Skip to content

Instantly share code, notes, and snippets.

@SayanSeth
Created February 28, 2018 01:33
Show Gist options
  • Save SayanSeth/decea5c1248e69d1f4e2b15e76a2fca3 to your computer and use it in GitHub Desktop.
Save SayanSeth/decea5c1248e69d1f4e2b15e76a2fca3 to your computer and use it in GitHub Desktop.
Download From Jupyter Notebook

How to download all the assignment files from the coursera-notebook hub.

  1. Go to the home of the coursera-notebook hub
  2. Create a new python notebook
  3. Execute !tar cvfz allfiles.tar.gz * in a cell
  4. Download the archive !

Enjoy!

If the resulting archive is too big and you can't download it

Open the python notebook where you executed last command and execute the following in a cell:

!split -b 200m allfiles.tar.gz allfiles.tar.gz.part.

This will split the archive into 200Mb blocks that you can download without a problem (if there is still a problem reduce the size by changing 200m to a lower value)

Then when you have downloaded all the split files reunite them on your system using the following command line (in a Linux environment, or use cmder if you are on Windows):

cat allfiles.tar.gz.part.* > allfiles.tar.gz

If you want to exclude a a specific directory. Then the command is

!tar cvfz allfiles.tar.gz * --exlcude=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment