summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Lan <lanhui@zjnu.edu.cn>2020-02-06 17:37:57 +0800
committerHui Lan <lanhui@zjnu.edu.cn>2020-02-06 17:37:57 +0800
commit97db795240795d947241ff30a8beafbd3aca93b8 (patch)
tree00d8de082d7c54f1554aa50c0204e6466f6f10d0
parenta93b28f0e147ae51c06254132c22e7460ad3d70a (diff)
backup_files.py: fix misspelling
-rw-r--r--Code/backup_files.py2
-rw-r--r--Code/crontab.txt7
-rwxr-xr-xCode/update_network.py12
3 files changed, 14 insertions, 7 deletions
diff --git a/Code/backup_files.py b/Code/backup_files.py
index 39a0d30..c7ee4f4 100644
--- a/Code/backup_files.py
+++ b/Code/backup_files.py
@@ -38,7 +38,7 @@ def disk_has_enough_space():
def copy_and_backup_file(src_file, dest_dir):
- disk_has_enough_space() # make sure we have enough space firs.t
+ disk_has_enough_space() # make sure we have enough space first
if not os.path.exists(src_file):
sys.exit()
make_paths(dest_dir) # if dest_dir does not exist, create it.
diff --git a/Code/crontab.txt b/Code/crontab.txt
new file mode 100644
index 0000000..aaabac5
--- /dev/null
+++ b/Code/crontab.txt
@@ -0,0 +1,7 @@
+1 13 * * * cd /home/lanhui/brain/Code && flock -n /tmp/brain.lockfile ./update_network.py
+1 7 * * * cd /home/lanhui/brain/Code && python3 update_network_by_force.py
+1 4 * * * cd /home/lanhui/brain/Code && python3 download_and_map.py
+
+15 6,18 * * * sudo lsof /home/lanhui/brain/Data/temp/edges.txt || sudo cp /home/lanhui/brain/Data/temp/edges.txt /var/www/brain/brain/static/edges/edges.txt
+20 6,18 * * * sudo lsof /home/lanhui/brain/Data/temp/html_edges/edges.sqlite || sudo cp /home/lanhui/brain/Data/temp/html_edges/edges.sqlite /var/www/brain/brain/static/edges
+
diff --git a/Code/update_network.py b/Code/update_network.py
index 672dc1e..3feae6c 100755
--- a/Code/update_network.py
+++ b/Code/update_network.py
@@ -500,22 +500,22 @@ def create_edges0():
# The following commands are optional. For example, if a user wants to run it locally, he don't have to provide these TPM tables.
if os.path.exists(PARAMETER_FOR_NET_TRAVADB_STRESS):
- write_log_file('[update_network.py] Create simple edges.txt using create_edges0.py with %s' % (PARAMETER_FOR_NET_TRAVADB_STRESS), UPDATE_NETWORK_LOG_FILE)
+ #write_log_file('[update_network.py] Create simple edges.txt using create_edges0.py with %s' % (PARAMETER_FOR_NET_TRAVADB_STRESS), UPDATE_NETWORK_LOG_FILE)
cmd = 'python3 create_edges0.py %s' % (PARAMETER_FOR_NET_TRAVADB_STRESS)
#os.system(cmd)
if os.path.exists(PARAMETER_FOR_NET_TRAVADB_MAP):
- write_log_file('[update_network.py] Create simple edges.txt using create_edges0.py with %s' % (PARAMETER_FOR_NET_TRAVADB_MAP), UPDATE_NETWORK_LOG_FILE)
+ #write_log_file('[update_network.py] Create simple edges.txt using create_edges0.py with %s' % (PARAMETER_FOR_NET_TRAVADB_MAP), UPDATE_NETWORK_LOG_FILE)
cmd = 'python3 create_edges0.py %s' % (PARAMETER_FOR_NET_TRAVADB_MAP)
#os.system(cmd)
if os.path.exists(PARAMETER_FOR_NET_MILD_DROUGHT):
- write_log_file('[update_network.py] Create simple edges.txt using create_edges0.py with %s' % (PARAMETER_FOR_NET_MILD_DROUGHT), UPDATE_NETWORK_LOG_FILE)
+ #write_log_file('[update_network.py] Create simple edges.txt using create_edges0.py with %s' % (PARAMETER_FOR_NET_MILD_DROUGHT), UPDATE_NETWORK_LOG_FILE)
cmd = 'python3 create_edges0.py %s' % (PARAMETER_FOR_NET_MILD_DROUGHT)
#os.system(cmd)
if os.path.exists(PARAMETER_FOR_NET_WIGGELAB_DIURNAL):
- write_log_file('[update_network.py] Create simple edges.txt using create_edges0.py with %s' % (PARAMETER_FOR_NET_WIGGELAB_DIURNAL), UPDATE_NETWORK_LOG_FILE)
+ #write_log_file('[update_network.py] Create simple edges.txt using create_edges0.py with %s' % (PARAMETER_FOR_NET_WIGGELAB_DIURNAL), UPDATE_NETWORK_LOG_FILE)
cmd = 'python3 create_edges0.py %s' % (PARAMETER_FOR_NET_WIGGELAB_DIURNAL)
#os.system(cmd)
@@ -825,10 +825,10 @@ if 'TPM.txt' in updated_file_list: # we could touch TPM.txt to make it recent.
record_file_time(FILE_LIST_TO_CHECK, FILE_TIMESTAMP)
create_edges0()
create_edges0B()
- wedge()
+ wedge()
correlation_per_group()
correlation_per_group_fixed_number()
- #correlation_mixtools(2)
+ correlation_mixtools(2)
#correlation_mixtools(3)