Skip to content

Instantly share code, notes, and snippets.

View mulka's full-sized avatar

Kyle Mulka mulka

View GitHub Profile
class Shitty(AdProvider):
source = 'shitty'
def get_data(self):
raise Exception('This ad provider is shitty... it always throws an exception')
@mulka
mulka / gist:2563719
Created April 30, 2012 23:49
boto batch write requests
import boto
conn = boto.connect_dynamodb()
def put_items(items_to_put):
for table, puts in items_to_put.iteritems():
while(len(puts) > 0):
unprocessed_items = []
for i in xrange(0, len(puts), 25):
batch_list = conn.new_batch_write_list()
--
-- Database: `infmos`
--
-- --------------------------------------------------------
--
-- Table structure for table `infmos`
--