Skip to content

Instantly share code, notes, and snippets.

@Momoumar
Last active October 25, 2025 10:20
Show Gist options
  • Select an option

  • Save Momoumar/26c73af0adcd2df05555f4a3b2d6ebc6 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

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

OsamuB commented Feb 13, 2019

Copy link
Copy Markdown

How select the file and download?

@ronykroy

ronykroy commented Jul 9, 2019

Copy link
Copy Markdown

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

@siebenbrunner

Copy link
Copy Markdown

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

@Johan-Liebert1

Johan-Liebert1 commented Jun 13, 2020

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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

@sergii1989

sergii1989 commented Nov 23, 2021

Copy link
Copy Markdown

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