returns config object for given KOI
424719
def fpp_config(koi, **kwargs):
    
    folder = os.path.join(KOI_FPPDIR, ku.koiname(koi))
    if not os.path.exists(folder):
        os.makedirs(folder)
    config = ConfigObj(os.path.join(folder,'fpp.ini'))

    koi = ku.koiname(koi)

    rowefit = jrowe_fit(koi)

    config['name'] = koi
    ra,dec = ku.radec(koi)
    config['ra'] = ra
    config['dec'] = dec
    config['rprs'] = rowefit.ix['RD1','val']
    config['period'] = rowefit.ix['PE1', 'val']

    config['starfield'] = kepler_starfield_file(koi)

    for kw,val in kwargs.items():
        config[kw] = val

    config['constraints'] = {}
    config['constraints']['maxrad'] = default_r_exclusion(koi)
    try:
        config['constraints']['secthresh'] = pipeline_weaksec(koi)
    except NoWeakSecondaryError:
        pass

    return config
754740
function getConfigGetter(options) {
	/**
	 * Return a config value.
	 *
	 * @param {string} prop
	 * @param {any} [defaultValue]
	 * @return {any}
	 */
	function config(prop, defaultValue) {
		console.warn(
			'Warning: calling config as a function is deprecated. Use config.values() instead'
		);
		return get(options, prop, defaultValue);
	}

	/**
	 * Return an object with all config values.
	 *
	 * @return {Object}
	 */
	function values() {
		return options;
	}

	/**
	 * Mark config options as required.
	 *
	 * @param {string[]} names...
	 * @return {Object} this
	 */
	function require(...names) {
		const unknown = names.filter(name => !options[name]);
		if (unknown.length > 0) {
			throw new MrmUndefinedOption(`Required config options are missed: ${unknown.join(', ')}.`, {
				unknown,
			});
		}
		return config;
	}

	/**
	 * Set default values.
	 *
	 * @param {Object} defaultOptions
	 * @return {any}
	 */
	function defaults(defaultOptions) {
		options = Object.assign({}, defaultOptions, options);
		return config;
	}

	config.require = require;
	config.defaults = defaults;
	config.values = values;
	return config;
}
493846
function(name) {
  try {
    debug(`Loading ${name} configuration`);

    return waigo.load(`config/${name}`);
  } catch (e) {
    debug(`Error loading config: ${name}`);
    debug(e);

    return null;
  }
}
435230
def get_ini_config(config=os.path.join(os.path.expanduser('~'), '.zdeskcfg'),
        default_section=None, section=None):
    """"""
    plac_ini.call(__placeholder__, config=config, default_section=default_section)
    return __placeholder__.getconfig(section)
762385
def __get_config():
    '''
    
    '''
    if 'config' not in globals():
        return None
    cfg = globals().get('config', None)
    if cfg is None:
        return None

    if not isinstance(cfg, dict):
        return None
    return cfg
209146
def getConfig(self, key):
        
        if hasattr(self, key):
            return getattr(self, key)
        else:
            return False
804854
def config_get(self, param, default=None):
        ''''''

        try:
            return self("config", "--get", param,
                        log_fail=False, log_cmd=False)
        except exception.CommandFailed:
            return default
801393
def get_configure(self,
                      repo=None,
                      name=None,
                      groups=None,
                      main_cfg=False):
        
        constraints = locals()
        del constraints['main_cfg']
        status = (True, None)
        template_dict = {}
        return_str = ''
        if main_cfg:
            vent_cfg = Template(self.vent_config)
            for section in vent_cfg.sections()[1]:
                template_dict[section] = {}
                for vals in vent_cfg.section(section)[1]:
                    template_dict[section][vals[0]] = vals[1]
        else:
            # all possible vent.template options stored in plugin_manifest
            options = ['info', 'service', 'settings', 'docker', 'gpu']
            tools = Template(System().manifest).constrain_opts(
                constraints, options)[0]
            if tools:
                # should only be one tool
                tool = list(tools.keys())[0]
                # load all vent.template options into dict
                for section in tools[tool]:
                    template_dict[section] = json.loads(tools[tool][section])
            else:
                status = (False, "Couldn't get vent.template information")
        if status[0]:
            # display all those options as they would in the file
            for section in template_dict:
                return_str += '[' + section + ']\n'
                # ensure instances shows up in configuration
                for option in template_dict[section]:
                    if option.startswith('#'):
                        return_str += option + '\n'
                    else:
                        return_str += option + ' = '
                        return_str += template_dict[section][option] + '\n'
                return_str += '\n'
            # only one newline at end of file
            status = (True, return_str[:-1])
        return status
702224
def get_config(k: str) -> Any:
    
    # If the config has been set explicitly, use it.
    if k in list(CONFIG.keys()):
        return CONFIG[k]

    # If there is a specific PULUMI_CONFIG_<k> environment variable, use it.
    env_key = get_config_env_key(k)
    if env_key in os.environ:
        return os.environ[env_key]

    # If the config hasn't been set, but there is a process-wide PULUMI_CONFIG environment variable, use it.
    env_dict = get_config_env()
    if env_dict is not None and k in list(env_dict.keys()):
        return env_dict[k]

    return None
834478
def config_(cls, key, default=None):
        
        return cls._app.config.get(key, default)
620126
function getConfigOptions(opts) {
    opts = formatOptions(opts);
    _.forEach(config, function(value, key) {
      opts[key] = opts[key] || value;
    });
    opts.headers = opts.headers || {};

    return opts;
  }
1138920
def loadconfig(self, keysuffix, obj):
        
        subtree = self.get(keysuffix)
        if subtree is not None and isinstance(subtree, ConfigTree):
            for k,v in subtree.items():
                if isinstance(v, ConfigTree):
                    if hasattr(obj, k) and not isinstance(getattr(obj, k), ConfigTree):
                        v.loadconfig(getattr(obj,k))
                    else:
                        setattr(obj, k, v)
                elif not hasattr(obj, k):
                    setattr(obj, k, v)
983790
def get_config(config_file):
    
    config = {}
    tobool = lambda s: True if s.lower() == 'true' else False
    if config_file:
        try:
            f = open(config_file, 'r')
        except:
            print ("Unable to open configuration file '{0}'".format(config_file))
        else:
            for line in f.readlines():
                if len(line.strip()):
                    key, value = line.split("=", 1)
                    key, value = key.strip(), value.strip()
                    if key in ['init2class', 'first_line', 'convert_only']:
                        value = tobool(value)
                    config[key] = value
    return config
927706
def get_config(cls, key, default=None):
        
        return cls._app.config.get(key, default)
75137
def _config_parse(self):
        """"""
        res = super(cfg.ConfigParser, self).parse(Backend._config_string_io)
        return res
337233
def _config_ini(path):
    
    conf = configparser.ConfigParser()
    conf.read(path)
    return dict(conf)
507231
def get_config(self, service, setting):
        
        try:
            return self.get_service(service)[setting]
        except KeyError:
            return getattr(self, setting + '_DEFAULT')