Split the segment according the t values
326824
def split(self, tValues):
        
        if self.segmentType == "curve":
            on1 = self.previousOnCurve
            off1 = self.points[0].coordinates
            off2 = self.points[1].coordinates
            on2 = self.points[2].coordinates
            return bezierTools.splitCubicAtT(on1, off1, off2, on2, *tValues)
        elif self.segmentType == "line":
            segments = []
            x1, y1 = self.previousOnCurve
            x2, y2 = self.points[0].coordinates
            dx = x2 - x1
            dy = y2 - y1
            pp = x1, y1
            for t in tValues:
                np = (x1+dx*t, y1+dy*t)
                segments.append([pp, np])
                pp = np
            segments.append([pp, (x2, y2)])
            return segments
        elif self.segmentType == "qcurve":
            raise NotImplementedError
        else:
            raise NotImplementedError
274160
def split(self, dt):
    
    outlist=[]
    for seg in self:
      start = seg.start()
      stop = seg.end()
      id = seg.id()

      while start < stop:
        tmpstop = start + dt
        if tmpstop > stop:
          tmpstop = stop
        elif tmpstop + dt > stop:
          tmpstop = int( (start + stop)/2 )
        x = ScienceSegment(tuple([id,start,tmpstop,tmpstop-start]))
        outlist.append(x)
        start = tmpstop

    # save the split list and return length
    self.__sci_segs = outlist
    return len(self)
863348
public static void decodePathSegment(List<PathSegment> segments, String segment, boolean decode) {
        int colon = segment.indexOf(';');
        if (colon != -1) {
            segments.add(new PathSegmentImpl(
                    (colon == 0) ? "" : segment.substring(0, colon),
                    decode,
                    decodeMatrix(segment, decode)));
        } else {
            segments.add(new PathSegmentImpl(
                    segment,
                    decode));
        }
    }
489366
def p_seg(p1, p2, cw, interval, trim=0, align=0):
    
    case = {True: pi / -2, False: pi / 2}
    p1m, p2m = m_seg(p1, p2, case[cw], interval)
    return t_seg(p1m, p2m, trim, align)
14710
def split(df):
    """"""
    idx = df.index.argmax() + 1
    down = df.iloc[:idx]
    # Reverse index to orient it as a CTD cast.
    up = df.iloc[idx:][::-1]
    return down, up
1356863
def _slice(index, n_samples, margin=None):
    """"""
    if margin is None:
        margin = (0, 0)
    assert isinstance(n_samples, (tuple, list))
    assert len(n_samples) == 2
    before, after = n_samples
    assert isinstance(margin, (tuple, list))
    assert len(margin) == 2
    margin_before, margin_after = margin
    before += margin_before
    after += margin_after
    index = int(index)
    before = int(before)
    after = int(after)
    return slice(max(0, index - before), index + after, None)
591513
def sub(self, *segments):
        ""
        d = self
        for segment in segments:
            try:
                d = d[segment]
            except KeyError:
                return ConfigDict({})
        return d
1318841
def split_taf(txt: str) -> [str]:  # type: ignore
    
    lines = []
    split = txt.split()
    last_index = 0
    for i, item in enumerate(split):
        if starts_new_line(item) and i != 0 and not split[i - 1].startswith('PROB'):
            lines.append(' '.join(split[last_index:i]))
            last_index = i
    lines.append(' '.join(split[last_index:]))
    return lines
1291735
private static List<Segmentation> getSegmentations(String str, int begin, int end, int nbMaxComponents, int minComponentSize, List<CuttingPoint> cuttingPoints) {
		List<Segmentation> s = new ArrayList<Segmentation>(nbMaxComponents);
		for(CuttingPoint cp:getPossibleCuttingPoints(str, begin, end, nbMaxComponents, minComponentSize)) {
			s.add(new Segmentation(str, addToDuplicate(cuttingPoints, cp, nbMaxComponents - 1)));
			if(nbMaxComponents > 2) {
				if(cp.isHypen())
					// recursivity on the left part only if the cp was an hypen
					if((cp.getIndex() - begin) >= 2*minComponentSize)
						s.addAll(getSegmentations(str, begin, cp.getIndex(), nbMaxComponents -1, minComponentSize, addToDuplicate(cuttingPoints, cp, nbMaxComponents - 1)));
				
				if((end - (cp.getIndex() + cp.getOffset())) >= 2*minComponentSize)
					s.addAll(getSegmentations(str, cp.getIndex() + cp.getOffset(), end, nbMaxComponents -1, minComponentSize, addToDuplicate(cuttingPoints, cp, nbMaxComponents - 1)));
			}
		}
		return s;
	}
250091
private static Region split(Region t) {
    if (t.right.right.level == t.level) {
      t = rotateWithRightChild(t);
      t.level++;
    }
    return t;
  }
686010
def split(self):
        """"""

        split_index = []
        parts = []

        pattern = self.pattern.decode('latin-1') if self.is_bytes else self.pattern

        i = util.StringIter(pattern)
        iter(i)
        for c in i:
            if self.extend and c in EXT_TYPES and self.parse_extend(c, i):
                continue

            if c == '|':
                split_index.append(i.index - 1)
            elif c == '\\':
                index = i.index
                try:
                    self._references(i)
                except StopIteration:
                    i.rewind(i.index - index)
            elif c == '[':
                index = i.index
                try:
                    self._sequence(i)
                except StopIteration:
                    i.rewind(i.index - index)

        start = -1
        for split in split_index:
            p = pattern[start + 1:split]
            parts.append(p.encode('latin-1') if self.is_bytes else p)
            start = split

        if start < len(pattern):
            p = pattern[start + 1:]
            parts.append(p.encode('latin-1') if self.is_bytes else p)

        return tuple(parts)
923413
def _split(string, splitters):
    """"""
    part = ''
    for character in string:
        if character in splitters:
            yield part
            part = ''
        else:
            part += character
    yield part
826704
def split_by_value( total, nodes, headdivisor=2.0 ):
    """"""
    head_sum,tail_sum = 0,0
    divider = 0
    for node in nodes[::-1]:
        if head_sum < total/headdivisor:
            head_sum += node[0]
            divider -= 1
        else:
            break
    return (head_sum,nodes[divider:]),(total-head_sum,nodes[:divider])
663872
def split(self, indices_or_sections, axis=0):
        """"""
        if not isinstance(indices_or_sections, numbers.Integral):
            raise Error('splitting by array of indices is not yet implemented')
        n = indices_or_sections
        if self.shape[axis] % n != 0:
            raise ValueError("Array split doesn't result in an equal division")
        step = self.shape[axis] / n
        pieces = []
        start = 0
        while start < self.shape[axis]:
            stop = start + step
            ix = [slice(None)] * self.ndim
            ix[axis] = slice(start, stop)
            ix = tuple(ix)
            pieces.append(self[ix])
            start += step
        return pieces
392802
def split_option(self, section, option):
		
		value = self[section][option].strip()
		if value == "":
			return []
		return [x.strip() for x in (value.split(","))]
636086
def segment(self):
        
        # half the height
        half = self.primitive.height / 2.0
        # apply the transform to the Z- aligned segment
        points = np.dot(
            self.primitive.transform,
            np.transpose([[0, 0, -half, 1], [0, 0, half, 1]])).T[:, :3]
        return points
173448
def slice_into_pieces(seq, n):
    """"""
    length = len(seq)
    if length % n == 0:
        size = length // n
    else:
        size = length // n + 1
    for it in slice_by_size(seq, size):
        yield it