Check at least *k* topics has at least one message.  Args: topics: Dictionary of which key is a topic and value is a list of messages. k: Condition parameter.  Returns: true if at least *k* topics has at least one message.
960297
function is_ready(topics, k) {
        let count = 0;
        for (var t in topics) {
            if (topics[t].length > 0) {
                count += 1;
            }
        }
        return count >= k;
    }
91502
def check(text):
    """"""
    err = "glaad.offensive_terms"
    msg = "Offensive term. Remove it or consider the context."

    list = [
        "fag",
        "faggot",
        "dyke",
        "sodomite",
        "homosexual agenda",
        "gay agenda",
        "transvestite",
        "homosexual lifestyle",
        "gay lifestyle"
        # homo - may create false positives without additional context
        # FIXME use topic detetor to decide whether "homo" is offensive
    ]

    return existence_check(text, list, err, msg, join=True, ignore_case=False)
101250
def koschei_group(config, message, group=None):
    
    if not group or 'koschei' not in message['topic']:
        return False
    groups = set([item.strip() for item in group.split(',')])
    return bool(groups.intersection(message['msg'].get('groups', [])))
1301186
def _on_status_message(self, sequence, topic, message):
        

        self._logger.debug("Received message on (topic=%s): %s" % (topic, message))

        try:
            conn_key = self._find_connection(topic)
        except ArgumentError:
            self._logger.warn("Dropping message that does not correspond with a known connection, message=%s", message)
            return

        if messages.ConnectionResponse.matches(message):
            if self.name != message['client']:
                self._logger.debug("Connection response received for a different client, client=%s, name=%s", message['client'], self.name)
                return

            self.conns.finish_connection(conn_key, message['success'], message.get('failure_reason', None))
        else:
            self._logger.warn("Dropping message that did not correspond with a known schema, message=%s", message)
1135773
def _bind_topics(self, topics):
        

        # FIXME: Allow for these subscriptions to fail and clean up the previous ones
        # so that this function is atomic

        self.client.subscribe(topics.status, self._on_status_message)
        self.client.subscribe(topics.tracing, self._on_trace)
        self.client.subscribe(topics.streaming, self._on_report)
        self.client.subscribe(topics.response, self._on_response_message)
152879
def topics(self):
        
        topics_sorted = sorted(self._topics.items(), key=lambda t: t[0])
        return MappingProxyType(OrderedDict(topics_sorted))
1082661
def find_topic(category_name, forum_name, topic_title, options = {})
      forum = self.find_forum(category_name, forum_name, options)
      if forum
        self.topics(forum['id'], options).detect {|t| t['title'] == topic_title}
      end
    end
49098
def topics(self):
        
        cluster = self._client.cluster
        if self._client._metadata_refresh_in_progress and self._client._topics:
            future = cluster.request_update()
            self._client.poll(future=future)
        stash = cluster.need_all_topic_metadata
        cluster.need_all_topic_metadata = True
        future = cluster.request_update()
        self._client.poll(future=future)
        cluster.need_all_topic_metadata = stash
        return cluster.topics()
597779
def exists(name, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    topics = get_all_topics(region=region, key=key, keyid=keyid,
                            profile=profile)
    if name.startswith('arn:aws:sns:'):
        return name in list(topics.values())
    else:
        return name in list(topics.keys())
1354447
def can_update_topics_to_announces(self, forum, user):
        
        return (
            self._perform_basic_permission_check(forum, user, 'can_edit_posts') and
            self._perform_basic_permission_check(forum, user, 'can_post_announcements')
        )
556484
def is_state(self, state):
        
        state = state.format(relation_name=self.relation_name)
        value = _get_flag_value(state)
        if not value:
            return False
        return self.key in value['conversations']
54362
def get_target_forums_for_moved_topics(self, user):
        
        return [f for f in self._get_forums_for_user(user, ['can_move_topics', ]) if f.is_forum]
1129390
public boolean topicExists(String topicName) {
        Map<String, List<PartitionInfo>> topicInfo = getTopicInfo();
        return topicInfo != null && topicInfo.containsKey(topicName);
    }
980204
def topic_exists(name, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    topics = list_topics(region=region, key=key, keyid=keyid, profile=profile)
    return name in list(topics.values() + topics.keys())
256881
def freeze(self, freeze: bool = True):
        
        for topic in self._topics.values():
            topic.freeze()
        self._frozen = freeze
1176455
def forum_topic(self):
        
        if self.api and self.forum_topic_id:
            return self.api._get_topic(self.forum_topic_id)
210142
def handle_msg(self, msg, **config):
        
        match = self.__prefix__.match(msg['topic'])
        if match:
            return match.groups()[-1] or ""