move to localtt & globltt
167339
def get_orthology_evidence_code(self, abbrev):
        '''
            
        '''
        # AA	Amino acid sequence comparison.
        # CE	Coincident expression.
        # CL	Conserved genome location (synteny).
        # FC	Functional complementation.
        # FH	Formation of functional heteropolymers.
        # IX	Immunological cross-reaction.
        # NS	Not specified.
        # NT	Nucleotide sequence comparison.
        # SI	Similar response to inhibitors.
        # SL	Similar subcellular location.
        # SS	Similar substrate specificity.
        # SU	Similar subunit structure.
        # XH	Cross-hybridization to same molecular probe.
        # PT	Phylogenetic Tree.
        # OT    Other

        eco_abbrev_map = {
            'AA': 'ECO:0000031',  # BLAST protein sequence similarity evidence
            'CE': 'ECO:0000008',  # expression evidence
            'CL': 'ECO:0000044',  # sequence similarity FIXME
            'FC': 'ECO:0000012',  # functional complementation
            # functional complementation in a heterologous system
            'FH': 'ECO:0000064',
            'IX': 'ECO:0000040',  # immunological assay evidence
            'NS': None,
            'NT': 'ECO:0000032',  # nucleotide blast
            'SI': 'ECO:0000094',  # biological assay evidence FIXME
            'SL': 'ECO:0000122',  # protein localization evidence FIXME
            'SS': 'ECO:0000024',  # protein binding evidence  FIXME
            'SU': 'ECO:0000027',  # structural similarity evidence
            'XH': 'ECO:0000002',  # direct assay evidence  FIXME
            'PT': 'ECO:0000080',  # phylogenetic evidence
            'OT': None,
        }

        if abbrev not in eco_abbrev_map:
            LOG.warning("Evidence code for orthology (%s) not mapped", str(abbrev))

        return eco_abbrev_map.get(abbrev)
395116
function(a, b) {
		var self = elFinder.prototype.naturalCompare;
		if (typeof self.loc == 'undefined') {
			self.loc = (navigator.userLanguage || navigator.browserLanguage || navigator.language || 'en-US');
		}
		if (typeof self.sort == 'undefined') {
			if ('11'.localeCompare('2', self.loc, {numeric: true}) > 0) {
				// Native support
				if (window.Intl && window.Intl.Collator) {
					self.sort = new Intl.Collator(self.loc, {numeric: true}).compare;
				} else {
					self.sort = function(a, b) {
						return a.localeCompare(b, self.loc, {numeric: true});
					};
				}
			} else {
				/*
				 * Edited for elFinder (emulates localeCompare() by numeric) by Naoki Sawada aka nao-pon
				 */
				/*
				 * Huddle/javascript-natural-sort (https://github.com/Huddle/javascript-natural-sort)
				 */
				/*
				 * Natural Sort algorithm for Javascript - Version 0.7 - Released under MIT license
				 * Author: Jim Palmer (based on chunking idea from Dave Koelle)
				 * http://opensource.org/licenses/mit-license.php
				 */
				self.sort = function(a, b) {
					var re = /(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi,
					sre = /(^[ ]*|[ ]*$)/g,
					dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,
					hre = /^0x[0-9a-f]+$/i,
					ore = /^0/,
					syre = /^[\x01\x21-\x2f\x3a-\x40\x5b-\x60\x7b-\x7e]/, // symbol first - (Naoki Sawada)
					i = function(s) { return self.sort.insensitive && (''+s).toLowerCase() || ''+s; },
					// convert all to strings strip whitespace
					// first character is "_", it's smallest - (Naoki Sawada)
					x = i(a).replace(sre, '').replace(/^_/, "\x01") || '',
					y = i(b).replace(sre, '').replace(/^_/, "\x01") || '',
					// chunk/tokenize
					xN = x.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'),
					yN = y.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'),
					// numeric, hex or date detection
					xD = parseInt(x.match(hre)) || (xN.length != 1 && x.match(dre) && Date.parse(x)),
					yD = parseInt(y.match(hre)) || xD && y.match(dre) && Date.parse(y) || null,
					oFxNcL, oFyNcL,
					locRes = 0;

					// first try and sort Hex codes or Dates
					if (yD) {
						if ( xD < yD ) return -1;
						else if ( xD > yD ) return 1;
					}
					// natural sorting through split numeric strings and default strings
					for(var cLoc=0, numS=Math.max(xN.length, yN.length); cLoc < numS; cLoc++) {

						// find floats not starting with '0', string or 0 if not defined (Clint Priest)
						oFxNcL = !(xN[cLoc] || '').match(ore) && parseFloat(xN[cLoc]) || xN[cLoc] || 0;
						oFyNcL = !(yN[cLoc] || '').match(ore) && parseFloat(yN[cLoc]) || yN[cLoc] || 0;

						// handle numeric vs string comparison - number < string - (Kyle Adams)
						// but symbol first < number - (Naoki Sawada)
						if (isNaN(oFxNcL) !== isNaN(oFyNcL)) {
							if (isNaN(oFxNcL) && (typeof oFxNcL !== 'string' || ! oFxNcL.match(syre))) {
								return 1;
							} else if (typeof oFyNcL !== 'string' || ! oFyNcL.match(syre)) {
								return -1;
							}
						}

						// use decimal number comparison if either value is string zero
						if (parseInt(oFxNcL, 10) === 0) oFxNcL = 0;
						if (parseInt(oFyNcL, 10) === 0) oFyNcL = 0;

						// rely on string comparison if different types - i.e. '02' < 2 != '02' < '2'
						if (typeof oFxNcL !== typeof oFyNcL) {
							oFxNcL += '';
							oFyNcL += '';
						}

						// use locale sensitive sort for strings when case insensitive
						// note: localeCompare interleaves uppercase with lowercase (e.g. A,a,B,b)
						if (self.sort.insensitive && typeof oFxNcL === 'string' && typeof oFyNcL === 'string') {
							locRes = oFxNcL.localeCompare(oFyNcL, self.loc);
							if (locRes !== 0) return locRes;
						}

						if (oFxNcL < oFyNcL) return -1;
						if (oFxNcL > oFyNcL) return 1;
					}
					return 0;
				};
				self.sort.insensitive = true;
			}
		}
		return self.sort(a, b);
	}
476610
def move_to(name):
    
    datapath = path.join(path.dirname(path.realpath(__file__)), path.pardir)
    datapath = path.join(datapath, '../gzoo_data', 'images', name)
    print path.normpath(datapath)
    return path.normpath(datapath)
273210
function  {
  var defaultLocaleBundle, localeBundle, merged;
  var aux = {};

  init();

  // Load i18n content.
  loadCldr(defaultLocale);
  loadCldr(locale);

  defaultLocaleBundle = new Globalize(defaultLocale).cldr.attributes.bundle;
  localeBundle = new Globalize(locale).cldr.attributes.bundle;

  assertLocale(locale);
  assert(typeof translation === "object", "missing or invalid `translation` argument, JSON expected (e.g., {\"en\": ...})");
  assert(typeof defaultLocale === "string", "missing or invalid `defaultLocale` argument, String expected (e.g., \"en\")");

  aux[localeBundle] = generateDefaultTranslation(defaultLocale)[defaultLocaleBundle];
  merged = merge({}, aux, translation);
  if (orderedStringify(translation) !== orderedStringify(merged)) {
    return merged;
  }
}
415471
def MoveToAttributeNs(self, localName, namespaceURI):
        
        ret = libxml2mod.xmlTextReaderMoveToAttributeNs(self._o, localName, namespaceURI)
        return ret
949851
def main(out_path, ud_dir, check_parse=False, langs=ALL_LANGUAGES, exclude_trained_models=False, exclude_multi=False,
         hide_freq=False, corpus='train', best_per_language=False):
    "
    languages = [lang.strip() for lang in langs.split(",")]

    print_freq_tasks = []
    if not hide_freq:
        print_freq_tasks = ['Tokens']

    # fetching all relevant treebank from the directory
    treebanks = fetch_all_treebanks(ud_dir, languages, corpus, best_per_language)

    print()
    print("Loading all relevant models for", languages)
    models = dict()

    # multi-lang model
    multi = None
    if not exclude_multi and not check_parse:
        multi = load_model('xx_ent_wiki_sm', add_sentencizer=True)

    # initialize all models with the multi-lang model
    for lang in languages:
        models[lang] = [multi] if multi else []
        # add default models if we don't want to evaluate parsing info
        if not check_parse:
            # Norwegian is 'nb' in spaCy but 'no' in the UD corpora
            if lang == 'no':
                models['no'].append(load_default_model_sentencizer('nb'))
            else:
                models[lang].append(load_default_model_sentencizer(lang))

    # language-specific trained models
    if not exclude_trained_models:
        if 'de' in models:
            models['de'].append(load_model('de_core_news_sm'))
        if 'es' in models:
            models['es'].append(load_model('es_core_news_sm'))
            models['es'].append(load_model('es_core_news_md'))
        if 'pt' in models:
            models['pt'].append(load_model('pt_core_news_sm'))
        if 'it' in models:
            models['it'].append(load_model('it_core_news_sm'))
        if 'nl' in models:
            models['nl'].append(load_model('nl_core_news_sm'))
        if 'en' in models:
            models['en'].append(load_model('en_core_web_sm'))
            models['en'].append(load_model('en_core_web_md'))
            models['en'].append(load_model('en_core_web_lg'))
        if 'fr' in models:
            models['fr'].append(load_model('fr_core_news_sm'))
            models['fr'].append(load_model('fr_core_news_md'))

    with out_path.open(mode='w', encoding='utf-8') as out_file:
        run_all_evals(models, treebanks, out_file, check_parse, print_freq_tasks)
337741
function LocalTransport(config) {
  this.id = config && config.id || null;
  this.networkId = this.id || null;
  this['default'] = config && config['default'] || false;
  this.agents = {};
}
396842
def _new_gnu_trans(self, localedir, use_null_fallback=True):
        
        use_null_fallback = False
        return gettext_module.translation(
            domain=self.domain,
            localedir=localedir,
            languages=[self.language],
            codeset='utf-8',
            fallback=use_null_fallback)
513192
function transpile(src, options) {
	return buble.transform(src, {
		target: { ie: 9 },
		transforms: { modules: false }
	});
}
405014
def _local_upload(self, filepath, remove=False):
        """"""
        if os.path.isfile(filepath):
            filename = os.path.basename(os.path.abspath(filepath))
            if filename and self.__isValidFilename(filename):
                suffix = self.__getFilenameSuffix(filename)
                try:
                    self.__unpack_tgz(os.path.abspath(filepath)) if self.__isValidTGZ(suffix) else self.__unpack_zip(os.path.abspath(filepath))
                finally:
                    if remove is True:
                        os.remove(filepath)
            else:
                raise InstallError("Invalid Filename")
        else:
            raise InstallError("Invalid Filepath")
142802
function glupost(configuration) {

   const tasks = configuration.tasks || {}
   const template = configuration.template || {}

   // Expand template object with defaults.
   expand(template, { transforms: [], dest: "." })


   // Create tasks.
   const names = Object.keys(tasks)
   for (const name of names) {
      const task = retrieve(tasks, name)

      if (typeof task === "object")
         expand(task, template)

      gulp.task(name, compose(task))
   }

   watch(tasks)

}
811275
function localMiddleware (req, res, next) {
            // Tell the client what Socket.IO namespace to use,
            // trim the leading slash because the cookie will turn it into a %2F
            res.setHeader('uibuilder-namespace', node.ioNamespace)
            res.cookie('uibuilder-namespace', tilib.trimSlashes(node.ioNamespace), {path: node.url, sameSite: true})
            next()
        }
885706
private void addToLocaleList(List localeList, List<Locale> locales) {
        if (locales != null) {
            for (Locale locale : locales) {
                if (locale != null && !localeList.contains(locale)) localeList.add(locale);
            }
        }
    }
558267
async function main({ isFragment, needsHelp, showVersion, useTabs }) {
  /* eslint-disable no-console */
  const stdin = await getStdin()

  if (showVersion) {
    return console.log(version)
  }

  if (needsHelp || !stdin) {
    return console.log(help)
  }

  const pug = html2pug(stdin, { isFragment, useTabs })
  return console.log(pug)

  /* eslint-enable no-console */
}
1109694
function isSonarInstalledLocally() {
        var libDir = path.join(__dirname, 'lib'),
            extension = (/^win/.test(process.platform) ? '.bat' : '');

        if (fs.existsSync(libDir)) {
            glob.sync('**/bin/sonar-runner' + extension, {cwd: libDir, root: '/'}).forEach(function (file) {
                console.log('Sonar-runner is already installed locally.');
                exit(0);
            });
        }
        console.log('Sonar-runner command [sonar-runner] could not be found locally either.');
        return false;
    }
533451
private void addLocalLayer() {
    LineLayer local = TrafficLayer.getLineLayer(
      Local.BASE_LAYER_ID,
      Local.ZOOM_LEVEL,
      Local.FILTER,
      Local.FUNCTION_LINE_COLOR,
      Local.FUNCTION_LINE_WIDTH,
      Local.FUNCTION_LINE_OFFSET
    );

    LineLayer localCase = TrafficLayer.getLineLayer(
      Local.CASE_LAYER_ID,
      Local.ZOOM_LEVEL,
      Local.FILTER,
      Local.FUNCTION_LINE_COLOR_CASE,
      Local.FUNCTION_LINE_WIDTH_CASE,
      Local.FUNCTION_LINE_OFFSET,
      Local.FUNCTION_LINE_OPACITY_CASE
    );

    addTrafficLayersToMap(localCase, local, placeLayerBelow());
  }
640690
function (from, to) {
            var toFile = xpfile(to);
            return xpfile(from).moveTo(toFile.parent, toFile.leafName);
        }