steps value up/down by a single step. Single step is defined in singleStep().

        Args:
            steps (int): positiv int steps up, negativ steps down
359505
def stepBy(self, steps):
        
        self.setValue(self.value() + steps*self.singleStep())
1352500
def _validate(self, val):
        
        if callable(val):
            return val

        if self.allow_None and val is None:
            return

        if not _is_number(val):
            raise ValueError("Parameter '%s' only takes numeric values"%(self.name))

        if self.step is not None and not _is_number(self.step):
            raise ValueError("Step parameter can only be None or a numeric value")

        self._checkBounds(val)
23422
def positive_directional_movement(high_data, low_data):
    
    catch_errors.check_for_input_len_diff(high_data, low_data)
    up_moves = calculate_up_moves(high_data)
    down_moves = calculate_down_moves(low_data)

    pdm = []
    for idx in range(0, len(up_moves)):
        if up_moves[idx] > down_moves[idx] and up_moves[idx] > 0:
            pdm.append(up_moves[idx])
        else:
            pdm.append(0)

    return pdm
1049282
def frange(start, end, inc=1.0):
    

    start = 1.0*start
    end   = 1.0*end
    inc   = 1.0*inc

    # if we got a dumb increment
    if not inc: return _n.array([start,end])

    # if the increment is going the wrong direction
    if 1.0*(end-start)/inc < 0.0:
        inc = -inc

    # get the integer steps
    ns = _n.array(list(range(0, int(1.0*(end-start)/inc)+1)))

    return start + ns*inc
1209608
function (segment, step) {
      if (segment % step === 0) {
        return segment;
      }
      if (Math.round((segment % step) / step)) {
        return (segment + (step - segment % step)) % 60;
      } else {
        return segment - segment % step;
      }
    }
517980
def static(self, max_steps, step_size):
        
        self._dynamic = False
        # begin checks      
        try : 
            self._max_steps = int(max_steps)
        except :
            print("Error: Input 1 (max_steps) has to be an int.")
            return 0
        try : 
            assert self._max_steps >= 0
        except : 
            print("Warning: Input 1 (max_steps) has to be non-negative.")
            print("Setting max_steps to 0.")
            self._max_steps = 0

        if max_steps > 0 :
            try : 
                assert step_size == float(step_size)
            except AssertionError :
                print("Warning: Input 2 (step_size) is not a float. Converted.")
                step_size = float(step_size)
            except :
                print("Error: Input 2 (step_size) has to be a float.")
                return 0

            try : 
                assert 0. < step_size < 1.
            except : 
                print("Warning: Input 2 (step_size) has to be between 0 and 1.")
                print("Setting step_size to 0.2.")
                step_size = 0.2
            self._step_size = step_size
            if step_size**max_steps < 10**(-15):
                print("Warning: Back-off gets dangerously small.")
1084277
def step(self, **kwargs):
        
        kwargs.setdefault('linestyle', kwargs.pop('where', 'steps-post'))
        data = self.append(self.value[-1:], inplace=False)
        return data.plot(**kwargs)
1313941
def doInteractions(self, number=1):
        
        t0 = time.time()

        for _ in range(number):
            self._oneInteraction()

        elapsed = time.time() - t0
        logger.info("%d interactions executed in %.3fs." % (number, elapsed))

        return self.stepid
657006
private List<Float> interpolateEmpty(int steps) {

        List<Float> result = new ArrayList<Float>();
        for (int i = 0; i < steps; i++) {
            result.add(new Float(1 + i));
        }
        return result;
    }
1031638
private List<Float> interpolateDownwards(float max, int steps) {

        List<Float> result = new ArrayList<Float>();
        if (max > 0) {
            // We try to generate a "nice" descending list of non-negative floats
            // where the step size is bigger for bigger "max" values.
            float base = (max > 1) ? (float)Math.floor(max) : max;
            float stepSize = 1000f;

            // reduce step size until the smallest element is greater than max/10.
            while ((base - (steps * stepSize)) < (max / 10.0f)) {
                stepSize = reduceStepSize(stepSize);
            }
            // we have determined the step size, now we generate the actual numbers
            for (int i = 0; i < steps; i++) {
                result.add(new Float(base - ((i + 1) * stepSize)));
            }
            Collections.reverse(result);
        } else {
            LOG.warn("Invalid navpos value: " + max);
            for (int i = 0; i < steps; i++) {
                result.add(new Float(max - (i + 1)));
            }
            Collections.reverse(result);
        }
        return result;
    }
1295637
def computeSlop(self, step, divisor):
        
        bottom = step * math.floor(self.minValue / float(step) + EPSILON)
        top = bottom + step * divisor

        if top >= self.maxValue - EPSILON * step:
            return max(top - self.maxValue, self.minValue - bottom)
        else:
            return None
196327
private void onEndStepProgress(Object source)
    {
        // Try to find the right step based on the source
        DefaultJobProgressStep step = findStep(this.currentStep, source);

        if (step == null) {
            LOGGER.warn("Could not find any matching step for source [{}]. Ignoring EndStepProgress.",
                source.toString());

            return;
        }

        this.currentStep = step;
        this.currentStep.finish();
    }
206115
function isEmptyAfterStep(step) {
        return step.keyword.trim() === 'After' && step.name === undefined && step.embeddings === undefined;
    }
550074
function getThreshold(fromStep, toStep, now)
{
	let threshold

	// Allows custom thresholds when moving
	// from a specific step to a specific step.
	if (fromStep && (fromStep.id || fromStep.unit)) {
		threshold = toStep[`threshold_for_${fromStep.id || fromStep.unit}`]
	}

	// If no custom threshold is set for this transition
	// then use the usual threshold for the next step.
	if (threshold === undefined) {
		threshold = toStep.threshold
	}

	// Convert threshold to a number.
	if (typeof threshold === 'function') {
		threshold = threshold(now)
	}

	// Throw if no threshold is found.
	if (fromStep && typeof threshold !== 'number') {
		// Babel transforms `typeof` into some "branches"
		// so istanbul will show this as "branch not covered".
		/* istanbul ignore next */
		const type = typeof threshold
		throw new Error(`Each step of a gradation must have a threshold defined except for the first one. Got "${threshold}", ${type}. Step: ${JSON.stringify(toStep)}`)
	}

	return threshold
}
608553
private void dcstep() {
		double sgnd = gp*Math.signum(gx);

		// the new step
		double stpf;

		if( fp > fx ) {
			stpf = handleCase1();
		} else if( sgnd < 0 ) {
			stpf = handleCase2();
		} else if( Math.abs(gp) < Math.abs(gx) ) {
			stpf = handleCase3();
		} else {
			stpf = handleCase4();
		}

		// update the bracket which contains the solution
		if( fp > fx ) {
			// found an upper bound
			sty = stp;
			fy = fp;
			gy = gp;
		} else {
			// see if its on the other side of the dip
			if( sgnd < 0 ) {
				sty = stx;
				fy = fx;
				gy = gx;
			}
			stx = stp;
			fx = fp;
			gx = gp;
		}
		
		stp = stpf;
		updated = true;
	}
567320
def geometric_progression_for_stepsize(x, update, dist, decision_function,
                                       current_iteration):
  
  epsilon = dist / np.sqrt(current_iteration)
  while True:
    updated = x + epsilon * update
    success = decision_function(updated[None])[0]
    if success:
      break
    else:
      epsilon = epsilon / 2.0

  return epsilon
326423
function steps(steps) {
  if ( steps === void 0 ) steps = 10;

  return function (t) { return Math.round(t * steps) * (1 / steps); };
}