Skip to content

Instantly share code, notes, and snippets.

@ToQoz
Created December 8, 2017 09:10
Show Gist options
  • Save ToQoz/ec951d88679f1c6bd0eb9d65a3d79f0e to your computer and use it in GitHub Desktop.
Save ToQoz/ec951d88679f1c6bd0eb9d65a3d79f0e to your computer and use it in GitHub Desktop.
cat notebook.ipynb | jq -r '.cells[] | select(.cell_type == "code") | select(.source != "") | .source + "\n"' | sed -e 's/\( *\)%.* /\1/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment