Skip to content

Instantly share code, notes, and snippets.

View a1rb4Ck's full-sized avatar
🎯

Pierre Nagorny a1rb4Ck

🎯
View GitHub Profile
@daien
daien / video_stabilize.py
Created January 2, 2012 18:23
Video stabilization with OpenCV and Hugin
#!/usr/bin/env python
""" Video stabilization with OpenCV (>=2.3) and Hugin
Adrien Gaidon
INRIA - 2012
TODO: add cropping, clean-up and improve doc-strings
"""
@attilaolah
attilaolah / imgcmp.py
Created February 29, 2012 11:30
Fast image comparison with Python
import math
import Image
import Levenshtein
class BWImageCompare(object):
"""Compares two images (b/w)."""
_pixel = 255

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@sprin
sprin / create_test_db.py
Last active November 30, 2022 04:57
A demo of creating a new database via SQL Alchemy. This module takes the form of a nosetest with three steps: - Set up the new database. - Create a table in the new database. - Teardown the new database.
"""
A demo of creating a new database via SQL Alchemy.
Under MIT License from sprin (https://gist.github.com/sprin/5846464/)
This module takes the form of a nosetest with three steps:
- Set up the new database.
- Create a table in the new database.
- Teardown the new database.
"""
@d3noob
d3noob / .block
Last active August 30, 2022 17:09
Earthquake Data Discovery using dc.js, crossfilter, d3.js and bootstrap
license: mit
@burnash
burnash / get_oauth2_token.py
Last active August 11, 2021 21:16
Simple command line script to fetch a Google API's access token.
'''
This script will attempt to open your webbrowser,
perform OAuth 2 authentication and print your access token.
It depends on two libraries: oauth2client and gflags.
To install dependencies from PyPI:
$ pip install python-gflags oauth2client
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active June 4, 2024 04:16
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@kriegsman
kriegsman / PaletteCrossfade.ino
Last active March 2, 2024 01:37
How to cross-fade between color palettes using nblendPaletteTowardPalette
#include <FastLED.h>
#define LED_PIN 3
#define NUM_LEDS 30
#define BRIGHTNESS 96
#define LED_TYPE WS2811
#define COLOR_ORDER GRB
CRGB leds[NUM_LEDS];
#define UPDATES_PER_SECOND 100
@hsiboy
hsiboy / FastLED_DMX.ino
Created March 2, 2015 16:37
DMX control of neopixels, WS2811, WS2812 etc using FastLED Arduino Teensy3.1
#include <DmxReceiver.h>
#include <FastLED.h>
#define DMX_NUM_CHANNELS 15
#define NUM_LEDS 15
#define DATA_PIN 11
#define LED_TYPE WS2811
#define COLOUR_ORDER
#define CLOCK_PIN 13 // Clock pin only needed for SPI based chipsets when not using hardware SPI
@ttscoff
ttscoff / voices.txt
Created April 20, 2015 20:48
Voices available to say command on OS X 10.10.3
# Voices available to `say` on OS X
# "*" indicates new additions since 10.8
Agnes (en_US)
Albert (en_US)
Alex (en_US)
*Alice (it_IT)
*Alva (sv_SE)
*Amelie (fr_CA)
*Anna (de_DE)