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 os, json | |
stats = {} | |
keys = set() | |
for fname in os.listdir("stats"): | |
name = fname.replace(".json", "") | |
with file("stats/%s" % fname) as f: | |
data = json.load(f) | |
stats[name] = data | |
for k, v in data.iteritems(): |
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
gl.setup(NATIVE_WIDTH, NATIVE_HEIGHT) | |
node.alias "looper" | |
local Looper = function(file) | |
local vid = resource.load_video(file, false, true) | |
local function draw() | |
util.draw_correct(vid, 0, 0, WIDTH, HEIGHT) | |
return true | |
end | |
local function set_running(running) |
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
/* | |
Copyright (c) 2012, Broadcom Europe Ltd | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright | |
notice, this list of conditions and the following disclaimer in the |
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
{ | |
"screens": [ | |
{ | |
"x": 48, | |
"y": 55.20000000000002, | |
"rotation": 0, | |
"inches": 22.5, | |
"width": 1920, | |
"height": 1080 | |
}, |
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
# fw@dividuum.de wrote this file. As long as you retain this notice you | |
# can do whatever you want with this stuff. If we meet some day, and you think | |
# this stuff is worth it, you can buy me a beer in return | |
import math | |
import traceback | |
import json | |
from cStringIO import StringIO | |
from PIL import Image |
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
/** | |
* Handle onKey() events coming down from a {@link TerminalView} above us. | |
* Modify the keys to make more sense to a host then pass it to the transport. | |
*/ | |
public boolean onKey(View v, int keyCode, KeyEvent event) { | |
try { | |
// Log.d(TAG, "KEY " + keyCode + " " + event.getAction() + " -> " + metaState); | |
if (bridge.isDisconnected() || bridge.transport == null) { | |
Log.d(TAG, "not connected"); |
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
# Based on | |
# http://japskua.wordpress.com/2010/08/04/detecting-eyes-with-python-opencv/ | |
# http://stackoverflow.com/questions/1650568/how-do-i-create-an-opencv-image-from-a-pil-image | |
import os | |
import sys | |
import logging | |
from cStringIO import StringIO | |
import cv |