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 -exu | |
directory=ubuntu-xenial-robot | |
debootstrap --variant=minbase --include=dbus,systemd-sysv xenial "$directory" http://archive.ubuntu.com/ubuntu/ | |
systemd-nspawn --boot --resolv-conf=copy-host --directory="$directory" & | |
pid=$! |
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 -exu | |
directory=ubuntu-xenial-robot | |
debootstrap --variant=minbase --include=dbus,systemd-sysv xenial "$directory" http://archive.ubuntu.com/ubuntu/ | |
systemd-nspawn --boot --resolv-conf=copy-host --directory="$directory" & | |
pid=$! |
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 -x | |
set -e | |
DEV=/dev/sdb | |
if ! sudo parted -lm 2>/dev/null | grep scsi | grep "$DEV" > /dev/null; then | |
echo "refusing to work on a device that is not a scsi disk" >&2 | |
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 | |
set -e | |
mkdir -p isomount | |
mkdir -p extmount | |
mkdir -p mainmount | |
cleanup() { | |
sudo umount isomount |
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
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
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
#!/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
#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
#!/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() |
NewerOlder