This file contains 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 threading, sys, os | |
import cPickle as pickle | |
import simplejson, requests | |
decoder = simplejson.JSONDecoder() | |
error_pages = {'section_pages': [], 'xml_pages': [], 'course_pages': []} | |
def getCourseNumbers(page): |
This file contains 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
def parseNote(note): | |
"""translates English notes to (default) lilypond notes""" | |
"""takes a string consisting of a note name 'a', 'b', 'c', 'd', 'f', or 'g' | |
(note names can be either upper or lower case) | |
optionally followed by a '#' or 'b' to signify sharps and flats, followed by | |
an octave number corresponding to the note's piano octave. | |
returns a default lilypond representation of the note in absolute octave | |
notation. Spaces are ignored. returns None if the input is invalid.""" |
This file contains 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
### This is a calculator to tell you how many lemene and cosmox to make | |
### if you are about to cook up some serious nono. You will need the | |
### requests and simpleson libraries and your own oauth token with read access. | |
import requests, simplejson | |
token = '' # put token with read access here | |
uri = ''.join(["http://api.glitch.com/simple/players.inventory?oauth_token=", | |
token]) |
This file contains 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
class Compound(): | |
def __init__(self, red, green, blue, shiny, price, name): | |
self.red = red | |
self.green = green | |
self.blue = blue | |
self.shiny = shiny | |
self.price = float(price) | |
self.name = name | |
def elements(self): | |
return (self.red, self.green, self.blue, self.shiny) |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Nono Calculator</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="shortcut icon" href="http://www.glitch-strategy.com/w/images/2/23/NoNoPowder469.png"> | |
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet"> | |
<style> |
This file contains 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
// This is public domain code written in 2011 by Jan Wolter and distributed | |
// for free at http://unixpapa.com/js/querystring.html | |
// | |
// Query String Parser | |
// | |
// qs= new QueryString() | |
// qs= new QueryString(string) | |
// | |
// Create a query string object based on the given query string. If | |
// no string is given, we use the one from the current page by default. |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<a href="https://api.glitch.com/oauth2/authorize?response_type=token&client_id=437-19317577bb4d4924be3681e4e0cbea95656bacb4&redirect_uri=http://bl.ocks.org/d/3196168/&scope=read">click here</a> | |
</html> |
This file contains 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
{"url": "http://www.youtube.com/watch?v=ETh0Kfxk2BY"} |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
</head> | |
<body> | |
<p>yo</p> | |
</body> |
This file contains 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
rollDie = function() { | |
var coin = Math.random(); | |
if (coin < (1 / 3)) { | |
return 0; | |
} else if (coin < (2 / 3)) { | |
return 1; | |
} else { | |
return 2; | |
} | |
}; |
OlderNewer