Skip to content

Instantly share code, notes, and snippets.


Adrian Schreyer aschreyer

View GitHub Profile
mcescalante /
Last active Nov 13, 2017
cx_Oracle installation instructions/notes for macOS or Linux

cx_Oracle Installation Instructions

I've had to put cx_Oracle (python Oracle database connector) on macOS and Linux, and both processes were similar but poorly documented on Oracle's website.

These instructions were written and tested using the client 12.1. The instructions for any 12.x are the same, but you may need to change 12_1 to 12_2 in commands if you are using version 12.2, etc.


  1. Download 64 bit (easy to download 32 by mistake) basic + sdk instantclient from Oracle website (Note: you need an account, I used throwaway email)
jbenet /
Last active Jan 19, 2021
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

View gist:5895770
class Config:
def __init__(self, **entries):
self.entries = entries
def __add__(self, other):
entries = (self.entries.items() +
return Config(**entries)
default_config = Config(color=False, port=8080)
config = default_config + Config(color=True)
ahmadia / gist:5550933
Last active Dec 17, 2015
numba for USR kernel (dirty)
View gist:5550933
from numba import autojit
import numpy as np
import numpy.testing as npt
import time
import gc
def usr(x, y, s=0.9, n=10):
scores = 1.0 / (1.0 + 1/12.0 * np.abs(x-y).sum(axis=1))
scores = scores[scores>=s]
cgoldberg /
Created Jun 16, 2012
Python Timer Class - Context Manager for Timing Code Blocks
#!/usr/bin/env python
# Python Timer Class - Context Manager for Timing Code Blocks
# Corey Goldberg - 2012
from timeit import default_timer
You can’t perform that action at this time.