A message is always sent as a JSON object. The following keys are allowed and denote different types of messages.
This file contains hidden or 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 multiprocessing | |
import threading | |
import time | |
def f(i): | |
try: | |
print "starting f(%i)..." % i | |
time.sleep(i * 3 + 1) | |
print "stopping f(%i)..." % i |
This file contains hidden or 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 threading, Queue | |
Thread = threading.Thread | |
Empty = Queue.Empty | |
Queue = Queue.Queue | |
class Stop(Exception): | |
pass | |
class Actor(object): | |
def __init__(self): |
This file contains hidden or 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
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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
/* | |
Requires | |
libraryDependencies += "com.helger" % "ph-css" % "4.0.0" | |
Use in boot.scala: | |
(new CSSFixer).fixCSS("css" :: "styles" :: Nil, Full("/newRoot")) | |
*/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.
This file contains hidden or 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 argparse | |
import subprocess | |
description = """ | |
This sets up the build for OpenCV and helps with finding | |
the right Python versions." | |
Run as: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer