Blending art, technology, and light. Designing Birdfish, an expressive Python Library for interactive and real time LED installations
Other
Intermediate
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import boto.ec2 | |
import boto.vpc | |
def dprint (body): | |
# print >> sys.stderr, body | |
return |
<html> | |
<head> | |
<title>key press test</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<h1>Press keys...</h1> | |
WebSocket status : <span id="message"></span> | |
<script> | |
var ws = new WebSocket('ws://127.0.0.1:8866/'); |
import sys | |
import os | |
import scipy | |
from numpy import array, dstack | |
from pylsm import lsmreader | |
# all of the above imports pull into our program features we use of other | |
# modules. Ideally anything not defined in our program can be seen above | |
# sys.argv contains a list of all the files passed to our script when it is called |
class PhysicalDevice(object): | |
def __init__(self, channel=0): | |
self.channel = channel | |
self.physical_state = False | |
class LogicalDeviceBase(object): | |
def __init__(self): | |
self.logical_state = False |
import sys | |
from birdfish.input.osc import OSCDispatcher | |
from birdfish.lights import RGBLight, Chase, LightShow | |
from birdfish.output.lumos_network import LumosNetwork | |
from birdfish import tween | |
osc_dispatcher = OSCDispatcher(('0.0.0.0', 8998)) |
diff --git a/django/contrib/auth/tests/forms.py b/django/contrib/auth/tests/forms.py | |
index 2589068..bca79a4 100644 | |
--- a/django/contrib/auth/tests/forms.py | |
+++ b/django/contrib/auth/tests/forms.py | |
@@ -100,7 +100,8 @@ class AuthenticationFormTest(TestCase): | |
form = AuthenticationForm(None, data) | |
self.assertFalse(form.is_valid()) | |
self.assertEqual(form.non_field_errors(), | |
- [force_text(form.error_messages['invalid_login'])]) | |
+ [force_text(form.error_messages['invalid_login'] |
(notebook)element:nbcast$ ipython notebook --NotebookApp.extra_static_paths="['./profile_nbcast/static/']" | |
Traceback (most recent call last): | |
File "/Users/preston/Projects/Python/virtualenvs/notebook/bin/ipython", line 9, in <module> | |
load_entry_point('ipython==0.14.dev', 'console_scripts', 'ipython')() | |
File "/Users/preston/UNIX/src/ipython/IPython/frontend/terminal/ipapp.py", line 388, in launch_new_instance | |
app.initialize() | |
File "<string>", line 2, in initialize | |
File "/Users/preston/UNIX/src/ipython/IPython/config/application.py", line 84, in catch_config_error | |
return method(app, *args, **kwargs) | |
File "/Users/preston/UNIX/src/ipython/IPython/frontend/terminal/ipapp.py", line 313, in initialize |
// load popcorn dynamically | |
var script = document.createElement("script"); | |
script.type = "text/javascript"; | |
script.src = '/static/js/popcorn.js'; | |
document.getElementsByTagName("head")[0].appendChild(script); | |
function popcornReady() { | |
// this is called when script loaded, but before Popcorn global ready | |
console.log("popcorn ready callback"); | |
// console.log(Popcorn); |
""" | |
Tween functions | |
t = current time | |
b = start value | |
c = change in value | |
d = total duration | |
""" | |
def OUT_EXPO(t, b, c, d ): | |
return b+c if (t==d) else c * (-2**(-10 * t/d) + 1) + b |