Interpolate linearly between start and end
355929
def value(self, progress_indicator):
        
        return interpolate.interpolate_linear_single(self.initial_value, self.final_value, progress_indicator)
940591
def slice_by_coord( self, start, end ):
        
        start_col = self.coord_to_col( start )
        end_col = self.coord_to_col( end )
        if (self.strand == '-'):
            (start_col,end_col) = (end_col,start_col)
        return self.slice( start_col, end_col )
657222
def strip_between(self, string, start, end):
        """"""
        regex = start + r'.*?' + end + r'\s*'
        res = re.sub(regex, '', string,
                     flags=re.DOTALL|re.IGNORECASE|re.MULTILINE)
        return res
1202257
def setup_interpolant(self):
        """"""
        # for computing nearby (z < 1) redshifts
        zs = numpy.linspace(0., 1., num=self.numpoints)
        ds = self.cosmology.luminosity_distance(zs).value
        self.nearby_d2z = interpolate.interp1d(ds, zs, kind='linear',
                                                bounds_error=False)
        # for computing far away (z > 1) redshifts
        zs = numpy.logspace(0, numpy.log10(self.default_maxz),
                            num=self.numpoints)
        ds = self.cosmology.luminosity_distance(zs).value
        self.faraway_d2z = interpolate.interp1d(ds, zs, kind='linear',
                                                 bounds_error=False)
        # store the default maximum distance
        self.default_maxdist = ds.max()
661048
def wrap(start: str, string: str, end: str = "") -> str:
    
    return f"{start}{string}{end}" if string else ""
36395
def linear_interpolate(p1, p2, fraction):
    ''''''
    return np.array((p1[0] + fraction * (p2[0] - p1[0]),
                     p1[1] + fraction * (p2[1] - p1[1]),
                     p1[2] + fraction * (p2[2] - p1[2])))
857128
function interpolate(pattern, match) {
    return pattern.replace(/\$(\$|\d{1,2})/, function (m, what) {
      return match[what === '$' ? 0 : Number(what)];
    });
  }
477212
function range(start, end) {
  return {
    start: start,
    end: end === undefined ? start : end
  };
}
557744
def interpolate_slice(slice_rows, slice_cols, interpolator):
    """"""
    fine_rows = np.arange(slice_rows.start, slice_rows.stop, slice_rows.step)
    fine_cols = np.arange(slice_cols.start, slice_cols.stop, slice_cols.step)
    return interpolator(fine_cols, fine_rows)
480525
def range(start, finish, step):
        """"""
        value = start
        while value <= finish:
            yield value
            value += step
858686
function(start, end) {
      var current = parseInt(start), end = parseInt(end), values = [current]
      if (end > current) while (++current <= end) values.push(current)
      else               while (--current >= end) values.push(current)
      return '[' + values + ']'
    }
166413
def _interpolate(self, xs, ys):
        """"""
        x = []
        y = []
        for i in range(len(ys)):
            if ys[i] is not None:
                x.append(xs[i])
                y.append(ys[i])

        interpolate = INTERPOLATIONS[self.interpolate]

        return list(
            interpolate(
                x, y, self.interpolation_precision,
                **self.interpolation_parameters
            )
        )
436358
def linear(m=1, b=0):
    ''' 

    '''
    def f(i):
        return m * i + b
    return partial(force, sequence=_advance(f))
1083324
def _to_linear(M, N, L, q):
    ""
    (x, y, u, k) = q
    return 2 * L * N * x + 2 * L * y + L * u + k
1358970
def add_regex_start_end(pattern_function):
    """"""

    @wraps(pattern_function)
    def func_wrapper(*args, **kwargs):
        return r'^{}$'.format(pattern_function(*args, **kwargs))
    return func_wrapper
701791
private static LineString linearZInterpolation(LineString lineString) {
        double startz = lineString.getStartPoint().getCoordinate().z;
        double endz = lineString.getEndPoint().getCoordinate().z;
        if (Double.isNaN(startz) || Double.isNaN(endz)) {
            return lineString;
        } else {
            double length = lineString.getLength();
            lineString.apply(new LinearZInterpolationFilter(startz, endz, length));
            return lineString;
        }
    }
415187
function zrange(start, end, withscores) {
  var i
    , len = this._keys.length
    , list = [];
  if(start < 0) start = len + start;
  if(end < 0) end = len + end;
  if(start < 0) start = 0;
  if(end >= len) end = len - 1;
  i = start;
  for(;i <= end;i++) {
    list.push(this._keys[i].m);
    if(withscores) list.push(this._keys[i].v);
  }
  return list;
}