Skip to content
Merged
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
34 changes: 34 additions & 0 deletions JupyterHub_Help.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,40 @@
"source": [
"Or, as a last ressort, remove the entire user site-packages directory by running `!rm -rf /home/jovyan/.local/lib/python3.*/site-packages/*` as a code cell (⚠️ be careful, there is no undo — deleted files are gone permanently)."
]
},
{
"cell_type": "markdown",
"id": "29",
"metadata": {},
"source": [
"### Workshop #3\n",
"\n",
"The following is a little script that will download example data files used in the SOLER workshop #3 to your JupyterHub. It will be used in case some of the data servers have connection problems."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "30",
"metadata": {},
"outputs": [],
"source": [
"import urllib.request\n",
"import zipfile\n",
"import io\n",
"import shutil\n",
"\n",
"url = \"https://github.com/jgieseler/workshop3_data/archive/refs/heads/main.zip\"\n",
"data_folder = \"/home/jovyan/data\"\n",
"\n",
"with urllib.request.urlopen(url) as response:\n",
" with zipfile.ZipFile(io.BytesIO(response.read())) as z:\n",
" z.extractall(data_folder)\n",
"\n",
"# GitHub adds a \"workshop3_data-main/\" subfolder, move contents up\n",
"shutil.copytree(f\"{data_folder}/workshop3_data-main/\", data_folder, dirs_exist_ok=True)\n",
"shutil.rmtree(f\"{data_folder}/workshop3_data-main/\")"
]
}
],
"metadata": {
Expand Down