Skip to content

Instantly share code, notes, and snippets.

View bbjubjub2494's full-sized avatar

Julie B. bbjubjub2494

View GitHub Profile
@bbjubjub2494
bbjubjub2494 / conway.clj
Last active April 3, 2018 15:48
functional conway game of life using sets
#!/usr/bin/env boot
"Clojure KISS implementation of Conway's game of life
Ported from https://gist.github.com/lourkeur/95799b35e2d3aac54cdd0e4a7c8d2037 (Python)
Patterns from http://conwaylife.com/wiki"
(set-env! :dependencies #(conj % '[org.clojure/clojure "1.9.0"]))
(require '[clojure.spec.alpha :as spec])
(use 'clojure.test)
@bbjubjub2494
bbjubjub2494 / conway.py
Last active November 10, 2017 13:21
functional conway game of life using sets
#!/usr/bin/env python3
"""Python 3.6 KISS implementation of Conway's game of life
Inspired by Stop Writing Classes by Jack Diederich,
https://www.youtube.com/watch?v=o9pEzgHorH0
"""
from collections import defaultdict
from itertools import *
from typing import *
@bbjubjub2494
bbjubjub2494 / cleanup
Last active March 20, 2017 21:41
issue21
#!/bin/sed -f
/Parent PID/d
s/^==[0-9]*== //
# Copyright Lourkeur 2016
#
# This module defines the python class Chronometer.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,