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
Aleut | 30835 | 28010 | 5 | |
---|---|---|---|---|
ALPHA 1 | 27699 | 32516 | 8 | |
ALPHA 2 | 32260 | 31402 | 1 | |
ALPHA 3 | 29747 | 33441 | 8 | |
ALPHA 4 | 31722 | 34644 | 7 | |
ALPHA 5 | 32234 | 27853 | 5 | |
ALPHA 6 | 31295 | 30871 | 3 | |
ALPHA 7 | 35735 | 33825 | 5 | |
ALPHA 8 | 33335 | 33005 | 3 | |
ALPHA 9 | 28490 | 33645 | 8 |
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 csv | |
import heapq | |
import math | |
class Skyland(object): | |
def __init__(self, name, location): | |
self.name = name | |
self.location = location | |
self.neighbours = [] | |
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
application: filehangar | |
version: live | |
runtime: python | |
api_version: 1 | |
handlers: | |
- url: /remote_api | |
script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py | |
login: admin |
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 DomainDispatchMiddleware(object): | |
def __init__(self, domain_apps, default_app): | |
"""Constructor. | |
Args: | |
domain_apps: A list of (regexp, application) tuples to dispatch to based on domain. | |
default_app: An app to run if no domain matches. | |
""" | |
self.domain_apps = domain_apps | |
self.default_app = default_app |
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 LazyRef(object): | |
def __init__(self, fullname): | |
self.fullname = fullname | |
self.ref = None | |
def __call__(self, *args, **kwargs): | |
if not self.ref: | |
modulename, objname = self.fullname.rpartition('.') | |
module = __import__(modulename, globals(), locals()) | |
self.ref = module.__dict__[objname] |
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.api import urlfetch | |
from google.appengine.api import xmpp | |
from google.appengine.ext import db | |
from google.appengine.ext import webapp | |
from google.appengine.ext.webapp.util import run_wsgi_app | |
from google.appengine.ext.webapp import xmpp_handlers | |
import base64 | |
import feedparser | |
import logging |
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 logging | |
import time | |
from google.appengine.api import mail | |
from google.appengine.ext import db | |
from google.appengine.ext.deferred import defer | |
from google.appengine.runtime import apiproxy_errors | |
class BulkUpdater(object): | |
"""A bulk updater for datastore entities. |
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 | |
class EntityCache(object): | |
"""Caches fetched entities so subsequent fetches return the same instance. | |
Usage: | |
cache = EntityCache() | |
e1, e2 = cache.get([k1, k2]) | |
e3, e4 = cache.get([k2, k3]) | |
assert e2 == e3 |
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
package main | |
import ( | |
"flag"; | |
"log"; | |
"os"; | |
"strings"; | |
"time"; | |
) |
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/python | |
import base64 | |
import logging | |
import Queue | |
import sys | |
import threading | |
import time | |
import urllib2 |