Get events for the given query.
10680
def get_filter_events(
            self,
            contract_address: Address,
            topics: List[str] = None,
            from_block: BlockSpecification = 0,
            to_block: BlockSpecification = 'latest',
    ) -> List[Dict]:
        
        logs_blocks_sanity_check(from_block, to_block)
        return self.web3.eth.getLogs({
            'fromBlock': from_block,
            'toBlock': to_block,
            'address': to_checksum_address(contract_address),
            'topics': topics,
        })
596275
def get_handlers(self, event: str) -> T.List[T.Callable]:
        """"""

        return list(self._events.get(event, []))
385559
def match_query(query)
        query ||= {}
        
        if match_event(query) && (state_requirement = match_states(query))
          state_requirement.merge(:on => event_requirement)
        end
      end
746953
function (query, callback) {
    if (!callback) {
      callback = query;
      query = null;
    }

    if (typeof query === 'string') {
      query = { aggregateId: query };
    }

    this.store.getUndispatchedEvents(query, callback);
  }
1064387
def _all(self, query):
        """"""
        if query.count() > 0:
            results = query.all()
            for result in results:
                if result.has_expired(self._expirations):
                    raise NotFoundError
            return results
        else:
            raise NotFoundError
611946
protected function get_from_db(
        $userid,
        $whereconditions,
        $whereparams,
        $ordersql,
        $offset,
        $limitnum
    ) {
        return array_values(
            $this->retrievalstrategy->get_raw_events(
                [$userid],
                null,
                null,
                null,
                $whereconditions,
                $whereparams,
                $ordersql,
                $offset,
                $limitnum
            )
        );
    }
939321
def _get_events(self):
        """"""
        events, changed_container_ids = self.docker_util.get_events()
        if not self._disable_net_metrics:
            self._invalidate_network_mapping_cache(events)
        if changed_container_ids and self._service_discovery:
            get_sd_backend(self.agentConfig).update_checks(changed_container_ids)
        if changed_container_ids:
            self.metadata_collector.invalidate_cache(events)
        return events
712472
def get_events(params = nil, paging = nil)
      response = @client.get(construct_url(paging), params)
      extract_paging(response)
      response
    end
1144600
def getAllPastEvents(request, *, home=None):
    
    qrys = [SimpleEventPage.events(request).past().this(),
            MultidayEventPage.events(request).past().this(),
            RecurringEventPage.events(request).past().this(),
            PostponementPage.events(request).past().this(),
            ExtraInfoPage.events(request).exclude(extra_title="").past().this()]
    if home is not None:
        qrys = [qry.descendant_of(home) for qry in qrys]
    events = sorted(chain.from_iterable(qrys),
                    key=attrgetter('page._past_datetime_from'), reverse=True)
    return events
1129935
def event_return(events):
    '''
    
    '''
    with _get_serv(events, commit=True) as cur:
        for event in events:
            tag = event.get('tag', '')
            data = event.get('data', '')
            sql = '''INSERT INTO salt_events (tag, data, master_id, alter_time)
                     VALUES (%s, %s, %s, to_timestamp(%s))'''
            cur.execute(sql, (tag, psycopg2.extras.Json(data),
                              __opts__['id'], time.time()))
1157595
def get_iterator(self, query, **options):
        """"""
        return EventsPageIterator(self.client, '/events', query, options).items()
106892
def __execute_queries(self):
        """"""

        def func(item):
            or_check = False
            for queries in self._queries:
                and_check = True
                for query in queries:
                    and_check &= self._matcher._match(
                        item.get(query.get('key'), None),
                        query.get('operator'),
                        query.get('value')
                    )
                or_check |= and_check
            return or_check

        self._json_data = list(filter(lambda item: func(item), self._json_data))
145260
def get_events(self, **kwargs):
        """"""
        force = kwargs.pop('force', False)
        response = api.request_sync_events(self.blink,
                                           self.network_id,
                                           force=force)
        try:
            return response['event']
        except (TypeError, KeyError):
            _LOGGER.error("Could not extract events: %s",
                          response,
                          exc_info=True)
            return False
1357197
def events(self):
        
        if self._events is None:
            self._events = EventList(self)
        return self._events
1104747
def get_events(self):
        
        return github.PaginatedList.PaginatedList(
            github.Event.Event,
            self._requester,
            self.url + "/events",
            None
        )
415716
def find_for_event(cls, event, include_hidden=False, **kwargs):
        
        query = cls.find(event_id=event.id, **kwargs)
        if not include_hidden:
            query = query.filter(~cls.hidden)
        return query
356657
def events(self, start_time, include=None):
        
        return self._query_zendesk(self.endpoint.events, 'ticket_event', start_time=start_time, include=include)