Skip to content

Instantly share code, notes, and snippets.

@lucabelluccini
lucabelluccini / firmware.c
Last active December 17, 2015 11:48
DesktopDefender Sketch for Arduino v1 + Schematics
/*
+-------+-------+------+--------+------+-------+--------+ K BLACK
| BLACK | WHITE | GREY | PURPLE | BLUE | GREEN | YELLOW |
+---+---+--+----+--+---+-+------+--+---+---+---+----+---+ R RED
+ + + + + + +
| | | | | | | G GREEN
+------|-----+-|-----|-+ | | |
+-|-----|-|-----|-|-----+-|-----+-+ |
| | | | | | | | | |
@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'
# 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

@lucabelluccini
lucabelluccini / cport-log-example.log
Last active April 2, 2017 17:10
CurrPorts to Kibana end to end configuration (Elastic stack 5.3.0)
"java.exe","TCP","53472","127.0.0.1","53473","127.0.0.1","E:\Applicazioni\CommonFiles\Java64\bin\java.exe","4696","Established","Java(TM) Platform SE 8","Java(TM) Platform SE binary","8.0.1110.14","Oracle Corporation","N/A","","","","","A","","02/04/2017 19.02.00","",""
02/04/2017 19.02.00 Added "java.exe","TCP","53473","127.0.0.1","53472","127.0.0.1","E:\Applicazioni\CommonFiles\Java64\bin\java.exe","4696","Established","Java(TM) Platform SE 8","Java(TM) Platform SE binary","8.0.1110.14","Oracle Corporation","N/A","","","","","A","","02/04/2017 19.02.00","",""
02/04/2017 19.02.00 Removed "Unknown","TCP","1120","127.0.0.1","53106","127.0.0.1","","0","Time Wait","","","","","N/A","","","","","","LUCA-PC","02/04/2017 19.00.00","",""
02/04/2017 19.02.00 Removed "Unknown","TCP","1120","127.0.0.1","53107","127.0.0.1","","0","Time Wait","","","","","N/A","","","","","","LUCA-PC","02/04/2017 19.00.00","",""
02/04/2017 19.02.00 Removed "Unknown","TCP","53096","127.0.0.1","53097",
@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