Increment volume by 0.1 (or delta) unless it is already maxed.
        Returns the new volume.
772156
def volume_up(self, delta=0.1):
        
        if delta <= 0:
            raise ValueError(
                "volume delta must be greater than zero, not {}".format(delta))
        return self.set_volume(self.status.volume_level + delta)
957438
def set_volume(self, percent, update_group=True):
        """"""
        if percent not in range(0, 101):
            raise ValueError('Volume percent out of range')
        new_volume = self._client['config']['volume']
        new_volume['percent'] = percent
        self._client['config']['volume']['percent'] = percent
        yield from self._server.client_volume(self.identifier, new_volume)
        if update_group:
            self._server.group(self.group.identifier).callback()
        _LOGGER.info('set volume to %s on %s', percent, self.friendly_name)
540757
def volume(action,value=30)
      cmd =
      case action
      when :up then "volume 1"
      when :down then "volume 0"
      when :set then "volume #{value} 1"
      else return false
      end
      resp = command cmd, /Volume/
      resp.gsub("Volume: ","").gsub(" %\n","")
    end
1062329
def strictly_increasing(values):
    """"""
    return all(x < y for x, y in zip(values, values[1:]))
1281628
public static double volume(SpatialComparable box) {
    final int dim = box.getDimensionality();
    double vol = 1.;
    for(int i = 0; i < dim; i++) {
      double delta = box.getMax(i) - box.getMin(i);
      if(delta == 0.) {
        return 0.;
      }
      vol *= delta;
    }
    return vol;
  }
452374
def advance_by(self, amount):
        
        if amount < 0:
            raise ValueError("cannot retreat time reference: amount {} < 0"
                             .format(amount))
        self.__delta += amount
120498
def increment(key, by: 1)
      if by.is_a?(Float)
        self.connection.hincrbyfloat(@key, key, by.to_f).to_f
      else
        self.connection.hincrby(@key, key, by.to_i).to_i
      end
    end
1067940
def increment(self, batch_size):
        """"""
        self.example_count += batch_size
        self.example_total += batch_size
        if self.log_unit == "seconds":
            self.unit_count = int(self.timer.elapsed())
            self.unit_total = int(self.timer.total_elapsed())
        elif self.log_unit == "examples":
            self.unit_count = self.example_count
            self.unit_total = self.example_total
        elif self.log_unit == "batches":
            self.unit_count += 1
            self.unit_total += 1
        elif self.log_unit == "epochs":
            # Track epoch by example count because otherwise we only know when
            # a new epoch starts, not when an epoch ends
            if self.example_count >= self.epoch_size:
                self.unit_count += 1
                self.unit_total += 1
        else:
            raise Exception(f"Unrecognized log_unit: {self.log_unit}")
900823
def adjust_volume(buf, mult)
      # We don't need to adjust anything if the buf is nil so just return in that case
      return unless buf

      # buf is s16le so use 's<' for signed, 16 bit, LE
      result = buf.unpack('s<*').map do |sample|
        sample *= mult

        # clamp to s16 range
        [32_767, [-32_768, sample].max].min
      end

      # After modification, make it s16le again
      result.pack('s<*')
    end
634159
def new(self):
        # type: () -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF Implementation Use Volume Descriptor already initialized')

        self.desc_tag = UDFTag()
        self.desc_tag.new(4)  # FIXME: we should let the user set serial_number

        self.vol_desc_seqnum = 1

        self.impl_ident = UDFEntityID()
        self.impl_ident.new(0, b'*UDF LV Info', b'\x02\x01')

        self.impl_use = UDFImplementationUseVolumeDescriptorImplementationUse()
        self.impl_use.new()

        self._initialized = True
1115470
def incr(self, key, delta=1):
        
        value = self.get(key)
        if value is None:
            raise ValueError("Key '%s' not found" % key)
        new_value = value + delta
        self.set(key, new_value)
        return new_value
20408
def _increment(self, *args):
        """"""
        value = self._var.get()
        if self._resolution:
            value = self._start + int(round((value - self._start) / self._resolution)) * self._resolution
            self._var.set(value)
        self.display_value(value)
543749
def increment(key, amount = 1, options = {})
      value = Utils.to_int(load(key, options)) + amount
      store(key, value.to_s, options)
      value
    end
126113
def set_volume(self, volume):
        """"""
        if volume > 100 or volume < 0:
            raise Exception('Bad request to volume control. '
                            'Must be between 0 and 100')
        params = ('<InstanceID>0</InstanceID><Channel>Master</Channel>'
                  '<DesiredVolume>{}</DesiredVolume>').format(volume)
        self.soap_request(URL_CONTROL_DMR, URN_RENDERING_CONTROL,
                          'SetVolume', params)
610941
def increment(self, key: Any, by: int = 1) -> None:
        
        if key is not None:
            self[key] = self.get(key, 0) + by
937718
def increment(self, amount=1):
        
        self.__lock.acquire()
        self.__count += amount
        v = self.value()
        self.__lock.release()
        return v
621342
def decrement(self, delta=1):
        
        check_call(_LIB.MXProfileAdjustCounter(self.handle, -int(delta)))