This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import sin, cos, pi, sqrt, atan2 | |
from time import sleep | |
from random import uniform | |
import sys | |
# coords and transform are three-tuples of x, y, phi | |
# coords specifies the coordinates to be transformed | |
# transform specifies the transformation properties to be applied (what translation/rotation) | |
def transform_robot_to_sim(coords, transform): | |
coords_x = coords[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Services to use: | |
# Choices: security updates (from security.debian.org), volatile updates (from volatile.debian.org) | |
apt-setup-udeb apt-setup/services-select multiselect | |
# Non-existing physical volume | |
partman-auto-lvm partman-auto-lvm/no_such_pv error | |
# Check the integrity of another CD-ROM? | |
d-i cdrom-checker/nextcd boolean false | |
# Install GRUB? | |
grub-installer grub-installer/grub_not_mature_on_this_platform boolean false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xmpp | |
import base64 | |
import sys | |
# this script retrieves the avatars of all your xmpp contacts and saves them | |
# in the current directory | |
if len(sys.argv) != 4: | |
print "usage: "+sys.argv[0]+" user pass server" | |
exit(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# this script first downloads and then sanitizes debian Packages and Sources | |
# files from snapshot.debian.org for every 5 days since the start of | |
# snapshot.debian.org | |
dist=sid | |
arch=i386 | |
dates=`cat << END | python -c "import sys; exec sys.stdin.read()" | |
from datetime import date, timedelta as t | |
last = date.today() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "opencv2/highgui/highgui.hpp" | |
#include "opencv2/core/core.hpp" | |
#include "opencv2/imgproc/imgproc.hpp" | |
#include "opencv2/imgproc/imgproc_c.h" | |
#include <iostream> | |
using namespace cv; | |
using namespace std; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# reads a deltavision file and stores all images therein as png | |
# this reader is fairly limited | |
# | |
# it expects a deltavision video in which there are two types of images, stored | |
# interleaved: ABABAB... Both types only have one channel. Each pair A and B is | |
# combined into an RGB image such that A is green and B is red | |
# | |
# example usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import shuffle | |
from itertools import permutations | |
# dolch word list excluding "Santa Claus" (94 words) | |
words = [ "apple", "baby", "back", "ball", "bear", "bed", "bell", "bird", | |
"birthday", "boat", "box", "boy", "bread", "brother", "cake", "car", | |
"cat", "chair", "chicken", "children", "christmas", "coat", "corn", | |
"cow", "day", "dog", "doll", "door", "duck", "egg", "eye", "farm", | |
"farmer", "father", "feet", "fire", "fish", "floor", "flower", | |
"game", "garden", "girl", "good-bye", "grass", "ground", "hand", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from urllib2 import Request, urlopen | |
from gzip import GzipFile | |
from cStringIO import StringIO | |
from zlib import decompress | |
from struct import unpack | |
from time import sleep | |
from datetime import timedelta, date, datetime | |
from lxml import etree | |
def get_id(station): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NFQLLexer(RegexLexer): | |
name = 'NFQL' | |
aliases = ['nfql'] | |
filenames = ['*.flw'] | |
tokens = { | |
'whitespace': [ | |
(r'\n', Text), | |
(r'\s+', Text), | |
(r'\\\n', Text), | |
(r'#(\n|.*?\n)', Comment.Single), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
mkdir -p isomount | |
mkdir -p extmount | |
mkdir -p mainmount | |
cleanup() { | |
sudo umount isomount |