Skip to content

Instantly share code, notes, and snippets.

View blacklight's full-sized avatar

Fabio Manganiello blacklight

View GitHub Profile
/**
* FULL PACKAGE: -> http://blacklight.gotdns.org/prog/headtracking.tar.bz2
*/
/*
* Little project that uses OpenCV libraries and Haar cascade classifiers
* to recognize a face in a video stream (i.e. from a cam) and uses this
* knowledge to move mouse's cursor. This way you can move your mouse
* pointer just by moving your head in front of your webcam. This source
* was made to be completely modular. So you can track not just faces, but
@blacklight
blacklight / gist:6573755
Created September 15, 2013 19:39
Fabio "BlackLight" Manganiello's public PGP key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.12 (GNU/Linux)
mQGiBEpgaxMRBADxwyiBBUketQmr5CqpeliXQVJiG4YCq5SMECIe0OJkAdGk+v0l
fepqlsg25JpUUQBCDMIj4sGH6wOAzr4VL7xh/tx5aJ5nHtJey2ZuexOmDsxgloEF
hg7q/fLTv5DTsKHUfY/XqR4vvtHFkPs0E1RWIMlZm1m+7b2ZO85hUkWYQwCg2g5x
+r0gAbbkLhsdmYWEPCPkZAMEANSYcr6bBJt/Pixd2b51DBZkETZ1hT7/cq3FnRHA
OCwuTPkynejmWP2SVF5P4ypMJjDhHfGxFQ5S2Z1An7sI/9y2gqjHYB+DeLVVv1pw
54Q6qqSLvyMJPUnBfzEjOJQRpoIWKzJS29KOP10OYKLysdxL8B2nOZXl+sk7PK0V
RPF9BAC64DeTAaoRcOicasaGWDq6MkbnQexKWQSmUIZgfmG/dNeQ1+0M2GFbT6em
@blacklight
blacklight / mpdrand
Created October 17, 2013 19:01
Script for loading and playing a random album from your MPD playlist using python-mpd2 API
#!/usr/bin/python
from mpd import MPDClient
from random import randint, shuffle
client = MPDClient()
client.connect('localhost', 6600)
albums = client.list("album")
shuffle(albums)
@blacklight
blacklight / theremin.py
Created October 27, 2013 03:22
Python script for using your Leap Motion as a weird theremin. Requirements: Leap SDK, pyaudio and numpy
#!/usr/bin/python
import sys
import math
import pyaudio
import numpy
import Leap
from datetime import datetime
class SoundDriver(object):
@blacklight
blacklight / nfcexec.py
Last active July 29, 2018 00:23
Read Platypush commands from an NFC card and deliver them to the local Redis queue
#!/usr/bin/python2
import json
import logging
import nfc
import ndef
import sys
import time
from redis import Redis
@blacklight
blacklight / pre_analyze_russian_troll_tweets_dump.py
Created August 3, 2018 23:05
Script to pre-analyze, count the countries share and filter Italian tweets from the dump of Russian trolls activity published on https://github.com/fivethirtyeight/russian-troll-tweets/
import csv
import json
import sys
from collections import defaultdict
def main():
tweets_by_region = defaultdict(lambda: 0)
tweets_by_language = defaultdict(lambda: 0)
italian_tweets = []
@blacklight
blacklight / cvimrc
Last active September 5, 2018 09:59
" Settings
" set noautofocus
set cncpcompletion
set nosmoothscroll
set nohud
set noautofocus
set autohidecursor
set typelinkhints
set numerichints
This file has been truncated, but you can view the full file.
/usr/lib/python2.7/site-packages/pylast/__init__.py:51: UserWarning: You are using pylast with Python 2. Pylast will soon be Python 3 only. More info: https://github.com/pylast/pylast/issues/265
UserWarning,
INFO 2018-10-31 18:28:58,431 [16926:MainThread] mopidy.__main__
Starting Mopidy 2.2.1
DEBUG 2018-10-31 18:28:58,439 [16926:MainThread] mopidy.ext
Loading entry point: mpd = mopidy.mpd:Extension
DEBUG 2018-10-31 18:28:58,440 [16926:MainThread] mopidy.ext
Loaded extension: Mopidy-MPD 2.2.1
DEBUG 2018-10-31 18:28:58,440 [16926:MainThread] mopidy.ext
Loading entry point: http = mopidy.http:Extension
#!/usr/bin/env python
### Get one or more true random numbers using the qrng.anu.edu.au quantum
### random number generator through the available API
import argparse
import json
import requests
_DEFAULT_MIN = 0
#!/usr/bin/env python
### Get one or more true random numbers using the qrng.anu.edu.au quantum
### random number generator through the available API
### Author: Fabio <BlackLight> Manganiello
import argparse
import json
import requests