From 66c3bbfa94d8a41e58adf154be25e6d86fee8e30 Mon Sep 17 00:00:00 2001 From: "martial.simon" Date: Sun, 13 Apr 2025 19:54:19 +0200 Subject: init: initial commit --- PVCM/cama/.jupyter/custom/custom.css | 74 ++++++++++++++++++++++ PVCM/cama/.jupyter/custom/custom.js | 44 +++++++++++++ PVCM/cama/.jupyter/jupyter_lab_config.py | 3 + PVCM/cama/.jupyter/jupyter_notebook_config.py | 3 + .../workspaces/auto-d-8a94.jupyterlab-workspace | 1 + PVCM/cama/.jupyter/labconfig/page_config.json | 3 + PVCM/cama/.jupyter/migrated | 1 + 7 files changed, 129 insertions(+) create mode 100644 PVCM/cama/.jupyter/custom/custom.css create mode 100644 PVCM/cama/.jupyter/custom/custom.js create mode 100644 PVCM/cama/.jupyter/jupyter_lab_config.py create mode 100644 PVCM/cama/.jupyter/jupyter_notebook_config.py create mode 100644 PVCM/cama/.jupyter/lab/workspaces/auto-d-8a94.jupyterlab-workspace create mode 100644 PVCM/cama/.jupyter/labconfig/page_config.json create mode 100644 PVCM/cama/.jupyter/migrated (limited to 'PVCM/cama/.jupyter') diff --git a/PVCM/cama/.jupyter/custom/custom.css b/PVCM/cama/.jupyter/custom/custom.css new file mode 100644 index 0000000..6034bbd --- /dev/null +++ b/PVCM/cama/.jupyter/custom/custom.css @@ -0,0 +1,74 @@ + + diff --git a/PVCM/cama/.jupyter/custom/custom.js b/PVCM/cama/.jupyter/custom/custom.js new file mode 100644 index 0000000..4b280ad --- /dev/null +++ b/PVCM/cama/.jupyter/custom/custom.js @@ -0,0 +1,44 @@ +import json +import os +import re +import ipykernel +import requests +from notebook.notebookapp import list_running_servers +from urllib.parse import urljoin +from IPython.display import display, Markdown + +def get_notebook_path(): + """ + Return the full path of the jupyter notebook. + """ + session = requests.Session() + session.trust_env = False + kernel_id = re.search('kernel-(.*).json', + ipykernel.connect.get_connection_file()).group(1) + servers = list_running_servers() + if + for ss in servers: + response = session.get(f"{ss['url']}api/sessions", + params={'token': ss['token']}) + for nn in json.loads(response.text): + if nn['kernel']['id'] == kernel_id: + try: + return os.envion['HOME_URL'] + 'notebooks/' + nn['notebook']['path'] + except: + return ss['url'] + 'notebooks/' + nn['notebook']['path'] + +def PreviousNext(url1, url2): + section = get_notebook_path() + section = section.replace('notebooks','tree') + section = section[:section.rfind('/')] + toc = "http://python3.mooc.lrde.epita.fr/notebooks/Table%20des%20mati%C3%A8res.ipynb" + text = 200 * "  " + text += "
" + text += f'{url1[url1.rfind("/")+1:-6]}' +# text += f'  ← →  ' + text += f'  ← →  ' + text += f'{url2[url2.rfind("/")+1:-6]}' + text += '

' + text += ' ' + return text + diff --git a/PVCM/cama/.jupyter/jupyter_lab_config.py b/PVCM/cama/.jupyter/jupyter_lab_config.py new file mode 100644 index 0000000..f846fdf --- /dev/null +++ b/PVCM/cama/.jupyter/jupyter_lab_config.py @@ -0,0 +1,3 @@ +c = get_config() #noqa +c.ServerApp.token = "" +c.ServerApp.password = "" diff --git a/PVCM/cama/.jupyter/jupyter_notebook_config.py b/PVCM/cama/.jupyter/jupyter_notebook_config.py new file mode 100644 index 0000000..993ec12 --- /dev/null +++ b/PVCM/cama/.jupyter/jupyter_notebook_config.py @@ -0,0 +1,3 @@ +c = get_config() +c.NotebookApp.token = '' +c.NotebookApp.password = '' diff --git a/PVCM/cama/.jupyter/lab/workspaces/auto-d-8a94.jupyterlab-workspace b/PVCM/cama/.jupyter/lab/workspaces/auto-d-8a94.jupyterlab-workspace new file mode 100644 index 0000000..764992d --- /dev/null +++ b/PVCM/cama/.jupyter/lab/workspaces/auto-d-8a94.jupyterlab-workspace @@ -0,0 +1 @@ +{"data":{"layout-restorer:data":{"main":{"dock":{"type":"tab-area","currentIndex":0,"widgets":[]}},"down":{"size":0,"widgets":[]},"left":{"collapsed":false,"visible":true,"current":"filebrowser","widgets":["filebrowser","running-sessions","@jupyterlab/toc:plugin","extensionmanager.main-view"],"widgetStates":{"jp-running-sessions":{"sizes":[0.25,0.25,0.25,0.25],"expansionStates":[false,false,false,false]},"extensionmanager.main-view":{"sizes":[0.3333333333333333,0.3333333333333333,0.3333333333333333],"expansionStates":[false,false,false]}}},"right":{"collapsed":true,"visible":true,"widgets":["jp-property-inspector","debugger-sidebar"],"widgetStates":{"jp-debugger-sidebar":{"sizes":[0.2,0.2,0.2,0.2,0.2],"expansionStates":[false,false,false,false,false]}}},"relativeSizes":[0.09334586746090842,0.9066541325390917,0],"top":{"simpleVisibility":true}}},"metadata":{"id":"auto-d"}} \ No newline at end of file diff --git a/PVCM/cama/.jupyter/labconfig/page_config.json b/PVCM/cama/.jupyter/labconfig/page_config.json new file mode 100644 index 0000000..1703a8a --- /dev/null +++ b/PVCM/cama/.jupyter/labconfig/page_config.json @@ -0,0 +1,3 @@ +{ + "lockedExtensions": {} +} \ No newline at end of file diff --git a/PVCM/cama/.jupyter/migrated b/PVCM/cama/.jupyter/migrated new file mode 100644 index 0000000..bfbcba1 --- /dev/null +++ b/PVCM/cama/.jupyter/migrated @@ -0,0 +1 @@ +2024-02-28T14:34:18.590584+00:00 \ No newline at end of file -- cgit v1.2.3