Specifies that matching script is for on of app names.
192733
def for_app(*app_names, **kwargs):
    """"""
    def _for_app(fn, command):
        if is_app(command, *app_names, **kwargs):
            return fn(command)
        else:
            return False

    return decorator(_for_app)
1367295
function() {
  // Get list of dirs from app registry.
  return getAppRegistry()
  // Map app dirs to app names.
  .then(inspectDirs)
  .all()
  .tap(function(appRegistryApps) {
    log.debug(format('Apps in registry: %j', appRegistryApps));
  });

}
809057
def has_app(app_name):
    
    if DJANGO_VERSION >= (1, 7):
        from django.apps import apps
        return apps.is_installed(app_name)
    else:
        from django.conf import settings

        return app_name in settings.INSTALLED_APPS
145415
def get_app_name(app_name):
    
    type_ = locate(app_name)
    if inspect.isclass(type_):
        return type_.name
    return app_name
368808
function hasConfigSetting(pkg, setting) {
  return pkg.config && pkg.config[appName] && pkg.config[appName][setting];
}
509093
function expandWildcard (name, scripts) {
  const n = swapColonAndSlash(name)
  return Object.keys(scripts)
    .map(swapColonAndSlash)
    .filter(x => minimatch(x, n))
    .map(swapColonAndSlash)
}
1374634
def matches?(filename, candidates)
      filename = filename.downcase
      candidates = candidates.compact.map(&:name)
      @exts_and_langs.any? { |ext| filename.end_with?(ext) }
    end
588437
def init_app(self, app):
        """"""
        prefix_len = len(self.prefix)
        for varname, value in os.environ.items():
            if not varname.startswith(self.prefix):
                continue

            # Prepare values
            varname = varname[prefix_len:]
            value = value or app.config.get(varname)

            # Evaluate value
            try:
                value = ast.literal_eval(value)
            except (SyntaxError, ValueError):
                pass

            # Set value
            app.config[varname] = value
1070837
private boolean isApplicationFound(String applicationName) {
        boolean applicationFinded = false;
        List<String> appList = application.get();
        if (!appList.isEmpty()) {
            if (appList.contains(applicationName)) {
                applicationFinded = true;
            } else {
                logger.info("Application [{}] do not exist. You must create an application named [{}] first.", applicationName, applicationName);
            }
        } else {
            logger.info(CLI_YOU_MUST_CREATE_AN_APPLICATION_FIRST);
        }
        return applicationFinded;
    }
1349539
def apply(script, value=None, vars={}, url=None, opener=default_opener, library_paths=[]):
    
    return all(script, value, vars, url, opener, library_paths)
419967
function onlyForApps(expectedPlatform) {
  const stack = new Error().stack || '';
  const re = /Appium.(\w+)/g;
  const caller = stack.split('\n')[2].trim();
  const m = re.exec(caller);

  if (!m) {
    throw new Error(`Invalid caller ${caller}`);
  }

  const callerName = m[1] || m[2];
  if (!expectedPlatform) {
    if (!this.platform) {
      throw new Error(`${callerName} method can be used only with apps`);
    }
  } else if (this.platform !== expectedPlatform.toLowerCase()) {
    throw new Error(`${callerName} method can be used only with ${expectedPlatform} apps`);
  }
}
928634
def add_usable_app(name, app):
    ''
    name = slugify(name)
    global usable_apps # pylint: disable=global-statement
    usable_apps[name] = app
    return name
370258
def format_application_name(name)
      if(name.index('.') != 0)
        name = '.' + name
      end
      return name.split(" ").join("_").downcase
    end
1374324
def app_run(app_name_or_id, alias=None, input_params={}, always_retry=True, **kwargs):
    
    input_params_cp = Nonce.update_nonce(input_params)
    fully_qualified_version = app_name_or_id + (('/' + alias) if alias else '')
    return DXHTTPRequest('/%s/run' % fully_qualified_version, input_params_cp, always_retry=always_retry, **kwargs)
969778
function(appName) {
    if (appName) {
      var options = _.sortBy(apps[appName].options, 'weight');
      apps[appName].options = options;
      return apps[appName];
    }
    return false;
  }
438269
function (scripts)
		{
			var script = {};
			for (s in scripts)
			{
				var ref=scripts[s],
					scriptName = s.substr(0,1).toUpperCase()+s.substr(1).toLowerCase(),
					s = 'script-'+s.replace('-','.');
				script[s]=ref;
				script[s].class='wnScript'+scriptName || 'wnScript';
				_componentsConfig[s]=_.merge({}, script[s]);
			}
			return this;
		}
433426
def show
      script_listing = Script::Listing.find(params[:listing_id])
      @script_url = script_listing.urls.friendly.find(params[:id])
    end