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 google.appengine.ext import db | |
| from google.appengine.api import memcache, users | |
| import logging | |
| import functools | |
| import datetime, time | |
| import sys, os, re | |
| sys.path.append(os.path.dirname(os.path.realpath(__file__))) |
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
| // Do checks for minimum requirements | |
| if (!XMLHttpRequest || !JSON) { | |
| throw Error('Browser does not support the minimum requirements of ' + | |
| 'XMLHttpRequest, JSON' + | |
| '. Try adding modernizer to polyfill.'); | |
| } | |
| function http(method, url, data, success) { | |
| var r = new XMLHttpRequest(); | |
| r.open(method, url, true); |
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 json | |
| import datetime | |
| import time | |
| def json_extras(obj): | |
| if hasattr(obj, 'utctimetuple'): | |
| ms = time.mktime(obj.utctimetuple()) * 1000 | |
| ms += getattr(obj, 'microseconds', 0) / 1000 | |
| return int(ms) | |
| return None |
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
| SELECT * FROM Object where __key__ = KEY('Object', 1) |
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 pixels_per_em(fontsize=12, resolution=72): | |
| return fontsize*(resolution/72.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 os | |
| import urllib | |
| from google.appengine.ext import blobstore | |
| from google.appengine.ext import webapp | |
| from google.appengine.ext.webapp import blobstore_handlers | |
| from google.appengine.ext.webapp import template |
NewerOlder