Skip to content

Instantly share code, notes, and snippets.

@justudin
Last active October 5, 2020 04:40
Show Gist options
  • Save justudin/4b207dbe3464cf0de0ccef9d87010a1d to your computer and use it in GitHub Desktop.
Save justudin/4b207dbe3464cf0de0ccef9d87010a1d to your computer and use it in GitHub Desktop.
Download jupyter notebook from Coursera as of 2020-10 via Terminal
  1. Open the terminal via New>Terminal

  2. Check the location of jupyter notebook, in this case is /tf:

ls -l /tf

Notes: Some files are linked, so you have to manually copy those files in order to download the original files. You can use the cp command to copy them. For example: cp originalfilelocation /tf/filename.ori

  1. Set the location and filename:
location=/tf
filename=C1W3_WGAN_GP
  1. Create a python requirements
pip freeze > $location/requirements.txt
  1. Compress and move the file into the jupyter homepage directory/folder as set in location (no. 3)
  • If the file is less than 100MB:
tar -czf $filename.tar.gz $location && mv $filename.tar.gz $location
  • If the size is more than 100MB, split them into multiple compressed files:

tar -czf - $location | split --bytes=100MB - $filename.tar.gz && mv $filename.tar.gz* $location

  1. Now you can download it from jupyter homepage. Download the file(s) by selecting it (square) then clicking on Download.
  • If you split the file, join them by using cat command: cat filename.tar.gz* > filename.tar.gz

  • In Windows use type command which works similarly to Unix cat: type filename.tar.gz* > filename.tar.gz type C2W1_Assignme.tar.gza* > C2W1_Assignme.tar.gz

@justudin
Copy link
Author

justudin commented Oct 5, 2020

For example:
Open the terminal:
Terminal

GAn

Now, you can download via jupyter notebook homepage:

Gans-

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