Skip to content

Instantly share code, notes, and snippets.

View ohe's full-sized avatar
🚀

Olivier H. ohe

🚀
  • Smart Flows
  • Paris
View GitHub Profile
@ohe
ohe / journee_type.ipynb
Last active May 12, 2020 13:58
Journee Type
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.
@ohe
ohe / ladder.md
Created June 17, 2017 13:24 — forked from jamtur01/ladder.md
Kickstarter Engineering Ladder
@ohe
ohe / keybase.md
Created March 29, 2017 09:20
Keybase Proof

Keybase proof

I hereby claim:

  • I am ohe on github.
  • I am ohe (https://keybase.io/ohe) on keybase.
  • I have a public key ASCKxCHoeHZoEgC5BtAeOLZXTc0DdbhsfrJ1BSPS9SfrEAo

To claim this, I am signing this object:

@ohe
ohe / compose_merger.py
Created September 29, 2016 12:34
Used to merge several compose file properly (might works for other YAML file)
import sys
import yaml
def merge(x, y):
if isinstance(x, dict) and isinstance(y, dict):
for k,v in y.iteritems():
if k not in x:
x[k] = v
else:
x[k] = merge(x[k], v)
@ohe
ohe / redefine.py
Created September 28, 2016 14:24
Given an object and a function, install the function as an instance method.
def redefine_instance_fn(obj, ext_fn, remote_name=None):
"""
Given an object and a function, install the function as an instance method.
Overrides any existing instance method with the same name.
Preserves object identity.
Uses name of function by default.
Note: not a best practice, but sometimes necessary.
>>> class A:
... def __init__(self, val):
@ohe
ohe / sleepsort.py
Created September 20, 2016 14:43
The only sort algorithm you need
from threading import Thread
import time
a = [3, 1, 4]
def sleepsort(array):
results = []
threads = []
def runner(x):
@ohe
ohe / Dockerfile
Created September 7, 2016 16:17
Dockerfile to build latest pyarrow version
FROM ubuntu:xenial
RUN apt-get update && apt-get install -y \
automake \
bison \
cmake \
curl \
flex \
g++ \
git \
@ohe
ohe / freeze_in_subprocess.py
Last active August 29, 2015 14:24
GIL + Cython + Subprocess freeze
from test import zero
from functools import wraps
from multiprocessing import Process, Queue
def queue_result(function, queue):
@wraps(function)
def decorated_function(*args, **kwargs):
has_raised = False
from contextlib import contextmanager
from functools import partial
from requests import request
from slugify import slugify
BASE="http://haltalk.herokuapp.com"
@contextmanager