Return the topics learned but not golden by a user in a language.
497450
def get_reviewable_topics(self, lang):
        """"""
        return [topic['title']
                for topic in self.user_data.language_data[lang]['skills']
                if topic['learned'] and topic['strength'] < 1.0]
944751
def untranslated_policy(self, default):
        ''''''
        return self.generator.settings.get(self.info.get('policy', None),
                                           default)
292520
def list_topics(region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    res = {}
    NextToken = ''
    while NextToken is not None:
        ret = conn.list_topics(NextToken=NextToken)
        NextToken = ret.get('NextToken', None)
        arns = jmespath.search('Topics[*].TopicArn', ret)
        for t in arns:
            short_name = t.split(':')[-1]
            res[short_name] = t
    return res
320181
def get_languages(self):
        """"""
        if self._languages_cache is None:
            self._languages_cache = list(self.iter_languages())
        return self._languages_cache
968403
function getLanguages(properties) {
  if (!Array.isArray(properties['wof:lang_x_official'])) {
    return [];
  }
  return properties['wof:lang_x_official']
    .filter(l => (typeof l === 'string' && l.length === 3))
    .map(l => l.toLowerCase());
}
702057
def get_avaliable_languages(self, bundleId):
        """"""
        bundleData = self.__get_bundle_data(bundleId)

        if not bundleData:
            return []

        sourceLanguage = bundleData.get(self.__RESPONSE_SRC_LANGUAGE_KEY)
        languages = bundleData.get(self.__RESPONSE_TARGET_LANGUAGES_KEY)
        languages.append(sourceLanguage)

        return languages if languages else []
841515
def filtered_entries(self):
        """"""
        return [
            e for e in self.entries if not any(fnmatch.fnmatch(e.name.lower(), p.lower()) for p in self.exclude_list)
        ]
1317056
def get_languages(self):
        
        headers, data = self._requester.requestJsonAndCheck(
            "GET",
            self.url + "/languages"
        )
        return data
1006498
def discussions_for(user, only_open=True):
    '''
    
    '''
    # Only fetch required fields for discussion filtering (id and slug)
    # Greatly improve performances and memory usage
    datasets = Dataset.objects.owned_by(user.id, *user.organizations).only('id', 'slug')
    reuses = Reuse.objects.owned_by(user.id, *user.organizations).only('id', 'slug')

    qs = Discussion.objects(subject__in=list(datasets) + list(reuses))
    if only_open:
        qs = qs(closed__exists=False)
    return qs
152879
def topics(self):
        
        topics_sorted = sorted(self._topics.items(), key=lambda t: t[0])
        return MappingProxyType(OrderedDict(topics_sorted))
235443
def subjects(subjects=None,
             recursive=False,
             include_tables=False,
             lang=DEFAULT_LANGUAGE):
    
    request = Request('subjects', *subjects,
                      recursive=recursive,
                      includeTables=include_tables,
                      lang=lang)

    return (Subject(subject, lang=lang) for subject in request.json)
961301
def get_topics(yaml_info):
    ''' 
    '''
    # Pull out the topic info
    names = []
    # Store all of the topics in a dictionary
    topics = yaml_info['topics']
    for topic in topics:
        names.append(topic['topic'])

    return names
194671
def languages(self, key, value):
    """"""
    languages = self.get('languages', [])

    values = force_list(value.get('a'))
    for value in values:
        for language in RE_LANGUAGE.split(value):
            try:
                name = language.strip().capitalize()
                languages.append(pycountry.languages.get(name=name).alpha_2)
            except KeyError:
                pass

    return languages
658359
def get_topic_tree(rs, topic, depth=0):
    

    # Break if we're in too deep.
    if depth > rs._depth:
        rs._warn("Deep recursion while scanning topic trees!")
        return []

    # Collect an array of all topics.
    topics = [topic]

    # Does this topic include others?
    if topic in rs._includes:
        # Try each of these.
        for includes in sorted(rs._includes[topic]):
            topics.extend(get_topic_tree(rs, includes, depth + 1))

    # Does this topic inherit others?
    if topic in rs._lineage:
        # Try each of these.
        for inherits in sorted(rs._lineage[topic]):
            topics.extend(get_topic_tree(rs, inherits, depth + 1))

    return topics
589061
def _get_translation(self, lang):
        """"""

        try:
            return self._translations[lang]
        except KeyError:
            # The fact that `fallback=True` is not the default is a serious design flaw.
            rv = self._translations[lang] = gettext.translation(self._domain, localedir=localedir, languages=[lang],
                                                                fallback=True)
            return rv
931640
def topics(text):
    """"""
    detectors = [
        detector_50_Cent
    ]
    ts = []
    for detector in detectors:
        ts.append(detector(text))

    return [t[0] for t in ts if t[1] > 0.95]
645083
def get_most_relevant_words_for_topic(vocab, rel_mat, topic, n=None):
    
    _check_relevant_words_for_topic_args(vocab, rel_mat, topic)
    return _words_by_score(vocab, rel_mat[topic], least_to_most=False, n=n)