Skip to content

Instantly share code, notes, and snippets.

View eliemichel's full-sized avatar

Elie Michel eliemichel

View GitHub Profile
/**
* Extrait de code à exécuter dans la console du navigateur pour ajouter
* sous les prix le prix au mètre-carré et le prix par chambre dans les
* résultats de logement sur pap.fr
* Fonctionne au 17/04/2017, mais puisque le code est très ad-hoc il faudra
* sûrement le mettre à jour à chaque màj de pap.fr
*
* Existe aussi pour seloger.com :
* https://gist.github.com/eliemichel/1c6f27be406a22a0d5114020c616d3e8
*
/**
* Extrait de code à exécuter dans la console du navigateur pour ajouter
* sous les prix le prix au mètre-carré et le prix par chambre dans les
* résultats de logement sur seloger.com
* Fonctionne au 17/04/2017, mais puisque le code est très ad-hoc il faudra
* sûrement le mettre à jour à chaque màj de seloger.com
*
* Existe aussi pour pap.fr :
* https://gist.github.com/eliemichel/e292bae7b439e15cf7da37ae518f08dc
*
def getNearestUCDpulse(azimuth, elevation, h3D):
"""
retrieves the impulse response from h3D that is closest to the specified
azimuth and elevation (in degrees)
h3D is the array containing all HRTFs for a given subject (left or right)
"""
elmax = 50
elindices = np.arange(elmax)
elevations = -45 + 5.625 * elindices
@eliemichel
eliemichel / codeTP2.py
Created November 15, 2016 11:13
MVA — Reinforcement Learning — TP2
# ########################################################################### #
# MVA -- Reinforcement Learning -- TP2
# ########################################################################### #
#
# Code base for the TP2 of the MVA lecture Reinforcement Learning, by
# Alessandro Lazaric. This is a Python port of the MATLAB base provided by the
# TP advisor Émilie Kaufmann:
# http://chercheurs.lille.inria.fr/ekaufman/teaching.html
#
# Do not hesitate to report any suggestion or bugfix to
# Example of use of Afanasy's API to generate a summary of the state of the
# render farm.
# Copyright (c) 2016 rise|fx (Elie Michel) - Released under MIT License
import af
cmd = af.Cmd()
def isSysJob(job):
return job['st'] == 0
@eliemichel
eliemichel / image2gradient.py
Created August 6, 2014 11:00
Convert image to Gimp gradient
import sys
import cv2
import numpy as np
"""
Convert image to Gimp gradient.
Usage: python image2gradient.py input_image
Output gradient in stdout. Place it in something like
~/.config/GIMP/2.x/gradients or