Returns a list containing first n digits of Pi
970596
def getPiLeibniz(n):
    
    mypi = piGenLeibniz()
    result = []
    if n > 0:
        result += [next(mypi) for i in range(n)]
    mypi.close()
    return result
1094461
def enumerated_list(self, nth, text):
        
        if not isinstance(nth, int):
            raise Exception("'nth' argument has to be an integer!")
        return "{nth}. {text}".format(nth=nth, text=text)
470397
def pull(iterable, n):
    
    fifo = collections.deque(maxlen=n)
    for i in iterable:
        fifo.append(i)
    return list(fifo)
555307
def primes(n):
    
    if n==2:
        return [2]
    elif n<2:
        return []
    s=list(range(3,n+1,2))
    mroot = n ** 0.5
    half=(n+1)//2-1
    i=0
    m=3
    while m <= mroot:
        if s[i]:
            j=(m*m-3)//2
            s[j]=0
            while j<half:
                s[j]=0
                j+=m
        i=i+1
        m=2*i+3
    return [2]+[x for x in s if x]
735002
function(digits, n) {
		n = n.toString();
		while(n.length < digits)
		n = '0' + n;
		return n;
	}
473229
def getPiLambert(n):
    
    mypi = piGenLambert()
    result = []
    if n > 0:
        result += [next(mypi) for i in range(n)]
    mypi.close()
    return result
1359477
def from_list(a, order='F'):
        
        d = len(a)  # Number of cores
        res = vector()
        n = _np.zeros(d, dtype=_np.int32)
        r = _np.zeros(d+1, dtype=_np.int32)
        cr = _np.array([])
        for i in xrange(d):
            cr = _np.concatenate((cr, a[i].flatten(order)))
            r[i] = a[i].shape[0]
            r[i+1] = a[i].shape[2]
            n[i] = a[i].shape[1]
        res.d = d
        res.n = n
        res.r = r
        res.core = cr
        res.get_ps()
        return res
364509
def ones(n, d=None):
    
    c = _vector.vector()
    if d is None:
        c.n = _np.array(n, dtype=_np.int32)
        c.d = c.n.size
    else:
        c.n = _np.array([n] * d, dtype=_np.int32)
        c.d = d
    c.r = _np.ones((c.d + 1,), dtype=_np.int32)
    c.get_ps()
    c.core = _np.ones(c.ps[c.d] - 1)
    return c
631177
function(n) {
    n = _.isInteger(n) ? n : 0

    return {
      x: n,
      y: n,
      data: _.map(_.range(n), function (num) {
        return [num]
      })
    }
  }
1221882
def blocks2numList(blocks, n):
    """"""
    toProcess = copy.copy(blocks)
    returnList = []
    for numBlock in toProcess:
        inner = []
        for i in range(0, n):
            inner.append(numBlock % 256)
            numBlock >>= 8
        inner.reverse()
        returnList.extend(inner)
    return returnList
255994
def p_lconst_list(self, p):
        ''''''
        if len(p) == 4:
            p[1].append(p[3])
            p[0] = p[1]
        elif len(p) == 2:
            p[0] = [p[1]]
455397
def _get_digit_list(alist: [str], from_index: int) -> ([str], [str]):  # type: ignore
    
    ret = []
    alist.pop(from_index)
    while len(alist) > from_index and alist[from_index].isdigit():
        ret.append(alist.pop(from_index))
    return alist, ret
1146750
def numericalize(self, t:Collection[str]) -> List[int]:
        ""
        return [self.stoi[w] for w in t]
498969
def _len_list(obj):
    '''
    '''
    n = len(obj)
     # estimate over-allocation
    if n > 8:
       n += 6 + (n >> 3)
    elif n:
       n += 4
    return n
245405
def nth(iterable, n, default=None):
        

        if type(n) != int:
            raise TypeError("n is not an integer")

        return next(islice(iterable, n, None), default)
738352
private String getNth(int n, List<String> list, String typeName) {
		if (n < 0) {
			throw new FuzzerException(name + ": " + n + ": " + typeName + " reference must be positive");
		}
		if (n >= list.size()) {
			throw new FuzzerException(name + ": " + n + " illegal " + typeName + " position");
		}
		return list.get(n);
	}
650167
def pretty_print(n):
    """"""
    if type(n) != int:
        return n

    ret = []
    n = str(n)
    for i in range(len(n) - 1, -1, -1):
        ret.append(n[i])
        if (len(n) - i) % 3 == 0:
            ret.append(',')
    ret.reverse()
    return ''.join(ret[1:]) if ret[0] == ',' else ''.join(ret)