This file contains hidden or 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 sys, threading, Queue, weakref | |
try: | |
import Tkinter | |
_has_tk = True | |
_debug_win = None | |
except ImportError: | |
# quietly disable ourselves | |
_has_tk = False |
This file contains hidden or 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
var mandelbulbCanvas = document.getElementById('mandelbulb'); | |
window.requestAnimFrame = (function(callback) { | |
return window.requestAnimationFrame || | |
window.webkitRequestAnimationFrame || | |
window.mozRequestAnimationFrame || | |
window.oRequestAnimationFrame || | |
window.msRequestAnimationFrame || | |
function(callback) { | |
window.setTimeout(callback, 100); |
This file contains hidden or 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
<html> | |
<head> | |
<title>Will's quick mandelbulb GLSL</title> | |
<script type="application/javascript"> | |
var canvas, gl, program; | |
function start() { | |
window.onerror = function(msg, url, lineno) { | |
alert(url + '(' + lineno + '): ' + msg); |
This file contains hidden or 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
function createOrtho2D(left,right,top,bottom) { | |
var near = -1, far = 1, rl = right-left, tb = top-bottom, fn = far-near; | |
return [2/rl,0,0,0, | |
0,2/tb,0,0, | |
0,0,-2/fn,0, | |
-(right+left)/rl, -(top+bottom)/tb, -(far+near)/fn,1]; | |
} | |
createOrtho2D(0,canvas.offsetWidth,0,canvas.offsetHeight) * [10,10,0] = [-0.9804878048598766,0.9450549436733127,0] |
This file contains hidden or 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 os, subprocess, base64 | |
import tornado.ioloop | |
import tornado.web | |
from tornado.options import define, options, parse_command_line | |
define("port",default=8888,type=int) | |
define("branch",default="master") | |
define("access",type=str,multiple=True) | |
class MainHandler(tornado.web.RequestHandler): |
This file contains hidden or 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
[I 120826 17:42:18 web:1447] 304 GET /index.html (127.0.0.1) 21.74ms | |
[I 120826 17:42:19 web:1447] 304 GET /game.js (127.0.0.1) 27.38ms | |
[I 120826 17:42:19 web:1447] 304 GET /glutil.js (127.0.0.1) 15.00ms | |
[I 120826 17:42:19 web:1447] 304 GET /ui.js (127.0.0.1) 30.35ms | |
[I 120826 17:42:19 web:1447] 304 GET /g3d.js (127.0.0.1) 17.36ms | |
[I 120826 17:42:19 web:1447] 304 GET /logo.jpg (127.0.0.1) 11.59ms | |
[I 120826 17:42:19 web:1447] 304 GET /bitstream_vera_sans.png (127.0.0.1) 9.04ms | |
[I 120826 17:42:19 web:1447] 304 GET /bitstream_vera_sans.xml (127.0.0.1) 12.62ms | |
[I 120826 17:42:19 web:1447] 304 GET /grid.png (127.0.0.1) 9.49ms | |
[I 120826 17:42:19 web:1447] 304 GET /fighter2.g3d (127.0.0.1) 13.74ms |
This file contains hidden or 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 sys, struct, datetime | |
fmts = ("b","<h",">h","<H",">H","<i",">i","<I",">I","<f",">f","<d",">d") | |
s = file(sys.argv[1],"r").read() | |
print sys.argv[1] | |
print "ofs,",", ".join(fmts) | |
for i in xrange(len(s)-8): | |
print "%d,"%i,", ".join("%s"%struct.unpack(fmt,s[i:i+struct.calcsize(fmt)])[0] for fmt in fmts), | |
print "'%s',"%datetime.datetime.fromtimestamp(struct.unpack("<I",s[i:i+4])[0]).strftime('%Y-%m-%d %H:%M:%S'), | |
print "'%s'"%datetime.datetime.fromtimestamp(struct.unpack(">I",s[i:i+4])[0]).strftime('%Y-%m-%d %H:%M:%S') |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<kml xmlns="http://earth.google.com/kml/2.2"> | |
<Document> | |
<name>Collar7854</name> | |
<description>GPS Plus - http://www.vectronic-aerospace.com</description> | |
<Style id="FirstFix"> | |
<IconStyle> | |
<Icon> | |
<href>http://maps.google.com/mapfiles/kml/shapes/square.png</href> | |
</Icon> |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<kml xmlns="http://earth.google.com/kml/2.2"> | |
<Document> | |
<name>Collar9007</name> | |
<description>GPS Plus - http://www.vectronic-aerospace.com</description> | |
<Style id="FirstFix"> | |
<IconStyle> | |
<Icon> | |
<href>http://maps.google.com/mapfiles/kml/shapes/square.png</href> | |
</Icon> |
This file contains hidden or 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
size=[14,48,25,33] | |
tilesize=2048 | |
map_size=[(size[1]+size[3])*tilesize,(size[0]+size[2])*tilesize] | |
print '<html><head><title>',",".join("%s"%i for i in map_size),'</title></head><body><table cellspacing="0" cellpadding="0">' | |
for ns in "ns": | |
for y in range(48): | |
print "<tr>" | |
for x in range(25): |