This file contains hidden or 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
public class Bullseye { | |
public static Food createBullseye() { | |
Kitchen kitchen = Kitchen.getInstance(); | |
Pantry pantry = kitchen.getPantry(); | |
Stove stove = kitchen.getStove(); | |
Pan pan = kitchen.getFryingPan(); | |
Butter butter = kitchen.getRefridgerator().find(Butter.class); | |
Carton<Egg> eggs = kitchen.getRefridgerator().findCartonOf(Egg.class); |
This file contains hidden or 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
#!/usr/bin/env python2.7 | |
from __future__ import print_function, with_statement | |
import os | |
import sys | |
from subprocess import Popen, PIPE | |
def call(cmd_str, *more): | |
args = cmd_str.split(' ') | |
if more: |
This file contains hidden or 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
class Vector(object): | |
@classmethod | |
def Lerp(cls, a, b, s): | |
return (1.0-s)*a + s*b | |
@classmethod | |
def Cross(cls, a, b): | |
return a^b |
This file contains hidden or 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
#!/usr/bin/env python | |
# coding=utf-8 | |
from __future__ import print_function | |
from collections import defaultdict | |
import datetime | |
import io | |
import json | |
import locale | |
import os |
This file contains hidden or 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
#!/usr/bin/env python | |
from __future__ import print_function | |
import random | |
import sys | |
EMPTY = ' ' | |
WALL = '#' | |
AGENT = 'o' |