Skip to content

Instantly share code, notes, and snippets.

View BBischof's full-sized avatar

Bryan Bischof BBischof

  • current: Theory Ventures | prev: Hex, Weights and Biases, Stitch Fix, Blue Bottle, QuasiCoherent Labs, IBM
  • Berkeley, California
  • X @bebischof
View GitHub Profile
@BBischof
BBischof / output
Last active May 22, 2017 16:57
Arithmetic Billiards Racks
row 4: [5]
row 3: [4, 9]
row 2: [7, 11, 2]
row 1: [8, 1, 12, 10]
row 0: [6, 14, 15, 3, 13]
Remaining: []
row 4: [5]
row 3: [9, 4]
row 2: [2, 11, 7]
row 1: [10, 12, 1, 8]
@BBischof
BBischof / compute_product.py
Last active May 18, 2017 02:08
All the i's, j's, and k's from Finnegan's Wake
quats = {"ii":"-1",
"jj":"-1",
"kk":"-1",
"ij":"k",
"ji":"-k",
"ik":"-j",
"ki":"j",
"jk":"i",
"kj":"-i"
}
@BBischof
BBischof / .block
Last active May 7, 2017 02:29
Horsey Race
license: mit
@BBischof
BBischof / exceptions.py
Created April 27, 2017 18:19
A nice python coding question
class B(Exception):
pass
class C(B):
pass
class D(C):
pass
for cls in [B, C, D]:
@BBischof
BBischof / f_nulls.py
Created February 22, 2017 01:56
ternary applied to fix a np.column with some nulls based on index
'''does something to an i'''
def f:
return i
s = pd.Series([f(i) for i in df.index])
df['A'] = np.where(df['A'].notnull(), df['A'],s)
@BBischof
BBischof / .block
Last active November 10, 2016 17:10
Multi-Line Voronoi.find() w/ speech data
license: gpl-3.0
@BBischof
BBischof / .block
Last active September 28, 2016 23:04
sentiment time-series mouseover
license: mit
@BBischof
BBischof / .block
Last active October 19, 2022 19:51
Beeswarm (Most Broken)
license: gpl-3.0
height: 200
@BBischof
BBischof / .block
Last active September 17, 2016 07:36
Beeswarm (With Flying Bees)
license: gpl-3.0
height: 200
@BBischof
BBischof / pathlike_dict_access_class.py
Created August 29, 2016 02:27
another iteration on the path-like dictionary access. This makes it into a class and uses getters and setters, a much more elegant solution
import sys, json
#inspired by http://stackoverflow.com/questions/14692690/access-python-nested-dictionary-items-via-a-list-of-keys
# Testing dictionary
D = {
"a": {
"aa": {
"aaa": 1,
"aab": 2
},