Skip to content

Instantly share code, notes, and snippets.

@bgschiller
bgschiller / count.py
Created October 12, 2012 05:30 — forked from MorganBorman/count.py
Counting using a generator which returns the digits of an arbitrary number system
def count(digitgen):
"Takes an iterator which yields the digits of a number system and counts using it."
def subcount(digitgen, places):
if places == 1:
for d in digitgen():
yield d
else:
for d in digitgen():
for ld in subcount(digitgen, places - 1):
@bgschiller
bgschiller / rayage
Last active December 16, 2015 20:39 — forked from philipbjorge/rayage
Front End:
Run tests functionality (we can run every time they hit run)
[X] Test output tab has a line for every line in the reference
[x] Modify the html in static/custom/templates/Rayage.html to mess with test output contents
[X] 'Test' button sends a message asking for a diff. Server responds with a JSON object
[ ] downgrade Test output from terminal to something simpler
[ ] change 'Logout' to 'Unspoof' when we are spoofing. (Can't figure this one out. I have code that should do this at static/custom/RayageMenu.js:70. It's not very high priority for me)
Submit assignment
message to server: "submit_assigment"