Skip to content

Instantly share code, notes, and snippets.

View codeamt's full-sized avatar

AnnMargaret Tutu codeamt

View GitHub Profile
@sansyrox
sansyrox / heap.py
Created July 1, 2020 16:50
Custom Comparators in Python heap
class FreqWord(object):
def __init__(self, freq, word):
self.freq = freq
self.word = word
def __lt__(self, other):
if self.freq != other.freq:
return lt(self.freq, other.freq)
else:
# opposite sort
@LiutongZhou
LiutongZhou / remote_jupyter_setup.md
Last active November 11, 2024 15:34
Setup Cloud9 on EC2 and remote Jupyter

Setup Cloud9 on EC2 and remote Jupyter

Create an EC2 instance on AWS

  • Launch: t3.2xlarge ($0.33/h) / m8g.4xlarge ($0.718) / g6.4xlarge ($1.32/h) / p3.2xlarge ($3.02/h)
  • Image: Deep Learning AMI (Ubuntu 22.04)
  • Configure Security Group:
    • open custom TCP and port 9999
    • open HTTPS, HTTP to anywhere
  • Attach an Elastic IP to the instance

ssh into EC2 from MobaXterm and run