Skip to content

Instantly share code, notes, and snippets.

View catermelon's full-sized avatar
🚩
oh no

Rachelle Green catermelon

🚩
oh no
View GitHub Profile
@catermelon
catermelon / zombie.py
Created October 9, 2013 04:12
ZombieBot
class Rachel_ChanceItIfUsing(object):
def __init__(self, name):
self.name = name
self.minShotguns = 2
def turn(self, gameState):
green_dice_left = 6
red_dice_left = 3
# Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz"
# instead of the number and for the multiples of five print "Buzz". For numbers which are
# multiples of both three and five print "FizzBuzz".
# This is a moldly oldie in the programmer community, it's known as "FizzBuzz" (for obvious
# reasons). Here's a blog post:
# http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html
# This solution runs through every number between 1 and 100, checks if they are evenly
@catermelon
catermelon / config.py
Created October 4, 2013 15:49
Flask-SQLAlchemy - separating reads and writes
# This is not used unless SQLALCHEMY_BINDS is not present
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://{username}:{password}@{hostname}/{database}?charset=utf8'
SQLALCHEMY_BINDS = {
'master': 'mysql+pymysql://{username}:{password}@{hostname}/{database}?charset=utf8',
'slave': 'mysql+pymysql://{username}:{password}@{hostname}/{database}?charset=utf8'
}
@catermelon
catermelon / autodoc on RTD
Created July 18, 2013 18:15
Autodoc still not worky
Build for PyExchange-Test
Built: July 18, 2013. 1:01 p.m.
State: Finished
Outcome: Passed
Version: latest
@catermelon
catermelon / Autodoc not worky
Created July 18, 2013 17:04
Autodoc not worky
Running Sphinx v1.1.3+
building [html]: targets for 5 source files that are out of date
updating environment: 5 added, 0 changed, 0 removed
reading sources... [ 20%] attendee
reading sources... [ 40%] changelog
reading sources... [ 60%] contributing
reading sources... [ 80%] exchange2010calendarevent
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/pyexchange/envs/latest/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 321, in import_object
__import__(self.modname)