From 129293ef65ca91c347c3df4ac97b8bc0bd220594 Mon Sep 17 00:00:00 2001 From: cded6f222a164a22601711b16e547edb Date: Thu, 26 Nov 2020 22:43:47 +0000 Subject: [PATCH] no commit message --- module2/exo1/toy_notebook_fr.ipynb | 40 +++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/module2/exo1/toy_notebook_fr.ipynb b/module2/exo1/toy_notebook_fr.ipynb index 0bbbe37..e44b303 100644 --- a/module2/exo1/toy_notebook_fr.ipynb +++ b/module2/exo1/toy_notebook_fr.ipynb @@ -1,5 +1,40 @@ { - "cells": [], + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "\n", + "__version__ = '0.3.0'\n", + "\n", + "\n", + "def _jupyter_nbextension_paths():\n", + " # src & dest are os paths, and so must use os.path.sep to work correctly on Windows.\n", + " # In contrast, require is a requirejs path, and thus must use `/` as the path separator.\n", + " return [dict(\n", + " section='notebook',\n", + " # src is relative to current module\n", + " src='jupytemplate',\n", + " # dest directory is in the `nbextensions/` namespace\n", + " dest='jupytemplate',\n", + " # require is also in the `nbextensions/` namespace\n", + " # must use / as path.sep\n", + " require='jupytemplate/main',\n", + " )]\n", + "\n", + "\n", + "def get_template_path():\n", + " \"\"\"\n", + " Get absolute path of template notebook.\n", + " :return: the path if the template notebook\n", + " \"\"\"\n", + " return os.path.abspath(os.path.join(os.path.dirname(__file__), 'jupytemplate', 'template.ipynb'))" + ] + } + ], "metadata": { "kernelspec": { "display_name": "Python 3", @@ -16,10 +51,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.3" + "version": "3.6.4" } }, "nbformat": 4, "nbformat_minor": 2 } - -- 2.18.1