Sets the AC/DC values of a setting with the given power for the given scheme
506921
def _set_powercfg_value(scheme, sub_group, setting_guid, power, value):
    '''
    
    '''
    if scheme is None:
        scheme = _get_current_scheme()

    cmd = 'powercfg /set{0}valueindex {1} {2} {3} {4}' \
          ''.format(power, scheme, sub_group, setting_guid, value * 60)
    return __salt__['cmd.retcode'](cmd, python_shell=False) == 0
764027
def setting(self, opt, val):
        """"""
        opt = opt.encode()
        if isinstance(val, basestring):
            fluid_settings_setstr(self.settings, opt, val)
        elif isinstance(val, int):
            fluid_settings_setint(self.settings, opt, val)
        elif isinstance(val, float):
            fluid_settings_setnum(self.settings, opt, val)
1049161
def _to_uniform_pwm(self, values):
        
        return [self._to_single_uniform_pwm(values[i])
                for i in range(len(self._pins))]
996421
async def configure_reporting(self, attribute, min_interval,
                                  max_interval, reportable_change):
        """"""
        result = await super().configure_reporting(
            PowerConfigurationCluster.BATTERY_VOLTAGE_ATTR,
            self.FREQUENCY,
            self.FREQUENCY,
            self.MINIMUM_CHANGE
        )
        return result
914197
def set(gandi, g, key, value):
    """"""
    gandi.configure(global_=g, key=key, val=value)
571878
def set_state(self, state):
        
        if self.index() == 0:
            values = {"outlets": [{"desired_state": {"powered": state}}, {}]}
        else:
            values = {"outlets": [{}, {"desired_state": {"powered": state}}]}

        response = self.api_interface.set_device_state(self, values, id_override=self.parent_id(),
                                                       type_override="powerstrip")
        self._update_state_from_response(response)
39641
def set_pick_up_current(self, amperes):
        
        if amperes >= 0 and amperes <= 2.0:
            self._pick_up_current = amperes
        else:
            raise ValueError(
                'Amperes must be a floating point between 0.0 and 2.0')
        return self
33214
def _power(ctx, number, power):
    
    return decimal_pow(conversions.to_decimal(number, ctx), conversions.to_decimal(power, ctx))
936830
def set_ac_fan_speed(self, speed):
        
        desired_state = {"fan_speed": speed}

        response = self.api_interface.set_device_state(self, {
            "desired_state": desired_state
        })

        self._update_state_from_response(response)
704258
def set(config, section, opt, value):
        
        if section not in config.keys():
            config[section] = {}

        config[section][opt] = value
620696
def set_setting(key, val, env=None):
    
    return settings.set(key, val, env=env)
578358
def set_power_mask(self, sid_mask, state):
    """"""

    packet = bytearray(16)
    packet[0x00] = 0x0d
    packet[0x02] = 0xa5
    packet[0x03] = 0xa5
    packet[0x04] = 0x5a
    packet[0x05] = 0x5a
    packet[0x06] = 0xb2 + ((sid_mask<<1) if state else sid_mask)
    packet[0x07] = 0xc0
    packet[0x08] = 0x02
    packet[0x0a] = 0x03
    packet[0x0d] = sid_mask
    packet[0x0e] = sid_mask if state else 0

    response = self.send_packet(0x6a, packet)

    err = response[0x22] | (response[0x23] << 8)
642293
def _set_conf(self):
        
        self.rr_init = 60 * self.fs / self.conf.hr_init
        self.rr_max = 60 * self.fs / self.conf.hr_min
        self.rr_min = 60 * self.fs / self.conf.hr_max

        # Note: if qrs_width is odd, qrs_width == qrs_radius*2 + 1
        self.qrs_width = int(self.conf.qrs_width * self.fs)
        self.qrs_radius = int(self.conf.qrs_radius * self.fs)

        self.qrs_thr_init = self.conf.qrs_thr_init
        self.qrs_thr_min = self.conf.qrs_thr_min

        self.ref_period = int(self.conf.ref_period * self.fs)
        self.t_inspect_period = int(self.conf.t_inspect_period * self.fs)
1081835
def set(self):
        
        glColor4f(self.r, self.g, self.b, self.a)
650804
def param_alter(self,
                    param,
                    default=None,
                    unit=None,
                    descr=None,
                    tomatrix=None,
                    nonzero=None,
                    mandatory=None,
                    power=None,
                    voltage=None,
                    current=None,
                    z=None,
                    y=None,
                    r=None,
                    g=None,
                    dccurrent=None,
                    dcvoltage=None,
                    time=None,
                    **kwargs):
        
        assert param in self._data, \
            'parameter <{}> does not exist in {}'.format(param, self._name)

        def alter_attr(p, attr, value):
            """Set self.__dict__[attr] for param based on value
            """
            if value is None:
                return
            elif (value is True) and (p not in self.__dict__[attr]):
                self.__dict__[attr].append(p)
            elif (value is False) and (p in self.__dict__[attr]):
                self.__dict__[attr].remove(p)
            else:
                self.log('No need to alter {} for {}'.format(attr, p))

        if default is not None:
            self._data.update({param: default})
        if unit is not None:
            self._units.update({param: unit})
        if descr is not None:
            self._descr.update({param: descr})

        alter_attr(param, '_params', tomatrix)
        alter_attr(param, '_zeros', nonzero)
        alter_attr(param, '_mandatory', mandatory)
        alter_attr(param, '_powers', power)
        alter_attr(param, '_voltages', voltage)
        alter_attr(param, '_currents', current)
        alter_attr(param, '_z', z)
        alter_attr(param, '_y', y)
        alter_attr(param, '_r', r)
        alter_attr(param, '_g', g)
        alter_attr(param, '_dcvoltages', dcvoltage)
        alter_attr(param, '_dccurrents', dccurrent)
        alter_attr(param, '_times', time)
630357
async def set_power(
            self, power_type: str,
            power_parameters: typing.Mapping[str, typing.Any] = {}):
        """"""
        data = await self._handler.update(
            system_id=self.system_id, power_type=power_type,
            power_parameters=power_parameters)
        self.power_type = data['power_type']
1192576
def set(self, channel, state):
        """"""
        checked_val = self._check_dac_val(channel, state)
        self._dac_enabled = 0x40
        self.i2c.write8(self._dac_enabled, checked_val * 255)