Parameters
    ----------
    events : list(threading.Event)
        List of events.

    Returns
    -------
    threading.Event
        Event that is set when **at least one** of the events in :data:`events`
        is set.
357572
def OrEvent(*events):
    '''
    
    '''
    or_event = threading.Event()

    def changed():
        '''
        Set ``or_event`` if any of the specified events have been set.
        '''
        bools = [event_i.is_set() for event_i in events]
        if any(bools):
            or_event.set()
        else:
            or_event.clear()
    for event_i in events:
        # Override ``set`` and ``clear`` methods on event to update state of
        # `or_event` after performing default behaviour.
        orify(event_i, changed)

    # Set initial state of `or_event`.
    changed()
    return or_event
509434
def _setup_events(plugin):
    

    events = plugin.events

    if events and isinstance(events, (list, tuple)):
        for event in [e for e in events if e in _EVENT_VALS]:
            register('event', event, plugin)
1332594
def __event_exist(self, event_type):
        
        for i in range(self.len()):
            if self.events_list[i][1] < 0 and self.events_list[i][3] == event_type:
                return i
        return -1
17980
def recentEvents(self):
        '''
        
        '''
        return Event.objects.filter(
            Q(pk__in=self.individualEvents.values_list('pk',flat=True)) |
            Q(session__in=self.eventSessions.all()) |
            Q(publicevent__category__in=self.eventCategories.all()) |
            Q(series__category__in=self.seriesCategories.all())
        ).filter(
            Q(startTime__lte=timezone.now() + timedelta(days=60)) &
            Q(endTime__gte=timezone.now() - timedelta(days=60))
        )
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
686846
def get_all_events(self):
        
        self.all_events = {}
        events = self.tree.execute("$.events.frames")
        if events is None:
            return
        for e in events:
            event_type = e.get('type')
            frame_id = e.get('frame_id')
            try:
                self.all_events[event_type].append(frame_id)
            except KeyError:
                self.all_events[event_type] = [frame_id]
699091
def events(self):
        
        all_events = [{ensure_unicode(key): value for key, value in iteritems(ev)} for ev in self._events]

        for ev in all_events:
            to_decode = []
            for key, value in iteritems(ev):
                if isinstance(value, binary_type) and key != 'host':
                    to_decode.append(key)
            for key in to_decode:
                ev[key] = ensure_unicode(ev[key])

            if ev.get('tags'):
                ev['tags'] = normalize_tags(ev['tags'])

        return all_events
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)
1134827
def events(self):
        ''''''
        ret = []
        while self.out_queue.qsize():
            ret.append(self.out_queue.get())
        return ret
1297554
def events(self):
        
        if not self.__events:
            self.__events = Events(self.__connection)
        return self.__events
1238045
def events(cls, filters):
        """"""
        current = filters.pop('current', False)
        current_params = []
        if current:
            current_params = [('current', 'true')]

        filter_url = uparse.urlencode(sorted(list(filters.items())) + current_params)  # noqa
        events = cls.json_get('%s/events?%s' % (cls.api_url, filter_url),
                              empty_key=True, send_key=False)
        return events
880137
private List<Event> filterEvents(List<Event> events) {
        List<Event> filteredEvents = new ArrayList<Event>();
        for (Event event : events) {
            if (!filter(event)) {
                filteredEvents.add(event);
            }
        }
        return filteredEvents;
    }
759916
def get_events(self):
        
        with open(self._path, 'r') as file_:
            file_lines = file_.read().splitlines()
            event_lines = [line for line in file_lines if line]
        events = []
        for event_line in event_lines:
            for event_cls in (AddEvent, SetReadingEvent, ReadEvent,
                              SetFinishedEvent):
                try:
                    event = event_cls.from_str(event_line)
                except EventParseError:
                    pass
                else:
                    events.append(event)
        return events
139282
def check_events(self):
        ''''''
        while self.event_count() > 0:
            event = self.get_event()
            for callback in self._callbacks:
                callback(event)
1169426
def get_occurrence_times_for_event(event):
    
    occurrences_starts = set()
    occurrences_ends = set()
    for o in event.occurrence_list:
        occurrences_starts.add(
            coerce_naive(o.original_start or o.start)
        )
        occurrences_ends.add(
            coerce_naive(o.original_end or o.end)
        )
    return occurrences_starts, occurrences_ends
722461
def process_events(events)
      process_join events['join'] if events.key? 'join'
      process_invite events['invite'] if events.key? 'invite'
      process_leave events['leave'] if events.key? 'leave'
    end
1148899
def trigger(self, event: str, *args: T.Any, **kw: T.Any) -> bool:
        """"""

        callbacks = list(self._events.get(event, []))
        if not callbacks:
            return False

        for callback in callbacks:
            callback(*args, **kw)
        return True