- All players must always abide by all the rules then in effect, in the form in which they are then in effect. The rules in the Initial Set are in effect whenever a game begins. The Initial Set consists of Rules 101-116 (immutable) and 201-213 (mutable).
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
#!/bin/bash | |
# CS 343 - A#Q# Test Script | |
# by m9chang | |
# based on progtest.sh by m9chang | |
# based on progdiff.sh by jlfwong (available at https://gist.github.com/3829517) | |
retval1=0 retval2=0 retcode=0 | |
# Method: run |
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
from subprocess import Popen, PIPE, STDOUT | |
import subprocess | |
import math, sys | |
from time import sleep | |
from os import path, access, W_OK, R_OK, F_OK | |
def cut(movie, start, clip): | |
subprocess.Popen(["ffmpeg", #Calls ffmpeg program | |
"-ss",str(start), #Begining of recording, must be string | |
"-t", '30', #How long to record clip for, must be a string |
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
#include <time.h> | |
#include <stdio.h> | |
// compile with: | |
// $ gcc -Wall -o time_loop time_loop.c -lrt | |
// make sure -lrt comes after specifying the .c file or it won't link | |
int rv; | |
struct timespec current; | |
struct timespec last; |
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
import re | |
import sys | |
p = re.compile("([0-9]{1,2}/[0-9]{1,2}/[0-9]{2,4} [0-9]{1,2}:[0-9]{2}:[0-9]{2}( (AM|PM|am|pm))?)") | |
for x in p.findall(sys.stdin.read()): | |
print x[0] |
I hereby claim:
- I am cbhl on github.
- I am cbhl (https://keybase.io/cbhl) on keybase.
- I have a public key whose fingerprint is 2C2F A6FA B21D 9CFB 3C6B FAE7 E5C7 1B66 D926 4E76
To claim this, I am signing this object:
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
// move randomly | |
// var moves = map.getAdjacentEmptyCells(me.getX(), me.getY()); | |
// getAdjacentEmptyCells gives array of ((x, y), direction) pairs | |
// me.move(moves[map.getRandomInt(0, moves.length - 1)][1]); | |
var Q = []; | |
var n0 = { | |
'c': [me.getX(), me.getY()], | |
'p': [] | |
}; |
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
// move randomly | |
// var moves = map.getAdjacentEmptyCells(me.getX(), me.getY()); | |
// getAdjacentEmptyCells gives array of ((x, y), direction) pairs | |
// me.move(moves[map.getRandomInt(0, moves.length - 1)][1]); | |
var idx = function(x, y) { | |
return (y * map.getWidth())+x; | |
}; | |
var d = function dfs(x, y, visited, path) { | |
if (( x == (map.getWidth() - 2) ) && (y == 10)) { | |
return true; |