Get events from the cloud node.
164927
def get_events(self):
        """"""
        to_send = {'limit': 50}
        response = self._send_data('POST', 'admin', 'get-events', to_send)

        output = {'message': ""}
        for event in response['events']:
            desc = "Source IP: {ip}\n"
            desc += "Datetime: {time}\n"
            desc += "Indicator: {match}\n"
            desc += "Method: {method}\n"
            desc += "URL: {url}\n"
            desc += "Request Type: {type}\n"
            desc += "User-Agent: {userAgent}\n"
            desc += "Contact: {contact}\n"
            desc += "\n"
            output['message'] += desc.format(**event)

        return output
393201
def get(self, event):
        """"""
        self.log("Schemarequest for", event.data, "from",
                 event.user, lvl=debug)
        if event.data in schemastore:
            response = {
                'component': 'hfos.events.schemamanager',
                'action': 'get',
                'data': l10n_schemastore[event.client.language][event.data]
            }
            self.fireEvent(send(event.client.uuid, response))
        else:
            self.log("Unavailable schema requested!", lvl=warn)
637460
def get_event_list(config):
    """"""
    eventinstances = session_request(
        config.session.post, device_event_url.format(
            proto=config.web_proto, host=config.host, port=config.port),
        auth=config.session.auth, headers=headers, data=request_xml)

    raw_event_list = _prepare_event(eventinstances)

    event_list = {}
    for entry in MAP + METAMAP:
        instance = raw_event_list
        try:
            for item in sum(entry[MAP_BASE].values(), []):
                instance = instance[item]
        except KeyError:
            continue
        event_list[entry[MAP_TYPE]] = instance

    return event_list
1274470
def get_run_events(cls, crawler, run_id, start, end, level=None):
        """"""
        key = make_key(crawler, "events", run_id, level)
        return cls.event_list(key, start, end)
1223642
private Object getEvent(EventEnvelope eventEnvelope) {
        Object event = eventEnvelope.getEvent();
        if (event instanceof Data) {
            event = eventService.nodeEngine.toObject(event);
        }
        return event;
    }
731708
def query_events(resource_root, query_str=None):
  
  params = None
  if query_str:
    params = dict(query=query_str)
  return call(resource_root.get, EVENTS_PATH, ApiEventQueryResult,
      params=params)
874633
def get_events(conn, stackname):
    """"""
    next = None
    event_list = []
    while 1:
        events = conn.describe_stack_events(stackname, next)
        event_list.append(events)
        if events.next_token is None:
            break
        next = events.next_token
        time.sleep(1)
    return reversed(sum(event_list, []))
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
581499
def _get_stack_events(h_client, stack_id, event_args):
    '''
    
    '''
    event_args['stack_id'] = stack_id
    event_args['resource_name'] = None
    try:
        events = h_client.events.list(**event_args)
    except heatclient.exc.HTTPNotFound as exc:
        raise heatclient.exc.CommandError(six.text_type(exc))
    else:
        for event in events:
            event.stack_name = stack_id.split('/')[0]
        return events
386361
def _event(self, event):
    """"""
    result = dict(
        pid=event.device_id,
        tid=event.resource_id,
        name=event.name,
        ts=event.timestamp_ps / 1000000.0)
    if event.duration_ps:
      result['ph'] = _TYPE_COMPLETE
      result['dur'] = event.duration_ps / 1000000.0
    else:
      result['ph'] = _TYPE_INSTANT
      result['s'] = _SCOPE_THREAD
    for key in dict(event.args):
      if 'args' not in result:
        result['args'] = {}
      result['args'][key] = event.args[key]
    return result
1283764
def _get_events(self):
        
        self.last_update = datetime.datetime.now()
        time_min = datetime.datetime.utcnow()
        time_max = time_min + datetime.timedelta(hours=self.events_within_hours)
        events = []

        try:
            eventsResult = (
                self.service.events()
                .list(
                    calendarId="primary",
                    timeMax=time_max.isoformat() + "Z",  # 'Z' indicates UTC time
                    timeMin=time_min.isoformat() + "Z",  # 'Z' indicates UTC time
                    singleEvents=True,
                    orderBy="startTime",
                )
                .execute(num_retries=5)
            )
        except Exception:
            return self.events or events
        else:
            for event in eventsResult.get("items", []):
                # filter out events that we did not accept (default)
                # unless we organized them with no attendees
                i_organized = event.get("organizer", {}).get("self", False)
                has_attendees = event.get("attendees", [])
                for attendee in event.get("attendees", []):
                    if attendee.get("self") is True:
                        if attendee["responseStatus"] in self.response:
                            break
                else:
                    # we did not organize the event or we did not accept it
                    if not i_organized or has_attendees:
                        continue

                # strip and lower case output if needed
                for key in ["description", "location", "summary"]:
                    event[key] = event.get(key, "").strip()
                    if self.force_lowercase is True:
                        event[key] = event[key].lower()

                # ignore all day events if configured
                if event["start"].get("date") is not None:
                    if self.ignore_all_day_events:
                        continue

                # filter out blacklisted event names
                if event["summary"] is not None:
                    if event["summary"].lower() in map(
                        lambda e: e.lower(), self.blacklist_events
                    ):
                        continue

                events.append(event)

        return events[: self.num_events]
706954
private Events<Event> getEvents(CanalEventStore eventStore, Position start, int batchSize, Long timeout,
                                    TimeUnit unit) {
        if (timeout == null) {
            return eventStore.tryGet(start, batchSize);
        } else {
            try {
                if (timeout <= 0) {
                    return eventStore.get(start, batchSize);
                } else {
                    return eventStore.get(start, batchSize, timeout, unit);
                }
            } catch (Exception e) {
                throw new CanalServerException(e);
            }
        }
    }
42637
def get_user_events(self, id, **data):
        
        
        return self.get("/users/{0}/events/".format(id), data=data)
662749
def get_event(id, opts = {})
      data, _status_code, _headers = get_event_with_http_info(id, opts)
      return data
    end
320872
def event_listeners(self):
        """"""
        return (self.__command_listeners[:],
                self.__server_heartbeat_listeners[:],
                self.__server_listeners[:],
                self.__topology_listeners[:])
1104747
def get_events(self):
        
        return github.PaginatedList.PaginatedList(
            github.Event.Event,
            self._requester,
            self.url + "/events",
            None
        )
1297554
def events(self):
        
        if not self.__events:
            self.__events = Events(self.__connection)
        return self.__events