Skip to content

Instantly share code, notes, and snippets.

View richardkiss's full-sized avatar

Richard Kiss richardkiss

View GitHub Profile
PROCESS
- install Raspian
- expand filesystem
- get on wifi
(zfec dependencies)
$ sudo apt-get install python-dev
$ curl http://python-distribute.org/distribute_setup.py | sudo python
#!/usr/bin/env python
"""
The obvious way is to do it with complex numbers.
"""
def f(x):
# remember, in Python 1j means sqrt(-1)
return 1j * x
@richardkiss
richardkiss / time_picker.js
Created February 16, 2013 23:55
jQuery extension for a time picker that has a small <select> menu with a small number of times that should handle 90% of cases, plus an "other time" option that allows any time to be entered.
/*global $ */
(function( $ ){
$.fn.time_picker = function( method ) {
if ( methods[method] ) {
return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 ));
} else if ( typeof method === 'object' || ! method ) {
return methods.init.apply( this, arguments );
} else {
#!/usr/bin/env python
import sys
import time
import csv
import sqlite3
from google.appengine.datastore import entity_pb
from google.appengine.api import datastore