After the event today there was a rail jam in memory of Molly, a 5 year old girl who died of lymphoma last July.. this is the second rail jam her family has held/. last year it was raising money for her treatment. this year its a memorial .. The money raised goes to help the family of kids battling cancer.
I installde in the house.. We’re trying to figure out what appliance take which power.. the catch is, you need to be staring at the screen all the time to see the power changing.. which makes it tough to figure out what’s using the power.. Today I wrote a simple program that plays a simple tone sequence over the sterieo when the power he house is using increases or decreases suddenly .. it makes it easy to figure out what device is using the power.
Right now it s driving us crazy dah-dah-dah dah .. dee-dee-dee-deeee
here’s the code if anyone’s interested..
from BeautifulSoup import BeautifulSoup
from time import sleep
import re, urllib2
import audiere
def read_entry(url):
try:
resp = urllib2.urlopen(url,None,100)
html_code = resp.read()
soup = BeautifulSoup(”.join(html_code))
power = soup.findAll(“powernow”)
return int(power0.contents0)
# print soup.prettify()
except IOError, e:
print e.reason
go = 1
last = 0
# Open default audio device
d = audiere.open_device()
threshold = 50
while (go == 1):
this = read_entry(‘http://ted5000/api/LiveData.xml‘)
diff = this – last
print this,” “, last, ” ” , diff
if abs(diff) > threshold :
steps = abs(diff) / threshold
freq = last
for i in range(steps) :
t = d.create_tone(freq)
t.pan = 1
t.play()
sleep(0.05)
t.stop()
if diff > 0 :
freq = freq + threshold
else :
freq = freq – threshold
last = this
Gotta go now.. Diane is watching the “Flying Nun” on Youtube..
Now that was a weird show
Nite folks.. nite sam
-me