Skip to content

Instantly share code, notes, and snippets.

@jsta
Created March 1, 2021 20:04
Show Gist options
  • Save jsta/8da15bcfce967e282bfc891c9289cc8b to your computer and use it in GitHub Desktop.
Save jsta/8da15bcfce967e282bfc891c9289cc8b to your computer and use it in GitHub Desktop.
Create a new Jupyter notebook from the command line
#!/bin/bash
# Create a new Jupyter notebook from the command line
#
# Examples
# jupyinit env_name py_file.py py_file.ipynb
touch $2
jupytext --set-kernel $1 $2
jupytext --to notebook --execute $2
jupytext --set-formats ipynb,py $3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment