Skip to content

Instantly share code, notes, and snippets.

View nshaud's full-sized avatar

Nicolas Audebert nshaud

View GitHub Profile

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@nshaud
nshaud / Dockerfile
Created March 19, 2018 15:34 — forked from klokan/Dockerfile
GDAL in Docker - stable GDAL with JP2KAK, MRSID and ECW: https://registry.hub.docker.com/u/klokantech/gdal/
FROM debian:7
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -qq update \
&& apt-get -qq -y --no-install-recommends install \
autoconf \
automake \
build-essential \
curl \
@nshaud
nshaud / speedmeeting.py
Created February 22, 2018 12:46
Solve a speed meeting arrangement for n guests in Python
from __future__ import print_function
import sys
import time
import random
def timeme(func):
# Decorator to time the various solutions
def timed(*args, **kwargs):
start = time.time()
res = func(*args, **kwargs)
@nshaud
nshaud / crop_face.py
Last active August 29, 2015 14:27
Detect and crop faces in Python using OpenCV
import cv2 # OpenCV
from PIL import Image
# Detect the bouding box of the faces
def detect_face(image):
# See http://docs.opencv.org/modules/objdetect/doc/cascade_classification.html
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_alt.xml')
# We ask a minimum size of 150px*150px for the face
# Helps remove false positives
min_size = (150,150)