Skip to content

Instantly share code, notes, and snippets.

@tommct tommct/README.md
Last active Nov 9, 2019

Embed
What would you like to do?
Instructions for downloading Jupyter Notebooks from Coursera

From an open Jupyter Notebook homework assignment, select "Coursera" to take you to the home page. Make a new notebook and fill it with the following and excute the cell with:

%%bash
tar cvfz hw.tar.gz .

This may take a little while to run depending on the packages. Select "Coursera" again to take you to the Home directory. Check the hw.tar.gz file and then Download. After the file is downloaded, delete it.

If the file is too big, you may get an error and have to restart. If so, try the following instead, remembering to delete any tar files created.

%%bash
for dir in */
do
  base=$(basename "$dir")
  tar -czf "${base}.tar.gz" "$dir"
done
find . -maxdepth 1 -type f -exec tar cvfz hw.tar.gz {} +
@RedDawe

This comment has been minimized.

Copy link

RedDawe commented Aug 27, 2018

thx dude <3 you're my savior 🥇

@ylchang

This comment has been minimized.

Copy link

ylchang commented Oct 24, 2019

Thank you so much! The method provided by Coursera does's work. I was lucky enough to find yours. It works but I need to open a new terminal and run the tar commend instead of run the commend on a new Notebook. Not sure what happened but it worked perfectly. Thank you so much again.

@ylchang

This comment has been minimized.

Copy link

ylchang commented Oct 25, 2019

I noticed that not most of the files in the sub directories are not downloaded. don't know what went wrong.

@Huta2018

This comment has been minimized.

Copy link

Huta2018 commented Nov 9, 2019

I completed two courses without downloading files. It was really difficult. with these two lines saved lots of time and made my life easier. Thank you so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.