Blends the different configs, from package defaults to .
974658
def get_config(filename, *search_dirs, **kwargs):
    """"""
    config = kwargs.get("config_reader_class", configparser.ConfigParser)()

    paths = config_search_paths(filename, *search_dirs)
    successes = config.read(reversed(paths))
    if successes:
        LOG.debug("Read config from %s", str(successes))
        return config, successes

    LOG.warning("Couldn't file any config file matching %s", filename)
    return None, []
204716
protected function setDefaults()
  {
    $this->importPaths = array();
    $this->pluginPaths = array();
    $this->sourceMap = self::DEFAULT_SOURCEMAP;
    $this->mapComment = self::DEFAULT_MAPCOMMENT;
    $this->lineNumbers = self::DEFAULT_LINENUMBERS;
    $this->precision = self::DEFAULT_PRECISION;
    $this->style = self::DEFAULT_STYLE;
  }
1040514
def pkgconfig(*packages, **kw):
    """"""

    flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'}
    output = sp.Popen(["pkg-config", "--libs", "--cflags"] + list(packages),
                      stdout=sp.PIPE).communicate()[0]
    if six.PY3:
        output = output.decode('utf8')
    for token in output.split():
        if token[:2] in flag_map:
            kw.setdefault(flag_map.get(token[:2]), []).append(token[2:])
        else:
            kw.setdefault('extra_compile_args', []).append(token)

    kw['include_dirs'] += [np.get_include()]

    return kw
323117
public function makeDefaultPackageStructure()
    {
        $default = $this->config->get('tie.stubs.default');
        if (!blank($default)) {
            foreach ($default as $stubKey) {
                $this->stubKey = $stubKey;
                $configuration = $this->config->get('tie.stubs.structure.' . $stubKey);
                if (is_array($configuration)) {
                    $this->createStubFiles($configuration);
                } else {
                    $this->makeDir($this->path . '/' . $configuration);
                }
            }
        }
    }
573027
def _insert_defaults(self):
        
        merged = merge_defaults(self.structure, self)
        self.update(merged)
1248760
protected ClassInfo mergeClassConfigInfo(ClassInfo classInfo) {
        // Update introspected class information from introspected package
        PackageInfo packageInfo = configFileParser.getPackageInfo(classInfo.getInternalPackageName());
        if (packageInfo == null) {
            packageInfo = getPackageInfo(classInfo.getInternalPackageName());
        }
        classInfo.updateDefaultValuesFromPackageInfo(packageInfo);

        // Override introspected class information from configuration document
        ClassInfo ci = configFileParser.getClassInfo(classInfo.getInternalClassName());
        if (ci != null) {
            classInfo.overrideValuesFromExplicitClassInfo(ci);
        }

        return classInfo;
    }
734235
def _merge_config(self, config_override):
        
        if not isinstance(config_override, dict):
            raise TypeError("config override must be a dict")

        def recursion(config_value, override_value):
            for key, value in override_value.items():
                if key in config_value:
                    if isinstance(value, dict) and isinstance(config_value[key], dict):
                        recursion(config_value[key], value)
                    else:
                        config_value[key] = value
                else:
                    config_value[key] = value

        for key, value in config_override.items():
            if key in self._data:
                recursion(self._data[key], value)
            else:
                self._data[key] = value
852292
function getDefaultConfig(defaultNames, packageName, obj) {
  for (let [objName, configName] of defaultNames) {
    obj[objName] = atom.config.get(`${packageName}.${configName}`);
  }
}
120343
function() {

            var info = this.moduleInfo, name, i, j;

            // Create skin modules
            for (name in info) {

                if (lang.hasOwnProperty(info, name)) {
                    var m = info[name];
                    if (m && m.skinnable) {
                        // Y.log("skinning: " + name);
                        var o=this.skin.overrides, smod;
                        if (o && o[name]) {
                            for (i=0; i<o[name].length; i=i+1) {
                                smod = this._addSkin(o[name][i], name);
                            }
                        } else {
                            smod = this._addSkin(this.skin.defaultSkin, name);
                        }

                        m.requires.push(smod);
                    }
                }

            }

            var l = lang.merge(this.inserted); // shallow clone
            
            if (!this._sandbox) {
                l = lang.merge(l, env.modules);
            }

            // Y.log("Already loaded stuff: " + lang.dump(l, 0));

            // add the ignore list to the list of loaded packages
            if (this.ignore) {
                YUI.ObjectUtil.appendArray(l, this.ignore);
            }

            // remove modules on the force list from the loaded list
            if (this.force) {
                for (i=0; i<this.force.length; i=i+1) {
                    if (this.force[i] in l) {
                        delete l[this.force[i]];
                    }
                }
            }

            // expand the list to include superseded modules
            for (j in l) {
                // Y.log("expanding: " + j);
                if (lang.hasOwnProperty(l, j)) {
                    lang.augmentObject(l, this.getProvides(j));
                }
            }

            // Y.log("loaded expanded: " + lang.dump(l, 0));

            this.loaded = l;

        }
395112
private static function setDefaultConfig() {
            if (!self::$defaults) {
                self::$defaults = [self::CFG_ERROR_LEVEL        => error_reporting(),
                                   self::CFG_LOG_ERROR_LOCATION => true];
            }
        }
34636
def normalize_defaults
      new_options = {}
      options.each do |key,value|
        unless value.nil?
          new_options[key.to_s] = value
          new_options[key.to_sym] = value
        end
      end
      options.merge!(new_options)
    end
1326546
protected function initializeConfigs()
    {
        $this->mergeConfigFrom(static::getConfigPath(), static::getConfigRootKeyName());

        $this->publishes([
            realpath(static::getConfigPath()) => config_path(basename(static::getConfigPath())),
        ], 'config');
    }
169057
def pkgconfig(*packages, **kw):
	
	kw = kw.copy()
	flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'}  # kwargs of :class:`Extension`
	for token in check_output(["pkg-config", "--libs", "--cflags"] + list(packages)).split():
		if token[:2] in flag_map:
			kw.setdefault(flag_map[token[:2]], []).append(token[2:])
		else:  # throw others to extra_link_args
			kw.setdefault('extra_link_args', []).append(token)
	return kw
756906
protected function configure_defaults() {
		$this->modules        = new \stdClass();
		$this->modules->count = 0;
		$this->installed_dir  = static::dirname( static::$current_file, 1 );
		$this->plugin_basedir = static::dirname( static::$current_file, 2 );
		$assumed_plugin_name  = basename( $this->plugin_basedir );
		$this->plugin_file    = $this->plugin_basedir . '/' . $assumed_plugin_name . '.php';
		$this->wp_plugin_slug = $assumed_plugin_name . '/' . $assumed_plugin_name . '.php';

		if ( is_callable( 'is_plugin_active_for_network' ) ) {
			$this->is_network_active = is_plugin_active_for_network( $this->wp_plugin_slug );
		}

		if ( file_exists( $this->plugin_file ) ) {
			$this->installed_url = plugins_url( '/', $this->plugin_file );
			// Ensure get_plugin_data is available.
			require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
			$this->plugin_data = get_plugin_data( $this->plugin_file, $markup = true, $translate = true );
			if ( is_array( $this->plugin_data ) && isset( $this->plugin_data['Version'] ) ) {
				$this->version = $this->plugin_data['Version'];
			}
		} else {
			$this->installed_url = plugins_url( '/', static::$current_file );
		}
		// Setup network url and fallback in case siteurl is not defined.
		if ( ! defined( 'WP_NETWORKURL' ) && is_multisite() ) {
			define( 'WP_NETWORKURL', network_site_url() );
		} elseif ( ! defined( 'WP_NETWORKURL' ) ) {
			define( 'WP_NETWORKURL', get_site_url() );
		}
		$this->network_url = WP_NETWORKURL;
	}
944119
private static function setDefaults() {
            if (!self::$defaults) {
                self::$defaults =
                    [self::CFG_CSS_PATH           => __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' .
                                                     DIRECTORY_SEPARATOR . 'error.min.css',
                     self::CFG_TRACE_MAX_DEPTH    => 50,
                     self::CFG_BACKGROUND         => 'default',
                     self::CFG_FOREGROUND_NOTICE  => 'cyan',
                     self::CFG_FOREGROUND_WARNING => 'yellow',
                     self::CFG_FOREGROUND_ERROR   => 'red',
                     self::CFG_FORCE_HTML         => false];
            }
        }
936726
private void applyConfig()
	{
		this.components.applyConfig(config);

		switch (config.getConfigType()) {
		case DEFAULT:
			break;
		case IMPORT:
			this.archives.applyConfiguration(config);
		}

		repaint();
	}
1289921
def configure(defaults, metadata, loader):
    
    config = Configuration(defaults)
    config.merge(loader(metadata))
    validate(defaults, metadata, config)
    return config