Skip to content

Commit

Permalink
Shut up repo2data
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuboudreau committed Oct 1, 2024
1 parent c9084e7 commit 785e683
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion figures/2 T1 mapping/figure_2-2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7031,8 +7031,22 @@
"from IPython.display import display, HTML\n",
"from plotly import tools\n",
"\n",
"from contextlib import contextmanager\n",
"import sys, os\n",
"\n",
"@contextmanager\n",
"def suppress_stdout():\n",
" with open(os.devnull, \"w\") as devnull:\n",
" old_stdout = sys.stdout\n",
" sys.stdout = devnull\n",
" try: \n",
" yield\n",
" finally:\n",
" sys.stdout = old_stdout\n",
"\n",
"data_req_path = os.path.join(\"..\",\"..\", \"binder\", \"data_requirement.json\")\n",
"repo2data = Repo2Data(data_req_path)\n",
"with suppress_stdout():\n",
" repo2data = Repo2Data(data_req_path)\n",
"DATA_ROOT = os.path.join(repo2data.install()[0],\"t1-book-neurolibre\")\n",
"\n",
"filename = os.path.join(DATA_ROOT,\"01\",'figure_2.pkl')\n",
Expand Down

0 comments on commit 785e683

Please sign in to comment.