Fill the dictionary with all defaults
975650
def set_defaults(self):
        
        self['mswitch'] = 1
        self['elem'] = '../grid/elem.dat'
        self['elec'] = '../grid/elec.dat'
        self['volt'] = '../mod/volt.dat'
        self['inv_dir'] = '../inv'
        self['diff_inv'] = 'F ! difference inversion?'
        self['iseed_var'] = 'iseed variance'
        self['cells_x'] = '0    ! # cells in x-direction'
        self['cells_z'] = '-1    ! # cells in z-direction'
        self['ani_x'] = '1.000  ! smoothing parameter in x-direction'
        self['ani_z'] = '1.000  ! smoothing parameter in z-direction'
        self['max_it'] = '20    ! max. nr of iterations'
        self['dc_inv'] = 'F     ! DC inversion?'
        self['robust_inv'] = 'T     ! robust inversion?'
        self['fpi_inv'] = 'F     ! final phase improvement?'
        self['mag_rel'] = '5'
        self['mag_abs'] = '1e-3'
        self['pha_a1'] = 0
        self['pha_b'] = 0
        self['pha_rel'] = 0
        self['pha_abs'] = 0
        self['hom_bg'] = 'F'
        self['hom_mag'] = '10.00'
        self['hom_pha'] = '0.00'
        self['another_ds'] = 'F'
        self['d2_5'] = '1'
        self['fic_sink'] = 'F'
        self['fic_sink_node'] = '10000'
        self['boundaries'] = 'F'
        self['boundaries_file'] = 'boundary.dat'
        self['mswitch2'] = '1'
        self['lambda'] = 'lambda'
1356239
def values(self, with_defaults=True):
        
        return dict(((k, str(v)) for k, v in self._inputs.items() if not v.is_empty(with_defaults)))
218155
def to_default
      default = {}
      each_pair do |key, config|
        default[key] = config.default
      end
      default
    end
1022804
def set_default(self, key, value):
        
        k = self._real_key(key.lower())
        self._defaults[k] = value
602940
def from_dict(self, d: Dict[str, Any]) -> None:
        """"""
        for key, value in d.items():
            if key.isupper():
                self._setattr(key, value)

        logger.info("Config is loaded from dict: %r", d)
294183
def use_defaults(self, data=None):
        
        if data is None:
            data = self.data
        return self.geom.use_defaults(data)
767813
def setDictDefaults (d, defaults):
  
  for key, val in defaults.items():
    d.setdefault(key, val)

  return d
130720
def _load_defaults(self, default='settings.py'):
        '''
        
        '''
        if default[-3:] == '.py':
            default = default[:-3]

        self.my_settings = {}
        try:
            settings = importlib.import_module(default)
            self.my_settings = self._convert_to_dict(settings)
        except ImportError:
            log.warning("No default settings found")
980459
def _merge_data(self, data: AnyMapping, *additional: AnyMapping) -> dict:
        
        """
        return defaults(
            dict(data) if not isinstance(data, dict) else data,
            *(dict(item) for item in additional))
381033
def _asdict(self):
    """"""
    # Start with any default values we have, and override with loaded values,
    # and then override with flag values.
    retval = {key: self._declarations[key].default_value for
              key in self._declarations if self._declarations[key].has_default}
    retval.update(self._loaded_values)
    # Only update keys that are declared so we don't allow injecting
    # un-declared keys via commandline flags.
    for key, value in self._modules['six'].iteritems(self._flag_values):
      if key in self._declarations:
        retval[key] = value
    return retval
562733
def _default_dict(self):
        """"""
        options = {}
        for attr, _, _, default, multi, _ in self._optiondict.values():
            if multi and default is None:
                options[attr] = []
            else:
                options[attr] = default
        return options
1153340
def _load_defaults(self):
        """"""
        for k, v in self._defaults.items():
            self[k] = v['default']
387661
def all_default_fields():
    
    default_fields = []
    for item in dir(fields):
        if not item.startswith("__"):
            var = getattr(definitions, item)
            if isinstance(var, dict):
                if var.get('replace_null', False):
                    default_fields.append(var)
    return default_fields
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
1239304
def setdefault(self, name: str, default: Any=None) -> Any:
        """"""
        return self.__dict__.setdefault(name, default)
1297404
function assignDefaults(defaults, options) {
  var keys = Object.keys(defaults),
      i = keys.length,
      k;

  options = options || {};

  while (i--) {
    k = keys[i];
    if (!(k in options)) {
      options[k] = defaults[k];
    }
  }

  return options;
}
1093039
function defaults(target, defs) {
  if (target == null) target = {};
  var ret = {};
  var keys = Object.keys(defs);
  for (var i = 0, len = keys.length; i < len; i++) {
    var key = keys[i];
    ret[key] = target[key] || defs[key];
  }
  return ret;
}