Last active
September 15, 2020 08:25
-
-
Save martimors/acd33c5d16105231a3759bed5efbda0f to your computer and use it in GitHub Desktop.
Convert all jupyter in path tree to *.py excluting certain directories
This file contains 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
# Significantly reduces the size of the repository | |
# The scripts can be converted back into notebooks, but the cache will be lost | |
# Excludes the directory ./venv and any directory with a . prefix such as .git | |
# Converts all jupyter notebooks to python scripts recursively starting from $(pwd) | |
find . -path ./venv -prune -false -o -name '*.ipynb' | xargs -0 jupyter nbconvert --to script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment