Skip to content

Instantly share code, notes, and snippets.

@lucabelluccini
lucabelluccini / video-straming.howto.sh
Created October 14, 2014 22:27
Video streaming on RaspberryPi
# Server receiving
nc <raspberry ip> <port> | mplayer -fps <fps> -demuxer h264es -
# Raspberry
raspivid -hf -w <width> -h <height> -n -t 0 -fps <fps> -b <bitrate> -o - | nc -l -p <port>
# My settings -> width: 640 height: 480 fps: 30 bitrate: 5000000
@lucabelluccini
lucabelluccini / video_to_texture.py
Created March 6, 2016 18:06
Script to convert a set of avi videos into Flipbook textures to be used in UE4
import glob
import subprocess
from math import sqrt, ceil, pow, log
from PIL import Image
import os
from joblib import Parallel, delayed
FFMPEG_BINARY_ABSOLUTE_PATH = 'E:\\Applicazioni\\ffmpeg-20151213-git-906c0b7-win64-static\\bin\\ffmpeg.exe'
IMAGE_FORMAT = 'png'
@lucabelluccini
lucabelluccini / IMU
Last active May 1, 2017 09:23
IMU 9+ Dof List
MEDICAL DEVICES
http://gyko.microgate.it/it
http://www.molinarilife.it/wordpress/wp-content/uploads/2014/03/Scheda-T-PLATE.pdf
https://www.myvert.com/
http://www.myotest.com/
http://www.lizardmed.eu/it/pedana-lizard-ultimate/57-scheda-tecnica-pedana-lizard-ultimate.html
http://www.myotest.com/
LASER LENSES AND LASER LINE BEAMS
# Retrieve random icons from IconArchive.com and show them into Sense HAT
from sense_emu import SenseHat
from urllib.request import urlopen
from urllib.parse import urljoin
import re
import PIL.Image
from io import BytesIO
SITE_URL="http://www.iconarchive.com/"
@lucabelluccini
lucabelluccini / server.py
Created January 4, 2017 18:47
HyperIMU UDP Receiver
# Tested on Python 3.5
# Requires https://play.google.com/store/apps/details?id=com.ianovir.hyper_imu
# A stripped down version of https://github.com/ianovir/HIMUServer
import socketserver
import datetime
class TheUDPHandler(socketserver.BaseRequestHandler):
@lucabelluccini
lucabelluccini / README.md
Last active January 7, 2017 19:03
Script to delete tweets based on a query

This script allows to delete tweets from timeline

Authentication info is stored into a file (remove it to re-auth)

Tries to handle rate limiting thanks to header metadata returned by Twitter API

Makes use of one application client and a user client (rate limiting is different)

Customize the 'tweet_matches' method to return True when you want to delete the tweet