Skip to content

Commit a56dd45

Browse files
Fix SSPCloud links (#270)
* Update utils.py * Update index.qmd * Automated changes * Automated changes * Automated changes * Automated changes * retour aux args default * Automated changes * Automated changes Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent fd439f0 commit a56dd45

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

content/course/manipulation/01_numpy/index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ la [cheatsheet numpy](https://www.datacamp.com/community/blog/python-numpy-cheat
4545
sur une fonction.
4646

4747
Dans ce chapitre, on ne dérogera pas à la convention qui s'est imposée
48-
d'importer `numpy` de la
48+
d'importer `numpy` sous le nom `np`. Cela se fait de la
4949
manière suivante:
5050

5151
```{python import np}

sspcloud/init-jupyter.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
SECTION=$1
44
CHAPTER=$2
55

6+
#FILE="notebooks/course/manipulation/01_numpy.ipynb"
7+
68
WORK_DIR="/home/onyxia/work"
79
CLONE_DIR="${WORK_DIR}/repo-git"
810
COURSE_DIR="${CLONE_DIR}/notebooks/course"

utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,13 @@ def reminder_badges(
5555
nbviewer_link = f'<a href="{nbviewer_link}" target="_blank" rel="noopener">'\
5656
'<img src="https://img.shields.io/badge/Visualize-nbviewer-blue?logo=Jupyter" alt="nbviewer"></a>'
5757

58-
onyxia_link_launcher = "https://datalab.sspcloud.fr/launcher/ide/jupyter"\
58+
section_latest = section.rsplit("/", maxsplit=1)[-1]
59+
chapter_no_extension=re.sub(".ipynb","", chapter)
60+
61+
onyxia_link_launcher = "https://datalab.sspcloud.fr/launcher/ide/jupyter-python"\
5962
"?autoLaunch=true&onyxia.friendlyName=%C2%ABpython-datascience%C2%BB"\
6063
"&init.personalInit=%C2%ABhttps%3A%2F%2Fraw.githubusercontent.com%2Flinogaliana%2Fpython-datascientist%2Fmaster%2Fsspcloud%2Finit-jupyter.sh%C2%BB"\
61-
f"&init.personalInitArgs=%C2%AB{section}/{chapter}%C2%BB&security.allowlist.enabled=false"
64+
f"&init.personalInitArgs=%C2%AB{section_latest}%20{chapter_no_extension}%C2%BB&security.allowlist.enabled=false"
6265

6366
if type == "md":
6467
onyxia_link = "[![Onyxia]"\

0 commit comments

Comments
 (0)