Created
April 3, 2019 01:43
-
-
Save tamuhey/7ab42a39465691139d032e994676cb57 to your computer and use it in GitHub Desktop.
bash function for executing Jupyter notebook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # jupyter execution | |
| function je(){ | |
| if [ $# = 2 ] | |
| then | |
| kernel=$2 | |
| elif [ $# = 1 ] && [ -n $CONDA_DEFAULT_ENV ] | |
| then | |
| kernel=$CONDA_DEFAULT_ENV | |
| fi | |
| echo $1 $kernel | |
| jupyter nbconvert --ExecutePreprocessor.timeout=-1 --ExecutePreprocessor.kernel_name=$kernel --to notebook --execute $1 | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment