Atomically subtracts `delta` from the current value and returns the
        old value.

        :param delta: The delta to subtract.
498515
def get_and_subtract(self, delta):
        '''
        
        '''
        with self._lock.exclusive:
            oldval = self._value
            self._value -= delta
            return oldval
18710
def get_delta(value):
    
    if isinstance(value, (int, float)):
        return timedelta(seconds=value)
    elif isinstance(value, timedelta):
        return value
    raise Exception('Invalid delta')
648889
def move(self, delta):
        
        self.pos = (self.pos[0]+delta[0], self.pos[1]+delta[1])
1328761
def increment(self, delta=1):
        
        check_call(_LIB.MXProfileAdjustCounter(self.handle, int(delta)))
1234589
def getDateFromToday(delta,strfmt='%Y%m%d'):
	
	return (dt.date.today() + dt.timedelta(delta)).strftime(strfmt)
727677
def add(self, delta):
        
        if self.lw is None:
            return Weights(lw=delta)
        else:
            return Weights(lw=self.lw + delta)
605902
private Delta<E> toDelta(difflib.Delta<E> delta) throws DiffException
    {
        Delta<E> newDelta;

        switch (delta.getType()) {
            case CHANGE:
                newDelta = new ChangeDelta<E>(delta.getOriginal(), delta.getRevised());
                break;
            case DELETE:
                newDelta = new DeleteDelta<E>(delta.getOriginal(), delta.getRevised());
                break;
            case INSERT:
                newDelta = new InsertDelta<E>(delta.getOriginal(), delta.getRevised());
                break;
            default:
                throw new DiffException(String.format("Failed to convert [%s] info [%s]. Unknown type [%s]", delta
                    .getClass().getName(), Delta.class.getName(), delta.getType().toString()));
        }

        return newDelta;
    }
810163
public static int delta(int[] data, int start, int length, int init) {
                final int nextinit = data[start + length - 1];
                for (int i = length - 1; i > 0; --i) {
                        data[start + i] -= data[start + i - 1];
                }
                data[start] -= init;
                return nextinit;
        }
962425
def increment(self, counter_name, delta):
    
    current_value = self.counters.get(counter_name, 0)
    new_value = current_value + delta
    self.counters[counter_name] = new_value
    return new_value
975660
def setDelta(self, delta):
        
        days = int(delta.days)
        secs = int(delta.total_seconds())
        
        direction = 'from now'
        if secs < 0:
            direction = 'ago'
        
        if days and days % 365 == 0:
            number = days / 365
            unit = 'year(s)'
        elif days and days % 30 == 0:
            number = days / 30
            unit = 'month(s)'
        elif days and days % 7 == 0:
            number = days / 7
            unit = 'week(s)'
        elif days:
            number = days
            unit = 'day(s)'
        elif secs % 3600 == 0:
            number = secs / 3600
            unit = 'hour(s)'
        elif secs % 60 == 0:
            number = secs / 60
            unit = 'minute(s)'
        else:
            number = secs
            unit = 'second(s)'
        
        self._numberSpinner.setValue(abs(int(number)))
        self._unitCombo.setCurrentIndex(self._unitCombo.findText(unit))
        index = self._directionCombo.findText(direction)
        self._directionCombo.setCurrentIndex(index)
1366654
def dt_delta(dt, delta):
    
    delta_time = datetime.timedelta(days=delta)
    target_date = dt + delta_time
    return target_date
1041897
def total_seconds(delta):
    
    try:
        return delta.total_seconds()
    except AttributeError:
        return ((delta.days * 24 * 3600) + delta.seconds +
                float(delta.microseconds) / (10 ** 6))
1121348
function substractPosition(bounds, delta) {
  return {
    x: bounds.x - delta.x,
    y: bounds.y - delta.y,
    width: bounds.width,
    height: bounds.height
  };
}
971492
function deltaReverse(arg, increment) {
  let newIdx = arg.idx + arg.direction * increment;
  if (newIdx >= arg.values.length) {
    arg.direction *= -1; // Reverse direction
    newIdx = arg.values.length - 2;
  }

  if (newIdx < 0) {
    arg.direction *= -1; // Reverse direction
    newIdx = 1;
  }

  if (newIdx >= 0 && newIdx < arg.values.length) {
    arg.idx = newIdx;
  }

  return true;
}
1098594
def offset(self, mjd, new_scale, eop):
        

        delta = 0
        for one, two in self.steps(new_scale):
            one = one.name.lower()
            two = two.name.lower()
            # find the operation
            oper = "_scale_{}_minus_{}".format(two, one)
            # find the reverse operation
            roper = "_scale_{}_minus_{}".format(one, two)
            if hasattr(self, oper):
                delta += getattr(self, oper)(mjd, eop)
            elif hasattr(self, roper):
                delta -= getattr(self, roper)(mjd, eop)
            else:  # pragma: no cover
                raise DateError("Unknown convertion {} => {}".format(one, two))

        return delta
816858
def getDelta(original, update):
    
    # Compute both keys
    k = genKw(*original)
    kPrime = genKw(*update)

    # Compute delta,p'
    delta = (kPrime * inverse(k, orderGt())) % orderGt()
    pPrime = generatorGt()**kPrime
    return delta,pPrime
973483
public static int compare(float a, float b, float delta) {
        if (equals(a, b, delta)) {
            return 0;
        }
        return Float.compare(a, b);
    }