Skip to content

Commit

Permalink
tmux scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
kevingreenman committed Jun 6, 2023
1 parent bee7deb commit 7139381
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions download_tmux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# should be run from root directory of PatentChem repo

for ((i=2001; i<=2023; i++))
do
# Create a new tmux session
session_name="dl-$i"
tmux new-session -d -s "$session_name"

# Send the command to the session
tmux send-keys -t "$session_name" "conda activate patents; python download.py --years $i --data_dir /data/patents_data/ --no_uncompress" Enter
done
13 changes: 13 additions & 0 deletions utils/tar_years_tmux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# should be run from within patents data directory (directory containing folder for each year)

for ((i=2001; i<=2023; i++))
do
# Create a new tmux session
session_name="tar-$i"
tmux new-session -d -s "$session_name"

# Send the command to the session
tmux send-keys -t "$session_name" "tar -czf $i.tar.gz $i" Enter
done

0 comments on commit 7139381

Please sign in to comment.