Turn a list like [(65,97), (66, 98), ..., (90,122)]
     into [(65, 90, +32)].
172594
def _MakeRanges(pairs):
  """"""
  ranges = []
  last = -100

  def evenodd(last, a, b, r):
    if a != last+1 or b != _AddDelta(a, r[2]):
      return False
    r[1] = a
    return True

  def evenoddpair(last, a, b, r):
    if a != last+2:
      return False
    delta = r[2]
    d = delta
    if type(delta) is not str:
      return False
    if delta.endswith('Skip'):
      d = delta[:-4]
    else:
      delta = d + 'Skip'
    if b != _AddDelta(a, d):
      return False
    r[1] = a
    r[2] = delta
    return True

  for a, b in pairs:
    if ranges and evenodd(last, a, b, ranges[-1]):
      pass
    elif ranges and evenoddpair(last, a, b, ranges[-1]):
      pass
    else:
      ranges.append([a, a, _Delta(a, b)])
    last = a
  return ranges
496068
def as_list(x):
    ''''''
    
    if x is None:
        x = []
    elif not isinstance(x, Sequence):
        x = [x]
    return list(x)
417545
def flatten(l, types=(list, float)):
    
    l = [item if isinstance(item, types) else [item] for item in l]
    return [item for sublist in l for item in sublist]
198059
def flatten(self, l):
        """"""
        if l == []:
            return l
        if isinstance(l[0], list):
            return self.flatten(l[0]) + self.flatten(l[1:])
        return l[:1] + self.flatten(l[1:])
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))
1112883
def chunks(some_list: List, n: int) -> Iterable[List]:
    """"""
    for i in range(0, len(some_list), n):
        yield some_list[i:i + n]
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
1326228
function (m, n) {
      n %= 64
      if (n === 32) {
        return [m[1], m[0]]
      } else if (n < 32) {
        return [(m[0] << n) | (m[1] >>> (32 - n)), (m[1] << n) | (m[0] >>> (32 - n))]
      } else {
        n -= 32
        return [(m[1] << n) | (m[0] >>> (32 - n)), (m[0] << n) | (m[1] >>> (32 - n))]
      }
    }
994313
def flatten(*sequence):
        """"""
        result = []
        for entry in sequence:
            if isinstance(entry, list):
                result += Select.flatten(*entry)
            elif isinstance(entry, tuple):
                result += Select.flatten(*entry)
            else:
                result.append(entry)
        return result
795187
def split(s):
  """"""
  l = [_split(x) for x in _SPLIT_RE.split(s)]
  return [item for sublist in l for item in sublist]
164576
def get_numbers(s):
    """"""

    result = map(int, re.findall(r'[0-9]+', unicode(s)))
    return result + [1] * (2 - len(result))
1062377
def flatten(in_list):
    """"""
    out_list = []
    for val in in_list:
        if isinstance(val, list):
            out_list.extend(val)
        else:
            out_list.append(val)

    return out_list
30986
def number(items):
    """"""
    n = len(items)
    if n == 0:
        return items
    places = str(int(math.log10(n) // 1 + 1))
    format = '[{0[0]:' + str(int(places)) + 'd}] {0[1]}'
    return map(
        lambda x: format.format(x),
        enumerate(items)
    )
761945
def flatten_list(multiply_list):
    
    if isinstance(multiply_list, list):
        return [rv for l in multiply_list for rv in flatten_list(l)]
    else:
        return [multiply_list]
1356233
def extendlist(lst, i, value=''):
    """"""
    if i < len(lst):
        pass
    else:
        lst.extend([value, ] * (i - len(lst) + 1))
1207842
function addToList(i, L, R) {
    R[L[i + 1]] = R[i];
    L[R[i]] = L[i + 1];
    R[i] = i + 1;
    L[i + 1] = i;
}
1133682
def splits(self):
        
        return list(map(lambda x: self.select_code(x), self.code))