Skip to content

Commit 8bf0117

Browse files
committed
feat: add instructions for Google collab
1 parent 8218c7e commit 8bf0117

1 file changed

Lines changed: 30 additions & 1 deletion

File tree

notebooks/Python_HH_version/README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,34 @@ This notebook was developed as part of [Google Summer of Code 2022 by Rahul Sonk
2626

2727
*Advantage: quick to start & run, no login required*
2828

29-
- The notebook can also be opened using [Binder](https://mybinder.org/). Click here to open the HH notebook: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openworm/hodgkin_huxley_tutorial/master?labpath=notebooks%2FPython_HH_version%2FPython_Notebook_HH.ipynb)
29+
- The notebook can also be opened using [Binder](https://mybinder.org/). Click here to open the HH notebook: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openworm/hodgkin_huxley_tutorial/master?labpath=notebooks%2FPython_HH_version%2FPython_Notebook_HH.ipynb)-
3030
- You should be able to run the interactive widget by click the double arrow (▶▶) in the JupyterLab toolbar at the top of the notebook.
31+
32+
### Option 3) Using Google Collab
33+
34+
*Advantage: can store your progress on your Google drive, but requires Google account and additional setup*
35+
36+
- The notebook can also be opened in [Google Collab](https://colab.research.google.com/github/openworm/hodgkin_huxley_tutorial/blob/master/notebooks/Python_HH_version/Python_Notebook_HH.ipynb), but you will need to add a new cell to the top of the notebook and paste the following to set it up to run properly:
37+
38+
39+
from google.colab import output
40+
output.enable_custom_widget_manager()
41+
42+
from google.colab import drive
43+
drive.mount("/content/gdrive")
44+
45+
%cd /content/gdrive/MyDrive
46+
!ls
47+
!rm -rf hodgkin_huxley_tutorial # remove this line if you do not want to remove your existing copy to create a new one
48+
!git clone --depth 1 https://github.com/openworm/hodgkin_huxley_tutorial/
49+
%cd hodgkin_huxley_tutorial/
50+
!pip install -r requirements.txt
51+
%cd notebooks/Python_HH_version/
52+
53+
54+
This does the following:
55+
56+
- asks you to allow Google Collab access your Google Drive when run for the first time: please allow all permissions
57+
- mounts your Google Drive
58+
- copies the GitHub repositoriy into it under the "hodgkin_huxley_tutorial" folder
59+
- installs the required Python packages

0 commit comments

Comments
 (0)