Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a0b41cad8e | |||
| b62981a338 | |||
| 553748fdcd | |||
| 5956d9d200 | |||
| 88308ea13e | |||
| 74783ab064 | |||
| c1a4e7b292 |
+1
-1
@@ -1 +1 @@
|
||||
0.7.5
|
||||
0.7.7
|
||||
|
||||
@@ -110,5 +110,5 @@ slice_size=500 # 10K symbols parallel cannot handle
|
||||
for ((ii=0; ii <${#Instruments[@]}; ii+=slice_size)); do
|
||||
InstSlice=("${Instruments[@]:ii:slice_size}")
|
||||
|
||||
echo parallel -j ${NumJobs} run_proc {} ${Start} ${End} ::: "${InstSlice[@]}"
|
||||
parallel -j ${NumJobs} run_proc {} ${Start} ${End} ::: "${InstSlice[@]}"
|
||||
done
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# ---------------- Settings
|
||||
declare -A git_repo_arr
|
||||
|
||||
git_repo_arr[cvttpy]=git@cloud21.cvtt.vpn:/opt/store/git/cvttpy.git
|
||||
git_repo_arr[ops]=git@cloud21.cvtt.vpn:/opt/store/git/ops.git
|
||||
git_repo_arr[research]=git@cloud21.cvtt.vpn:/opt/store/git/research.git
|
||||
|
||||
default_project=cvttpy
|
||||
default_branch=master
|
||||
|
||||
Executable
+57
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
date=${1}
|
||||
if [ "${date}" == "" ] ; then
|
||||
date="yesterday"
|
||||
fi
|
||||
|
||||
SourceHost=cryptoval3.cvtt.vpn
|
||||
SourceUser=cvtt
|
||||
SourceRootDir=/localdisk/cvtt/archive/md_archive
|
||||
SourceFile=$(date -d ${date} "+%Y%m%d.mktdata.db")
|
||||
SourceFileZip="${SourceFile}.gz"
|
||||
SourceFilePath=$(date -d ${date} "+${SourceRootDir}/%Y/%m/${SourceFileZip}")
|
||||
|
||||
TargetDir="/opt/jupyter_gpu/data/crypto_md"
|
||||
TargetFile=$(date -d ${date} "+%Y%m%d.mktdata.ohlcv.db")
|
||||
TargetFilePath="${TargetDir}/${TargetFile}"
|
||||
|
||||
echo ${SourceFile}
|
||||
tmp_dir=$(mktemp -d)
|
||||
|
||||
function cleanup {
|
||||
cd ${HOME}
|
||||
rm -rf ${tmp_dir}
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
function download_file {
|
||||
|
||||
Cmd="rsync"
|
||||
Cmd="${Cmd} -ahv"
|
||||
if tty -s; then
|
||||
Cmd="${Cmd} --progress=info2"
|
||||
fi
|
||||
Cmd="${Cmd} ${SourceUser}@${SourceHost}:${SourceFilePath} ${tmp_dir}/"
|
||||
echo ${Cmd}
|
||||
eval ${Cmd}
|
||||
ls -lh ${tmp_dir}
|
||||
Cmd="gunzip ${tmp_dir}/${SourceFileZip}"
|
||||
echo ${Cmd} && eval ${Cmd}
|
||||
ls -lh ${tmp_dir}
|
||||
|
||||
rm -f ${TargetFilePath}
|
||||
touch ${TargetFilePath}
|
||||
|
||||
for table in bnbfut_ohlcv_1min bnbspot_ohlcv_1min coinbase_ohlcv_1min
|
||||
do
|
||||
Cmd="sqlite3 ${tmp_dir}/${SourceFile} \".dump ${table}\" | sqlite3 ${TargetFilePath}"
|
||||
echo ${Cmd}
|
||||
eval ${Cmd}
|
||||
done
|
||||
chmod 600 ${TargetFilePath}
|
||||
ls -lh ${TargetFilePath}
|
||||
|
||||
|
||||
}
|
||||
download_file
|
||||
Reference in New Issue
Block a user