Get the number of rows similar to row which precede the index `until`
354698
def _get_num_similar_rows(self, row, until=None):
        """"""
        return len(list(filter(lambda r: row == r, self.dataset[:until])))
1019360
def get_number_of_rows(dbcon, tablename, uuid=None):
    
    dbcur = dbcon.cursor()
    if check_table_exists(dbcon, tablename):
        if uuid:
            dbcur.execute("SELECT COUNT(*) FROM '{name}' WHERE UUID='{uuid}'".format(name=tablename, uuid=uuid))
        else:
            dbcur.execute("SELECT COUNT(*) FROM '{name}'".format(name=tablename))
        try:
            result = dbcur.fetchone()[0]
        except (TypeError, IndexError) as e:
            logger.error(e)
            result = 0
        dbcur.close()
        return result if isinstance(result, (int, long, float)) else 0
    else:
        return 0
518789
function getSameColumnCount(currentColumn, prevColumn) {
    var index = 0;
    var len = Math.min(currentColumn.length, prevColumn.length);

    for (; index < len; index += 1) {
        if (currentColumn[index].name !== prevColumn[index].name) {
            break;
        }
    }

    return index;
}
1154624
def next(self):
        
        if self.rows is None:
            raise ProgrammingError(
                "No result available. " +
                "execute() or executemany() must be called first."
            )
        elif not self._closed:
            return next(self.rows)
        else:
            raise ProgrammingError("Cursor closed")
214013
def rowCount(self, index=None):
        """"""
        if self.axis == 0:
            return max(1, self._shape[0])
        else:
            if self.total_rows <= self.rows_loaded:
                return self.total_rows
            else:
                return self.rows_loaded
145467
def _findRow(subNo, model):
    """"""
    items = model.findItems(str(subNo))
    if len(items) == 0:
        return None
    if len(items) > 1:
        raise IndexError("Too many items with sub number %s" % subNo)
    return items[0].row()
291094
def row(self):
        """"""
        if self.parent is not None:
            children = self.parent.getChildren()
            # The index method of the list object.
            return children.index(self)
        else:
            return 0
748677
function(data){
			var rows = this.calculateRowsNumber();
			var datas = [];
			for(var i = 0; i < data.length; i += rows){
				datas.push(data.slice(i, i+rows));
			}
			return datas;
		}
800897
def rows(self):
        

        yield [self.index.name] + list(self.columns)

        for t in self.itertuples():
            yield list(t)
54145
private int findRow(int rangeStart) {
        int index = 0;

        // check the vicinity of the last-seen row (start
        // searching with an unrolled loop)

        index = prevRow * columns;
        if (rangeStart >= v[index]) {
            if (rangeStart < v[index + 1]) {
                // same row as last seen
                return index;
            } else {
                index += columns;
                if (rangeStart < v[index + 1]) {
                    ++prevRow;
                    return index;
                } else {
                    index += columns;
                    if (rangeStart < v[index + 1]) {
                        prevRow += 2;
                        return index;
                    } else if ((rangeStart - v[index + 1]) < 10) {
                        // we are close, continue looping
                        prevRow += 2;
                        do {
                            ++prevRow;
                            index += columns;
                        } while (rangeStart >= v[index + 1]);
                        return index;
                    }
                }
            }
        } else if (rangeStart < v[1]) {
            // the very first row
            prevRow = 0;
            return 0;
        }

        // do a binary search for the start of the range
        int start = 0;
        int mid = 0;
        int limit = rows;
        while (start < limit - 1) {
            mid = (start + limit) / 2;
            index = columns * mid;
            if (rangeStart < v[index]) {
                limit = mid;
            } else if (rangeStart < v[index + 1]) {
                prevRow = mid;
                return index;
            } else {
                start = mid;
            }
        }

        // must be found because all ranges together always cover
        // all of Unicode
        prevRow = start;
        index = start * columns;
        return index;
    }
872086
def next(self, rows: List[Row]) -> List[Row]:
        
        if not rows:
            return []
        input_row_index = self._get_row_index(rows[0])
        if input_row_index < len(self.table_data) - 1 and input_row_index != -1:
            return [self.table_data[input_row_index + 1]]
        return []
387987
def func(data_row, wait):
    ''' 
    '''
    time.sleep(wait)
    data_row['sum'] = data_row['col_1'] + data_row['col_2']
    return data_row
352517
def _get_next_buffered_row(self):
        
        if self._iter_row == self._iter_nrows:
            raise StopIteration

        if self._row_buffer_index >= self._iter_row_buffer:
            self._buffer_iter_rows(self._iter_row)

        data = self._row_buffer[self._row_buffer_index]
        self._iter_row += 1
        self._row_buffer_index += 1
        return data
480602
def next(self):
        """"""
        self._parse_block()
        if self._remaining > 0:
            self._remaining -= 1
        return six.next(self._iter_rows)
160547
def next_row(self):
        """"""
        row = self.currentIndex().row()
        rows = self.source_model.rowCount()
        if row + 1 == rows:
            row = -1
        self.selectRow(row + 1)
527902
def count(self, with_limit_and_skip=False):
        ''' 
        '''
        return self.__get_query_result().cursor.count(with_limit_and_skip=with_limit_and_skip)
1365681
def iter_rows(self, start=None, end=None):
        """"""
        start = start or 0
        end = end or self.nrows
        for i in range(start, end):
            yield self.iloc[i, :]