Skip to content

Commit cab749c

Browse files
authored
Merge pull request #76 from sanjayankur31/feat-collab
feat: add instructions for Google collab
2 parents d69873b + c10b55c commit cab749c

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

notebooks/Python_HH_version/README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,36 @@ 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+
```
40+
from google.colab import output
41+
output.enable_custom_widget_manager()
42+
43+
from google.colab import drive
44+
drive.mount("/content/gdrive")
45+
46+
%cd /content/gdrive/MyDrive
47+
!ls
48+
!rm -rf hodgkin_huxley_tutorial # remove this line if you do not want to remove your existing copy to create a new one
49+
!git clone --depth 1 https://github.com/openworm/hodgkin_huxley_tutorial/
50+
%cd hodgkin_huxley_tutorial/
51+
!pip install -r requirements.txt
52+
%cd notebooks/Python_HH_version/
53+
```
54+
55+
56+
This does the following:
57+
58+
- asks you to allow Google Collab access your Google Drive when run for the first time: please allow all permissions
59+
- mounts your Google Drive
60+
- copies the GitHub repositoriy into it under the "hodgkin_huxley_tutorial" folder
61+
- installs the required Python packages

0 commit comments

Comments
 (0)