Skip to content

Instantly share code, notes, and snippets.

View 26medias's full-sized avatar

Julien Loutre 26medias

View GitHub Profile
@shoebahmedadeel
shoebahmedadeel / .ino
Created May 6, 2017 18:25
MPU 9250 - roll, pitch, yaw from Accelerometer,Gyroscope and Magnetometer
#include <Wire.h>
#include <Servo.h>
#define SerialPort Serial
#include <SparkFunMPU9250-DMP.h>
MPU9250_DMP imu;
double roll , pitch, yaw;
long int pre_ts=0;
void setup()
{

Install dlib and face_recognition on a Raspberry Pi

Instructions tested with a Raspberry Pi 2 with an 8GB memory card. Probably also works fine on a Raspberry Pi 3.

Steps

Download the latest Raspbian Jessie Light image. Earlier versions of Raspbian won't work.

Write it to a memory card using Etcher, put the memory card in the RPi and boot it up.

@xyfeng
xyfeng / gif.py
Last active January 19, 2022 15:55
python script turn images into gif
# From https://github.com/wnyc/PIL/blob/master/Scripts/gifmaker.py
#
# The Python Imaging Library
# $Id$
#
# convert sequence format to GIF animation
#
# history:
# 97-01-03 fl created
#
@sstephenson
sstephenson / back_forward.js
Created December 13, 2010 21:55
How to detect whether a hash change came from the Back or Forward button
var detectBackOrForward = function(onBack, onForward) {
hashHistory = [window.location.hash];
historyLength = window.history.length;
return function() {
var hash = window.location.hash, length = window.history.length;
if (hashHistory.length && historyLength == length) {
if (hashHistory[hashHistory.length - 2] == hash) {
hashHistory = hashHistory.slice(0, -1);
onBack();