I hereby claim:
- I am rabuf on github.
- I am jtsummers (https://keybase.io/jtsummers) on keybase.
- I have a public key ASDPgB1khrqckkW16UTuQRPml00Lc9i3K3bHr8UrdspjWgo
To claim this, I am signing this object:
pieces = [{3,4,5,6}, | |
{4, 3+1j, 4+1j, 5+1j, 4+2j}, | |
{3, 4, 5, 5+1j, 5+2j}, | |
{3, 3+1j, 3+2j, 3+3j}, | |
{3, 4, 3+1j, 4+1j}] | |
def make_piece(): | |
level = 0 | |
for piece in cycle(pieces): |
use itertools::Itertools; | |
use lazy_static::lazy_static; | |
use std::fs::File; | |
use std::io::{BufRead, BufReader}; | |
fn get_input(filename: &str) -> (Vec<Vec<String>>, Vec<Vec<String>>) { | |
let file = File::open(filename).unwrap(); | |
let lines = BufReader::new(file).lines(); | |
let mut displays = vec![]; |
I hereby claim:
To claim this, I am signing this object:
# 1 2 3 5 8 10 11 | |
Q = [0, 1/3, 1/3, 1/3, 0, 0, 0; #1 | |
0, 0, 1/3, 2/3, 0, 0, 0; #2 | |
0, 0, 0, 2/3, 0, 0, 1/3; #3 | |
0, 1/3, 0, 0, 1/3, 0, 1/3; #5 | |
0, 0, 0, 0, 1/3, 1/3, 1/3; #8 | |
0, 0, 0, 0, 0, 0, 1/3; #10 | |
0, 0, 0, 0, 0, 0, 0] #11 | |
N = (eye(7) - Q) ^ - 1 |
(* Test framework, since we only submit 2 files I'm copy/pasting this here *) | |
datatype (''a,''b) testcase = | |
TestCase of ''a * ''b * string | |
| TestCaseException of ''a * exn * string | |
datatype 'a testresult = Pass | Fail of 'a | |
datatype ('a,'b,'c) test = Test of 'c * ('a,'b) testcase list | |
fun test (Test (f,cases)) = | |
let fun aux cases acc = | |
case cases of |