重置设置
    :param target:
    :param settings:
    :return:
160947
def reset(target, settings):
    
    target_settings = _import_module(target)
    for k, v in settings.items():
        if hasattr(target_settings, k):
            setattr(target_settings, k, _get_value(getattr(target_settings, k), v))
        else:
            logger.debug('AttributeError {target} has no attribute {k}'.format(target=target, k=k))
    return target_settings
764580
def setTargets(self, targets):
        
        if not self.verifyArguments(targets) and not self.patterned:
            raise NetworkError('setTargets() requires [[...],[...],...] or [{"layerName": [...]}, ...].', targets)
        self.targets = targets
860366
def settings(**kwargs):
    
    from pyemma import config

    old_settings = {}
    try:
        # remember old setting, set new one. May raise ValueError, if invalid setting is given.
        for k, v in kwargs.items():
            old_settings[k] = getattr(config, k)
            setattr(config, k, v)
        yield
    finally:
        # restore old settings
        for k, v in old_settings.items():
            setattr(config, k, v)
218651
def update_settings(self, settings):
        
        new_settings = copy.copy(self._settings)
        new_settings.update(settings)
        if self.settings != new_settings:
            yield from self._stop()
            self._settings = settings
            self._controller.save()
            if self.enable:
                yield from self.start()
        else:
            # When user fix something on his system and try again
            if self.enable and not self.current_engine().running:
                yield from self.start()
105640
def __load_settings_from_dict(self, settings):
        
        errors = self.check_settings(settings)
        if len(errors) == 0:
            self.__errors = []
            self.__sp = settings['sp']
            self.__idp = settings.get('idp', {})
            self.__strict = settings.get('strict', False)
            self.__debug = settings.get('debug', False)
            self.__security = settings.get('security', {})
            self.__contacts = settings.get('contactPerson', {})
            self.__organization = settings.get('organization', {})

            self.__add_default_values()
            return True

        self.__errors = errors
        return False
208657
function ajaxSetup(target, settings) {
        return settings ?

        // Building a settings object
        ajaxExtend(ajaxExtend(target, this.ajaxSettings), settings) :

        // Extending ajaxSettings
        ajaxExtend(this.ajaxSettings, target);
    }
87530
def __load_settings(self):
        
        #file_path = path.relpath(settings_file_path)
        #file_path = path.abspath(settings_file_path)
        file_path = self.file_path

        try:
            self.data = json.load(open(file_path))
        except FileNotFoundError:
            print("Could not load", file_path)
890932
def get_target(self, target):
        
        if target not in self._target_cache:
            self._target_cache[target] = self._get_target(target)
        return self._target_cache[target]
816500
function migrateEnsureHotKeys(settings: Settings): Settings {
  settings.hotKeyRegistry = {
    ...hotkeys.newDefaultRegistry(),
    ...settings.hotKeyRegistry,
  };
  return settings;
}
167531
public void setTarget(Profile<S, C> target) {
		this.target = target;
		targetFuture = null;
		reset();
	}
288387
def load_target(cls, scheme, path, fragment, username,
                    password, hostname, port, query,
                    load_method, **kwargs):
        
        raise NotImplementedError("load_target must be overridden")
1017506
def get_settings(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.get_settings(index=self._name, **kwargs)
993805
def _get(self, target, alias):
        
        if target not in self._aliases:
            return
        return self._aliases[target].get(alias)
1254349
def set_target(self, target):
        '''
        
        '''
        self.target = target
        if target:
            self.target.set_fuzzer(self)
        return self
306386
def settings(self):
        
        if self._settings is None:
            self._settings = SettingsList(self._version, )
        return self._settings
349845
def get_settings(self):
        
        settings = self.context.getAnalysisServicesSettings()
        mapping = dict(map(lambda s: (s.get("uid"), s), settings))
        return mapping
362951
def reload_settings(*args, **kwargs):
    
    global settings
    setting, value = kwargs['setting'], kwargs['value']
    if setting == XRAY_NAMESPACE:
        settings = XRaySettings(value)