Retrieve config.
976600
function() {
    var manager, name;
    manager = this.configManager();
    if (manager == null) {
      return;
    }
    name = this.configName();
    if (name == null) {
      return;
    }
    return manager.get(name);
  }
865405
def config_load(ctx, param, value):
    """"""
    if ctx.obj is None:
        ctx.obj = {}

    ctx.obj['config_path'] = value
    ctx.obj['config'] = read_config(value)
    return value
1111872
def get_config(self):
        
        # Fill this dict with config data
        return {
            'hash_name': self.hash_name,
            'dim': self.dim,
            'bin_width': self.bin_width,
            'projection_count': self.projection_count,
            'components': self.components
        }
237404
def config(self):
        """"""
        try:
            admin = self.connection().admin
            config = admin.command('replSetGetConfig')['config']
        except pymongo.errors.OperationFailure:
            # replSetGetConfig was introduced in 2.7.5.
            config = self.connection().local.system.replset.find_one()
        return config
504772
def get_aliyun_config(name, default=None):
    '''
    
    '''
    config = os.environ.get(name, getattr(settings, name, default))
    if config is not None:
        if isinstance(config, str):
            return config.strip()
        else:
            return config
    else:
        raise ImproperlyConfigured(
            'Can not get config for {} either in environment'
            'variable or in settings.py'.format(name))
574475
def get_config():
    
    configpath = get_configpath()
    if not configpath.exists():
        raise IOError("Config file {} not found.".format(str(configpath)))
    else:
        config = configparser.ConfigParser()
        config.read(str(configpath))
        return config
790309
def config(self):
        """"""
        if self._config:
            return self._config
        else:
            self._config = p_config.ProsperConfig(self.config_path)
            return self._config
206377
def get_config(self, model):
        """"""
        if not inspect.isclass(model):
            model = model.__class__
        return self.configs.get(self.get_model_name(model))
145719
def _config(self) -> ExtensionConfig:
        
        return dict(pattern=self.__pattern__, search_in_keys=True, search_in_values=False)
1297202
def config_dict(config):
    
    return dict(
        (key, getattr(config, key))
        for key in config.values
    )
1067399
def _get_config(self, i):
        
        variables = {}
        if not i.get_option('config'):
            raise Exception('The --config|-c option is missing.')

        with open(i.get_option('config')) as fh:
            exec(fh.read(), {}, variables)

        return variables['DATABASES']
1229873
def get_config(path=os.getcwd()):
    """"""
    config = default
    tries = 0
    current_dir = path
    while current_dir and tries < MAX_CONFIG_SEARCH_DEPTH:
        potential_path = os.path.join(current_dir, ".fonduer-config.yaml")
        if os.path.exists(potential_path):
            with open(potential_path, "r") as f:
                config = _merge(config, yaml.safe_load(f))
            logger.debug(f"Loading Fonduer config from {potential_path}.")
            break

        new_dir = os.path.split(current_dir)[0]
        if current_dir == new_dir:
            logger.debug("Unable to find config file. Using defaults.")
            break
        current_dir = new_dir
        tries += 1

    return config
659720
def _load_config(self):
        """"""
        self._config = ConfigParser.SafeConfigParser()
        self._config.read(self.config_path)
1116714
def _config_section(config, section):
    """"""
    path = os.path.join(config.get('config_path'), config.get('config_file'))
    conf = _config_ini(path)
    return conf.get(section)
11775
def read_config(cls, configparser):
        """"""
        config = dict()
        section = cls.__name__
        option = "prefixes"
        if configparser.has_option(section, option):
            value = configparser.get(section, option)
            names = [x.strip().lower() for x in value.split(",")]
        else:
            names = []
        config[option] = names
        return config
66226
def configuration(*args, **kwargs):
    """"""
    try:
        config_kwargs = {'mapping_class': kwargs.pop('mapping_class')}
    except KeyError:
        config_kwargs = {}
    cm = ConfigurationManager(*args, **kwargs)
    return cm.get_config(**config_kwargs)
507231
def get_config(self, service, setting):
        
        try:
            return self.get_service(service)[setting]
        except KeyError:
            return getattr(self, setting + '_DEFAULT')