Return link and list strings for a given event.
329392
def build_ajax_rsvps(event, user_profile):
    """"""
    if user_profile in event.rsvps.all():
        link_string = True
    else:
        link_string = False

    if not event.rsvps.all().count():
        list_string = 'No RSVPs.'
    else:
        list_string = 'RSVPs:'
        for counter, profile in enumerate(event.rsvps.all()):
            if counter > 0:
                list_string += ','

            list_string += \
                ' <a class="page_link" title="View Profile" href="{url}">' \
                    '{name}</a>'.format(
                        url=reverse(
                            'member_profile',
                            kwargs={'targetUsername': profile.user.username}
                        ),
                        name='You' if profile.user == user_profile.user \
                            else profile.user.get_full_name(),
                    )
    return (link_string, list_string)
934191
def getAllEvents(request, *, home=None):
    
    qrys = [SimpleEventPage.events(request).all(),
            MultidayEventPage.events(request).all(),
            RecurringEventPage.events(request).all()]
    # Does not return exceptions
    if home is not None:
        qrys = [qry.descendant_of(home) for qry in qrys]
    events = sorted(chain.from_iterable(qrys),
                    key=attrgetter('_first_datetime_from'))
    return events
154891
def links(self):
        
        links = Links()
        links["self"] = Link.for_(
            self._operation,
            self._ns,
            qs=self._page.to_items(),
            **self._context
        )
        return links
406538
def get_extracted_events(fnames):
    """"""
    event_list = []
    for fn in fnames:
        tp = trips.process_xml_file(fn)
        ed = tp.extracted_events
        for k, v in ed.items():
            event_list += v
    return event_list
296712
def read_cz_lsm_event_list(fd, byte_order):
    """"""
    count = struct.unpack(byte_order+'II', fd.read(8))[1]
    events = []
    while count > 0:
        esize, etime, etype = struct.unpack(byte_order+'IdI', fd.read(16))
        etext = stripnull(fd.read(esize - 16))
        events.append((etime, etype, etext))
        count -= 1
    return events
50045
def process_links(self, links):
        
        links_list = []
        for link in links:
            if os.path.splitext(link)[1][1:].strip().lower() in self.format_list:
                links_list.append(link)
        return links_list
617170
def get_formatted_files(self, net):
        """"""
        idx = -1
        if (
                self.event_name is not None and
                net.history
        ):
            for i, v in enumerate(net.history[:, self.event_name]):
                if v:
                    idx = i
        return {
            "f_params": self._format_target(net, self.f_params, idx),
            "f_optimizer": self._format_target(net, self.f_optimizer, idx),
            "f_history": self.f_history_,
            "f_pickle": self._format_target(net, self.f_pickle, idx)
        }
152915
def get_received_events(self):
        
        return github.PaginatedList.PaginatedList(
            github.Event.Event,
            self._requester,
            self.url + "/received_events",
            None
        )
898751
def get_string_list(self, key):
        """"""
        strings = []
        size = self.beginReadArray(key)
        for i in range(size):
            self.setArrayIndex(i)
            entry = str(self._value("entry"))
            strings.append(entry)
        self.endArray()
        return strings
1125037
def _get_event_stream(self):
        """"""
        self.__event_handle = threading.Event()
        event_thread = threading.Thread(target=self.thread_function)
        event_thread.start()
320872
def event_listeners(self):
        """"""
        return (self.__command_listeners[:],
                self.__server_heartbeat_listeners[:],
                self.__server_listeners[:],
                self.__topology_listeners[:])
1054422
def iter_links(self, file, encoding=None, context=False):
        '''
        '''
        if context:
            return [item for item in self.iter_text(file, encoding) if item[1]]
        else:
            return [item[0] for item in self.iter_text(file, encoding) if item[1]]
601504
def _event_funcs(self, event: str) -> Iterable[Callable]:
        
        for func in self._events[event]:
            yield func
101542
def list_links(args = {})
      if args.empty?
        links
      else
        links.select { |link| link.match? args }
      end
    end
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, []))
152217
def list(self, argv):
        """"""

        def read(index):
            print(index.name)
            for key in sorted(index.content.keys()): 
                value = index.content[key]
                print("    %s: %s" % (key, value))

        if len(argv) == 0:
            for index in self.service.indexes:
                count = index['totalEventCount']
                print("%s (%s)" % (index.name, count))
        else:
            self.foreach(argv, read)
596275
def get_handlers(self, event: str) -> T.List[T.Callable]:
        """"""

        return list(self._events.get(event, []))