Skip to content

Instantly share code, notes, and snippets.

View zhengrui315's full-sized avatar

Rui Zheng zhengrui315

View GitHub Profile
@msis
msis / download_coursera_jupyter_data.md
Last active October 5, 2020 21:20
[How to download coursera classes?] #coursera #jupyter #notebook
  1. File > Open ...
  2. Launch new terminal instance: New > Terminal
  3. tarball the folder:
tar czvhf coursera.tar.gz *
  1. a. split it (usually this file might be too large for your instance to allow download)
split -b 500M -d coursera.tar.gz coursera.
@tommct
tommct / README.md
Last active January 9, 2022 09:02
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.

@kachayev
kachayev / dijkstra.py
Last active April 14, 2024 06:58
Dijkstra shortest path algorithm based on python heapq heap implementation
from collections import defaultdict
from heapq import *
def dijkstra(edges, f, t):
g = defaultdict(list)
for l,r,c in edges:
g[l].append((c,r))
q, seen, mins = [(0,f,())], set(), {f: 0}
while q: