Skip to content

Commit ed289f7

Browse files
committed
FIX add a pause to let time to ngrok to start
1 parent 9f8cdc2 commit ed289f7

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

tutorials/movies_3T/01_plot_explainable_variance.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
# To start an interactive 3D viewer in the browser, use the ``webshow``
224224
# function.
225225

226-
if True:
226+
if False:
227227
cortex.webshow(vertex, open_browser=False, port=8050)
228228

229229
###############################################################################
@@ -235,6 +235,7 @@
235235
if in_colab:
236236
from IPython import get_ipython
237237
get_ipython().system_raw('./ngrok http 8050 &')
238+
plt.pause(1)
238239

239240
command = """
240241
curl -s http://localhost:4040/api/tunnels | python3 -c \

tutorials/notebooks/movies_3T/01_plot_explainable_variance.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@
292292
},
293293
"outputs": [],
294294
"source": [
295-
"if True:\n cortex.webshow(vertex, open_browser=False, port=8050)"
295+
"if False:\n cortex.webshow(vertex, open_browser=False, port=8050)"
296296
]
297297
},
298298
{
@@ -310,7 +310,7 @@
310310
},
311311
"outputs": [],
312312
"source": [
313-
"if in_colab:\n from IPython import get_ipython\n get_ipython().system_raw('./ngrok http 8050 &')\n\n command = \"\"\"\n curl -s http://localhost:4040/api/tunnels | python3 -c \\\n \"import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])\"\n \"\"\"\n result = get_ipython().getoutput(command, split=True)\n print(\"Use the following address to connect to the brain viewer:\\n\"\n f\"{result}\\n\"\n \"and not the one proposed by pycortex ('Open viewer: ...')\\n\")"
313+
"if in_colab:\n from IPython import get_ipython\n get_ipython().system_raw('./ngrok http 8050 &')\n plt.pause(1)\n\n command = \"\"\"\n curl -s http://localhost:4040/api/tunnels | python3 -c \\\n \"import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])\"\n \"\"\"\n result = get_ipython().getoutput(command, split=True)\n print(\"Use the following address to connect to the brain viewer:\\n\"\n f\"{result}\\n\"\n \"and not the one proposed by pycortex ('Open viewer: ...')\\n\")"
314314
]
315315
},
316316
{

tutorials/notebooks/movies_3T/merged_for_colab.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@
608608
},
609609
"outputs": [],
610610
"source": [
611-
"if True:\n",
611+
"if False:\n",
612612
" cortex.webshow(vertex, open_browser=False, port=8050)"
613613
]
614614
},
@@ -634,6 +634,7 @@
634634
"if in_colab:\n",
635635
" from IPython import get_ipython\n",
636636
" get_ipython().system_raw('./ngrok http 8050 &')\n",
637+
" plt.pause(1)\n",
637638
"\n",
638639
" command = \"\"\"\n",
639640
" curl -s http://localhost:4040/api/tunnels | python3 -c \\\n",

0 commit comments

Comments
 (0)