This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import os | |
import socket | |
import subprocess | |
import time | |
from socket_lib import attach_cleanup_handler | |
from socket_lib import cleanup_server | |
host = 'localhost' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name of the gist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import click | |
# Add this to avoid the annoying warning: http://click.pocoo.org/5/python3/ | |
click.disable_unicode_literals_warning = True | |
import sys | |
from select import select | |
# Internal modules | |
from sockets import SocketServer, ThreadedSocketServer, SocketClient | |
def main(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
import pip | |
import imp | |
import pkg_resources | |
from os.path import join, expanduser, dirname, realpath | |
import virtualenv | |
def check_venv(expected_path): | |
"""Check if we are running in a virtual env""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sys | |
import subprocess | |
# Internal Python Modules | |
from get_urls import URLS | |
DEST = "repos" | |
class FileManager(object): | |
dest = DEST |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import time | |
import numpy as np | |
from scipy.spatial.distance import cdist | |
# from scipy.spatial.distance import euclidean | |
from bisect import bisect_left | |
import argparse | |
zprint = globals()['__builtins__'].print |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import time | |
import math | |
import numpy as np | |
import argparse | |
FFT = np.fft.fft | |
IFFT = np.fft.ifft | |
zprint = globals()['__builtins__'].print |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var piazza_hotkeys = function() { | |
/* | |
Provides hotkey support for navigating many posts on piazza. | |
1) a + alt: archives the current post and navigates to the previous post | |
2) i + alt: marks the current post as unread and navigates to the previous post | |
3) up + alt: navigates to the more recent post from current | |
4) down + alt: navigates to the older post | |
*/ | |
// keycodes: https://css-tricks.com/snippets/javascript/javascript-keycodes/ | |
const A = 65; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import OrderedDict | |
"""Q: How do we define a data structure that makes it easy | |
to determine which keys should be passed to children | |
and which should be passed to report summaries. | |
And which keys should be promoted? | |
## Thoughts: | |
- CAPS_AND_UNDERSCORE signify importance | |
- Optional updates | |
- All keys should be passed to children by default |
NewerOlder