Skip to content

Instantly share code, notes, and snippets.

View davidalber's full-sized avatar

David Alber davidalber

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidalber
davidalber / redfin-cla.md
Created February 11, 2016 20:09
Redfin Contributor License Agreement

Redfin Corporation

Individual Contributor License Agreement ("Agreement")

Thank you for your interest in Redfin Corporation ("Redfin"). In order to clarify the intellectual property license granted with Contributions from any person or entity, Redfin must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of Redfin and its users; it does not change your rights to use your own Contributions for any other purpose. Please read this document carefully before signing and keep a copy for your records.

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Redfin. In return, Redfin shall not use Your Contributions in a way that is contrary to the public benefit. Except for the license granted herein to Redfin and recipients of software distributed by Redfin, You reserve all ri

@davidalber
davidalber / python-cryptography-install.md
Created May 1, 2014 19:32
Steps to successfully install Python cryptography package on Mac OS X 10.8.5.

Prior to setting the PKG_CONFIG_PATH, as below, pip install cryptography failed with Symbol not found: _ffi_type_double on my machine running Mac OS X 10.8.5. I am not sure how commonly the error occurs for other users.

brew install libffi

# Note the version-specific path below.
PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.0.13/lib/pkgconfig/ pip install cryptography
@davidalber
davidalber / max_per_second.py
Created January 16, 2014 22:18
Decorator to limit the maximum number of times a function will run per second.
def max_per_second(mps):
def decorate(func):
ind = [0]
arr = [0.0]*mps
def wrapper(*args, **kwargs):
now = time.time()
stime = (arr[ind[0]]+1) - now
if stime > 0:
time.sleep(stime)