Get recent matches by user.
334681
def get_user_matches(session, user_id, from_timestamp=None, limit=None):
    """"""
    return get_recent_matches(session, '{}{}/{}/Matches/games/matches/user/{}/0'.format(
        session.auth.base_url, PROFILE_URL, user_id, user_id), from_timestamp, limit)
1049210
def previous(self, match, predicate=None, index=None):
        
        current = match.start
        while current > -1:
            previous_matches = self.ending(current)
            if previous_matches:
                return filter_index(previous_matches, predicate, index)
            current -= 1
        return filter_index(_BaseMatches._base(), predicate, index)
338811
def get_match_history(start_at_match_id=None, player_name=None, hero_id=None,
                      skill=0, date_min=None, date_max=None, account_id=None,
                      league_id=None, matches_requested=None, game_mode=None,
                      min_players=None, tournament_games_only=None,
                      **kwargs):
    

    params = {
        "start_at_match_id": start_at_match_id,
        "player_name": player_name,
        "hero_id": hero_id,
        "skill": skill,
        "date_min": date_min,
        "date_max": date_max,
        "account_id": account_id,
        "league_id": league_id,
        "matches_requested": matches_requested,
        "game_mode": game_mode,
        "min_players": min_players,
        "tournament_games_only": tournament_games_only
    }

    return make_request("GetMatchHistory", params, **kwargs)
153620
async def get_next_match(self):
        
        if self._final_rank is not None:
            return None

        matches = await self.get_matches(MatchState.open_)

        if len(matches) == 0:
            matches = await self.get_matches(MatchState.pending)

        if len(matches) > 0:
            return matches[0]

        return None
1171404
def query_recent(num=8, **kwargs):
        '''
        
        '''
        order_by_create = kwargs.get('order_by_create', False)
        kind = kwargs.get('kind', None)
        if order_by_create:
            if kind:
                recent_recs = TabPost.select().where(
                    (TabPost.kind == kind) & (TabPost.valid == 1)
                ).order_by(
                    TabPost.time_create.desc()
                ).limit(num)
            else:
                recent_recs = TabPost.select().where(
                    TabPost.valid == 1
                ).order_by(
                    TabPost.time_create.desc()
                ).limit(num)
        else:
            if kind:
                recent_recs = TabPost.select().where(
                    (TabPost.kind == kind) & (TabPost.valid == 1)
                ).order_by(
                    TabPost.time_update.desc()
                ).limit(num)
            else:
                recent_recs = TabPost.select().where(
                    TabPost.valid == 1
                ).order_by(
                    TabPost.time_update.desc()
                ).limit(num)
        return recent_recs
483610
def get_current_tournaments():
    """"""

    schedule_page = requests.get(TOURNAMENTS_XML_URL)
    root = etree.XML(schedule_page.content)

    for tour in root.iter('{*}tournament'):
        yield _Tournament(
            start_date=tour.findtext('{*}start_date'),
            name=tour.findtext('{*}name'),
            game=tour.findtext('{*}game'),
            buyin=tour.findtext('{*}buy_in_fee'),
            players=tour.get('players')
        )
913550
def get_users(self, fetch=True):
        """"""
        return Users(self.resource.users, self.client, populate=fetch)
540299
def get_recent_files(self):
        """"""
        try:
            recent_files = self.CONF[WORKSPACE].get('main', 'recent_files',
                                                    default=[])
        except EnvironmentError:
            return []

        for recent_file in recent_files[:]:
            if not os.path.isfile(recent_file):
                recent_files.remove(recent_file)
        return list(OrderedDict.fromkeys(recent_files))
837342
def fetch_deposits_since(self, since: int) -> List[Deposit]:
        """"""
        return self._transactions_since(self._deposits_since, 'deposits', since)
907923
def recent(category=None, pages=1, sort=None, order=None):
	""""""
	s = Search()
	s.recent(category, pages, sort, order)
	return s
1025286
def recent(self):
        '''
        
        '''
        kwd = {
            'pager': '',
            'title': 'Recent Pages',
        }
        self.render('wiki_page/wiki_list.html',
                    view=MWiki.query_recent(),
                    format_date=tools.format_date,
                    kwd=kwd,
                    userinfo=self.userinfo)
1074449
def query_recent_most(num=8, recent=30):
        '''
        
        '''
        time_that = int(time.time()) - recent * 24 * 3600
        return TabPost.select().where(
            TabPost.time_update > time_that
        ).order_by(
            TabPost.view_count.desc()
        ).limit(num)
843328
def filter_by_user(self, user):
        """"""

        return self.filter(Q(users=user) | Q(groups__in=user.groups.all()))
71476
public function getMatches()
    {
        $matches = ArrayHelper::merge($this->homeMatches, $this->awayMatches);
        ArrayHelper::multisort($matches, 'date', SORT_ASC);
        return $matches;
    }
1307847
def get_active_sessions(self):
        
        for last_timestamp, i, events in self.recently_active:
            yield Session(events[-1].user, unpack_events(events))
444470
def get_current_user(self):
        """"""
        url = self.current_user_url
        result = self.get(url)
        return result
1136411
@Programmatic
    public List<SessionLogEntry> findByUserAndStrictlyBefore(
            final String user,
            final Timestamp from) {

        return repositoryService.allMatches(new QueryDefault<>(SessionLogEntry.class,
                "findByUserAndTimestampStrictlyBefore",
                "user", user,
                "from", from));
    }