Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing polars notebook #84

Merged
merged 5 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading