Skip to content

Instantly share code, notes, and snippets.

@thorr18
Created May 8, 2021 23:23
Show Gist options
  • Save thorr18/9d3c7523ab937ab60467759eb803c98c to your computer and use it in GitHub Desktop.
Save thorr18/9d3c7523ab937ab60467759eb803c98c to your computer and use it in GitHub Desktop.
Tired of manually creating ipynb files
# jupyter notebook creation convenience for ~/.zshrc:
new-notebook() {
if [ ! -f "$(pwd)/$1.ipynb" ]; then
echo "{
\"cells\": [],
\"metadata\": {},
\"nbformat\": 4,
\"nbformat_minor\": 2
}" > "$(pwd)/$1.ipynb"
echo "***Created New Notebook at: "
else
echo "***Already a Notebook at: "
fi
echo "$(pwd)/$1.ipynb"
jupyter-notebook "$(pwd)/$1.ipynb" # &
#exit 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment