Skip to content

Instantly share code, notes, and snippets.

View Sheeo's full-sized avatar

Michael Søndergaard Sheeo

View GitHub Profile
@Sheeo
Sheeo / gist:3789611
Created September 26, 2012 18:13
Improved runtests
#!/bin/bash
progname=$(basename $0)
print_short_help() {
cat <<EOF
Usage: $progname [-1] [-f] [-r] [-p phases] [-c compiler] <tests-dir>
EOF
}
#!/usr/bin/env python3
"""
Usage:
server.py [--nodb | --db TYPE]
Options:
--nodb Don't use a database (Use a mock.Mock). Caution: Will break things.
--db TYPE Use TYPE database driver [default: QMYSQL]
"""
@Sheeo
Sheeo / foo.ts
Created December 26, 2016 22:39
export function CalculateIntegrationField(room: Room, goalName: string, goals: [number, number][]): IntegrationField {
if(!goals) throw new Error("No goals provided");
if(!room.memory.costField || room.memory.costFieldInvalid) {
CalculateCostField(room);
}
let pre = Game.cpu.getUsed();
let costField = room.memory.costField;
let integrationField: number[][] = [];
let openList: [number, number][] = [];
### Keybase proof
I hereby claim:
* I am sheeo on github.
* I am sheeo (https://keybase.io/sheeo) on keybase.
* I have a public key ASAsgdfQbU465HBWjqtKsmabv5UOF2And0qn1J9VBkQZ-go
To claim this, I am signing this object: