Skip to content

Instantly share code, notes, and snippets.

View alx's full-sized avatar
🌌
exploring

Alexandre Girard Davila alx

🌌
exploring
View GitHub Profile
#
# input:
#
# >> log
# => [{:time=>201201, :x=>2}, {:time=>201201, :y=>7}, {:time=>201201, :z=>2}, {:time=>201202, :a=>3}, {:time=>201202, :b=>4}, {:time=>201202, :c=>0}]
#
result = {}
log.each do |line|
result[line[:time]] = result[line[:time]].nil? ? line : result[line[:time]].merge(line)
@alx
alx / ledpong_random.js
Created April 6, 2012 16:14
Ledpong : random with nodejs
var SerialPort = require("serialport").SerialPort;
var serialPort;
try {
serialPort = new SerialPort("/dev/ttyACM0", { baudrate: 38400 });
} catch(e) {
console.error(e.stack);
serialPort = { write: console.log };
}
setInterval(function() {
@alx
alx / pypong.py
Created April 6, 2012 14:48
PyPong - Ledpgon with Python
import serial
import time
class pypong:
def __init__(self, port="/dev/ttyACM0", baudrate=38400):
self.__s = serial.Serial(port=port, baudrate=baudrate)
def send_text(self, data):
if len(data) == 432:
try:
@alx
alx / tetaneutral_box.scad
Created March 24, 2012 15:05
Tetaneutral box
use <write.scad>
// Define box size
// it will compute the hole to leave inside these box
// depending on the wall size
box_size = [120,30,90];
wall_size = 1.6;
inner_size = [
box_size[0] - (wall_size * 2),
box_size[1] - (wall_size * 2),
@alx
alx / error.log
Created March 12, 2012 17:32
Marlin deuligne compilation
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=100 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/mega -I/Applications/Arduino.app/Contents/Resources/Java/libraries/Wire -I/Users/alx/Documents/Arduino/libraries/Deuligne -I/Applications/Arduino.app/Contents/Resources/Java/libraries/LiquidCrystal /var/folders/df/rc0lj9613dn7fhgs1v1llrlw0000gn/T/build4813587601835859949.tmp/cardreader.cpp -o/var/folders/df/rc0lj9613dn7fhgs1v1llrlw0000gn/T/build4813587601835859949.tmp/cardreader.cpp.o
In file included from cardreader.cpp:1:
Marlin.h:75: warning: only initialized variables can be placed into program memory area
Marlin.h:76: warning: only initialized variables can be placed into program memory area
cardreader.cpp: In member function 'void CardReader::initsd(
@alx
alx / gist:2023450
Created March 12, 2012 17:16
compilation Marlin Deuligne
Smiley Deuligne:
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=100 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/mega -I/Applications/Arduino.app/Contents/Resources/Java/libraries/Wire -I/Users/alx/Documents/Arduino/libraries/Deuligne /var/folders/df/rc0lj9613dn7fhgs1v1llrlw0000gn/T/build4813587601835859949.tmp/Smiley.cpp -o/var/folders/df/rc0lj9613dn7fhgs1v1llrlw0000gn/T/build4813587601835859949.tmp/Smiley.cpp.o
Marlin:
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=100 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Jav
@alx
alx / stratfor_social.gexf
Last active July 3, 2023 20:19
Startfor social network with 167 releases from GIFiles
<?xml version="1.0" encoding="UTF-8"?><gexf xmlns="http://www.gexf.net/1.2draft" version="1.2"><meta lastmodifieddate="2012-02-27"><creator>Tetalab</creator><description>Stratfor</description></meta><graph mode="static" defaultedgetype="directed"><nodes count="702"><node id="mirela.glass" label="mirela.glass"/><node id="hanna" label="hanna"/><node id="glass" label="glass"/><node id="sagebiel" label="sagebiel"/><node id="gibbons" label="gibbons"/><node id="campbell" label="campbell"/><node id="sagebiel" label="sagebiel"/><node id="gibbons" label="gibbons"/><node id="hanna" label="hanna"/><node id="Solomon.Foshko" label="Solomon.Foshko"/><node id="mirela.glass" label="mirela.glass"/><node id="leticia.pursel" label="leticia.pursel"/><node id="undisclosed-recipients:" label="undisclosed-recipients:"/><node id="reva.bhalla" label="reva.bhalla"/><node id="analysts" label="analysts"/><node id="victoria.allen" label="victoria.allen"/><node id="analysts" label="analysts"/><node id="friedman@att.blackberry.net" label="
@alx
alx / deuligne_v1_error.log
Created February 20, 2012 15:23
deuligne_v1 compilation error
Marlin.cpp: In function 'void screen_display()':
Marlin.pde:-1: error: invalid conversion from 'int*' to 'int'
temperature.h:37: error: too few arguments to function 'float analog2temp(int, uint8_t)'
Marlin.pde:-1: error: at this point in file
Marlin.pde:-1: error: invalid conversion from 'int*' to 'int'
temperature.h:37: error: too few arguments to function 'float analog2temp(int, uint8_t)'
Marlin.pde:-1: error: at this point in file
temperature.h: In function 'void key_interaction(uint8_t)':
temperature.h:35: error: too few arguments to function 'int temp2analog(int, uint8_t)'
Marlin.pde:-1: error: at this point in file
@alx
alx / toulouse_videosurveillance.json
Created January 25, 2012 17:17
GeoJson data for Toulouse Videosurveillance mapping, by Tetalab
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alx
alx / Bethelsassar_festival_2012.md
Last active September 29, 2015 08:37
Bethelsassar festival 2012

01/2012

  • Electroshock par Hugo JACKSON, Pascal CHANDELIER, Valentin MICHEL, Bastien MORTELECQUE et Elliot MAREN de l'Ecole Supérieure des Métiers Artistiques 2011
  • Joe par Laetitia Butyn de l'EMCA (Angoulême)
  • Road Rage par Nick Khoo

04/2012