<jupyter_start><jupyter_text>Load Revision<jupyter_code>f = open('revision.txt', 'r')
rev = f.read().split(',')
print(rev)
rev_num = rev[-1]
f.close<jupyter_output>['rev', '31']<jupyter_text>Save Revision<jupyter_code>f = open('revision.txt', 'w')
rev_new = f'rev,{int(rev_num)+1}'
f.write(rev_new)
f.close

f = open('revision.txt', 'r')
rev = f.read().split(',')
print('new:',rev)<jupyter_output>new: ['rev', '32']<jupyter_text>Git<jupyter_code>!git checkout
!ls
!git add 'Train_th-en_harryy.ipynb' 'Install_Library.ipynb' 'git_save.ipynb' 'revision.txt' 'Train_th-en_harryy_scb.ipynb' 'using_th-en_harryy.ipynb' 'Train_en-th_harryy.ipynb' 'train_en_th.py' 'train_th_en.py'
# git add all
!
!git config --global user.email "<EMAIL>"

comment_for_commit =''
comment_for_commit = 'Use 449999 data for training alignment-transformer th-en'

!git commit -m "rev_{rev_num}_{comment_for_commit}"

# %%bash
# git push https://$GIT_TOKEN@github.com/huak95/machine-translation.git
# %%bash
# !. ./git_push.sh

# !bash ./git_push.sh
%%bash
. ./git_push.sh
%%sh
cat git_push.sh 
!bash ./git_push.sh
!bash ./git_push.sh
import subprocess
!chmod u+x git_push.sh
subprocess.call(['./git_push.sh'], shell=True)
!cat revision.txt<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup