Skip to content

Instantly share code, notes, and snippets.

View gist:574e4d6a54ba25fe48f6
Verifying I am +smitec on my passcard. https://onename.com/smitec
View keybase.md

Keybase proof

I hereby claim:

  • I am smitec on github.
  • I am smitec (https://keybase.io/smitec) on keybase.
  • I have a public key whose fingerprint is 1EEC EBCF D71A 39F9 FD5D A524 19CA 80C7 D954 7DF1

To claim this, I am signing this object:

@smitec
smitec / fractal_mountains.py
Created Jan 13, 2014
Generate tile-able (in 1 direction) mountains. Useful for game backgrounds.
View fractal_mountains.py
import random
import Image
def fractal_mountain(pixels, damping, seed=0.0):
px = [seed, seed]
factor = 1.0;
while(len(px) < pixels):
# loop through and generate
new_p = []
for i in range(1, len(px)):
@smitec
smitec / Example
Created Feb 20, 2012
Python boolean statement to RPN
View Example
parse("( S < 16 and T = \"P\" ) or ( S > 16 and L = 50 )") => ['S<16', 'T="P"', 'and', 'S>16', 'L=50', 'and', 'or']
@smitec
smitec / +s output
Created Oct 29, 2011
First 100 Primes in Haskell (Probably the Long Way)
View +s output
(0.02 secs, 3699564 bytes)