Generate each `a:tc` element in topmost row of range.
762710
def iter_top_row_tcs(self):
        """"""
        tr = self._tbl.tr_lst[self._top]
        for tc in tr.tc_lst[self._left:self._right]:
            yield tc
916413
def _generatePattern(self, numBits, totalSize):
    
    cellsIndices = range(totalSize)
    random.shuffle(cellsIndices)
    return set(cellsIndices[:numBits])
1068492
def items(self):
        """"""
        keycol = self._keycol
        for row in self.__iter__():
            yield (row[keycol], dict(row))
1023457
def row_coordinates(self, X):
        """"""
        utils.validation.check_is_fitted(self, 's_')

        # Check input
        if self.check_input:
            utils.check_array(X, dtype=[str, np.number])

        # Prepare input
        X = self._prepare_input(X)

        return self._row_coordinates_from_global(self._build_X_global(X))
1173510
def rows(self):
        
        with self.input().open('r') as fobj:
            for line in fobj:
                yield line.strip('\n').split('\t')
1273477
function() {
      var i, j, col1, col2;
      var from = this.originalTable.startIndex;
      var to = this.originalTable.endIndex;
      /* Find children thead and tbody.
       * Only to process the immediate tr-children. Bugfix for inner tables
       */
      var thtb = this.originalTable.el.children();
      if (this.options.excludeFooter) {
        thtb = thtb.not('tfoot');
      }
      if (from < to) {
        for (i = from; i < to; i++) {
          col1 = thtb.find('> tr > td:nth-child(' + i + ')')
            .add(thtb.find('> tr > th:nth-child(' + i + ')'));
          col2 = thtb.find('> tr > td:nth-child(' + (i + 1) + ')')
            .add(thtb.find('> tr > th:nth-child(' + (i + 1) + ')'));
          for (j = 0; j < col1.length; j++) {
            swapNodes(col1[j], col2[j]);
          }
        }
      } else {
        for (i = from; i > to; i--) {
          col1 = thtb.find('> tr > td:nth-child(' + i + ')')
            .add(thtb.find('> tr > th:nth-child(' + i + ')'));
          col2 = thtb.find('> tr > td:nth-child(' + (i - 1) + ')')
            .add(thtb.find('> tr > th:nth-child(' + (i - 1) + ')'));
          for (j = 0; j < col1.length; j++) {
            swapNodes(col1[j], col2[j]);
          }
        }
      }
    }
1129148
def _get_cells(self, row):
        """"""

        childnodes = row.childNodes
        qname_childnodes = [(s.qname[1], s) for s in childnodes]
        return [node for name, node in qname_childnodes
                if name == u'table-cell']
102316
def _build_row(self, row, parent, align, border):
        
        tr = etree.SubElement(parent, 'tr')
        tag = 'td'
        if parent.tag == 'thead':
            tag = 'th'
        cells = self._split_row(row, border)
        # We use align here rather than cells to ensure every row
        # contains the same number of columns.
        for i, a in enumerate(align):
            c = etree.SubElement(tr, tag)
            try:
                c.text = cells[i].strip()
            except IndexError:
                c.text = ""
            if a:
                c.set('align', a)
465860
def children(self):
        """""""
        for c in self.table.columns:
            if c.parent == self.name and  not c.valuetype_class.is_label():
                yield c
420776
def _tabulate(rows, headers, spacing=5):
    """"""
    if len(rows) == 0:
        return "None\n"
    assert len(rows[0]) == len(headers)
    count = len(rows[0])
    widths = [0 for _ in range(count)]
    rows = [headers] + rows

    for row in rows:
        for index, field in enumerate(row):
            if len(str(field)) > widths[index]:
                widths[index] = len(str(field))

    output = ""
    for row in rows:
        for index, field in enumerate(row):
            field = str(field)
            output += field + (widths[index] - len(field) + spacing) * " "
        output += "\n"
    return output
625773
def colgen(*lstcol,**kargs):
    """"""
    if len(lstcol) < 2:
        lstcol *= 2
    trans = kargs.get("trans", lambda x,y,z: (x,y,z))
    while 1:
        for i in range(len(lstcol)):
            for j in range(len(lstcol)):
                for k in range(len(lstcol)):
                    if i != j or j != k or k != i:
                        yield trans(lstcol[(i+j)%len(lstcol)],lstcol[(j+k)%len(lstcol)],lstcol[(k+i)%len(lstcol)])
339844
def generate(self):
    """"""
    header = ' '.join('=' * self.width[i] for i in range(self.w))
    lines = [
        ' '.join(row[i].ljust(self.width[i]) for i in range(self.w))
        for row in self.rows]
    return [header] + lines + [header]
896935
def get_row_generator(self, ref, cache=None):

        """"""
        from inspect import isgenerator
        from rowgenerators import get_generator

        g = get_generator(ref)

        if not g:
            raise GenerateError("Cant figure out how to generate rows from {} ref: {}".format(type(ref), ref))
        else:
            return g
1168758
def rowxcol(row, col):
    """"""
    row = row.reshape(4, 4)
    col = col.reshape(4, 8)
    ret = uint2exprs(0, 8)
    for i in range(4):
        for j in range(4):
            if row[i, j]:
                ret ^= xtime(col[i], j)
    return ret
1259847
def chunks(lst, size):
    """"""
    for i in xrange(0, len(lst), size):
        yield lst[i:i + size]
82050
def _GenerateStopTimesTuples(self):
    """"""
    stoptimes = self.GetStopTimes()
    for i, st in enumerate(stoptimes):
      yield st.GetFieldValuesTuple(self.trip_id)
290252
function getRows (elements, row) {
  if (!row) {
    return [ elements ]
  }

  let lastOffset = false

  return elements.reduce((rows, el) => {

    if (lastOffset !== el.offsetTop) {
      rows.push([el])
    } else {
      rows[rows.length - 1].push(el)
    }

    lastOffset = el.offsetTop

    return rows

  }, [])
}