Skip to content

Instantly share code, notes, and snippets.

@ssokolow
ssokolow / magog_updates_filter.py
Created Jun 22, 2016
Minimal prototype pre-differ for MaGOG dumps
View magog_updates_filter.py
#!/usr/bin/env python
"""This script should work as a way to extract only changed lines from a
pair of MaGOG dumps in a format that can be imported into a spreadsheet
tool.
"""
# Minimal argument-reading for proof of concept (I'd use argparse instead)
from sys import argv
import difflib, re
@banksean
banksean / perlin-noise-classical.js
Created Feb 15, 2010
two Perlin noise generators in javascript. The simplex version is about 10% faster (in Chrome at least, haven't tried other browsers)
View perlin-noise-classical.js
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough banksean@gmail.com
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/