Assigns the mutator settings to the settings object for the dll
    :param mutator_settings:
    :param config:
513065
def parse_mutator_settings(mutator_settings, config: ConfigObject):
    
    mutator_settings.match_length = safe_get_mutator(match_length_types, config, MUTATOR_MATCH_LENGTH)
    mutator_settings.max_score = safe_get_mutator(max_score_types, config, MUTATOR_MAX_SCORE, {'0': 'Unlimited'})
    mutator_settings.overtime = safe_get_mutator(overtime_mutator_types, config, MUTATOR_OVERTIME)
    mutator_settings.series_length = safe_get_mutator(series_length_mutator_types, config, MUTATOR_SERIES_LENGTH)
    mutator_settings.game_speed = safe_get_mutator(game_speed_mutator_types, config, MUTATOR_GAME_SPEED)
    mutator_settings.ball_max_speed = safe_get_mutator(
        ball_max_speed_mutator_types, config, MUTATOR_BALL_MAX_SPEED, {'0': 'Default'})
    mutator_settings.ball_type = safe_get_mutator(ball_type_mutator_types, config, MUTATOR_BALL_TYPE)
    mutator_settings.ball_weight = safe_get_mutator(ball_weight_mutator_types, config, MUTATOR_BALL_WEIGHT)
    mutator_settings.ball_size = safe_get_mutator(
        ball_size_mutator_types, config, MUTATOR_BALL_SIZE, {'1.0': 'Default'})
    mutator_settings.ball_bounciness = safe_get_mutator(
        ball_bounciness_mutator_types, config, MUTATOR_BALL_BOUNCINESS, {'1.0': 'Default'})
    mutator_settings.boost_amount = safe_get_mutator(boost_amount_mutator_types, config, MUTATOR_BOOST_AMOUNT)
    mutator_settings.rumble = safe_get_mutator(rumble_mutator_types, config, MUTATOR_RUMBLE)
    mutator_settings.boost_strength = safe_get_mutator(
        boost_strength_mutator_types, config, MUTATOR_BOOST_STRENGTH, {'Default': '1x', '1.0': '1x'})
    mutator_settings.gravity = safe_get_mutator(gravity_mutator_types, config, MUTATOR_GRAVITY)
    mutator_settings.demolish = safe_get_mutator(demolish_mutator_types, config, MUTATOR_DEMOLISH)
    mutator_settings.respawn_time = safe_get_mutator(respawn_time_mutator_types, config, MUTATOR_RESPAWN_TIME, {
                                                            '3.0': '3 Seconds', '3': '3 Seconds'})
476813
def ensure_value(
        config: dict,
        name: Union[str, Tuple[str, ...]],
        mutable_config_list: List[str]):
    
    if not isinstance(name, tuple):
        path: Tuple[str, ...] = (name,)
    else:
        path = name
    for element in path[:-1]:
        config = config[element]

    value = config[path[-1]]
    if path[-1] in mutable_config_list:
        value = value['value']
    return value
587651
def mutate(self, config):
        

        # TODO: Make a configuration item to choose whether or not multiple
        # mutations can happen simultaneously.
        if random() < config.node_add_prob:
            self.mutate_add_node(config)

        if random() < config.node_delete_prob:
            self.mutate_delete_node(config)

        if random() < config.conn_add_prob:
            self.mutate_add_connection(config)

        if random() < config.conn_delete_prob:
            self.mutate_delete_connection()

        # Mutate connection genes.
        for cg in self.connections.values():
            cg.mutate(config)

        # Mutate node genes (bias, response, etc.).
        for ng in self.nodes.values():
            ng.mutate(config)
1327970
def set_config_variables(repo, variables):
    
    with repo.config_writer() as writer:
        for k, value in variables.items():
            section, option = k.split('.')
            writer.set_value(section, option, value)
        writer.release()
1354436
def create_config(cls, params, prefix=None, name=None):
        
        if isinstance(cls.cfg, Config):
            cfg = cls.cfg.copy(name=name, prefix=prefix)
        else:
            cfg = cls.cfg.copy()
            if name:
                cfg[name] = name
            if prefix:
                cfg[prefix] = prefix
            cfg = Config(**cfg)
        cfg.update_settings()
        cfg.update(params, True)
        return cfg
58407
def _set_config(c):
    """"""
    func = sdl2.SDL_GL_SetAttribute
    func(sdl2.SDL_GL_RED_SIZE, c['red_size'])
    func(sdl2.SDL_GL_GREEN_SIZE, c['green_size'])
    func(sdl2.SDL_GL_BLUE_SIZE, c['blue_size'])
    func(sdl2.SDL_GL_ALPHA_SIZE, c['alpha_size'])
    func(sdl2.SDL_GL_DEPTH_SIZE, c['depth_size'])
    func(sdl2.SDL_GL_STENCIL_SIZE, c['stencil_size'])
    func(sdl2.SDL_GL_DOUBLEBUFFER, 1 if c['double_buffer'] else 0)
    samps = c['samples']
    func(sdl2.SDL_GL_MULTISAMPLEBUFFERS, 1 if samps > 0 else 0)
    func(sdl2.SDL_GL_MULTISAMPLESAMPLES, samps if samps > 0 else 0)
    func(sdl2.SDL_GL_STEREO, c['stereo'])
1194541
async def set_config(cls, name: str, value):
        
        return await cls._handler.set_config(name=[name], value=[value])
1308333
def update_settings(self, settings):
        

        def error_string(setting, setting_val):
            return ('{val} is not an acceptable value for '
                    'parameter {param} for visualization'
                    '{vis}.').format(val=setting_val,
                                     param=setting,
                                     vis=self.__class__.__name__)

        for setting in settings:
            if settings[setting] in self.ALLOWED_SETTINGS[setting]:
                # if the setting is allowed, set the attribute but remove
                # invalid variable characters
                #
                # see:
                #
                # https://stackoverflow.com/questions/3303312/how-do-i-convert-a-string-to-a-valid-variable-name-in-python
                setattr(self, '_' + re.sub('\W|^(?=\d)', '_', setting).lower(),
                        settings[setting])
            else:
                raise ValueError(error_string(settings[setting], setting))
89882
def configure(ctx, helper, edit):
    '''
    
    '''

    ctx.obj.config = ConfigFile(ctx.obj.config_file)

    if edit:
        ctx.obj.config.edit_config_file()
        return

    if os.path.isfile(ctx.obj.config.config_file):
        ctx.obj.config.read_config()

    if ctx.obj.profile is None:
        ctx.obj.profile = ctx.obj.config.default_profile

    args, kwargs = _parse_args_and_kwargs(ctx.args)
    assert len(args) == 0, 'Unrecognized arguments: "{}"'.format(args)

    if ctx.obj.profile not in ctx.obj.config.config['profiles']:
        ctx.obj.config.config['profiles'][ctx.obj.profile] = {
            'api': {'user_config': {}}, 'manager': {}, 'authorities': {}}

    profile_config = ctx.obj.config.config['profiles'][ctx.obj.profile]
    profile_config['api']['user_config'].update(kwargs)

    ctx.obj.config.write_config(ctx.obj.config_file)

    _generate_api(ctx)

    if ctx.obj.api.manager is not None:
        check_requirements(
            to_populate=profile_config['api']['user_config'],
            prompts=ctx.obj.api.manager.required_user_config,
            helper=helper)

    ctx.obj.config.write_config(ctx.obj.config_file)
627013
public void setChildPropertySetter(final Object childPropertySetter) {
        if (childPropertySetter instanceof ChildPropertySetter) {
            this.childPropertySetter = (ChildPropertySetter) childPropertySetter;
        } else if (childPropertySetter instanceof Closure) {
            final ObjectGraphBuilder self = this;
            this.childPropertySetter = new ChildPropertySetter() {
                public void setChild(Object parent, Object child, String parentName,
                                     String propertyName) {
                    Closure cls = (Closure) childPropertySetter;
                    cls.setDelegate(self);
                    cls.call(parent, child, parentName, propertyName);
                }
            };
        } else {
            this.childPropertySetter = new DefaultChildPropertySetter();
        }
    }
381920
def _create_settings(self):
        

        self.settings = {
            "columns": [{"Header": s, "accessor": s} for s in self.settings],
            "port": self.port,
            "docs": construct_trie(self.docs)
        }
361823
async def set_config(self, config):
        
        app_facade = client.ApplicationFacade.from_connection(self.connection)

        log.debug(
            'Setting config for %s: %s', self.name, config)

        return await app_facade.Set(self.name, config)
200882
def configure_settings(settings, environment_settings=True):
    '''
    
    '''
    changes = 1
    iterations = 0

    while changes:
        changes = 0
        app_names = ['django_autoconfig'] + list(settings['INSTALLED_APPS'])
        if environment_settings:
            app_names.append('django_autoconfig.environment_settings')
        for app_name in app_names:
            import django_autoconfig.contrib
            if autoconfig_module_exists(app_name):
                module = importlib.import_module("%s.autoconfig" % (app_name,))
            elif app_name in django_autoconfig.contrib.CONTRIB_CONFIGS:
                module = django_autoconfig.contrib.CONTRIB_CONFIGS[app_name]
            else:
                continue
            changes += merge_dictionaries(
                settings,
                getattr(module, 'SETTINGS', {}),
                template_special_case=True,
            )
            changes += merge_dictionaries(
                settings,
                getattr(module, 'DEFAULT_SETTINGS', {}),
                only_defaults=True,
            )
            for relationship in getattr(module, 'RELATIONSHIPS', []):
                changes += relationship.apply_changes(settings)

        if iterations >= MAX_ITERATIONS:
            raise ImproperlyConfigured(
                'Autoconfiguration could not reach a consistent state'
            )
        iterations += 1
    LOGGER.debug("Autoconfiguration took %d iterations.", iterations)
503166
def set_display_config(cls, config): # pragma: no cover
        
        cls.DISPLAY_CONFIG = DisplayConfig(
            show_approx_str=config.show_approx_str,
            base_config=config.base_config,
            digits_config=config.digits_config,
            strip_config=config.strip_config
        )
642274
def config_settings_loader(request=None):
    
    conf = SPConfig()
    conf.load(copy.deepcopy(settings.SAML_CONFIG))
    return conf
750579
def set_combiner(value, mutator, *args, **kwargs):
    
    value.add(mutator(*args, **kwargs))
    return value
328486
def global_config(cls, key, *args):
        '''  '''
        if args:
            cls.settings[key] = args[0]
        else:
            return cls.settings[key]