This file contains 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 mapreduce import operation as op | |
def scrubber(entity): | |
"""Deletes any data from the underlying datastore that are no longer | |
present in the entity's model definition. | |
""" | |
# What properties are still defined on the model? | |
valid_props = set(entity.properties().keys()) | |
# What properties are attached in the datastore? | |
raw_props = set(entity._entity.keys()) |
This file contains 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
# Map ASCII fractions to fancy fractions | |
FRACTION_MAP = { | |
u'1/2' : u'\u00BD', | |
u'1/4' : u'\u00BC', | |
u'3/4' : u'\u00BE', | |
u'1/3' : u'\u2153', | |
u'2/3' : u'\u2154', | |
u'1/5' : u'\u2155', | |
u'2/5' : u'\u2156', | |
u'3/5' : u'\u2157', |
This file contains 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
diff -qr dirA/ dirB/ |
This file contains 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
name = 'Will' | |
print 'Hello, %s' % name |
This file contains 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
name = raw_input('Name? ') | |
print 'Hello, %s' % name |
This file contains 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 5761a54ec9553c704c0782d5c581c2178f8e32b1 Mon Sep 17 00:00:00 2001 | |
From: Will McCutchen <[email protected]> | |
Date: Mon, 4 Apr 2011 15:13:09 -0500 | |
Subject: [PATCH] Stop caring about coverage omissions when running tests with code coverage. Let anyone creating coverage reports worry about them. | |
--- | |
shared/fabric/utils.py | 30 +++--------------------------- | |
1 files changed, 3 insertions(+), 27 deletions(-) | |
diff --git a/shared/fabric/utils.py b/shared/fabric/utils.py |
This file contains 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 google.appengine.ext.mapreduce import operation as op | |
def count_impressions_by_month(entity): | |
key = entity.timestamp.strftime('%Y-%m') | |
yield op.counters.Increment(key) |
This file contains 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
$.ajax({ | |
url: url, | |
dataType: 'jsonp', | |
jsonp: 'jsonp', | |
success: onSuccess, | |
error: onError | |
}); |
This file contains 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
[{"privacy": "0", "created": "1325864138", "modified": "1325887899", "global_hash": "bGuRVV", "user_hash": "8rcCNv", "login": "5aQOloVyMze"}, {"privacy": "1", "created": "1325889382", "modified": "1325881184", "global_hash": "7eGqml", "user_hash": "VsrNOH", "login": "87YwHtJVoWthckEYLdum9akgmN4QzB"}, {"privacy": "1", "created": "1325918261", "modified": "1325983013", "global_hash": "a5rlvC", "user_hash": "OTHiE6", "login": "qvIKx3iw"}, {"privacy": "0", "created": "1325946981", "modified": "1325919728", "global_hash": "aZufjE", "user_hash": "7EwMRB", "login": "rpgOLjYkmzFyl2MIiTQAbAv"}, {"privacy": "0", "created": "1325892447", "modified": "1325893896", "global_hash": "rN4QdJ", "user_hash": "wlVmhv", "login": "HEN2KhU"}, {"privacy": "0", "created": "1325822276", "modified": "1325924205", "global_hash": "S2Vcmb", "user_hash": "F5nnD9", "login": "UBoEMP4giVjzo7SJmGG0ptyD"}, {"privacy": "1", "created": "1325890208", "modified": "1325986230", "global_hash": "GvdjO8", "user_hash": "j5qyky", "login": "MgYFhjgp63uo4C |
This file contains 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/sh | |
app=$1 | |
shift; | |
open -a $app $@ |