Skip to content

Commit

Permalink
adapted basic tutorial to Colab
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosVaquero committed Oct 14, 2024
1 parent 8d5f5b0 commit cdd2ee6
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/source/Tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,33 @@
"4. We print the size of the DataFrame."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "926bc78a",
"metadata": {},
"outputs": [],
"source": [
"try:\n",
" import google.colab\n",
" IN_COLAB = True\n",
"except:\n",
" IN_COLAB = False\n",
"\n",
"# Check if in colab\n",
"if IN_COLAB:\n",
" print('in colab')\n",
" import urllib.request\n",
" # Replace with the raw URL of the YAML file on GitHub\n",
" github_url = \"https://raw.githubusercontent.com/DIDONEproject/musif/main/config_postprocess_example.yml\" \n",
" # Replace with the desired local file name\n",
" local_file_name = \"config_postprocess_example.yml\" \n",
" urllib.request.urlretrieve(github_url, local_file_name)\n",
" print(f\"File downloaded to: {local_file_name}\")\n",
"else:\n",
" local_file_name = \"../../config_postprocess_example.yml\" \n"
]
},
{
"cell_type": "code",
"execution_count": 11,
Expand Down

0 comments on commit cdd2ee6

Please sign in to comment.