General

this program will factor numbers up to 10e19 in almost no-time requires a file of prime numbers, the file i have is about 530MB. ##by Richard A. Nichols III, 2007 ## ##factor() returns the factorization of a given number. ## ##primes.txt should be a...
i made this for a guy named eep for his philosophy of "absolute relativity".  it uses Pygame. import sys , pygame, math , random   size = width, height = 512 , 512 minradius = 2 maxspeed = 1 minspeed = - 1 #depthspeeds = [1,1,1,1,1,1,1,1,1,1]...
shows an anagram of a given word, but works using phonems instead of letters. requires the cmu phonic dictionary (freely downloadable).  might use an old version;just replacethe version number.   import re word = raw_input ( "ENTER YOUR WORD: " ) ....
A fun way of ciphering text import sys text = ' '. join ( sys . argv [ 1 : ] ) if not text: text = raw_input ( ) nonalphas = [ ( p, c ) for ( p, c ) in enumerate ( text ) if not c. isalpha (...
names = "false nor xleft nleft xright nright xor nand and nxor right nxright left nxleft or true" . split ( ) lookup = dict ( map ( reversed, enumerate ( names ) ) ) prompt = "<logic gate> <operator> <logic gate>: "   print...
perms = lambda a: a [ 1 : ] and [ c+r for i, c in enumerate ( a ) for r in perms ( a [ :i ] +a [ i+ 1 : ] ) ] or a     ex: >>> perms = lambda a: a[1:] and [c+r for i, c in enumerate(a) for...
simple conway's game of life simulator, with garbage collector currently just  puts random spots on the board, then starts simulating ideally i should have it be able to read Golly files. i made this so that i could see what happens if you modify cells with the mouse...