Split the given comma separated value to multiple integer values.
9417
def lengths_offsets(value):
    
    values = []
    for item in value.split(','):
        item = int(item)
        values.append(item)
    return values
1041581
private function setSplit($key, $value)
    {
        $values = str_split($value, self::VALUE_SPLIT_SIZE);

        $to_set       = array();
        $to_set[$key] = self::VALUE_SPLIT.count($values);

        foreach ($values as $part_nr => $v) {
            $to_set[$key.$part_nr] = $v;
        }

        if (false === $this->memcached->setMulti($to_set)) {
            $msg = sprintf(
                'Unable to store split values for key "%s": %s.',
                $key,
                $this->memcached->getResultMessage()
            );

            $this->getLogger()->log(LogLevel::NOTICE, $msg);
            throw new \RuntimeException($msg);
        }

        return $value;
    }
999399
public static String[] split(String str, char separator) {
    final int len;
    if (str == null 
        || ((len = str.length()) == 0)) {
      return null;
    }

    List<String> componentList = new ArrayList<String>();
    int startIndex = 0;

    for (int i = 0; i < len; i++) {
      if (str.charAt(i) == separator) {
        componentList.add(str.substring(startIndex, i));
        startIndex = i + 1;
      }
    }

    if (str.charAt(len - 1) != separator) {
      componentList.add(str.substring(startIndex, len));
    }

    return componentList.toArray(new String[componentList.size()]);
  }
644900
void splitKeyVal(byte[] line, int length, Text key, Text val)
  throws IOException {
    int numKeyFields = getNumOfKeyFields();
    byte[] separator = getFieldSeparator();
    
    // Need to find numKeyFields separators
    int pos = UTF8ByteArrayUtils.findBytes(line, 0, length, separator);
    for(int k=1; k<numKeyFields && pos!=-1; k++) {
      pos = UTF8ByteArrayUtils.findBytes(line, pos + separator.length, 
          length, separator);
    }
    try {
      if (pos == -1) {
        key.set(line, 0, length);
        val.set("");
      } else {
        StreamKeyValUtil.splitKeyVal(line, 0, length, key, val, pos, separator.length);
      }
    } catch (CharacterCodingException e) {
      LOG.warn(StringUtils.stringifyException(e));
    }
  }
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
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
776695
function splitNesting(value) {
    value = value.trim();
    var result = [];
    var accum = '';
    var depth = 0;
    for (var offset = 0; offset < value.length; offset++) {
        var c = value[offset];
        if (c === ',' && depth === 0) {
            result.push(accum);
            accum = '';
        }
        else {
            accum += c;
            if (c === '(') {
                depth++;
            }
            else if (c === ')') {
                depth--;
                if (depth === -1) {
                    throw new Error('unbalanced parenthsis');
                }
            }
        }
    }
    if (accum) {
        result.push(accum);
    }
    return result;
}
512343
private void split() throws IOException {
        hasSplit = true;
        IntegerBuffer before = new IntegerBuffer();
        IntegerBuffer after = new IntegerBuffer();

        int current;
        boolean ready = false;
        boolean stillNeedToSeeDoctype = true;
        while (!ready && (current = original.read()) != -1) {
            if (Character.isWhitespace((char) current)) {
                before.append(current);
            } else if (current == '<') {
                // could be XML declaration, comment, PI, DOCTYPE
                // or the first element
                int[] elementOrDeclOr = readUntilCloseCharIsReached();
                if (elementOrDeclOr.length > 0) {
                    if (elementOrDeclOr[0] == '?') {
                        // XML declaration or PI
                        before.append('<');
                        before.append(elementOrDeclOr);
                    } else if (elementOrDeclOr[0] != '!') {
                        // first element
                        after.append('<');
                        after.append(elementOrDeclOr);
                        stillNeedToSeeDoctype = false;
                        ready = true;
                    } else {
                        // comment or doctype
                        IntegerBuffer b =
                            new IntegerBuffer(elementOrDeclOr.length);
                        b.append(elementOrDeclOr);
                        if (b.indexOf(DOCTYPE_INTS) == -1) {
                            after.append('<');
                            after.append(elementOrDeclOr);
                        } else {
                            // swallow old declaration
                            stillNeedToSeeDoctype = false;
                        }
                        ready = true;
                    }
                } else {
                    after.append('<');
                    stillNeedToSeeDoctype = false;
                    ready = true;
                }
            } else {
                after.append(current);
                stillNeedToSeeDoctype = false;
                ready = true;
            }
        }

        // need to eliminate original DOCTYPE if it exists
        while (stillNeedToSeeDoctype && (current = original.read()) != -1) {
            if (Character.isWhitespace((char) current)) {
                after.append(current);
            } else if (current == '<') {
                int[] elementOrDeclOr = readUntilCloseCharIsReached();
                if (elementOrDeclOr.length > 0) {
                    if (elementOrDeclOr[0] == '?') {
                        // PI
                        after.append('<');
                        after.append(elementOrDeclOr);
                    } else if (elementOrDeclOr[0] != '!') {
                        // first element
                        after.append('<');
                        after.append(elementOrDeclOr);
                        stillNeedToSeeDoctype = false;
                    } else {
                        // comment or doctype
                        IntegerBuffer b =
                            new IntegerBuffer(elementOrDeclOr.length);
                        b.append(elementOrDeclOr);
                        if (b.indexOf(DOCTYPE_INTS) == -1) {
                            after.append('<');
                            after.append(elementOrDeclOr);
                        } else {
                            // swallow old declaration
                            stillNeedToSeeDoctype = false;
                        }
                    }
                } else {
                    after.append('<');
                    stillNeedToSeeDoctype = false;
                }
            } else {
                after.append(current);
                stillNeedToSeeDoctype = false;
            }
        }

        beforeDoctype = before.size() > 0
            ? new IntBufferReadable(before) : null;
        afterDoctype = after.size() > 0
            ? new IntBufferReadable(after) : null;
    }
1204061
@Transformer
    public static String[] divide(Object o, String sep) {
        return str(o).split(sep);
    }
408369
protected List<BigInteger> split(
      BigInteger start,
      BigInteger range,
      BigInteger ringEnd,
      BigInteger ringLength,
      int numberOfSplits) {
    BigInteger[] tmp = range.divideAndRemainder(BigInteger.valueOf(numberOfSplits));
    BigInteger divider = tmp[0];
    int remainder = tmp[1].intValue();

    List<BigInteger> results = Lists.newArrayListWithExpectedSize(numberOfSplits - 1);
    BigInteger current = start;
    BigInteger dividerPlusOne =
        (remainder == 0)
            ? null // won't be used
            : divider.add(BigInteger.ONE);

    for (int i = 1; i < numberOfSplits; i++) {
      current = current.add(remainder-- > 0 ? dividerPlusOne : divider);
      if (ringEnd != null && current.compareTo(ringEnd) > 0) current = current.subtract(ringLength);
      results.add(current);
    }
    return results;
  }
398959
function SplitIndex(s) {
        var spl = s.split(spDelim);
        this.id = spl[0];
        this.value = spl[1];
    }
381878
public void appendCountValue(int count, int integralDigits, 
                               int decimalDigits, StringBuffer sb) {
    int ival = count / 1000;
    if (decimalDigits == 0) {
      appendInteger(ival, integralDigits, 10, sb);
      return;
    }

    if (dr.requiresDigitSeparator && sb.length() > 0) {
      sb.append(' ');
    }
    appendDigits(ival, integralDigits, 10, sb);
    int dval = count % 1000;
    if (decimalDigits == 1) {
      dval /= 100;
    } else if (decimalDigits == 2) {
      dval /= 10;
    }
    sb.append(dr.decimalSep);
    appendDigits(dval, decimalDigits, decimalDigits, sb);
    if (dr.requiresDigitSeparator) {
      sb.append(' ');
    }
  }
376258
public static Iterable<String> split(String separator, String stringToSplit) {

    String[] StringArray = stringToSplit.split(separator);

    Iterable<String> iterable = Arrays.asList(StringArray);

    return iterable;
  }
645698
public static Integer[] splitNumSeq(final String numSeq) {
    if (isEmpty(numSeq)) { return null; }
    String[] numArray = split(numSeq, ',');
    Set<Integer> numSet = CollectUtils.newHashSet();
    for (int i = 0; i < numArray.length; i++) {
      String num = numArray[i];
      if (num.contains("-")) {
        String[] termFromTo = split(num, '-');
        int from = Numbers.toInt(termFromTo[0]);
        int to = Numbers.toInt(termFromTo[1]);
        for (int j = from; j <= to; j++) {
          numSet.add(Integer.valueOf(j));
        }
      } else {
        numSet.add(new Integer(num));
      }
    }
    Integer[] nums = new Integer[numSet.size()];
    numSet.toArray(nums);
    return nums;
  }
1129071
def split_comma_argument(comma_sep_str):
    """"""
    terms = []
    for term in comma_sep_str.split(','):
        if term:
            terms.append(term)
    return terms
815707
private static void splitMult(double a[], double b[], double ans[]) {
        ans[0] = a[0] * b[0];
        ans[1] = a[0] * b[1] + a[1] * b[0] + a[1] * b[1];

        /* Resplit */
        resplit(ans);
    }
1085364
def intcomma(value):
    """"""
    try:
        if isinstance(value, compat.string_types):
            float(value.replace(',', ''))
        else:
            float(value)
    except (TypeError, ValueError):
        return value
    orig = str(value)
    new = re.sub("^(-?\d+)(\d{3})", '\g<1>,\g<2>', orig)
    if orig == new:
        return new
    else:
        return intcomma(new)