Skip to content

Instantly share code, notes, and snippets.

View rsgalloway's full-sized avatar

Ryan Galloway rsgalloway

View GitHub Profile
@patrickwolf
patrickwolf / seq_lib_performance_test.py
Last active May 20, 2016 02:29
Quick script to compare performance of sequence detection libraries
'''
Quick script to compare performance of sequence detection libraries
Created on Aug 26, 2014
Refernced libraries:
https://github.com/4degrees/clique
http://pyseq.rsgalloway.com/
@author: patrick.wolf
'''
import time
@temoto
temoto / helpers_data.py
Last active March 22, 2022 05:19
Part of py-helpers. Gzip compression shortcuts. Encoding. Database helpers. Retry decorator.
def namedlist(typename, field_names):
"""Returns a new subclass of list with named fields.
>>> Point = namedlist('Point', ('x', 'y'))
>>> Point.__doc__ # docstring for the new class
'Point(x, y)'
>>> p = Point(11, y=22) # instantiate with positional args or keywords
>>> p[0] + p[1] # indexable like a plain list
33
>>> x, y = p # unpack like a regular list
@rsgalloway
rsgalloway / gist:5835065
Last active June 3, 2016 08:07
Alembic Build Notes

Alembic Build Notes

Alembic 1.5.1 Boost 1.49 OpenEXR 2.0.1 HDF5 1.8.9

@saetia
saetia / gist:1623487
Last active May 1, 2024 19:55
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@lrvick
lrvick / flask_geventwebsocket_example.py
Created September 1, 2011 07:17
Simple Websocket echo client/server with Flask and gevent / gevent-websocket
from geventwebsocket.handler import WebSocketHandler
from gevent.pywsgi import WSGIServer
from flask import Flask, request, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')