Skip to content

Commit

Permalink
Fix SSPCloud links (#270)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
linogaliana and github-actions[bot] committed Sep 20, 2022
1 parent fd439f0 commit a56dd45
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion content/course/manipulation/01_numpy/index.qmd
Expand Up @@ -45,7 +45,7 @@ la [cheatsheet numpy](https://www.datacamp.com/community/blog/python-numpy-cheat
sur une fonction.

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

```{python import np}
Expand Down
2 changes: 2 additions & 0 deletions sspcloud/init-jupyter.sh
Expand Up @@ -3,6 +3,8 @@
SECTION=$1
CHAPTER=$2

#FILE="notebooks/course/manipulation/01_numpy.ipynb"

WORK_DIR="/home/onyxia/work"
CLONE_DIR="${WORK_DIR}/repo-git"
COURSE_DIR="${CLONE_DIR}/notebooks/course"
Expand Down
7 changes: 5 additions & 2 deletions utils.py
Expand Up @@ -55,10 +55,13 @@ def reminder_badges(
nbviewer_link = f'<a href="{nbviewer_link}" target="_blank" rel="noopener">'\
'<img src="https://img.shields.io/badge/Visualize-nbviewer-blue?logo=Jupyter" alt="nbviewer"></a>'

onyxia_link_launcher = "https://datalab.sspcloud.fr/launcher/ide/jupyter"\
section_latest = section.rsplit("/", maxsplit=1)[-1]
chapter_no_extension=re.sub(".ipynb","", chapter)

onyxia_link_launcher = "https://datalab.sspcloud.fr/launcher/ide/jupyter-python"\
"?autoLaunch=true&onyxia.friendlyName=%C2%ABpython-datascience%C2%BB"\
"&init.personalInit=%C2%ABhttps%3A%2F%2Fraw.githubusercontent.com%2Flinogaliana%2Fpython-datascientist%2Fmaster%2Fsspcloud%2Finit-jupyter.sh%C2%BB"\
f"&init.personalInitArgs=%C2%AB{section}/{chapter}%C2%BB&security.allowlist.enabled=false"
f"&init.personalInitArgs=%C2%AB{section_latest}%20{chapter_no_extension}%C2%BB&security.allowlist.enabled=false"

if type == "md":
onyxia_link = "[![Onyxia]"\
Expand Down

0 comments on commit a56dd45

Please sign in to comment.