Skip to content

Instantly share code, notes, and snippets.

View s-celles's full-sized avatar

Sébastien Celles s-celles

View GitHub Profile
@s-celles
s-celles / random_walk_pyqtgraph.py
Last active May 27, 2020 09:31
A random walk with PyQtGraph and a Numpy circular buffer / ring buffer
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This example demonstrates a random walk with pyqtgraph.
"""
from pyqtgraph.Qt import QtGui, QtCore
import numpy as np
import pyqtgraph as pg
import collections
@s-celles
s-celles / mason_level.py
Created October 14, 2015 14:40
a mason's level using Raspberry Pi SenseHat
#!/usr/bin/python3
# coding: utf-8
import sys
import time
from sense_hat import SenseHat
def limit(lcd_pos):
pos_lim = 6
if lcd_pos < 0:
@s-celles
s-celles / colorchooser_pyqt.py
Created October 14, 2015 14:41
A color chooser example with Raspberry Pi and PyQt
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from PyQt4 import QtGui, QtCore
from sense_hat import SenseHat
import signal
signal.signal(signal.SIGINT, signal.SIG_DFL)
Verifying that +scls19fr is my blockchain ID. https://onename.com/scls19fr
@s-celles
s-celles / Pingo.jl
Last active October 27, 2018 06:45
We couldn’t find that file to show.
@s-celles
s-celles / blink_millis.ino
Last active May 21, 2017 06:33
Arduino Led blink without delay (with millis)
@s-celles
s-celles / email_unique.py
Last active August 14, 2017 14:53
Find duplicate email
import click
import re
from collections import OrderedDict
def format_email(email, name):
if name is None:
return "<%s>" % email
else:
return "%s <%s>" % (name, email)
@s-celles
s-celles / omercy.py
Created February 16, 2018 19:27 — forked from Krazybug/omercy.py
O'Reilly free ebooks downloader
'''
O'Meirrcy !!!! Download free ebooks from O'Reilly.w
Usage:
>pip install requests
>pip install bs4
>mkdir omercy
>cd omercy
>curl ... omercy.py
>python omercy.py
import os
import json
import pandas as pd
def main():
print("Summary omercy!")
lst = []
for root, dirs, files in os.walk('.', topdown=False):
for name in files:
,_---~~~~~----._
_,,_,*^____ _____``*g*\"*,
/ __/ /' ^. / \ ^@q f
[ @f | @)) | | @)) l 0 _/
\`/ \~____ / __ \_____/ \
| _l__l_ I
} [______] I
] | | | |
] ~ ~ |
| |