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 os | |
import sys | |
import time | |
import signal | |
import threading | |
import atexit | |
import Queue | |
_interval = 1.0 | |
_times = {} |
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 os | |
import sys | |
# If your project is not on your PYTHONPATH by default you can add: | |
path = '/path/to/project' | |
if path not in sys.path: | |
sys.path.insert(0, path) |
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
--visit ronwinter.tv/drums.html, let the swf load, start the script, and then click inside the swf to put keyboard focus on Flash. The script will take control of your keyboard and play the drumset. The timing is really crappy. | |
global tempo | |
set tempo to 120 | |
--establish quarter note delay time | |
global q | |
set q to 60 / tempo | |
--establish eighth note delay time |
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
MidiIn min; | |
MidiMsg msg; | |
false => int activeShred; // store the id of the currently active shred. | |
// always be mindful of your starting conditions; | |
// in this case, the starting condition is that we | |
// have not yet launched any child shreds. | |
if(!min.open(0)) me.exit(); | |
fun int reShred(string shredFileName, int currentShred) { |
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
OscRecv recv; | |
6449 => recv.port; | |
recv.listen(); | |
// osc message path used is the Osculator default. | |
recv.event("/wii/1/accel/pry/3,f") @=> OscEvent e; | |
time ti; | |
float dt; | |
1000000.0 => float smallest; | |
while(true) { | |
now => ti; |
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
# Jordan Orelli wrote it. | |
# Do what you want with it. | |
# June 9th, 2011 | |
import os | |
import subprocess | |
import tempfile | |
if not os.environ.has_key('EDITOR'): | |
raise Exception('Unable to open editor; please set your EDITOR ' |
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
#!/usr/bin/env python | |
# Load the Django environment | |
from django.core.management import setup_environ | |
import os | |
import sys | |
try: | |
project_path = os.environ['DJANGO_PROJECT_PATH'] | |
except KeyError: | |
raise Exception("Unable to locate Django project. Set your operating " |
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
#!/usr/bin/env python | |
# Load the Django environment | |
from django.core.management import setup_environ | |
import os | |
import sys | |
try: | |
project_path = os.environ['DJANGO_PROJECT_PATH'] | |
except KeyError: | |
raise Exception("Unable to locate Django project. Set your operating " |
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
KBHit kb; | |
fun void kbListener(KBHit @ _kb) | |
{ | |
while(true) | |
{ | |
_kb => now; | |
while(_kb.more()) | |
{ | |
chout <= "ascii: " <= kb.getchar() <= IO.newline(); |
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
from django.conf.urls.defaults import patterns, include, url | |
from django.views.generic import TemplateView | |
urlpatterns = patterns('', | |
url(r'^$', TemplateView.as_view( | |
template_name='index.html', | |
), name='home'), | |
) |
OlderNewer