Given a function, initial conditions, step size and end value, this will
		calculate an unforced system. The default start time is t=0.0, but this
		can be changed.

		y - initial state
		h - step size
		n - stop time
540522
def solve(self, y, h, t_end):
		
		ts = []
		ys = []
		yi = y
		ti = 0.0
		while ti < t_end:
			ts.append(ti)
			yi = self.step(yi, None, ti, h)
			ys.append(yi)
			ti += h
		return ts, ys
741587
public void initialize(double initial[] , int numberOfParameters , int numberOfFunctions ) {
		super.initialize(initial,numberOfParameters);
		lambda = config.dampeningInitial;
		nu = NU_INITIAL;

		residuals.reshape(numberOfFunctions,1);

		diagOrig.reshape(numberOfParameters,1);
		diagStep.reshape(numberOfParameters,1);

		computeResiduals(x,residuals);
		fx = costFromResiduals(residuals);

		mode = Mode.COMPUTE_DERIVATIVES;

		if( verbose != null ) {
			verbose.println("Steps     fx        change      |step|   f-test     g-test    tr-ratio  lambda ");
			verbose.printf("%-4d  %9.3E  %10.3E  %9.3E  %9.3E  %9.3E  %6.2f   %6.2E\n",
					totalSelectSteps, fx, 0.0,0.0,0.0,0.0, 0.0, lambda);
		}
	}
1196103
def init_default(m:nn.Module, func:LayerFunc=nn.init.kaiming_normal_)->None:
    ""
    if func:
        if hasattr(m, 'weight'): func(m.weight)
        if hasattr(m, 'bias') and hasattr(m.bias, 'data'): m.bias.data.fill_(0.)
    return m
1297613
function defaults(freq, dtstart, rrule/*, tzoffset*/) {
    rrule = rrule || {};

    if ('object' !== typeof dtstart) {
      if ('string' === typeof dtstart) {
        dtstart = stringifyDateStr(dtstart);
      }
      dtstart = new Date(dtstart);
    }
    switch(freq) {
      case 'secondly':
        break;
      case 'minutely':
        if (!rrule.bysecond) {
          rrule.bysecond = [dtstart.getUTCSeconds()];
        }
        /* falls through */
      case 'hourly':
        if (!rrule.byminute) {
          rrule.byminute = [dtstart.getUTCMinutes()];
        }
        /* falls through */
      case 'daily':
        if (!rrule.byhour) {
          rrule.byhour = [dtstart.getUTCHours()];
        }
        /* falls through */
      case 'weekly':
        if (!rrule.byday) {
          rrule.byday = [Rrecur.weekdays[dtstart.getUTCDay()]];
        }
        /* falls through */
      case 'monthly':
        if (!rrule.bymonthday) {
          rrule.bymonthday = [dtstart.getUTCDate()];
        }
        /* falls through */
      case 'yearly':
        if (!rrule.bymonth) {
          rrule.bymonth = [dtstart.getUTCMonth() + 1];
        }
        /* falls through */
    }

    return rrule;
  }
1331391
function hrtime(previousTimestamp){
  var clocktime = performanceNow.call(performance)*1e-3
  var seconds = Math.floor(clocktime)
  var nanoseconds = Math.floor((clocktime%1)*1e9)
  if (previousTimestamp) {
    seconds = seconds - previousTimestamp[0]
    nanoseconds = nanoseconds - previousTimestamp[1]
    if (nanoseconds<0) {
      seconds--
      nanoseconds += 1e9
    }
  }
  return [seconds,nanoseconds]
}
738532
function beforechange(start1, stop1) {
    if (!isFinite(start)) start = start1;
    values.splice(0, Math.max(0, Math.min(size, Math.round((start1 - start) / step))));
    start = start1;
    stop = stop1;
  }
1259000
function() {
    var min = typeof this.options.start_value !== 'undefined' && this.min >= 0 ? this.options.start_value : this.min,
        start_value = this.round(min, 1);

    /* This is a boundary condition */
    if (this.min > 0 && start_value > this.min) {
      return 0;
    }

    if (this.min === this.max) {
      return 0;
    }

    return start_value;
  }
852580
function(d) {
    return d.wm || (d.wm =
      (later.D.val(d) +
      (later.dw.val(later.M.start(d)) - 1) + (7 - later.dw.val(d))) / 7);
  }
542573
function prepare(start1, stop) {
    var steps = Math.min(size, Math.round((start1 - start) / step));
    if (!steps || fetching) return; // already fetched, or fetching!
    fetching = true;
    steps = Math.min(size, steps + cubism_metricOverlap);
    var start0 = new Date(stop - steps * step);
    request(start0, stop, step, function(error, data) {
      fetching = false;
      if (error) return console.warn(error);
      var i = isFinite(start) ? Math.round((start0 - start) / step) : 0;
      for (var j = 0, m = data.length; j < m; ++j) values[j + i] = data[j];
      event.change.call(metric, start, stop);
    });
  }
207552
def iteration_length(N, start=0, step=1):
    '''
    '''
    if N < 0:
        raise ValueError('N cannot be negative')

    if start < 0:
        start += N
        if start < 0:
            raise ValueError('Invalid start value')

    if step < 0:
        step = -step
        new_N = start + 1
        if new_N > N:
            raise ValueError('Invalid parameters')
        N = new_N
        start = 0

    ret = int(math.ceil((N - start) / float(step)))
    return max(0, ret)
1349071
function( from, to, unit ) {
		this.startTime = now();
		this.start = from;
		this.end = to;
		this.unit = unit || this.unit || "px";
		this.now = this.start;
		this.pos = this.state = 0;

		var self = this;
		function t( gotoEnd ) {
			return self.step(gotoEnd);
		}

		t.elem = this.elem;

		if ( t() && jQuery.timers.push(t) && !timerId ) {
			timerId = setInterval(jQuery.fx.tick, 13);
		}
	}
236106
def steps(self, start, end):
        
        if not 0 <= start <= 1:
            raise ValueError('Values must be between 0 and 1.')
        if not 0 <= end <= 1:
            raise ValueError('Values must be between 0 and 1.')

        raw_start = self._to_single_raw_pwm(start)
        raw_end = self._to_single_raw_pwm(end)
        return abs(raw_start - raw_end)
936404
private function calculateStartEnd()
    {
        if ($this->minutes == 0) {
            $this->setToday();
        } else {
            $this->start = Carbon::now()->subMinutes($this->minutes);

            $this->end = Carbon::now();
        }
    }
560425
def step(self)->Number:
        ""
        self.n += 1
        return self.func(self.start, self.end, self.n/self.n_iter)
342339
function determineStepSize(min, max, unit, capacity) {
	var range = max - min;
	var interval = INTERVALS[unit];
	var milliseconds = interval.size;
	var steps = interval.steps;
	var i, ilen, factor;

	if (!steps) {
		return Math.ceil(range / (capacity * milliseconds));
	}

	for (i = 0, ilen = steps.length; i < ilen; ++i) {
		factor = steps[i];
		if (Math.ceil(range / (milliseconds * factor)) <= capacity) {
			break;
		}
	}

	return factor;
}
26052
function timeCalculator(progress, selfInvoker) {
        if (isStoppedTimer) return;

        var step = 1;

        var remainingProgress = 1.0 - progress.position;

        var estimatedCompletionTime = Math.round((remainingProgress / progress.position) * progressIterations);
        var estimatedHours, estimatedMinutes, estimatedSeconds, displayHours, displayMinutes, displaySeconds;
        progressIterations += step;

        if (progress.position < 1.0) {
            if (isFinite(estimatedCompletionTime)) {
                estimatedHours = Math.floor(estimatedCompletionTime / 3600);
                displayHours = estimatedHours > 9 ? estimatedHours : '0' + estimatedHours;
                estimatedMinutes = Math.floor((estimatedCompletionTime / 60) % 60);
                displayMinutes = estimatedMinutes > 9 ? estimatedMinutes : '0' + estimatedMinutes;
                estimatedSeconds = estimatedCompletionTime % 60;
                displaySeconds = estimatedSeconds > 9 ? estimatedSeconds : '0' + estimatedSeconds;
            }

            var output = '';
            if (displayHours > 0) {
                output += displayHours + ' hours ';
            }
            if (displayMinutes > 0) {
                output += displayMinutes + ' minutes ';
            }
            if (displaySeconds > 0) {
                output += displaySeconds + ' seconds ';
            }
            if (output.length) {
                progressHelper.callback(output);
            }
        }

        setTimeout(function() {
            timeCalculator(progress, true);
        }, step * ONE_SECOND);
    }
433315
function range(start, stop, step){
  utils.assertType(start, 'unit', 'start');
  utils.assertType(stop, 'unit', 'stop');
  if (step) {
    utils.assertType(step, 'unit', 'step');
    if (0 == step.val) {
      throw new Error('ArgumentError: "step" argument must not be zero');
    }
  } else {
    step = new nodes.Unit(1);
  }
  var list = new nodes.Expression;
  for (var i = start.val; i <= stop.val; i += step.val) {
    list.push(new nodes.Unit(i, start.type));
  }
  return list;
}