Generate a list of 10 numbers.
15964
def do_list(self, arglist: List[str]) -> None:
        """"""
        if arglist:
            first = arglist[0]
            try:
                first = int(first)
            except ValueError:
                first = 1
        else:
            first = 1
        last = first + 10

        for x in range(first, last):
            self.poutput(str(x))
208038
def mix_generators(generator_list):
  """"""
  i = 0
  l = len(generator_list)
  stopiters_seen = 0
  while stopiters_seen <= l:
    try:
      yield six.next(generator_list[i % l])
      i += 1
      stopiters_seen = 0
    except StopIteration:
      i += 1
      stopiters_seen += 1
1024286
def simulate(self):
        """"""
        # Simulates zero to 10 types
        return [t.simulate() for t in itertools.islice(self, random.choice(range(10)))]
621970
def numlistbetween(num1, num2, option='list', listoption='string'):
    
    if option == 'list':
        if listoption == 'string':
            output = ''
            output += str(num1)
            for currentnum in range(num1 + 1, num2 + 1):
                output += ','
                output += str(currentnum)
        elif listoption == 'list':
            output = []
            for currentnum in range(num1, num2 + 1):
                output.append(str(currentnum))
            return output
    elif option == 'count':
        return num2 - num1
1033631
def list(self, count=10):
    
    import IPython
    data = []
    # Add range(count) to loop so it will stop either it reaches count, or iteration
    # on self is exhausted. "self" is iterable (see __iter__() method).
    for _, model in zip(range(count), self.get_iterator()):
      element = {'name': model['name']}
      if 'defaultVersion' in model:
        version_short_name = model['defaultVersion']['name'].split('/')[-1]
        element['defaultVersion'] = version_short_name
      data.append(element)

    IPython.display.display(
        datalab.utils.commands.render_dictionary(data, ['name', 'defaultVersion']))
74139
def build_list(self):
        """"""
        ret = []
        for p in self.args.stdout.split(','):
            if '.' in p:
                p, a = p.split('.')
            else:
                a = None
            ret.append((p, a))
        return ret
182338
def _chunk_list(l, n):
    """"""
    for i in range(0, len(l), n):
        yield l[i:i + n]
1099470
def generateExpectedList(numUniqueFeatures, numLocationsPerObject, maxNumObjects):
  
  # We're choosing a location, checking its feature, and checking how many
  # *other* occurrences there are of this feature. So we check n - 1 locations.
  maxNumOtherLocations = maxNumObjects*10 - 1

  results = zip(itertools.count(1),
                findBinomialNsWithExpectedSampleMinimum(
                  itertools.count(1), 1./numUniqueFeatures, numLocationsPerObject,
                  maxNumOtherLocations))

  finalResults = [(numOtherLocations, interpolatedN / numLocationsPerObject)
                  for numOtherLocations, (interpolatedN, _, _) in results]

  return [(0, 0.)] + finalResults
561900
def generateFeatures(numFeatures):
  
  # Capital letters, lowercase letters, numbers
  candidates = ([chr(i+65) for i in xrange(26)] +
                [chr(i+97) for i in xrange(26)] +
                [chr(i+48) for i in xrange(10)])

  if numFeatures > len(candidates):
    candidates = ["F{}".format(i) for i in xrange(numFeatures)]
    return candidates

  return candidates[:numFeatures]
352798
def make_data(n,m):
    """"""
    p = {}
    for i in range(1,m+1):
        for j in range(1,n+1):
            p[i,j] = random.randint(1,10)
    return p
1225139
def generate(length):
    """"""
    if not isinstance(length, int) or length < 2:
        raise TypeError('length must be a positive integer greater than 1.')

    # first digit cannot be 0
    digits = [random.randint(1, 9)]

    for i in range(length-2):
        digits.append(random.randint(0, 9))
    digits.append(get_check_digit(''.join(map(str, digits))))

    return ''.join(map(str, digits))
612547
def p_generate_items(self, p):
        ''
        p[0] = p[1] + (p[2],)
        p.set_lineno(0, p.lineno(1))
1251693
function randNum (n) {
  let sNum = ''
  for (let i = 0; i < n; i++) {
    sNum += tools.rnd(0, 9)
  }
  return sNum
}
1364196
def generate_classes(self, items):
        ""
        classes = set()
        for c in items: classes = classes.union(set(c))
        classes = list(classes)
        classes.sort()
        return classes
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
103450
def base10toN(num, n):
    """"""
    num_rep = {10:'a',
         11:'b',
         12:'c',
         13:'d',
         14:'e',
         15:'f',
         16:'g',
         17:'h',
         18:'i',
         19:'j',
         20:'k',
         21:'l',
         22:'m',
         23:'n',
         24:'o',
         25:'p',
         26:'q',
         27:'r',
         28:'s',
         29:'t',
         30:'u',
         31:'v',
         32:'w',
         33:'x',
         34:'y',
         35:'z'}
    new_num_string = ''
    new_num_arr = array(())
    current = num
    while current != 0:
        remainder = current % n
        if 36 > remainder > 9:
            remainder_string = num_rep[remainder]
        elif remainder >= 36:
            remainder_string = '(' + str(remainder) + ')'
        else:
            remainder_string = str(remainder)
        new_num_string = remainder_string + new_num_string
        new_num_arr = r_[remainder, new_num_arr]
        current = current / n
    print(new_num_arr)
    return new_num_string
490223
def r_get_numbers(matchgroup, num):
    """"""
    res = []
    for i in range(num):
        res.append(float(matchgroup.next().group()))
    return np.array(res)