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
import wat | |
from pickle import dumps | |
try: | |
wat.b() | |
except Exception, the_exc: | |
exc = the_exc | |
print dumps(exc) |
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
def get_access_token_from_code(code): | |
""" | |
Given a code retrieved from a signed request (*not* from a callback | |
querystring), resolve the access token. | |
""" | |
try: | |
return _get_access_token_from_code(code) | |
except GraphAPIError: | |
time.sleep(1) | |
return _get_access_token_from_code(code) |
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
Running migrations for notifications: | |
- Migrating forwards to 0005_auto__del_deliveryfrequency__add_deliveryfrequencyconfiguration. | |
> notifications:0005_auto__del_deliveryfrequency__add_deliveryfrequencyconfiguration | |
DEBUG 2012-05-01 17:17:09,394 generic south execute "DROP TABLE `notifications_deliveryfrequency` CASCADE;" with params "[]" | |
DEBUG 2012-05-01 17:17:09,396 generic south execute "CREATE TABLE `notifications_deliveryfrequencyconfiguration` (`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `create_ts` datetime NOT NULL DEFAULT '2012-05-01 17:17:09', `modify_ts` datetime NOT NULL DEFAULT '2012-05-01 17:17:09', `frequency` smallint UNSIGNED NOT NULL UNIQUE, `last_delivered_ts` datetime NOT NULL DEFAULT '2000-01-01 00:00:00');" with params "[]" | |
DEBUG 2012-05-01 17:17:09,396 generic south execute "SET FOREIGN_KEY_CHECKS=1;" with params "[]" | |
DEBUG 2012-05-01 17:17:09,396 generic south execute "DROP TABLE `notifications_deliveryfrequency` CASCADE;" with params "[]" | |
DEBUG 2012-05-01 17:17:09,410 generic |
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 BasicItemFallback(object): | |
def __init__(self, property_name): | |
self.property_name = property_name | |
def __get__(self, obj, type=None): | |
return getattr(obj.item, self.property_name) | |
def __set__(self, obj, value): | |
# or maybe raise? | |
setattr(obj.item, self.property_name) | |
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
if settings.IS_DEV or settings.IS_TEST: | |
KeyValueStore = RedisKeyValueStore | |
else: | |
KeyValueStore = DynamoKeyValueStore |
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
#!/bin/bash | |
sudo pmset -a hibernatemode 3 |
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
We're thrilled to announce our coffee tastings for the second half of the year. Coffee Tastings are held on Saturday mornings from 10:00-11:30am. They cost $20, which also scores you a 12oz bag of coffee. | |
July 21 - Coffee Tasting 101: Introductory Tasting | |
August 4 - Espresso Tasting | |
August 25 - 1 Coffee 5 Ways | |
September 15 - Coffee Tasting 101: Introductory Tasting | |
October 6 - Coffee Tasting 201: Cupping | |
October 27 - 1 Coffee 5 Ways | |
November 17 - Espresso Tasting | |
December 8 - Coffee Tasting 101: Introductory Tasting |
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
define sentry::server( | |
$dir, | |
$user = 'sentry', | |
$sentry_version = '3.7.1', | |
$sentry_domain = 'some.host.com', | |
$sentry_web_host = '0.0.0.0', | |
$sentry_web_port = '9000', | |
$sentry_udp_host = '0.0.0.0', | |
$sentry_udp_port = '9001', | |
$sentry_num_workers = '20', |
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
# from http://artificialcode.blogspot.com/2009/08/10-ways-to-let-people-know-your-bad.html | |
def api_entry_point(): | |
try: | |
obj.method() | |
except: | |
#lets not bother the developer with this exception. He should quit out immediately! | |
import sys | |
sys.exit(0) |
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 | |
import cookielib | |
import json | |
import re | |
import random | |
import unittest | |
import requests | |
from wordpress_xmlrpc import Client, WordPressComment, WordPressPost |