diff options
| author | martial.simon <martial.simon@epita.fr> | 2025-04-13 19:54:19 +0200 |
|---|---|---|
| committer | martial.simon <martial.simon@epita.fr> | 2025-04-13 19:54:19 +0200 |
| commit | 66c3bbfa94d8a41e58adf154be25e6d86fee8e30 (patch) | |
| tree | 9c5e998f324f2f60c1717759144da3f996c5ae1a /PVCM/cama/.jupyter | |
init: initial commit
Diffstat (limited to 'PVCM/cama/.jupyter')
| -rw-r--r-- | PVCM/cama/.jupyter/custom/custom.css | 74 | ||||
| -rw-r--r-- | PVCM/cama/.jupyter/custom/custom.js | 44 | ||||
| -rw-r--r-- | PVCM/cama/.jupyter/jupyter_lab_config.py | 3 | ||||
| -rw-r--r-- | PVCM/cama/.jupyter/jupyter_notebook_config.py | 3 | ||||
| -rw-r--r-- | PVCM/cama/.jupyter/lab/workspaces/auto-d-8a94.jupyterlab-workspace | 1 | ||||
| -rw-r--r-- | PVCM/cama/.jupyter/labconfig/page_config.json | 3 | ||||
| -rw-r--r-- | PVCM/cama/.jupyter/migrated | 1 |
7 files changed, 129 insertions, 0 deletions
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 @@ +<style> + @font-face { + font-family: "Computer Modern"; + src: url('http://9dbb143991406a7c655e-aa5fcb0a5a4ec34cff238a2d56ca4144.r56.cf5.rackcdn.com/cmunss.otf'); + } + @font-face { + font-family: "Computer Modern"; + font-weight: bold; + src: url('http://9dbb143991406a7c655e-aa5fcb0a5a4ec34cff238a2d56ca4144.r56.cf5.rackcdn.com/cmunsx.otf'); + } + @font-face { + font-family: "Computer Modern"; + font-style: oblique; + src: url('http://9dbb143991406a7c655e-aa5fcb0a5a4ec34cff238a2d56ca4144.r56.cf5.rackcdn.com/cmunsi.otf'); + } + @font-face { + font-family: "Computer Modern"; + font-weight: bold; + font-style: oblique; + src: url('http://9dbb143991406a7c655e-aa5fcb0a5a4ec34cff238a2d56ca4144.r56.cf5.rackcdn.com/cmunso.otf'); + } + div.cell{ + width:90%; + margin-left:5% !important; + margin-right:auto; + } + div.rendered_html code { + font-family: monospace, monospace; + font-size: 90%; + padding-top: 1px; + padding-left: 2px; + color: #803030; + } + div.text_cell_render{ + font-family: Computer Modern, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; + line-height: 110%; + font-size: 110%; + margin-left:0%; + margin-right:auto; + } + .container { width:95% !important; } + .warning{ + color: rgb( 240, 20, 20 ) + } + .rendered_html ol {list-style:decimal; margin: 1em 2em;} + + .rendered_html tr, .rendered_html th, .rendered_html td { + text-align: center; + } + .rendered_html :first-child { + text-align: left; + } + .rendered_html :last-child { + text-align: left; + } + .nav > li > .clusters_tab_link { + display:none; + } +</style> +<script> + MathJax.Hub.Config({ + TeX: { + extensions: ["AMSmath.js"] + }, + tex2jax: { + inlineMath: [ ['$','$'], ["\\(","\\)"] ], + displayMath: [ ['$$','$$'], ["\\[","\\]"] ] + }, + displayAlign: 'center', // Change this to 'center' to center equations. + "HTML-CSS": { + styles: {'.MathJax_Display': {"margin": 4}} + } + }); +</script> 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 += "<br/><center>" + text += f'<a href="{url1}">{url1[url1.rfind("/")+1:-6]}</a>' +# text += f' ← <a href="{section}" style="text-decoration:none"> △ </a> → ' + text += f' ← <a href="{toc}" style="text-decoration:none"> △ </a> → ' + text += f'<a href="{url2}">{url2[url2.rfind("/")+1:-6]}</a>' + text += '</center><br/>' + 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 |
