Set default options for builtin batch systems. This is required if a Config
    object is not constructed from an Options object.
328249
def setDefaultOptions(config):
    
    config.batchSystem = "singleMachine"
    config.disableAutoDeployment = False
    config.environment = {}
    config.statePollingWait = None  # if not set, will default to seconds in getWaitDuration()
    config.maxLocalJobs = multiprocessing.cpu_count()
    config.manualMemArgs = False

    # single machine
    config.scale = 1
    config.linkImports = False

    # mesos
    config.mesosMasterAddress = '%s:5050' % getPublicIP()

    # parasol
    config.parasolCommand = 'parasol'
    config.parasolMaxBatches = 10000
1369933
def configure_defaults():
    
    log.debug("configure_defaults()")

    global initialized
    initialized = True

    if use_rootpy_handler:
        # Need to do it again here, since it is overridden by ROOT.
        set_error_handler(python_logging_error_handler)

    if os.environ.get('ROOTPY_BATCH', False) or IN_NOSETESTS:
        ROOT.gROOT.SetBatch(True)
        log.debug('ROOT is running in batch mode')

    ROOT.gErrorIgnoreLevel = 0

    this_dll = C.CDLL(None)
    try:
        EnableAutoDictionary = C.c_int.in_dll(
            this_dll, "G__EnableAutoDictionary")
    except ValueError:
        pass
    else:
        # Disable automatic dictionary generation
        EnableAutoDictionary.value = 0

    # TODO(pwaller): idea, `execfile("userdata/initrc.py")` here?
    #                note: that wouldn't allow the user to override the default
    #                      canvas size, for example.

    for init in _initializations:
        init()
647649
public ConfigParams setDefaults(ConfigParams defaultConfigParams) {
		StringValueMap map = StringValueMap.fromMaps(defaultConfigParams, this);
		return new ConfigParams(map);
	}
818659
def setOptions(self, glob=False, **kwargs):
        
        if glob:
            self.globalOptions.update(kwargs)
        else:
            self.options.update(kwargs)
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)
751856
def set_defaults(self, default_config_params):
        
        map = StringValueMap.from_maps(default_config_params, self)
        return ConfigParams(map)
1356260
void setDefaults() {
        // If no ClassLoaders are specified, use the TCCL
        // Ensure we default this BEFORE defaulting the extension loader, as
        // the loader needs a CL to be created
        if (this.getClassLoaders() == null) {
            final ClassLoader tccl = SecurityActions.getThreadContextClassLoader();
            if (log.isLoggable(Level.FINER)) {
                log.finer("User has not defined an explicit " + ClassLoader.class.getSimpleName()
                    + "; defaulting to the TCCL: " + tccl);
            }
            final Collection<ClassLoader> tcclCollection = new ArrayList<ClassLoader>(1);
            // Adjust for the bootstrap CL, which may be denoted as null in some JVM impls
            if (tccl != null) {
                tcclCollection.add(tccl);
            } else {
                tcclCollection.add(ClassLoader.getSystemClassLoader());
            }
            this.classLoaders = tcclCollection;
        }

        // Adjust the CLs to be sure of no duplicate or null references (which may indicate
        // the bootstrap CL, so get to the system CL)
        final Collection<ClassLoader> adjustedCls = new HashSet<ClassLoader>();
        for (ClassLoader cl : this.classLoaders) {

            // Adjust for null references
            if (cl == null) {
                cl = ClassLoader.getSystemClassLoader();
            }

            // Add to the set, which will restrict duplicates
            adjustedCls.add(cl);
        }
        this.classLoaders = adjustedCls;

        // If no extension loader is present, create one
        if (getExtensionLoader() == null) {
            final ExtensionLoader loader = createDefaultExtensionLoader();
            if (log.isLoggable(Level.FINER)) {
                log.finer("User has not defined an explicit " + ExtensionLoader.class.getSimpleName()
                    + "; defaulting to " + loader);
            }
            this.extensionLoader(loader);
        }
    }
866112
def set_default(self, default):
        
        # Find index of choice
        try:
            default_index = self._parameter.default_values.index(default)
            self.default_input_button_group.button(default_index).setChecked(
                True)
        except ValueError:
            last_index = len(self._parameter.default_values) - 1
            self.default_input_button_group.button(last_index).setChecked(
                True)
            self.custom_value.setValue(default)

        self.toggle_custom_value()
1094038
protected function setupDefaultOptions()
    {
        $defaultOptions = [
            'overwriteInitial' => false,
            'initialPreviewAsData' => true,
            'browseLabel' => trans('admin.browse'),
            'showRemove' => false,
            'showUpload' => false,
//            'initialCaption'       => $this->initialCaption($this->value),
            'deleteExtraData' => [
                $this->formatName($this->column) => static::FILE_DELETE_FLAG,
                static::FILE_DELETE_FLAG => '',
                '_token' => csrf_token(),
                '_method' => 'PUT',
            ],
        ];

        if ($this->form instanceof Form) {
            $defaultOptions['deleteUrl'] = $this->form->resource().'/'.$this->form->model()->getKey();
        }

        $this->options($defaultOptions);
    }
822886
def set_default(self):
        
        queryset = self.get_default_queryset()
        if queryset.exists():
            queryset.update(default=False)
99780
def prepare_system_options(cfg, defaults=None):
    
    d = {} if defaults is None else defaults.copy()
    if 'nonbondedMethod' in cfg:
        d['nonbondedMethod'] = warned_getattr(openmm_app, cfg.pop('nonbondedMethod'), None)
    if 'nonbondedCutoff' in cfg:
        d['nonbondedCutoff'] = cfg.pop('nonbondedCutoff') * u.nanometers
    if 'constraints' in cfg:
        d['constraints'] = warned_getattr(openmm_app, cfg.pop('constraints'), None)
    for key in ['rigidWater', 'ewaldErrorTolerance']:
        if key in cfg:
            d[key] = cfg.pop(key)
    if 'extra_system_options' in cfg:
        if 'implicitSolvent' in cfg['extra_system_options']:
            implicit_solvent = warned_getattr(
                openmm_app, cfg['extra_system_options']['implicitSolvent'], None)
            cfg['extra_system_options']['implicitSolvent'] = implicit_solvent
        d.update(cfg.pop('extra_system_options'))
    return d
1271141
def add_config_option(self, default=None):
        

        self.argparser.add_argument('--config', default=default, help='Config file to read. Defaults to: %(default)s')
        self.should_parse_config = True
765392
def update_defaults(self, ext_config):
        
        for setting in dir(ext_config):
            if setting.isupper() and not hasattr(self, setting):
                setattr(self, setting, getattr(ext_config, setting))
866590
function setDefaultConfig(defaultNames, packageName, obj) {
  for (let [objName, configName] of defaultNames) {
    atom.config.set(`${packageName}.${configName}`, obj[objName]);
  }
}
953883
def set_default(self, default):  # type: (typing.Any) -> None
        
        if default is not None and len(default) > 1 and default[0] == '"' and default[-1] == '"':
            default = default[1:-1]
        self.defaultValue = default
400082
def set_defaults(self):
        
        self['mswitch'] = '***FILES***'
        self['elem'] = '../grid/elem.dat'
        self['elec'] = '../grid/elec.dat'
        self['rho'] = '../rho/rho.dat'
        self['config'] = '../config/config.dat'
        self['write_pots'] = 'F'  # ! potentials ?
        self['pot_file'] = '../mod/pot/pot.dat'
        self['write_volts'] = 'T'  # ! measurements ?
        self['volt_file'] = '../mod/volt.dat'
        self['write_sens'] = 'F'  # ! sensitivities ?
        self['sens_file'] = '../mod/sens/sens.dat'
        self['another_dataset'] = 'F'  # ! another dataset ?
        self['2D'] = '1'  # ! 2D (=0) or 2.5D (=1)
        self['fictitious_sink'] = 'F'  # ! fictitious sink ?
        self['sink_node'] = '1660'  # ! fictitious sink node number
        self['boundary_values'] = 'F'  # ! boundary values ?
        self['boundary_file'] = 'boundary.dat'
959978
public function setDefaultsFromConfiguration()
    {
        if ($this->options['dsn']) {
            $dsn = explode(':', $this->options['dsn']);
            $this->setSQLDialect($dsn[0]);
        }

        $this->setTablePrefix($this->options['table_prefix']);
    }