Skip to content

Instantly share code, notes, and snippets.

View qpleple's full-sized avatar

Quentin Pleplé qpleple

View GitHub Profile

Keybase proof

I hereby claim:

  • I am qpleple on github.
  • I am qpleple (https://keybase.io/qpleple) on keybase.
  • I have a public key whose fingerprint is 804B D7B2 C3F3 7968 9147 2B1F 2158 651F 4489 E206

To claim this, I am signing this object:

@qpleple
qpleple / gbr.py
Last active March 8, 2019 12:33
GBR
import RPi.GPIO as GPIO
import time
import requests
# -------------- Config --------------
pin_button = 21
pin_led = 20
time_previous_blink = time.time()
@qpleple
qpleple / torndb-examples.py
Last active January 8, 2019 05:10
Examples with torndb
# Torndb is a very thin wrapper around MySQLdb that makes it even easier to use MySQL.
# Because it is very light, one can just go through the one-file python source
# to learn how to use it.
# Installation: pip install torndb
# Official doc: http://torndb.readthedocs.org/en/latest/
# Source: https://github.com/bdarnell/torndb/blob/master/torndb.py
from torndb import Connection
# -*- encoding: utf-8
import time, os, cPickle
from termcolor import colored
def chrono(method):
def timed(*args, **kw):
start = time.time()
result = method(*args, **kw)
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.
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.
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.