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
function Sphere(iterations) { | |
// returns an object with a 'draw' method | |
// we cache ready-built spheres | |
if(!Sphere.spheres) | |
Sphere.spheres = []; | |
if(iterations in Sphere.spheres) | |
return Sphere.spheres[iterations]; | |
// we have to create it... | |
var vertices = [], | |
vIndex = {}, |
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 sys | |
queue = ["a"+"-"*9] | |
boards = {queue[0]:set()} | |
ends = set() | |
next = {"a":"b","b":"a"} | |
def won(side,board): | |
line = side*3 |
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
digraph luffarschack { | |
node [shape=none]; | |
"baabb--ba-" [label=<<TABLE BORDER="1" BGCOLOR="white"> | |
<TR><TD BGCOLOR="red"></TD><TD BGCOLOR="red"></TD><TD BGCOLOR="blue"></TD></TR> | |
<TR><TD BGCOLOR="blue"></TD><TD BGCOLOR="white"></TD><TD BGCOLOR="white"></TD></TR> | |
<TR><TD BGCOLOR="blue"></TD><TD BGCOLOR="red"></TD><TD BGCOLOR="white"></TD></TR> | |
</TABLE>>]; | |
"baabb--ba-" -> "abbaa-a-b-"; | |
"baabb--ba-" -> "ab-aaba--b"; | |
"baabb--ba-" -> "abbaaba---"; |
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 signal, time, traceback, threading | |
def start(interval=0.1): | |
global _interval, _samples | |
_samples = [] | |
signal.signal(signal.SIGALRM,_sample) | |
signal.setitimer(signal.ITIMER_REAL,interval,interval) | |
def stop(): | |
global _samples |
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
from PIL import Image, ImageDraw, ImageSequence | |
from random import random as rnd | |
from math import sqrt | |
def vec3_scale(v,f): | |
return (v[0]*f,v[1]*f,v[2]*f) | |
def vec3_add(a,b): | |
return (a[0]+b[0],a[1]+b[1],a[2]+b[2]) |
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
from PIL import Image, ImageDraw, ImageSequence | |
from random import random as rnd | |
from math import sqrt | |
def vec3_scale(v,f): | |
return (v[0]*f,v[1]*f,v[2]*f) | |
def vec3_add(a,b): | |
return (a[0]+b[0],a[1]+b[1],a[2]+b[2]) |
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
<html><head><title> 165888,79872 </title></head><body><table cellspacing="0" cellpadding="0"> | |
<tr> | |
<td><img src="http://imgs.xkcd.com/clickdrag/48n0e.png" alt=""/> | |
<td><img src="http://imgs.xkcd.com/clickdrag/48n1e.png" alt=""/> | |
<td><img src="http://imgs.xkcd.com/clickdrag/48n2e.png" alt=""/> | |
<td><img src="http://imgs.xkcd.com/clickdrag/48n3e.png" alt=""/> | |
<td><img src="http://imgs.xkcd.com/clickdrag/48n4e.png" alt=""/> | |
<td><img src="http://imgs.xkcd.com/clickdrag/48n5e.png" alt=""/> | |
<td><img src="http://imgs.xkcd.com/clickdrag/48n6e.png" alt=""/> | |
<td><img src="http://imgs.xkcd.com/clickdrag/48n7e.png" alt=""/> |
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
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): |
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
<?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 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> |