Like self.auto but calculates the next unit if >999.99.
968016
def auto_no_thousands(self):
        """"""
        if self._value >= 1000000000000:
            return self.TiB, 'TiB'
        if self._value >= 1000000000:
            return self.GiB, 'GiB'
        if self._value >= 1000000:
            return self.MiB, 'MiB'
        if self._value >= 1000:
            return self.KiB, 'KiB'
        else:
            return self.B, 'B'
869512
def sub(self, num):
        
        try:
            val = self.value() - num
        except:
            val = -num
        self.set(max(0, val))
1001791
def auto(self):
        """"""
        if self._value >= 1000000000000:
            return self.tb, 'tb'
        if self._value >= 1000000000:
            return self.gb, 'gb'
        if self._value >= 1000000:
            return self.mb, 'mb'
        if self._value >= 1000:
            return self.kb, 'kb'
        else:
            return self.b, 'b'
367409
private void onEnd()
   {
      long result = System.currentTimeMillis() - currentTime.get().poll();
      times.incrementAndGet();
      if (result < min.get())
      {
         min.set(result);
      }
      if (max.get() < result)
      {
         max.set(result);
      }
      total.addAndGet(result);
   }
836106
def within_limits(self, value):
        

        if isinstance(value, int) or isinstance(value, float):
            value = value * self.default_unit

        return (self.limits[0] is None or value >= self.limits[0]) and (self.limits[1] is None or value <= self.limits[1])
180226
def _abs(ctx, number):
    
    return conversions.to_decimal(abs(conversions.to_decimal(number, ctx)), ctx)
1105995
function(n){

    	if(!_.isNumber(n)){
            return;
	    }

        // Avoid stepping over
        if(this._data[this._itr + n] === undefined){
            return;
        }

        // Advance num steps
        this._itr += n;
    }
801541
def _call(self, x):
        """"""

        if abs(x.ufuncs.sum() / self.sum_value - 1) <= self.sum_rtol:
            return 0
        else:
            return np.inf
1054472
def increment(self, attr, amount=1):
        
        return self.set(attr, operation.Increment(amount))
857204
def small_integer(self, column, auto_increment=False, unsigned=False):
        
        return self._add_column(
            "small_integer", column, auto_increment=auto_increment, unsigned=unsigned
        )
362316
def tiny_integer(self, column, auto_increment=False, unsigned=False):
        
        return self._add_column('tiny_integer', column,
                                auto_increment=auto_increment,
                                unsigned=unsigned)
918057
def incrementSub(self, amount=1):
        
        self._subProgressBar.setValue(self.subValue() + amount)
        QApplication.instance().processEvents()
540219
def abs_unit(self):
        """"""
        s = self.x * self.x + self.y * self.y
        if s < 1e-5:
            return Point(0,0)
        s = math.sqrt(s)
        return Point(abs(self.x) / s, abs(self.y) / s)
1312827
def increment(self):
        
        if self._starttime is not None:
            self._delta = datetime.datetime.now() - self._starttime
        else:
            self._delta = datetime.timedelta()
        
        self.refresh()
        self.ticked.emit()
1045908
def get_number_unit(number):
    """"""
    n = str(float(number))
    mult, submult = n.split('.')
    if float(submult) != 0:
        unit = '0.' + (len(submult)-1)*'0' + '1'
        return float(unit)
    else:
        return float(1)
1367509
def get_unit(key)
    @counters[key] ||= 0
    @counters[key] += @interval
    @counters[key] = @counters[key] - 1.0 if @counters[key] > 1
    @counters[key] = @counters[key] + 1.0 if @counters[key] < 0
    @counters[key]
  end
173109
def nextpow2(value):
    """"""
    if value >= 1:
        return 2**np.ceil(np.log2(value)).astype(int)
    elif value > 0:
        return 1
    elif value == 0:
        return 0
    else:
        raise ValueError('Value must be positive')