-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript_get_exercise.sh
executable file
·63 lines (50 loc) · 1.74 KB
/
script_get_exercise.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
52
53
54
55
56
57
58
59
60
#for Jupyter-hub
#connect to admin2
#pwd gfellerlab
cd /home/jupyter-admin0
git clone https://github.com/GfellerLab/exercises_intro_bioinfo_clinique
cd exercises_intro_bioinfo_clinique
#### HOW TO install package.
## OPTION 1: For each user separately (manual installation)!!!
# open a jupyter notebook
# run:
#!sudo pip install pandas numpy scipy plotly scikit-survival scikit-learn umap h5py scikit-image matplotlib seaborn
# restart kernel
# log out and log in again
# added this line to Week1 jupyter-notebook
#
## OPTION 2:
# It seems related to this: https://github.com/pypa/pip/issues/11776
# WHAT I've done: mv EXTERNALLY_MANAGED EXTERNALLY_MANAGED_BKCP
####################################################################################################
#copy files to each user (include/exclude solutions)
cd /home
week="Week4"
include_solution=false
echo "Copying file $filename for $week"
for i in $(ls | grep u[00-300])
do
echo "$i, $week"
# Making directory
mkdir -p /home/$i/$week
if $include_solution; then
for filename in $(ls /home/jupyter-admin0/exercises_intro_bioinfo_clinique/$week/)
do
cp -r /home/jupyter-admin0/exercises_intro_bioinfo_clinique/$week/$filename /home/$i/$week/
done
else
for filename in $(ls /home/jupyter-admin0/exercises_intro_bioinfo_clinique/$week/ | grep -v solution)
do
cp -r /home/jupyter-admin0/exercises_intro_bioinfo_clinique/$week/$filename /home/$i/$week/
done
fi
sudo chmod 777 /home/$i/$week
done
####################################################################################################
#function to clean (remove ALL files)
#cd /home
#for i in `ls | grep u[00-300]`
#do
# echo $i
# rm -rf /home/$i/*
#done