-
Notifications
You must be signed in to change notification settings - Fork 0
/
collectSubmission.sh
51 lines (42 loc) · 1.09 KB
/
collectSubmission.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
48
49
50
51
#!/bin/bash
#NOTE: DO NOT EDIT THIS FILE-- MAY RESULT IN INCOMPLETE SUBMISSIONS
set -euo pipefail
CODE=(
"cs231n/classifiers/k_nearest_neighbor.py"
"cs231n/classifiers/linear_classifier.py"
"cs231n/classifiers/linear_svm.py"
"cs231n/classifiers/softmax.py"
"cs231n/optim.py"
"cs231n/solver.py"
)
# these notebooks should ideally
# be in order of questions so
# that the generated pdf is
# in order of questions
NOTEBOOKS=(
"knn.ipynb"
"svm.ipynb"
"softmax.ipynb"
"features.ipynb"
)
FILES=( "${CODE[@]}" "${NOTEBOOKS[@]}" )
LOCAL_DIR=`pwd`
ASSIGNMENT_NO=1
ZIP_FILENAME="a1.zip"
C_R="\e[31m"
C_G="\e[32m"
C_BLD="\e[1m"
C_E="\e[0m"
for FILE in "${FILES[@]}"
do
if [ ! -f ${FILE} ]; then
echo -e "${C_R}Required file ${FILE} not found, Exiting.${C_E}"
exit 0
fi
done
echo -e "### Zipping file ###"
rm -f ${ZIP_FILENAME}
zip -q "${ZIP_FILENAME}" -r ${NOTEBOOKS[@]} $(find . -name "*.py") -x "makepdf.py"
echo -e "### Creating PDFs ###"
python makepdf.py --notebooks "${NOTEBOOKS[@]}"
echo -e "### Done! Please change the name of a1.zip to A1_YourRollNo.zip and the pdfs name to A1_YourRollNo.pdf###"