Set defaults from the current config
489328
def set_as_defaults(self):
        
        self.defaults = []
        for section in self.sections():
            secdict = {}
            for option, value in self.items(section, raw=self.raw):
                secdict[option] = value
            self.defaults.append( (section, secdict) )
1223531
def set_defaults(self, config, fields_spec):
        
        defaults = dict([(f, d)
                         for f, d in fields_spec.items()
                         if not isinstance(d, type)])
        for field, default_value in defaults.items():
            if field not in config:
                config[field] = default_value
776200
def set_configs(self, key, d):
        """"""
        if '_config' in self.proxy:
            self.proxy['_config'][key] = d
        else:
            self.proxy['_config'] = {key: d}
279719
def set(self, **kwargs):
        '''
        
        '''
        for lower_key, value in kwargs.items():
            if lower_key.lower() != lower_key:
                raise ValueError('Requires lowercase: %s' % lower_key)
            key = lower_key.upper()
            try:
                getattr(self, key)
            except (AttributeError, ConfigurationError):
                raise AttributeError('Cannot override %s' % key)
            self.overridden_settings[key] = value
860995
def reset_to_defaults(self, save=True, verbose=False, section=None):
        
        for sec, options in self.defaults:
            if section == None or section == sec:
                for option in options:
                    value = options[ option ]
                    self._set(sec, option, value, verbose)
        if save:
            self._save()
806385
def _set_program_defaults(cls, programs):
        """"""
        for program in programs:
            val = getattr(cls, program.__name__) \
                and extern.does_external_program_run(program.__name__,
                                                     Settings.verbose)
            setattr(cls, program.__name__, val)
24557
void setDefaults(Settings defaultSettings) {

		Assert.notNull(defaultSettings, "Missing default settings!");

		for (String key : defaultSettings.keySet()) {

			CommandOption<?> option = findBySetting(key);

			if (option == null) {
				// option not present ... check next
				continue;
			}

			Object value = defaultSettings.get(key);
			option.defaultsTo(value);
		}

	}
838922
def _set_defaults(self):
        
        self.contents.setdefault('log', [])
        self.contents.setdefault('rollback', None)
        self.contents.setdefault('rollforward', None)
111099
def _prepare_defaults(self):
		""""""
		
		for name, field in self.__fields__.items():
			if field.assign:
				getattr(self, name)
845714
def defaults(current: dict, *args: AnyMapping) -> dict:
    
    """
    for data in args:
        for key, value in data.items():
            current.setdefault(key, value)
    return current
1351163
function setConfig (options) {
  Object.keys(options).forEach((option) => {
    if (config[option] !== undefined) {
      config[option] = options[option]
    }
  })
}
880403
def set_default(self_,param_name,value):
        
        cls = self_.cls
        setattr(cls,param_name,value)
395112
private static function setDefaultConfig() {
            if (!self::$defaults) {
                self::$defaults = [self::CFG_ERROR_LEVEL        => error_reporting(),
                                   self::CFG_LOG_ERROR_LOCATION => true];
            }
        }
1080326
protected function set_defaults()
	{
		$this->options   = $this->default_options;
		$this->params    = $this->default_params;
		return $this;
	}
671407
def set_default_config(
    *,
    style=_UNSET_SENTINEL,
    max_seq_len=_UNSET_SENTINEL,
    width=_UNSET_SENTINEL,
    ribbon_width=_UNSET_SENTINEL,
    depth=_UNSET_SENTINEL,
    sort_dict_keys=_UNSET_SENTINEL
):
    
    global _default_config

    if style is not _UNSET_SENTINEL:
        set_default_style(style)

    new_defaults = {**_default_config}

    if max_seq_len is not _UNSET_SENTINEL:
        new_defaults['max_seq_len'] = max_seq_len

    if width is not _UNSET_SENTINEL:
        new_defaults['width'] = width

    if ribbon_width is not _UNSET_SENTINEL:
        new_defaults['ribbon_width'] = ribbon_width

    if depth is not _UNSET_SENTINEL:
        new_defaults['depth'] = depth

    if sort_dict_keys is not _UNSET_SENTINEL:
        new_defaults['sort_dict_keys'] = sort_dict_keys

    _default_config = new_defaults
    return new_defaults
53131
def set_default_var(**vars):
    
    for k, v in vars.iteritems():
        current_context.vars.setdefault(k, v)
1239070
public function setSettings()
    {
        $type = $this->option('type');
        $options = config('generators.settings');

        $found = false;
        // loop through the settings and find the type key
        foreach ($options as $key => $settings) {
            if ($type == $key) {
                $found = true;
                break;
            }
        }

        if ($found === false) {
            $this->error('Oops!, no settings key by the type name provided');
            exit;
        }

        // set the default keys and values if they do not exist
        $defaults = config('generators.defaults');
        foreach ($defaults as $key => $value) {
            if (!isset($settings[$key])) {
                $settings[$key] = $defaults[$key];
            }
        }

        $this->settings = $settings;
    }