Skip to content

Instantly share code, notes, and snippets.

@pierre-haessig
pierre-haessig / selenium_2048.py
Created May 20, 2014 17:54
A simple code to interact in Python with the "real" 2048 game in web browser.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Pierre Haessig — May 2014
"""A simple code to interact in Python with the "real" 2048 game in web browser.
"""
from __future__ import print_function
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
@pierre-haessig
pierre-haessig / logit_scale.ipynb
Created October 8, 2014 13:34
Logit scale, for plotting cumulated probability distributions (matplotlib implementation). Better visualization of the tails
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pierre-haessig
pierre-haessig / config
Last active April 3, 2020 00:36
Raspberry Pi kernel config: comparing Raspbian's 3.12-1-rpi vs. RPi foundation's 3.12.32+ (e.g. config of 1-Wire bus)
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 3.12.32 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_HAVE_PROC_CPU=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_LOCKDEP_SUPPORT=y
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pierre-haessig
pierre-haessig / luminosity_2_channels.ino
Created May 21, 2015 12:04
2 channels light sensor (Broadband+IR) based on Arduino board + TSL2561 sensor
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_TSL2561_U.h>
Adafruit_TSL2561_Unified tsl = Adafruit_TSL2561_Unified(TSL2561_ADDR_FLOAT, 12345);
void displaySensorDetails(void)
{
sensor_t sensor;
tsl.getSensor(&sensor);
@pierre-haessig
pierre-haessig / logit_norm_imshow.ipynb
Created July 13, 2015 15:42
Image plot with a logit scale -- example of a transition matrix
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pierre-haessig
pierre-haessig / Marker disappear bug.ipynb
Created May 26, 2016 11:28
Matplotlib markers disappear bug when using seaborn-notebook style (mpl 1.5.1)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pierre-haessig
pierre-haessig / Diamonds Altair.ipynb
Created October 24, 2016 16:06
first test of Altair viz package on the diamonds dataset
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pierre-haessig
pierre-haessig / JuMP modify constraint.ipynb
Created May 25, 2018 16:09
Experiment with the ability to modify a constraint of an existing optimization problem modeled with JuMP
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pierre-haessig
pierre-haessig / Marp_ecosystem_map.drawio
Last active July 19, 2021 10:25
Marp tools concept maps
<mxfile host="Electron" modified="2021-07-19T10:24:03.119Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/14.6.13 Chrome/89.0.4389.128 Electron/12.0.7 Safari/537.36" etag="CDG5akxwugxlUMQvqCN3" version="14.6.13" type="device"><diagram id="Ig-QWzCFrPFKFMDAhXfC" name="Page-1">7Vxbd6M2EP41nNM+2AeEDfZjNol3t03a9GS33fZNBmFrA4gKObb311cSEubmmMT4sl3nIYZBGoTmm/kGjWzDvo5W7ylM5vfER6EBTH9l2DcGAJbj2vxDSNZKMh64mWRGsa9kG8Ej/oaU0FTSBfZRWmrICAkZTspCj8Qx8lhJBikly3KzgITluyZwhmqCRw+Gdelf2GdzJbWc8ebCB4Rnc3XrEVDPF0HdWD1JOoc+WRZE9q1hX1NCWHYUra5RKGZPz0vWb7Llaj4wimLWpsNyGU/Wd+k/nz892uDL6Btc9YKerezzDMOFemI1WrbWU4B8PiPqlFA2JzMSw/B2I31HySL2kbiPyc82be4ISbjQ4sKviLG1Mi9cMMJFcxaF6mpAYjaBEQ4FTD7GDFElfCQL6ok+c8a4xcHQvuL/+DOKf6JB2p8RMgsRTHDa90gkL3ipbDoJMpX8MFdanzU1kam+07ap0uiDdIbYS1OatROzVriBssl7RCLEKB+TSVEIGX4u4wwquM7ydhuL8gNl1NcYeFgzsI8CHHOfarLzHZxyDy7ZBoZ4FvNjD6kpfEaUYe4hV+pChH0/gwFK8Tc4lfoEEBKCuYGE8uE7Y3izzc51k7wMVX57tDIanF/duuRfpSlXvXpm33KtQdZXBSYF+9ZGUcofxCMWNIOS0kp/EgQph07VpPkAm6z8OUX09+lXEdqAGWbWybzUCZkwF