array version of only show "n:k:x" from each of the long strings:
548106
private static String printAsShort(String[] kPieces)
    {
        String ret;

        String sep = "";
        ret = "";
        for (String s : kPieces)
        {
            ret += sep;
            sep = ", ";
            ret = ret + printAsShort(s);
        }
        return ret;
    }
795571
def p_array(self,t):
    
    if len(t)==4: t[0] = ArrayLit(t[2].children)
    elif len(t)==5: t[0] = ArrayLit(t[3].children)
    else: raise NotImplementedError('unk_len',len(t)) # pragma: no cover
158397
function(str) {
    var T = this, k, child, ret = [];
    if (str === undefined) {
      str = "";
    }
    if (T === undefined) {
      return [];
    }
    if (T.words > 0) {
      ret.push(str);
    }
    for (k in T.children) {
      if (T.children.hasOwnProperty(k)) {
        child = T.children[k];
        ret = ret.concat(child.getAllWords(str + k));
      }
    }
    return ret;
  }
459601
public static int[] getMatchNos(String[] strings, String[] s) {
        int[] nos = new int[s.length];
        for (int i = 0, j = 0; i < strings.length; i++) {
            for (int k = 0; k < s.length; k++) {
                if (s[k].equals(strings[i])) {
                    nos[j] = i;
                    j++;
                }
            }
        }
        return nos;
    }
873670
def codes_get_long_array(handle, key, size):
    # type: (cffi.FFI.CData, str, int) -> T.List[int]
    
    values = ffi.new('long[]', size)
    size_p = ffi.new('size_t *', size)
    _codes_get_long_array(handle, key.encode(ENC), values, size_p)
    return list(values)
304840
def toString(self):
        
        result = []
        k, v = self.optimalRepr()
        longest = reduce(lambda x, y: x if x > len(y) else len(y), k, 0)
        for ind in range(len(k)):
            result.append("%s : %s" % (k[ind].ljust(longest), v[ind]))
        return "\n".join(result)
364192
function repeatString(str, len) {
  return Array.apply(null, {length: len + 1}).join(str).slice(0, len)
}
1197159
function(array, n, pad) {
      var p = function(array) {
        if (array == null) return [];

        var part = _.take(array, n);

        if (n === _.size(part)) {
          return _.cons(part, p(_.drop(array, n)));
        }
        else {
          return pad ? [_.take(_.cat(part, pad), n)] : [];
        }
      };

      return p(array);
    }
762239
def run_length_decode(in_array):
    """"""
    switch=False
    out_array=[]
    in_array = in_array.tolist()
    for item in in_array:
        if switch==False:
            this_item = item
            switch=True
        else:
            switch=False
            out_array.extend([this_item]*int(item))
    return numpy.asarray(out_array, dtype=numpy.int32)
1119393
function stringifyArray( arr, indent ) {
  var hasMoreThanOneItem = arr.length > 1;
  if ( hasMoreThanOneItem ) {
    var out = '[';
    arr.forEach( function( itm, idx ) {
      if ( idx > 0 )
        out += ",";
      out += "\n" + indent + itm;
    });
    return out + "]";
  } else {
    return "[" + ( arr.length == 1 ? arr[0] : '' ) + "]";
  }
}
1343636
function randData (o, n) {
  if (!o) {
    return ''
  }
  let a = o instanceof Array ? o : (String(o)).split('')
  let len = a.length - 1
  let str = ''
  for (let i = 0; i < n; i++) {
    str += a[tools.rnd(0, len)]
  }
  return str
}
1273043
def stringify_comment_array comments
      ctxt = ''
      num = nil
      started = false
      last_line = nil
      comments.each { |l|
        # Trim the comment and minimum leading whitespace
        p = l.text.gsub(/^#+/, '')
        if num.nil? and !p.strip.empty?
          num = p.index(/[^ ]/)
          started = true
        elsif started and !p.strip.empty?
          cur = p.index(/[^ ]/)
          num = cur if cur < num
        end
        # Include blank lines between comments
        ctxt += ("\n" * (l.loc.first_line - last_line - 1)) unless last_line.nil? || l.loc.first_line - last_line <= 0
        ctxt += "#{p[num..-1]}\n" if started
        last_line = l.loc.last_line if last_line.nil? || l.loc.last_line > last_line
      }
      ctxt
    end
48538
def sortkey(x):
    """"""
    k = str(x[1]).zfill(3) + str(x[2]).zfill(3) + str(x[3]).zfill(3)
    return k
587101
def array_indented(level: int, l: List[str], quote_char='\'', comma_after=False) -> str:
    
    out = "[\n"
    for x in l:
        out += (((level+1) * 4) * " ") + '{}{}{}'.format(quote_char, x, quote_char) + ",\n"
    out += ((level * 4) * " ") + "]"
    if comma_after:
        out += ","
    return out
780413
function dataAlasis(d, k, l) {
    k = k || [];
    if (Array.isArray(d)) {
        var key = k[l];
        for (var i = 0; i < d.length; i++) {
            var item = d[i];
            var crtData = item[key] || [];
            l && (l = k.indexOf(key));
            if (l == keyLength - 1) {
                filterCtt.push(crtData);
            }
            else {
                l++;
                arguments.callee(crtData, k, l);
            }
        }
    }
    else {
        var subData = d[k[l]];
        l++;
        if (subData) {
            arguments.callee(subData, k, l);
        }
    }
}
354242
private static int lineSeparatorIndex(char[] array, int length) {
        for (int k = 0; k < length; k++) {
            if (isLineSeparator(array[k])) {
                return k;
            }
        }
        return -1;
    }
504514
private static int getMaxStringLength(String[] names) {
		int size = 0;
		for(String s : names) {
			if(s.length()>size) {
				size = s.length();
			}
		}
		return size;
	}