Skip to content

Instantly share code, notes, and snippets.

View Debilski's full-sized avatar

Rike-Benjamin Schuppner Debilski

  • Institute for Theoretical Biology, Humboldt-University
  • Berlin
View GitHub Profile
@Debilski
Debilski / gist:2839185
Created May 30, 2012 21:55
Pelita network spec

Pelita network messaging specification

Message format

A message is always sent as a JSON object. The following keys are allowed and denote different types of messages.

Request message

import multiprocessing
import threading
import time
def f(i):
try:
print "starting f(%i)..." % i
time.sleep(i * 3 + 1)
print "stopping f(%i)..." % i
@Debilski
Debilski / actortest-py2.py
Last active December 12, 2015 02:59
Python (2/3) Actor test
import threading, Queue
Thread = threading.Thread
Empty = Queue.Empty
Queue = Queue.Queue
class Stop(Exception):
pass
class Actor(object):
def __init__(self):
function bash_env --description 'Imports named variables from a bash script'
# Usage:
# bash_env script.bash VAR1 VAR2 VARN
#
set -l script $argv[1]
while read i; set code "$code""$i"\n; end < $script
set -l variables
for arg in $argv[2..-1]
set variables $variables "echo \"set -g $arg \${$arg}\""\n
end
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/*
Requires
libraryDependencies += "com.helger" % "ph-css" % "4.0.0"
Use in boot.scala:
(new CSSFixer).fixCSS("css" :: "styles" :: Nil, Full("/newRoot"))
*/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Debian installation using only debootstrap

Prerequisites

A minimal Debian installation on a USB stick in EFI mode.

Using grml would be easier to prepare but only works from legacy (BIOS) boot and does not come with systemd-nspawn.

A future task would be to add statelessness to the USB stick and enable boot to RAM.

import argparse
import subprocess
description = """
This sets up the build for OpenCV and helps with finding
the right Python versions."
Run as:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.