Fetch basis.js options from script's `basis-config` or `data-basis-config` attribute.
11416
function fetchConfig(){
    var config = __config;

    if (!config)
    {
      if (NODE_ENV)
      {
        // node.js env
        basisFilename = process.basisjsFilename || __filename.replace(/\\/g, '/');

        /** @cut */ if (process.basisjsConfig)
        /** @cut */ {
        /** @cut */   config = process.basisjsConfig;
        /** @cut */   if (typeof config == 'string')
        /** @cut */   {
        /** @cut */     try {
        /** @cut */       config = Function('return{' + config + '}')();
        /** @cut */     } catch(e) {
        /** @cut */       /** @cut */ consoleMethods.error('basis-config: basis.js config parse fault: ' + e);
        /** @cut */     }
        /** @cut */   }
        /** @cut */ }
      }
      else
      {
        // browser env
        var scripts = document.scripts;
        for (var i = 0, scriptEl; scriptEl = scripts[i]; i++)
        {
          var configAttrValue = scriptEl.hasAttribute('basis-config')
            ? scriptEl.getAttribute('basis-config')
            : scriptEl.getAttribute('data-basis-config');

          scriptEl.removeAttribute('basis-config');
          scriptEl.removeAttribute('data-basis-config');

          if (configAttrValue !== null)
          {
            basisFilename = pathUtils.normalize(scriptEl.src);

            try {
              config = Function('return{' + configAttrValue + '}')();
            } catch(e) {
              /** @cut */ consoleMethods.error('basis-config: basis.js config parse fault: ' + e);
            }

            break;
          }
        }

        if (!basisFilename)
        {
          basisFilename = pathUtils.normalize(scripts[0].src);
          /** @cut */ consoleMethods.warn('basis-config: no `basis-config` marker on any script tag is found. All paths will be resolved relative to `src` from the first `script` tag.');
        }
      }
    }

    return processConfig(config);
  }
158148
def _cli_check_basis(name, data_dir):
    ''''''

    if name is None:
        return None

    name = misc.transform_basis_name(name)
    metadata = api.get_metadata(data_dir)
    if not name in metadata:
        errstr = "Basis set '" + name + "' does not exist.\n"
        errstr += "For a complete list of basis sets, use the 'bse list-basis-sets' command"
        raise RuntimeError(errstr)

    return name
1062882
function fetchConfig(cb) {
  return function (name, args) {
    function resultCb(result) {
      console.log(result);
    }
    function jenkinsCb(jenkins) {
      jenkins.fetchViewConfig(name, cli.exitCb(null, resultCb));
    }
    cb(args, jenkinsCb);
  };
}
313142
def get_context(self, name, value, attrs):
        """"""
        context = super().get_context(
            name, value, attrs)
        context['widget']['attrs']['dp_config'] = json_dumps(self.config)
        return context
570006
def _get_options(ret=None):
    '''
    
    '''
    attrs = {'host': 'host',
             'port': 'port',
             'unix_socket_path': 'unix_socket_path',
             'db': 'db',
             'password': 'password',
             'cluster_mode': 'cluster_mode',
             'startup_nodes': 'cluster.startup_nodes',
             'skip_full_coverage_check': 'cluster.skip_full_coverage_check',
             }

    if salt.utils.platform.is_proxy():
        return {
            'host': __opts__.get('redis.host', 'salt'),
            'port': __opts__.get('redis.port', 6379),
            'unix_socket_path': __opts__.get('redis.unix_socket_path', None),
            'db': __opts__.get('redis.db', '0'),
            'password': __opts__.get('redis.password', ''),
            'cluster_mode': __opts__.get('redis.cluster_mode', False),
            'startup_nodes': __opts__.get('redis.cluster.startup_nodes', {}),
            'skip_full_coverage_check': __opts__.get('redis.cluster.skip_full_coverage_check', False)
        }

    _options = salt.returners.get_returner_options(__virtualname__,
                                                   ret,
                                                   attrs,
                                                   __salt__=__salt__,
                                                   __opts__=__opts__)
    return _options
1113115
def get_option(option, default=None, cast=None):
        
        from acorn.config import settings
        config = settings("acorn")
        if (config.has_section("database") and
            config.has_option("database", option)):
            result = config.get("database", option)
            if cast is not None:
                result = cast(result)        
        else:
            result = default

        return result
484179
function getValidOptions (options) {
  if (typeof options !== 'object') {
    return DEFAULT_OPTIONS
  }

  var validOptions = {}

  for (var prop in DEFAULT_OPTIONS) {
    if (DEFAULT_OPTIONS.hasOwnProperty(prop)) {
      validOptions[prop] = typeof options[prop] === 'string'
        ? options[prop] : DEFAULT_OPTIONS[prop]
    }
  }

  return validOptions
}
720317
private Map<String, Object> extractOptions(Map<String, Object> props) {
        List<Map<String, Object>> optionsList = Nester.nest("options", props);
        if (!optionsList.isEmpty()) {
            Map<String, Object> options = new HashMap<String, Object>(optionsList.get(0).size());
            for (Map.Entry<String, Object> option : optionsList.get(0).entrySet()) {
                String key = option.getKey();
                if (key.startsWith(".")
                    || key.startsWith("config.")
                    || key.startsWith("service.")
                    || key.equals("id")) {
                    continue;
                }
                options.put(key, option.getValue());

            }
            return options;
        }
        return new HashMap<String, Object>(2);

    }
328474
def extract_options_dict(template, options):
    """"""
    for option, val in template.items():
        if options and option in options:
            yield option, options[option]
        else:
            yield option, Default(template[option]['default'](os.environ))
1045714
function getGeneratorConfig(options) {
  const { tag, classNames } = parseSelector(options.baseSelector)
  const config = {
    files           : options.paths,
    dest            : options.outputDir,
    types           : options.types,
    codepoints      : options.codepointsMap,
    startCodepoint  : options.startCodepoint || 0xF101,
    cssDest         : options.cssPath,
    cssFontsUrl     : getCssFontsUrl(options),
    htmlDest        : options.htmlPath,
    cssTemplate     : options.cssTemplate  || TEMPLATES.css,
    htmlTemplate    : options.htmlTemplate || TEMPLATES.html,
    templateOptions : {
      baseTag             : tag || options.baseTag || 'i',
      baseSelector        : options.baseSelector || null,
      baseClassNames      : classNames.join(' '),
      classPrefix         : (options.classPrefix || 'icon') + '-',
      htmlCssRelativePath : path.relative(
        path.dirname(getResolvedPath(options, 'html')),
        getResolvedPath(options, 'css')
      )
    }
  }

  // Normalise and add available optional configurations
  OPTIONAL_PARAMS.forEach(key => {
    if (typeof options[key] !== 'undefined') {
      // Parse numeric values
      if (`${ parseFloat(options[key]) }` === `${ options[key] }`) {
        options[key] = parseFloat(options[key])
      }

      config[key] = options[key]
    }
  })

  return config
}
1106490
def get_config(src_dir):
    
    config = None
    configure = "%s/*-dist/scripts/configure.py" % src_dir
    entropy = glob.glob(configure)
    if entropy:
        for item in entropy:
            config = os.path.dirname(item) + "/config.JSON"
            if os.path.isfile(config):
                configure = item
                break
    if os.path.isfile(config) and os.path.isfile(configure):
        subprocess.check_output(str("python %s" % configure).split())
        with open(config, 'r') as fh:
            config = json.loads(fh.read())
    else:
        raise EnvironmentError("Exp setup parameters missing!")
    return config
705519
def get_customjs(self, references, plot_id=None):
        
        # Generate callback JS code to get all the requested data
        if plot_id is None:
            plot_id = self.plot.id or 'PLACEHOLDER_PLOT_ID'
        self_callback = self.js_callback.format(comm_id=self.comm.id,
                                                timeout=self.timeout,
                                                debounce=self.debounce,
                                                plot_id=plot_id)

        attributes = self.attributes_js(self.attributes)
        conditions = ["%s" % cond for cond in self.skip]
        conditional = ''
        if conditions:
            conditional = 'if (%s) { return };\n' % (' || '.join(conditions))
        data = "var data = {};\n"
        code = conditional + data + attributes + self.code + self_callback
        return CustomJS(args=references, code=code)
820318
function getScriptInfo() {
    var bases = [ document.location.protocol + "//" + document.location.host ],
        scripts, src, rootUrl, baseMatch;
    if (typeof window.__vogue__ === "undefined") {
      scripts = document.getElementsByTagName("script");
      for (var i=0; i < scripts.length; i++) {
        src = scripts[i].getAttribute("src");
        if (src && src.slice(-15) === 'vogue-client.js') break;
      }
      rootUrl = src.match(/^https?\:\/\/(.*?)\//)[0];
      // There is an optional base argument, that can be used.
      baseMatch = src.match(/\bbase=(.*)(&|$)/);

      if (baseMatch) {
        bases = bases.concat(baseMatch[1].split(","));
      }
      return {
        rootUrl: rootUrl,
        bases: bases
      };
    } else {
      window.__vogue__.bases = bases;
      return window.__vogue__;
    }
  }
691859
def _get_config(**kwargs):
    '''
    
    '''
    config = {
        'filter_id_regex': ['.*!doc_skip'],
        'filter_function_regex': [],
        'replace_text_regex': {},
        'proccesser': 'highstate_doc.proccesser_markdown',
        'max_render_file_size': 10000,
        'note': None
    }
    if '__salt__' in globals():
        config_key = '{0}.config'.format(__virtualname__)
        config.update(__salt__['config.get'](config_key, {}))
    # pylint: disable=C0201
    for k in set(config.keys()) & set(kwargs.keys()):
        config[k] = kwargs[k]
    return config
76597
def get_linter_config(self, name):
        """"""
        prefix = name + ' '
        return {k[len(prefix):]: v
                for k, v in self._config.items()
                if k.startswith(prefix)}
1001750
def with_options(self, component):
        """"""
        options = component.get_required_config()
        component_name = _get_component_name(component)
        return BoundConfig(self._get_base_config(), component_name, options)
267104
function getTemplateConfig(pageId, attr) {
  const dom = getTemplateDOMById.call(this, pageId);
  let config = dom.getAttribute(attr);
  if ((attr === "ct-data-mode") && !config) {
    config = "standard";
  }
  return config;
}