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
""" | |
Grammar designed by Alexander Clark (See: http://www.cs.rhul.ac.uk/home/alexc/lot2012/mcfgsforlinguists.pdf) | |
Adapted for use with Peter Ljunglof's code at https://github.com/heatherleaf/MCFParser.py | |
@author: Chris Brew | |
""" | |
from MCFParser import * |
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
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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
""" | |
Game of Life on a torus | |
Uses an amazingly concise pair of lines that do the update. | |
They are nearly identical to Allen Downey's code from | |
http://greenteapress.com/complexity/Life.py | |
The torus part is in mode='wrap'. | |
""" |
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
# torus.py | |
# | |
# Game of Life on a torus, purely for fun... | |
# amazingly concise... | |
from scipy.ndimage import convolve | |
import numpy as np | |
import matplotlib | |
matplotlib.use('TkAgg') |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
<style type="text/css"> | |
body { | |
font: 300 13px "Helvetica Neue", Helvetica; | |
} |