Public: Returns a breakdown of language stats.

 Examples

   # => { 'Ruby' => 46319,
          'JavaScript' => 258 }

 Returns a Hash of language names and Integer size values.
506942
def languages
      @sizes ||= begin
        sizes = Hash.new { 0 }
        cache.each do |_, (language, size)|
          sizes[language] += size
        end
        sizes
      end
    end
877269
def stats
      result = cmd("stats")
      Hash[*result.split("\n").map { |line|
          stat = line.strip!.split(/\s+/, 2)
          [stat[1], stat[0].to_i]
        }.flatten
      ]
    end
1180772
def stats(contents={}, &callback)
      send_request Request::Stats.new(contents) do |result|
        callback.call result

        if result[:status] == Errors::NO_ERROR && result[:key] != ''
          :proceed
        end
      end
    end
737232
def stats
      return "" unless Rails.cache.respond_to? :stats

      stats    = Rails.cache.stats
      values     = stats.select{|k,v| k =~ Regexp.new(host) }.values[0]
      mem_used = to_megabytes values['bytes']
      mem_max  = to_megabytes values['limit_maxbytes']
      return "#{mem_used} / #{mem_max} MB, #{stats.count - 1} peers"
    rescue => e
      raise ConnectionFailed, e
    end
413661
def supported_languages(self):
        
        if self.__supported_languages is None:
            res = self.wiki_request({"meta": "siteinfo", "siprop": "languages"})
            tmp = res["query"]["languages"]
            supported = {lang["code"]: lang["*"] for lang in tmp}
            self.__supported_languages = supported
        return self.__supported_languages
771428
def get_languages(self, abbreviations=False):
        
        data = []

        for lang in self.user_data.languages:
            if lang['learning']:
                if abbreviations:
                    data.append(lang['language'])
                else:
                    data.append(lang['language_string'])

        return data
143575
def languages_for_select
      ::I18nData.languages.map{|pair| pair.reverse}.sort{|x,y| x.first <=> y.first}
    end
1013757
def encodings_count(factory_id, opts = {})
      data, _status_code, _headers = encodings_count_with_http_info(factory_id, opts)
      return data
    end
532195
def include_in_language_stats?
      !vendored? &&
      !documentation? &&
      !generated? &&
      language && ( defined?(detectable?) && !detectable?.nil? ?
        detectable? :
        DETECTABLE_TYPES.include?(language.type)
      )
    end
854731
def software_language(instance):
    
    for key, obj in instance['objects'].items():
        if ('type' in obj and obj['type'] == 'software' and
                'languages' in obj):
            for lang in obj['languages']:
                if lang not in enums.SOFTWARE_LANG_CODES:
                    yield JSONError("The 'languages' property of object '%s' "
                                    "contains an invalid ISO 639-2 language "
                                    " code ('%s')."
                                    % (key, lang), instance['id'])
107914
def stat_jsonld(data, key=None, counter=None):
    
    if counter is None:
        counter = collections.Counter()

    if isinstance(data, dict):
        ret = {}
        for k, v in data.items():
            stat_jsonld(v, k, counter)
            counter[u"p_{}".format(k)] += 0
        if key:
            counter["triple"] += 1
            counter[u"p_{}".format(key)] +=1
    elif isinstance(data, list):
        [stat_jsonld(x, key, counter) for x in data]
        if key in ["tag"]:
            for x in data:
                if isinstance(x, dict) and x.get("name"):
                    counter[u"{}_{}".format(key, x["name"])] +=1
                elif type(x) in [basestring, unicode]:
                    counter[u"{}_{}".format(key, x)] +=1

    else:
        if key and key not in ["@id","@context"]:
            counter["triple"] += 1
            counter[u"p_{}".format(key)] +=1

    return counter
1118364
def get_languages(self):
        
        if self._languages:
            return self._languages
        self._languages = cache.get(self.PAGE_LANGUAGES_KEY % (self.id))
        if self._languages is not None:
            return self._languages

        languages = [c['language'] for
                            c in Content.objects.filter(page=self,
                            type="slug").values('language')]
        # remove duplicates
        languages = list(set(languages))
        languages.sort()
        cache.set(self.PAGE_LANGUAGES_KEY % (self.id), languages)
        self._languages = languages
        return languages
216835
def getScriptLanguageSystems(feaFile):
    
    languagesByScript = collections.OrderedDict()
    for ls in [
        st
        for st in feaFile.statements
        if isinstance(st, ast.LanguageSystemStatement)
    ]:
        if ls.script == "DFLT":
            continue
        languagesByScript.setdefault(ls.script, []).append(ls.language)

    langSysMap = collections.OrderedDict()
    for script, languages in languagesByScript.items():
        sc = unicodedata.ot_tag_to_script(script)
        langSysMap.setdefault(sc, []).append((script, languages))
    return langSysMap
448051
function() {
            let resultLangCount =  query('select count(*) as count from target_language');
            let resultResLvl3Count = query('select count(*) as count from resource where checking_level >= 3');
            let resultResCount = query('select count(*) as count from resource');
            let resultProjCount = query('select count(*) as count from (select id from project group by slug)');
            return {
                resource_count_level3:resultResLvl3Count[0]['count'],
                resource_count:resultResCount[0]['count'],
                target_language_count:resultLangCount[0]['count'],
                project_count:resultProjCount[0]['count']
            };
        }
1255860
def get_entry_for(entry, language)
      if entry.length > 1
        entry_string = get_entry_for_rec(entry[1..-1], language, hashes[language][entry[0]])
      else
        entry_string = hashes[language][entry[0]]
      end

      if entry_string.kind_of?(Array)
        entry_string = entry_string.map(&:inspect).join(', ')
      end
      entry_string
    end
1164508
function getLanguages(options) {
  options.hash = _private.getDevHash(options.secret);
  return _private.makeRequest(_getLink(options), 'Unable to fetch project languages');
}
1275310
def matches(language)
      values.select {|v|
        v = v.match(/^(.+?)-/) ? $1 : v if @first_level_match
        v == language || v == '*' || (language.match(/^(.+?)-/) && v == $1)
      }.sort {|a, b|
        # "*" gets least precedence, any others are compared based on length.
        a == '*' ? -1 : (b == '*' ? 1 : a.length <=> b.length)
      }.reverse
    end