Skip to content

Instantly share code, notes, and snippets.

View rubdos's full-sized avatar
💬

Ruben De Smet rubdos

💬
View GitHub Profile
@rubdos
rubdos / hello.sh
Created July 16, 2015 12:01
hello-world mesos
while [ true ] ; do echo 'Hello Marathon' ; sleep 5 ; done
@rubdos
rubdos / pingpongballtwitter
Created March 18, 2015 12:06
Ping pong ball controller Twitter coupling
#!/usr/bin/env python
import tweepy, time, sys, serial, json
CONSUMER_KEY = ''
CONSUMER_SECRET = ''
ACCESS_KEY = ''
ACCESS_SECRET = ''
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
@rubdos
rubdos / compile_procedures.py
Created January 5, 2015 15:45
compile_procedures.py
#!/usr/bin/python
# Please put this file in the $FG_ROOT directory, chmod +x and run, then look in the procedures subdirectory.
import xml.etree.ElementTree as etree
import os
import shutil
from subprocess import call
def generate_procedures(source):
@rubdos
rubdos / motiondetect.py
Created August 27, 2014 12:00
Simple pythonscript to detect motion using a webcam
#!/bin/python
import numpy as np
import cv2
def diffImg(i0,i1,i2):
d1 = cv2.absdiff(i2, i1)
d2 = cv2.absdiff(i1, i0)
return cv2.bitwise_and(d1, d2)
cap = cv2.VideoCapture(0)
#!/bin/python2
from Tkinter import *
import tkFileDialog
import base64
import tempfile
import os
import sys, subprocess
class App:
#!/usr/bin/python3
import sqlite3
conn = sqlite3.connect("trackerbackup")
c = conn.cursor()
vcard = open("contacts.vcard","w+")
PersonContacts = []
@rubdos
rubdos / fgfs test code
Created April 19, 2013 20:05
Code used with flightgear
//PIN 0 -> 7 has positive segment part
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);