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
gst-launch-0.10 videotestsrc ! video/x-raw-yuv,format=\(fourcc\)I420,width=640,height=480,framerate=25/1 ! x264enc byte-stream=true ! filesink location=foo.mp4 |
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 cv2 | |
import numpy as np | |
import scipy.ndimage.measurements | |
cv2.startWindowThread() | |
for iname,t in (("img",45),("img2",230), ("img3",230), ("img4",250)): | |
i = cv2.imread("%s.png" % iname) | |
cv2.namedWindow(iname) |
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 threading | |
import time | |
import serial | |
from gi.repository import Gtk, Gdk, GObject | |
GObject.threads_init() | |
Gdk.threads_init() |
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 numpy as np | |
def fix(d): | |
#d = d.copy() | |
for k,v in d.items(): | |
if type(v) == dict: | |
d[k] = fix(v) | |
elif isinstance(v,np.floating): | |
d[k] = float(v) | |
elif isinstance(v,np.integer): |
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
all: testc testorc | |
clean: | |
rm -f testc testorc out.c out.h | |
testc: out.c test.c | |
$(CC) -DDISABLE_ORC=1 -o $@ $^ | |
testorc: out.c test.c | |
$(CC) -o $@ $^ `pkg-config --cflags --libs orc-0.4` |
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 UserDict | |
class DotDict(UserDict.IterableUserDict): | |
def __init__(self): | |
UserDict.IterableUserDict.__init__(self) | |
def __setitem__(self, key, val): | |
bits = key.split(".") | |
if bits[0] not in self.data: |
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 | |
OUT="./" | |
PROJ="/home/john/Programming/pygtk.git/" | |
pepper activity --datemin=1998-12-01 --output=${OUT}/activity.png --size=800x600 ${PROJ} | |
pepper activity --split=authors --n=10 --datemin=1998-12-01 --output=${OUT}/activity-auth.png --size=800x600 ${PROJ} | |
pepper activity --split=directories --datemin=1998-12-01 --output=${OUT}/activity-directories.png --size=800x600 ${PROJ} | |
pepper loc --output=${OUT}/loc.png --size=800x600 ${PROJ} | |
pepper loc --tags --output=${OUT}/loc-tags.png --size=3200x600 ${PROJ} |
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
/* | |
* Gtk example to show depth map from Micrsoft Kinect | |
* Copyright (c) 2010 John Stowers | |
* | |
* Copyright (c) 2010 individual OpenKinect contributors. See the CONTRIB file | |
* for details. | |
* | |
* This code is licensed to you under the terms of the Apache License, version | |
* 2.0, or, at your option, the terms of the GNU General Public License, | |
* version 2.0. See the APACHE20 and GPL2 files for the text of the licenses, |