Skip to content

Commit b7bee53

Browse files
committed
MNT update notebooks
1 parent 3312b9f commit b7bee53

12 files changed

Lines changed: 30 additions & 186 deletions

tutorials/notebooks/movies_3T/00_download_vim5.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
"name": "python",
101101
"nbconvert_exporter": "python",
102102
"pygments_lexer": "ipython3",
103-
"version": "3.8.3"
103+
"version": "3.7.3"
104104
}
105105
},
106106
"nbformat": 4,

tutorials/notebooks/movies_3T/00_load_colab.ipynb

Lines changed: 6 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"outputs": [],
2828
"source": [
29-
""
29+
"#"
3030
]
3131
},
3232
{
@@ -40,7 +40,7 @@
4040
"cell_type": "markdown",
4141
"metadata": {},
4242
"source": [
43-
"## Mount data with Google Drive\n\nFirst, open the following Google Drive link:\nhttps://drive.google.com/drive/folders/1NuxO5_GHgDvjrL2FX5ohzAsvWpZuepIA\n\nThen, click on the directory name (\"vim-5\"), and add a shortcut to your Drive\n(\"Add shortcut to Drive\"). Place the shortcut in the main directory of your\nGoogle Drive. Do not place it in another folder, or you will have to change \nthe code to update the location of the dataset.\n\nFinally, mount Google Drive in Google Colab. To do so, run the following cell,\nand follow the instructions from Google to copy/paste the authorization code.\n\n"
43+
"## Download the data and install all required dependencies\n\nUncomment and run the following cell to download the tutorial data and\ninstall the required dependencies\n\n"
4444
]
4545
},
4646
{
@@ -51,14 +51,14 @@
5151
},
5252
"outputs": [],
5353
"source": [
54-
"from google.colab import drive\ndrive.mount(\"/content/drive\")"
54+
"# !gdown --id 1b0I0Ytj06m6GCmfxfNrZuyF97fDo3NZb && \\\n# tar xzf vim-5-for-ccn.tar.gz && \\\n# pip install -q voxelwise_tutorials && \\\n# git clone https://github.com/gallantlab/pycortex"
5555
]
5656
},
5757
{
5858
"cell_type": "markdown",
5959
"metadata": {},
6060
"source": [
61-
"Uncomment and run the following command to check that Google Drive was\ncorrectly mounted.\n\n"
61+
"Now run the following cell to set up the environment variables for the tutorials\nand pycortex.\n\n"
6262
]
6363
},
6464
{
@@ -69,79 +69,7 @@
6969
},
7070
"outputs": [],
7171
"source": [
72-
"# !ls drive/MyDrive/vim-5"
73-
]
74-
},
75-
{
76-
"cell_type": "markdown",
77-
"metadata": {},
78-
"source": [
79-
"Tell the voxelwise_tutorials package where the data is. (If you placed the\nshortcut in a different location than the main directory of your Google\nDrive, change this code to point to the correct location.)\n\n"
80-
]
81-
},
82-
{
83-
"cell_type": "code",
84-
"execution_count": null,
85-
"metadata": {
86-
"collapsed": false
87-
},
88-
"outputs": [],
89-
"source": [
90-
"import os\nos.environ['VOXELWISE_TUTORIALS_DATA'] = \"drive/MyDrive/\""
91-
]
92-
},
93-
{
94-
"cell_type": "markdown",
95-
"metadata": {},
96-
"source": [
97-
"## Install package helper\n\nFinally, install the tutorial helper package, by uncommenting and running\nthe install command.\n\n"
98-
]
99-
},
100-
{
101-
"cell_type": "code",
102-
"execution_count": null,
103-
"metadata": {
104-
"collapsed": false
105-
},
106-
"outputs": [],
107-
"source": [
108-
"# !pip install voxelwise_tutorials"
109-
]
110-
},
111-
{
112-
"cell_type": "markdown",
113-
"metadata": {},
114-
"source": [
115-
"When using Colab, the install of pycortex might fail to locate the default\npycortex filestore. Uncomment and run the following line to fix it:\n\n"
116-
]
117-
},
118-
{
119-
"cell_type": "code",
120-
"execution_count": null,
121-
"metadata": {
122-
"collapsed": false
123-
},
124-
"outputs": [],
125-
"source": [
126-
"# !git clone https://github.com/gallantlab/pycortex"
127-
]
128-
},
129-
{
130-
"cell_type": "markdown",
131-
"metadata": {},
132-
"source": [
133-
"Now change the pycortex filestore path.\n\n"
134-
]
135-
},
136-
{
137-
"cell_type": "code",
138-
"execution_count": null,
139-
"metadata": {
140-
"collapsed": false
141-
},
142-
"outputs": [],
143-
"source": [
144-
"import cortex\nfilestore = \"/content/pycortex/filestore/\"\ncortex.options.config['basic']['filestore'] = filestore\ncortex.options.config['webgl']['colormaps'] = \"/content/pycortex/filestore/colormaps\"\ncortex.database.db = cortex.database.Database(filestore)\ncortex.db = cortex.database.db\ncortex.utils.db = cortex.database.db\ncortex.dataset.braindata.db = cortex.database.db"
72+
"import os\nos.environ['VOXELWISE_TUTORIALS_DATA'] = \"/content\"\n\nimport cortex\nfilestore = \"/content/pycortex/filestore/\"\ncortex.options.config['basic']['filestore'] = filestore\ncortex.options.config['webgl']['colormaps'] = \"/content/pycortex/filestore/colormaps\"\ncortex.database.db = cortex.database.Database(filestore)\ncortex.db = cortex.database.db\ncortex.utils.db = cortex.database.db\ncortex.dataset.braindata.db = cortex.database.db"
14573
]
14674
},
14775
{
@@ -168,7 +96,7 @@
16896
"name": "python",
16997
"nbconvert_exporter": "python",
17098
"pygments_lexer": "ipython3",
171-
"version": "3.8.3"
99+
"version": "3.7.3"
172100
}
173101
},
174102
"nbformat": 4,

tutorials/notebooks/movies_3T/01_plot_explainable_variance.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@
337337
"name": "python",
338338
"nbconvert_exporter": "python",
339339
"pygments_lexer": "ipython3",
340-
"version": "3.8.3"
340+
"version": "3.7.3"
341341
}
342342
},
343343
"nbformat": 4,

tutorials/notebooks/movies_3T/02_plot_wordnet_model.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@
664664
"name": "python",
665665
"nbconvert_exporter": "python",
666666
"pygments_lexer": "ipython3",
667-
"version": "3.8.3"
667+
"version": "3.7.3"
668668
}
669669
},
670670
"nbformat": 4,

tutorials/notebooks/movies_3T/03_plot_hemodynamic_response.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@
327327
"name": "python",
328328
"nbconvert_exporter": "python",
329329
"pygments_lexer": "ipython3",
330-
"version": "3.8.3"
330+
"version": "3.7.3"
331331
}
332332
},
333333
"nbformat": 4,

tutorials/notebooks/movies_3T/04_plot_motion_energy_model.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@
352352
"name": "python",
353353
"nbconvert_exporter": "python",
354354
"pygments_lexer": "ipython3",
355-
"version": "3.8.3"
355+
"version": "3.7.3"
356356
}
357357
},
358358
"nbformat": 4,

tutorials/notebooks/movies_3T/05_plot_banded_ridge_model.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@
503503
"name": "python",
504504
"nbconvert_exporter": "python",
505505
"pygments_lexer": "ipython3",
506-
"version": "3.8.3"
506+
"version": "3.7.3"
507507
}
508508
},
509509
"nbformat": 4,

tutorials/notebooks/movies_3T/06_extract_motion_energy.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
"name": "python",
137137
"nbconvert_exporter": "python",
138138
"pygments_lexer": "ipython3",
139-
"version": "3.8.3"
139+
"version": "3.7.3"
140140
}
141141
},
142142
"nbformat": 4,

tutorials/notebooks/movies_3T/merged_for_colab.ipynb

Lines changed: 14 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
"collapsed": false
3939
},
4040
"outputs": [],
41-
"source": []
41+
"source": [
42+
"#"
43+
]
4244
},
4345
{
4446
"cell_type": "markdown",
@@ -58,18 +60,10 @@
5860
"cell_type": "markdown",
5961
"metadata": {},
6062
"source": [
61-
"## Mount data with Google Drive\n",
62-
"\n",
63-
"First, open the following Google Drive link:\n",
64-
"https://drive.google.com/drive/folders/1NuxO5_GHgDvjrL2FX5ohzAsvWpZuepIA\n",
65-
"\n",
66-
"Then, click on the directory name (\"vim-5\"), and add a shortcut to your Drive\n",
67-
"(\"Add shortcut to Drive\"). Place the shortcut in the main directory of your\n",
68-
"Google Drive. Do not place it in another folder, or you will have to change \n",
69-
"the code to update the location of the dataset.\n",
63+
"## Download the data and install all required dependencies\n",
7064
"\n",
71-
"Finally, mount Google Drive in Google Colab. To do so, run the following cell,\n",
72-
"and follow the instructions from Google to copy/paste the authorization code.\n",
65+
"Uncomment and run the following cell to download the tutorial data and\n",
66+
"install the required dependencies\n",
7367
"\n"
7468
]
7569
},
@@ -81,37 +75,18 @@
8175
},
8276
"outputs": [],
8377
"source": [
84-
"from google.colab import drive\n",
85-
"drive.mount(\"/content/drive\")"
78+
"# !gdown --id 1b0I0Ytj06m6GCmfxfNrZuyF97fDo3NZb && \\\n",
79+
"# tar xzf vim-5-for-ccn.tar.gz && \\\n",
80+
"# pip install -q voxelwise_tutorials && \\\n",
81+
"# git clone https://github.com/gallantlab/pycortex"
8682
]
8783
},
8884
{
8985
"cell_type": "markdown",
9086
"metadata": {},
9187
"source": [
92-
"Uncomment and run the following command to check that Google Drive was\n",
93-
"correctly mounted.\n",
94-
"\n"
95-
]
96-
},
97-
{
98-
"cell_type": "code",
99-
"execution_count": null,
100-
"metadata": {
101-
"collapsed": false
102-
},
103-
"outputs": [],
104-
"source": [
105-
"# !ls drive/MyDrive/vim-5"
106-
]
107-
},
108-
{
109-
"cell_type": "markdown",
110-
"metadata": {},
111-
"source": [
112-
"Tell the voxelwise_tutorials package where the data is. (If you placed the\n",
113-
"shortcut in a different location than the main directory of your Google\n",
114-
"Drive, change this code to point to the correct location.)\n",
88+
"Now run the following cell to set up the environment variables for the tutorials\n",
89+
"and pycortex.\n",
11590
"\n"
11691
]
11792
},
@@ -124,67 +99,8 @@
12499
"outputs": [],
125100
"source": [
126101
"import os\n",
127-
"os.environ['VOXELWISE_TUTORIALS_DATA'] = \"drive/MyDrive/\""
128-
]
129-
},
130-
{
131-
"cell_type": "markdown",
132-
"metadata": {},
133-
"source": [
134-
"## Install package helper\n",
102+
"os.environ['VOXELWISE_TUTORIALS_DATA'] = \"/content\"\n",
135103
"\n",
136-
"Finally, install the tutorial helper package, by uncommenting and running\n",
137-
"the install command.\n",
138-
"\n"
139-
]
140-
},
141-
{
142-
"cell_type": "code",
143-
"execution_count": null,
144-
"metadata": {
145-
"collapsed": false
146-
},
147-
"outputs": [],
148-
"source": [
149-
"# !pip install voxelwise_tutorials"
150-
]
151-
},
152-
{
153-
"cell_type": "markdown",
154-
"metadata": {},
155-
"source": [
156-
"When using Colab, the install of pycortex might fail to locate the default\n",
157-
"pycortex filestore. Uncomment and run the following line to fix it:\n",
158-
"\n"
159-
]
160-
},
161-
{
162-
"cell_type": "code",
163-
"execution_count": null,
164-
"metadata": {
165-
"collapsed": false
166-
},
167-
"outputs": [],
168-
"source": [
169-
"# !git clone https://github.com/gallantlab/pycortex"
170-
]
171-
},
172-
{
173-
"cell_type": "markdown",
174-
"metadata": {},
175-
"source": [
176-
"Now change the pycortex filestore path.\n",
177-
"\n"
178-
]
179-
},
180-
{
181-
"cell_type": "code",
182-
"execution_count": null,
183-
"metadata": {
184-
"collapsed": false
185-
},
186-
"outputs": [],
187-
"source": [
188104
"import cortex\n",
189105
"filestore = \"/content/pycortex/filestore/\"\n",
190106
"cortex.options.config['basic']['filestore'] = filestore\n",
@@ -3520,7 +3436,7 @@
35203436
"name": "python",
35213437
"nbconvert_exporter": "python",
35223438
"pygments_lexer": "ipython3",
3523-
"version": "3.8.3"
3439+
"version": "3.7.3"
35243440
},
35253441
"name": "_merged"
35263442
},

tutorials/notebooks/movies_4T/00_download_vim2.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
"name": "python",
101101
"nbconvert_exporter": "python",
102102
"pygments_lexer": "ipython3",
103-
"version": "3.8.3"
103+
"version": "3.7.3"
104104
}
105105
},
106106
"nbformat": 4,

0 commit comments

Comments
 (0)