Skip to content

Instantly share code, notes, and snippets.

View elidickinson's full-sized avatar

Eli Dickinson elidickinson

View GitHub Profile
@elidickinson
elidickinson / print_weather.py
Created February 17, 2011 21:20
Send weather updates to your HP Printer LCD dispaly
#!/usr/bin/python
import pywapi # http://code.google.com/p/python-weather-api/
import telnetlib
import sys
if len(sys.argv) != 3:
print "USAGE: python print_weather.py <ZIPCODE> <PRINTER_IP>"
exit()
location_id = sys.argv[1]
load data local infile 'c:/fierce/fwe_opens.csv' ignore into table opens fields
TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
lines terminated by '\n'
(email,@check_time,@last_open,total_opens)
set mlid = 102866,
check_time = from_unixtime(@check_time),
last_open = if(@last_open<=0,NULL,date(from_unixtime(@last_open)))
;