You will be creating a web service capable of...
- receiving emails over SMTP and storing contents
- fetching email contents over HTTP REST API
- viewing email contents in a browser
BattleSnake sponsors wanted to get more involved this year, so we've introduced Bounty Snakes.
Bounty Snakes are snakes programmed by sponsors in advance of the tournament. Each Bounty Snake will have a bounty prize attached to it, along with specific criteria for defeating it. The first team to successfully defeat a Bounty Snake throughout the day will claim its bounty prize.
Bounty Snakes will not go down easy, and we suggest not spending time focused on defeating Bounty Snakes.
Available Bounty Snakes and their rewards will are listed below. Some Bounty Snakes may not appear until the day of the event.
import sqlite3 | |
class CohortDatabase(object): | |
def __init__(self): | |
self.db = sqlite3.connect(':memory:') | |
# Create Tables | |
self.db.cursor().execute(""" |
### Keybase proof | |
I hereby claim: | |
* I am bvanvugt on github. | |
* I am bvanvugt (https://keybase.io/bvanvugt) on keybase. | |
* I have a public key whose fingerprint is 0BF2 4AB6 B045 FF31 4727 C156 4DE4 0D34 C74D D045 | |
To claim this, I am signing this object: |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Email Title</title> | |
</head> | |
<body> |
# See http://blog.sendwithus.com/task-monitoring-using-redis/ for details and documentation. | |
def start_task(task_type): | |
redis.HINCRBY('ACTIVE_TASKS', task_type, 1) | |
def stop_task(task_type): | |
with redis.MULTI: | |
redis.HSET('IDLE_SINCE', task_type, now()) | |
redis.HINCRBY('ACTIVE_TASKS', task_type, -1) |