-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcollectSubmission_tensorflow.sh
executable file
·47 lines (38 loc) · 1.33 KB
/
collectSubmission_tensorflow.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
#NOTE: DO NOT EDIT THIS FILE-- MAY RESULT IN INCOMPLETE SUBMISSIONS
NOTEBOOKS="RNN_Captioning.ipynb
LSTM_Captioning.ipynb
NetworkVisualization-TensorFlow.ipynb
StyleTransfer-TensorFlow.ipynb
Generative_Adversarial_Networks_TF.ipynb"
CODE=cs231n/"classifiers/rnn.py
cs231n/rnn_layers.py"
REMOTE_DIR="cs231n-2019-assignment3"
ZIP_FILENAME="a3.zip"
FILES="${NOTEBOOKS} ${CODE}"
for FILE in ${FILES}
do
if [ ! -f ${FILE} ]; then
echo "Required file ${FILE} not found, Exiting."
exit 0
fi
done
if [ -d ${REMOTE_DIR} ]; then
rm -r ${REMOTE_DIR}
fi
echo "### Zipping file ###"
zip -r ${ZIP_FILENAME} . -x '*.ipynb_checkpoints*' -i '*.ipynb' '*.py' > assignment_zip.log
echo ""
mkdir -p ${REMOTE_DIR}
cp ${FILES} ${REMOTE_DIR}
mv ${ZIP_FILENAME} ${REMOTE_DIR}
echo "### Submitting to myth ###"
echo "Type in your Stanford student ID (alphanumeric, *not* the 8-digit ID):"
read -p "Student ID: " SUID
echo ""
echo "### Copying to ${SUID}@myth.stanford.edu:${REMOTE_DIR} ###"
echo "Note: if myth is under heavy use, this may hang: If this happens, rerun the script."
scp -r ${REMOTE_DIR} ${SUID}@myth.stanford.edu:~/
echo ""
echo "### Running remote submission script from ${SUID}@myth.stanford.edu:${REMOTE_DIR} ###"
ssh ${SUID}@myth.stanford.edu "cd ${REMOTE_DIR} && /afs/ir/class/cs231n/grading/submit_a3_tensorflow && exit"