Skip to content

Commit

Permalink
Fix missing polars notebook (#84)
Browse files Browse the repository at this point in the history
* Link colab

* Create init.sh

* Update init.sh

* Update index.qmd

* Update index.qmd
  • Loading branch information
linogaliana authored Jan 2, 2024
1 parent a3af1cc commit b2a4f7d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
4 changes: 2 additions & 2 deletions post/polars/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ Ses atouts ? D'excellentes performances et une expressibilité qui le rapproche
Ce post de blog revient sur les principaux atouts de `Polars`, sans vouloir être exhaustif. Un _notebook_ illustrant les principales
fonctionnalités du package vise à le compléter :

<a href="https://datalab.sspcloud.fr/launcher/ide/jupyter-python?autoLaunch=true&init.personalInit=%C2%ABhttps%3A%2F%2Fraw.githubusercontent.com%2Fromaintailhurat%2Fssphub%2Fblog%2Fpolars%2Fcontent%2Fnotebooks%2Finit.sh%C2%BB&init.personalInitArgs=%C2%ABpolars-tuto%C2%BB&onyxia.friendlyName=%C2%ABTutoriel%20Polars%C2%BB" target="_blank" rel="noopener"><img src="https://img.shields.io/badge/SSPcloud-Tester%20via%20SSP--cloud-informational&amp;color=yellow?logo=Python" alt="Onyxia"></a>
<a href="http://colab.research.google.com/github/inseefrlab/ssphub/blob/main/content/notebooks/polars-tuto.ipynb" target="_blank" rel="noopener"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>
<a href="https://datalab.sspcloud.fr/launcher/ide/jupyter-python?version=1.13.22&autoLaunch=true&init.personalInit=«https%3A%2F%2Fraw.githubusercontent.com%2FInseeFrLab%2Fssphub%2F6322c25d65f61f7874e7900f38c4b2774e007ea7%2Fpost%2Fpolars%2Finit.sh»&init.personalInitArgs=«polars-tuto»&onyxia.friendlyName=«Tutoriel%20Polars»" target="_blank" rel="noopener"><img src="https://img.shields.io/badge/SSPcloud-Tester%20via%20SSP--cloud-informational&amp;color=yellow?logo=Python" alt="Onyxia"></a>
<a href="https://colab.research.google.com/github/inseefrlab/ssphub/blob/main/post/polars/polars-tuto.ipynb" target="_blank" rel="noopener"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>



Expand Down
21 changes: 21 additions & 0 deletions post/polars/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
NOTEBOOK_NAME=$1
# ex: polars-tuto

WORK_DIR="/home/onyxia/work"
CLONE_DIR="${WORK_DIR}/repo-git"

COURSE_DIR="${CLONE_DIR}/post/polars"

# Clone course repository
REPO_URL="https://github.com/inseefrlab/ssphub.git"
git clone --depth 1 $REPO_URL $CLONE_DIR

# Put relevant notebook in formation dir
cp "${COURSE_DIR}/${NOTEBOOK_NAME}.ipynb" "${WORK_DIR}"

# Remove useless repositories
rm -rf $CLONE_DIR ${WORK_DIR}/lost+found

# Open the relevant notebook when starting Jupyter Lab
jupyter server --generate-config
echo "c.LabApp.default_url = '/lab/tree/${NOTEBOOK_NAME}.ipynb'" >> /home/onyxia/.jupyter/jupyter_server_config.py

0 comments on commit b2a4f7d

Please sign in to comment.