Example #1
0
def get_users_timeline_from_db():
    uslov = { 'timeline': { '$not': { '$size': 0 } } }
    return DataOperations.load_from_mongo('users_crawl', 'users_timelines', True, criteria=uslov)
Example #2
0
 def __iter__(self):
     for cursor in DataOperations.load_from_mongo('users_crawl', 'users_vectors', True):
     # assume there's one document per line, tokens separated by whitespace
         yield cursor['vector']
Example #3
0
def get_users_friends_from_db():
    friends_ids = DataOperations.load_from_mongo('users_crawl', 'users_ids')
    return friends_ids