Skip to content

Instantly share code, notes, and snippets.

@Momoumar
Last active May 11, 2023 19:46
Show Gist options
  • Star 20 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save Momoumar/26c73af0adcd2df05555f4a3b2d6ebc6 to your computer and use it in GitHub Desktop.
Save Momoumar/26c73af0adcd2df05555f4a3b2d6ebc6 to your computer and use it in GitHub Desktop.
Download all programming assignments Notebook. #Coursera #DeepLearning.ai #Jupyter #Python
#To download all your programming assignments including all files and notebooks, follow these steps:
#1 - Go to the root tree folder for instance: https://hub.coursera-notebooks.org/user/${user_token}/tree/
#2- Open the terminal by clicking the + button on the right-hand corner
#3 - Enter the following command in the terminal:
tar cvfz allassignments.tar.gz *
#4 - The previous command will create a zip named allassignments containing all your programmings assignment
#5 - Select allassignments.tar.gz and download
#6 - Enjoy, don't forget to delete it afterward ;-)
@subTropic
Copy link

If you add the 'h' option tar will resolve the symlinks to images,
(otherwise downloaded image files may be blank where they are symlinks) e.g:

tar cvfzh allassignments.tar.gz *

@OsamuB
Copy link

OsamuB commented Feb 13, 2019

How select the file and download?

@ronykroy
Copy link

ronykroy commented Jul 9, 2019

This is neat..
Should been higher up the relevant google search :)

@siebenbrunner
Copy link

Great! If the download fails, try splitting it up into smaller chunks or exclude the files that are too large.

@Johan-Liebert1
Copy link

Johan-Liebert1 commented Jun 13, 2020

Great! If the download fails, try splitting it up into smaller chunks or exclude the files that are too large.

Can you tell me how to do that. It won't download my file because "the server took too long to respond".

I want to download everything, so how do I split up the final zip file?

@kaushikanshul
Copy link

Thanks for this solution. It is supremely useful.
There is an npy file which is not getting downloaded even after tar-gz, most likely because of its size. Is there another better compression that will help?

@PierreGabioud
Copy link

Split into multiple 50MB files
split -b 50m allassignments.tar.gz allassignments.tar.gz.

@sergii1989
Copy link

sergii1989 commented Nov 23, 2021

3 major steps:

  1. Compress the directory with assignments and split the archive into batches:

    • tar cvfzh allassignments.tar.gz * | split -b 100M allassignments.tar.gz "allassignments.tar.gz.part"
  2. Download all parts using Jupyter Notebook

  3. Join all batches back to one file (on your local machine):

    • cat allassignments.tar.gz.part* > allassignments.tar.gz

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