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

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

src/k/n/kninfra-HEAD/utils/restore-from-old.py   kninfra(Download)
    plan_changes = dict()
    plan_remove = set()
    for r in Es.rcol.find({'until': {'$lt': DT_MAX}}):
        lut[r['until'] + timedelta(1,0), r['with'],
                r['how'], r['who']] = r['_id']
    print ' crossreference from'
    for r in Es.rcol.find({'from': {'$gt': DT_MIN}}):

src/k/n/kninfra-HEAD/utils/one-shot/2012-04-27-correct-ledenStartDate.py   kninfra(Download)
            print name, rel['from'].date(), ' -> ', \
                                joined.date()
            rrel = Es.rcol.find({'_id': rel['_id']})[0]
            rrel['from'] = joined
            Es.rcol.save(rrel)
            print name, rel['from'].date(), ' -> ', \
                                joined.date()
            rrel = Es.rcol.find({'_id': rel['_id']})[0]
            rrel['from'] = joined
            if not 'tags' in rrel:

src/k/n/kninfra-HEAD/utils/one-shot/2012-08-26-year-overrides.py   kninfra(Download)
        start_of_year = Es.year_to_range(year)[0]
        informal_start = start_of_year - datetime.timedelta(3*365/12)
        for rel in Es.rcol.find({'with': leden_id,
                                 'from': {'$gt': informal_start,
                                          '$lt': start_of_year}}):

src/k/n/kninfra-HEAD/utils/leden/check-integrity.py   kninfra(Download)
id2name = Es.names_by_ids()
 
for r in Es.rcol.find():
    if (r['who'] not in ids or r['with'] not in ids or (
            r['how'] is not None and r['how'] not in ids)):