Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(1)  |  Derive(0)  |  Import(6)

src/s/n/sneakernet-HEAD/appengine/run.py   sneakernet(Download)
def team_caches(u):
    from cache import CacheLocation, TYPE_LOCAL_FD, TYPE_EXTERN_FD, is_cache_available_now, Cache
    locs = CacheLocation.all().filter("team_responsible =",u.team).filter("type =",TYPE_LOCAL_FD).fetch(limit=1000)
    locs += CacheLocation.all().filter("team_responsible =",u.team).filter("type =",TYPE_EXTERN_FD).fetch(limit=1000)
    caches = []

src/s/n/sneakernet-HEAD/appengine/teamadmin.py   sneakernet(Download)
  def get(self):
    #get the whole team's caches
    from cache import CacheLocation, Cache, TYPE_LOCAL_FD, TYPE_EXTERN_FD
    from team import get_team_for_team_leader
    from user_sn import confirm
  def post(self):
    from cache import CacheLocation, TYPE_LOCAL_FD, TYPE_EXTERN_FD
    from user_sn import confirm
    from team import get_team_for_team_leader
    u = confirm(self)
    team = get_team_for_team_leader(u)
    if self.request.get("cache-key")=="MAKENEW":
        cl = CacheLocation()
        u = confirm(self)
        team = get_team_for_team_leader(u)
        from cache import Cache, CacheLocation
        type = self.request.get("type")
        if type=="INTERN":

src/s/n/sneakernet-HEAD/appengine/request.py   sneakernet(Download)
def get_from_someone_on_team_not_tl(request,allcopies):
    from cache import TYPE_COMPUTER, CacheLocation, TYPE_LOCAL_FD, is_cache_available_soon
    for copy in allcopies:
        if copy.where.last_touched.team.key() ==request.user.team.key() and copy.where.type==TYPE_COMPUTER and is_cache_available_soon(copy.where):
            if copy.where.last_touched.team_leader_flag:

src/s/n/sneakernet-HEAD/appengine/cachetalk.py   sneakernet(Download)
    def get(self):
        from cache import CacheLocation
        c = CacheLocation.get(self.request.get("cache"))
        self.response.headers["Content-Type"] = "image/jpeg"
        self.response.out.write(c.image)