:param mode: 1.0 for Very sensitive, 0.2 for not sensitive.
                     Steps in values of 0.2.
        :return: nothing
328641
def set_alarm_sensitivity(self, mode):
        
        values = {"desired_state": {"alarm_sensitivity": mode}}
        response = self.api_interface.set_device_state(self, values)
        self._update_state_from_response(response)
461645
def set_sensitivity(self, sensitivity=DEFAULT_SENSITIVITY):
        
        if sensitivity < 31:
            self._mtreg = 31
        elif sensitivity > 254:
            self._mtreg = 254
        else:
            self._mtreg = sensitivity
        self._power_on()
        self._set_mode(0x40 | (self._mtreg >> 5))
        self._set_mode(0x60 | (self._mtreg & 0x1f))
        self._power_down()
1120710
def _scale(self, mode):
        
        if mode in self._mode_scale:
            scale = self._mode_scale[mode]
        else:
            scale = 10**(-self.decimals)
            self._mode_scale[mode] = scale

        return scale
390835
def valueAt(self, percent):
        
        values = self.values()
        if percent < 0:
            index = 0
        elif percent > 1:
            index = -1
        else:
            index = percent * (len(values) - 1)
        
        # allow some floating point errors for the index (30% left or right)
        remain = index % 1
        if remain < 0.3 or 0.7 < remain:
            try:
                return values[int(round(index))]
            except IndexError:
                return None
        return None
119775
def validate_timeout_or_zero(option, value):
    
    if value is None:
        raise ConfigurationError("%s cannot be None" % (option, ))
    if value == 0 or value == "0":
        return 0
    return validate_positive_float(option, value) / 1000.0
367223
def qsnorm(p):
    
    d = p
    if d < 0. or d > 1.:
        print('d not in (1,1) ')
        sys.exit()
    x = 0.
    if (d - 0.5) > 0:
        d = 1. - d
    if (d - 0.5) < 0:
        t2 = -2. * np.log(d)
        t = np.sqrt(t2)
        x = t - old_div((2.515517 + .802853 * t + .010328 * t2),
                        (1. + 1.432788 * t + .189269 * t2 + .001308 * t * t2))
        if p < 0.5:
            x = -x
    return x
816817
def mode_readable(self):
        """"""
        ret = ""
        mode = self._raw_mode

        if mode.MANUAL:
            ret = "manual"
            if self.target_temperature < self.min_temp:
                ret += " off"
            elif self.target_temperature >= self.max_temp:
                ret += " on"
            else:
                ret += " (%sC)" % self.target_temperature
        else:
            ret = "auto"

        if mode.AWAY:
            ret += " holiday"
        if mode.BOOST:
            ret += " boost"
        if mode.DST:
            ret += " dst"
        if mode.WINDOW:
            ret += " window"
        if mode.LOCKED:
            ret += " locked"
        if mode.LOW_BATTERY:
            ret += " low battery"

        return ret
938341
def mode(self):
        """"""
        mu = self.mean()
        sigma = self.std()
        ret_val = math.exp(mu - sigma**2)
        if math.isnan(ret_val):
            ret_val = float("inf")
        return ret_val
393658
def c_mvar(self):
        
        if self.b == -4:
            return 1.0
        elif self.b == -3:
            return 0.0
        elif self.b == -2:
            return -1.0
        elif self.b == -1:
            return -2.0
        elif self.b == 0:
            return -3.0
734246
def value(self):
        
        if self.pwm_device.pin.frequency is None:
            return None
        else:
            try:
                return log2(
                    self.pwm_device.pin.frequency / self.mid_tone.frequency
                ) / self.octaves
            except ZeroDivisionError:
                return 0.0
1310521
function mode() {
      var value = (attr.mdMode || "").trim();
      if (value) {
        switch (value) {
          case MODE_DETERMINATE:
          case MODE_INDETERMINATE:
          case MODE_BUFFER:
          case MODE_QUERY:
            break;
          default:
            value = MODE_INDETERMINATE;
            break;
        }
      }
      return value;
    }
306253
def check_conf_percentage_validity(conf_percentage):
    
    msg = "conf_percentage MUST be a number between 0.0 and 100."
    condition_1 = isinstance(conf_percentage, Number)
    if not condition_1:
        raise ValueError(msg)
    else:
        condition_2 = 0 < conf_percentage < 100
        if not condition_2:
            raise ValueError(msg)
    return None
1100434
def FibreMode(gridSize,modeDiameter):
    
    rmode=modeDiameter/2
    return np.exp(-(RadiusGrid(gridSize)/rmode)**2)/(np.sqrt(np.pi/2)*rmode)
899768
def mode(self, mode=None):
        
        if mode is None:
            return self.__mode
        if mode == const.MODBUS_TCP or mode == const.MODBUS_RTU:
            self.__mode = mode
            return self.__mode
        else:
            return None
818857
def clear_mode(self, mode, value=None):
        
        try:
            if mode in self.user_modes:
                del self.mode_users[mode][value]
            else:
                del self.modes[mode]
        except KeyError:
            pass
1278296
def mode(name, num, minimum=0, maximum=0, ref=None):
    '''
    
    '''
    return calc(
        name=name,
        num=num,
        oper='mode',
        minimum=minimum,
        maximum=maximum,
        ref=ref
    )
765236
def get_interface_mode(args):
    

    calculator_list = ['wien2k', 'abinit', 'qe', 'elk', 'siesta', 'cp2k',
                       'crystal', 'vasp', 'dftbp', 'turbomole']
    for calculator in calculator_list:
        mode = "%s_mode" % calculator
        if mode in args and args.__dict__[mode]:
            return calculator
    return None