Skip to content

Instantly share code, notes, and snippets.

@anthonygarvan
anthonygarvan / BotOrNotCoreLogic.py
Last active August 29, 2015 14:04
This is the bot logic behind the game Bot or Not, a crowdsourced Turing test. Learn more at www.anthonygarvan.com.
class Repository:
def __init__(self):
mongo_uri = 'mongodb://localhost:27017/master'
db_name = 'master'
self.client = MongoClient(mongo_uri)
self.db = self.client[db_name]
self.messages = self.db.messages
self.partner_queue = self.db.partner_queue
self.default_messages = ['Sorry I don\'t get that.',
'DOES NOT COMPUTE',