Display a list of all registered events
3775
def sourcess_list(self, *args):
        """"""

        from pprint import pprint

        sources = {}
        sources.update(self.authorized_events)
        sources.update(self.anonymous_events)

        for source in sources:
            pprint(source)
943880
def get_allEvents(self):
        '''
        
        '''

        if not hasattr(self,'allEvents'):
            timeFilters = {'endTime__gte': timezone.now()}
            if getConstant('registration__displayLimitDays') or 0 > 0:
                timeFilters['startTime__lte'] = timezone.now() + timedelta(days=getConstant('registration__displayLimitDays'))

            # Get the Event listing here to avoid duplicate queries
            self.allEvents = Event.objects.filter(
                **timeFilters
            ).filter(
                Q(instance_of=PublicEvent) |
                Q(instance_of=Series)
            ).annotate(
                **self.get_annotations()
            ).exclude(
                Q(status=Event.RegStatus.hidden) |
                Q(status=Event.RegStatus.regHidden) |
                Q(status=Event.RegStatus.linkOnly)
            ).order_by(*self.get_ordering())

        return self.allEvents
801087
public List<String> eventNames() {
        return events.stream().map(BEvent::getName).collect( toList() );
    }
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
891872
def events(self):
        
        if not self.event_reflector:
            return []

        events = []
        for event in self.event_reflector.events:
            if event.involved_object.name != self.pod_name:
                # only consider events for my pod name
                continue

            if self._last_event and event.metadata.uid == self._last_event:
                # saw last_event marker, ignore any previous events
                # and only consider future events
                # only include events *after* our _last_event marker
                events = []
            else:
                events.append(event)
        return events
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, []))
760959
def print_event_statistics(self):
        """"""
        logger.info('All events by type')
        logger.info('-------------------')
        for k, v in self.all_events.items():
            logger.info('%s, %s' % (k, len(v)))
        logger.info('-------------------')
984187
function onList() {
    getCurrentRegistry(function(cur) {
        var info = [''];
        var allRegistries = getAllRegistry();

        Object.keys(allRegistries).forEach(function(key) {
            var item = allRegistries[key];
            var prefix = item.registry === cur ? '* ' : '  ';
            info.push(prefix + key + line(key, 12) + item.registry);
        });

        info.push('');
        printMsg(info);
    });
}
1134827
def events(self):
        ''''''
        ret = []
        while self.out_queue.qsize():
            ret.append(self.out_queue.get())
        return ret
855551
def show_events(self, status=None, nids=None):
        
        nrows, ncols = get_terminal_size()

        for task in self.iflat_tasks(status=status, nids=nids):
            report = task.get_event_report()
            if report:
                print(make_banner(str(task), width=ncols, mark="="))
                print(report)
1288198
def summarize_events():
    """"""

    for ev in event.events:
        if ev.callbacks:
            LOG.info("subscribed to %s by %s", ev, ', '.join(imap(repr, ev.callbacks)))
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
732296
def _events(self):
        
        with self.app.events_lock:
            res = self.app.get_events()
        return serialize(res, True)
9363
def emit(self, event, *args, **kwargs):
        
        for func in self._registered_events[event].values():
            func(*args, **kwargs)
1132098
def events_list(self, *args):
        """"""

        def merge(a, b, path=None):
            "merges b into a"
            if path is None: path = []
            for key in b:
                if key in a:
                    if isinstance(a[key], dict) and isinstance(b[key], dict):
                        merge(a[key], b[key], path + [str(key)])
                    elif a[key] == b[key]:
                        pass  # same leaf value
                    else:
                        raise Exception('Conflict at %s' % '.'.join(path + [str(key)]))
                else:
                    a[key] = b[key]
            return a

        events = {}
        sources = merge(self.authorized_events, self.anonymous_events)

        for source, source_events in sources.items():
            events[source] = []
            for item in source_events:
                events[source].append(item)

        self.log(events, pretty=True)
1216526
function tableFromEvents(eventsObj) {
  const headers = ["Event Name", "Type", "Description"]
  let rows = []

  for(const evt in eventsObj) {
    let cols = []

    cols.push(`${evt}`) // event name
    
    let typeList = ''
    eventsObj[evt]["type"]["names"].forEach((type, idx, arr) => {
      typeList += `${type}${arr[idx+1] ? `|` : ''}`
    })
    cols.push(typeList) // list of event types
    cols.push(`${eventsObj[evt]["description"]}`) // description of the event

    rows.push(cols);
  }

  return rows.length > 0 ? {table: {headers, rows}} : null
}
1098118
protected function actionListReportEvent()
    {
        list($selected, $action) = $this->getPostedAction();

        if ($action === 'delete' && $this->access('report_events')) {
            if ($this->report->delete(array('log_id' => $selected))) {
                $message = $this->text('Deleted %num item(s)', array('%num' => count($selected)));
                $this->setMessage($message, 'success');
            }
        }
    }