Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.gitattributes
__pycache__
*.swp
*.ziggy
2 changes: 1 addition & 1 deletion modules/module1/InClass/Index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.2"
"version": "3.7.3"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
Expand Down
16 changes: 9 additions & 7 deletions modules/module1/InClass/environment_variables.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"outputs": [],
"source": [
"%%bash\n",
"\n",
"echo $HOME\n",
"echo $PATH"
]
Expand Down Expand Up @@ -239,10 +240,10 @@
"outputs": [],
"source": [
"%%bash\n",
"rm -r /home/jovyan/bin\n",
"mkdir /home/jovyan/bin\n",
"cp ./ls /home/jovyan/bin/.\n",
"chmod +x /home/jovyan/bin/ls"
"rm -r /home/mdsung/bin\n",
"mkdir /home/mdsung/bin\n",
"cp ./ls /home/mdsung/bin/.\n",
"chmod +x /home/mdsung/bin/ls"
]
},
{
Expand All @@ -252,7 +253,8 @@
"outputs": [],
"source": [
"%%bash\n",
"/home/jovyan/bin/ls"
"pwd\n",
"/home/mdsung/bin/ls"
]
},
{
Expand Down Expand Up @@ -295,7 +297,7 @@
"echo $PATH\n",
"export PATH=$PATH:/home/jovyan/bin\n",
"which ls\n",
"ls /home/jovyan/DATA/Misc\n"
"ls /home/mdsung/DATA/Misc\n"
]
},
{
Expand Down Expand Up @@ -325,7 +327,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
"version": "3.7.3"
}
},
"nbformat": 4,
Expand Down
69 changes: 38 additions & 31 deletions modules/module1/InClass/finding_files.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,6 @@
"If I do not provide any expressions, all files under the specified print will be found."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%bash\n",
"\n",
"find . "
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -128,7 +117,7 @@
"outputs": [],
"source": [
"%%bash\n",
"find /home/jovyan -name 'README'"
"find /home/mdsung -name 'README'"
]
},
{
Expand Down Expand Up @@ -172,7 +161,7 @@
"outputs": [],
"source": [
"%%bash\n",
"find /home/jovyan/work/decart_bootcamp_part1 -name '*.ipynb'\n"
"find /home/mdsung/2019_linux_bootcamp -name '*.ipynb'\n"
]
},
{
Expand All @@ -190,7 +179,7 @@
"source": [
"## Exercise\n",
"\n",
"In the /home/jovyan/DATA directory there are [WAVE files](https://en.wikipedia.org/wiki/WAV) (.wav) that are recordings of various heart anomalies. There are two types of Mitral valve problems: mitral stenosis (ms) and mitral regurgitation (mr). Use find with wildcards to find all the \"ms\" and \"mr\" WAVE files. Make sure that you do not match other files, for example pulmonary stenosis (ps). How many mitral WAVE files are there? How many WAVE files are there?"
"In the /home/mdsung/DATA directory there are [WAVE files](https://en.wikipedia.org/wiki/WAV) (.wav) that are recordings of various heart anomalies. There are two types of Mitral valve problems: mitral stenosis (ms) and mitral regurgitation (mr). Use find with wildcards to find all the \"ms\" and \"mr\" WAVE files. Make sure that you do not match other files, for example pulmonary stenosis (ps). How many mitral WAVE files are there? How many WAVE files are there?"
]
},
{
Expand All @@ -199,7 +188,8 @@
"metadata": {},
"outputs": [],
"source": [
"%%bash\n"
"%%bash\n",
"find /home/mdsung/DATA -name '*ms*.*'"
]
},
{
Expand All @@ -208,7 +198,8 @@
"metadata": {},
"outputs": [],
"source": [
"mitral_files()"
"%%bash\n",
"find /home/mdsung/DATA -name '*mr*.*'"
]
},
{
Expand All @@ -217,7 +208,16 @@
"metadata": {},
"outputs": [],
"source": [
"wave_files()"
"mitral_files(2)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"wave_files(11)"
]
},
{
Expand Down Expand Up @@ -258,7 +258,8 @@
"metadata": {},
"outputs": [],
"source": [
"%%bash"
"%%bash\n",
"find ~/DATA -size 10000 -name '*.txt'"
]
},
{
Expand All @@ -267,7 +268,7 @@
"metadata": {},
"outputs": [],
"source": [
"find_10k_files()"
"find_10k_files(66)"
]
},
{
Expand Down Expand Up @@ -317,7 +318,7 @@
"outputs": [],
"source": [
"%%bash\n",
"grep chapel /home/jovyan/DATA/Misc/obits.txt"
"grep chapel /home/mdsung/DATA/Misc/obits.txt"
]
},
{
Expand All @@ -334,7 +335,7 @@
"outputs": [],
"source": [
"%%bash\n",
"grep -i chapel /home/jovyan/DATA/Misc/obits.txt"
"grep -i chapel /home/mdsung/DATA/Misc/obits.txt"
]
},
{
Expand All @@ -351,7 +352,7 @@
"outputs": [],
"source": [
"%%bash\n",
"grep -i -c chapel /home/jovyan/DATA/Misc/obits.txt"
"grep -i -c chapel /home/mdsung/DATA/Misc/obits.txt"
]
},
{
Expand All @@ -368,7 +369,7 @@
"outputs": [],
"source": [
"%%bash\n",
"grep -i -c -r chapel /home/jovyan/DATA/Misc"
"grep -i -c -r chapel /home/mdsung/DATA/Misc"
]
},
{
Expand All @@ -385,7 +386,7 @@
"outputs": [],
"source": [
"%%bash\n",
"grep -i -l -r chapel /home/jovyan/DATA/Misc"
"grep -i -l -r chapel /home/mdsung/DATA/Misc"
]
},
{
Expand All @@ -402,8 +403,8 @@
"outputs": [],
"source": [
"%%bash\n",
"grep -i chapel /home/jovyan/DATA/Misc/obits.txt \\\n",
"/home/jovyan/DATA/Misc/icd9-short.txt"
"grep -i chapel /home/mdsung/DATA/Misc/obits.txt \\\n",
"/home/mdsung/DATA/Misc/icd9-short.txt"
]
},
{
Expand All @@ -413,7 +414,7 @@
"outputs": [],
"source": [
"%%bash\n",
"grep -i chapel /home/jovyan/DATA/Misc/*.txt"
"grep -i chapel /home/mdsung/DATA/Misc/*.txt"
]
},
{
Expand All @@ -434,7 +435,7 @@
"outputs": [],
"source": [
"%%bash\n",
"grep '7.-year-old' /home/jovyan/DATA/Misc/*.txt"
"grep '7.-year-old' /home/mdsung/DATA/Misc/*.txt"
]
},
{
Expand All @@ -458,15 +459,21 @@
"metadata": {},
"outputs": [],
"source": [
"bp_hr_ge200()"
"cd /home/mdsung/DATA/Numerics/mimic2/hr/subjects\n",
"grep -lrP \"\\b(?<!\\.)[23]\\d{2,2}\\b\" . > ~/hr200.txt ##\\b : word boundary \n",
"cd /home/mdsung/DATA/Numerics/mimic2/bp/subjects\n",
"grep -lrP \"\\b(?<!\\.)[23]\\d{2,2}\\b\" . > ~/bp200.txt\n",
"grep -Fx -f ~/bp200.txt ~/hr200.txt"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
"source": [
"bp_hr_ge200()"
]
}
],
"metadata": {
Expand All @@ -485,7 +492,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.7.3"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion modules/module1/InClass/introducing_shells.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.2"
"version": "3.7.3"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
Expand Down
Loading