Inverts delete_row and returns the rows where key = value
481489
def invert_delete_row(self, key, value):
        
        self.rows = filter(lambda x: x.get(key) == value, self.rows)
436476
def delete_homogenous_columns!(*options)
      return if rows.size < 2

      exceptions = extract_exceptions(options)

      (columns.map(&:key) - exceptions).each do |key|
        value = rows.first[key]
        delete_column key if rows.all? { |row| row[key] == value }
      end
    end
273899
def unselectRow(self, row):
        ''
        if id(row) in self._selectedRows:
            del self._selectedRows[id(row)]
            return True
        else:
            return False
713343
def decomprest(f, rows):
    """"""

    row = 0
    while row < rows:
        row, o = deblock(f)
        yield o
340330
private void revertInsertRow(long id, int row, boolean reuseRow) {
		// INFORM INSIDER
		insider.uninserting(clazz, id);

		idColl.cancelId(id); // UNDO CHANGE #1

		if (reuseRow) {
			deleted.add(row); // UNDO CHANGE #2
		} else {
			rows--; // UNDO CHANGE #3
		}

		idColl.delete(id); // UNDO CHANGE #4

		size--; // UNDO CHANGE #5

		ids.remove(id); // UNDO CHANGE #6

		if (reuseRow) {
			// NO NEED TO UNDO CHANGE #7a
		} else {
			records.remove(records.size() - 1); // UNDO CHANGE #7b
		}
	}
426888
def get_row(self, row):
        ''''''

        if isinstance(self.fields, dict):
            return dict([
                (key, text_type(value).format(**row) if RE_FORMATTED.match(value) else row[value])
                for key, value in self.fields.items()
            ])
        else:
            return [text_type(field).format(**row) if RE_FORMATTED.match(field)
                    else row[field]
                    for field in self.fields]
91624
def dict_minus(d, *keys):
    """"""
    # make shallow copy
    d = dict(d)
    for key in keys:
        try:
            del d[key]
        except:
            pass
    return d
348539
def append(self, row=None):
        
        self.table.append(self._normalize_row(row))
        return self.table[-1]
199529
def remove(self, key):
        '''
        
        '''
        encodedKey = json.dumps(key)
        sql = 'DELETE FROM ' + self.table + ' WHERE name = %s'
        with self.connect() as conn:
            with doTransaction(conn):
                return executeSQL(conn, sql, args=[encodedKey])
1097556
def invert_dict(d):
    """"""
    # Based on recipe from ASPN
    result = {}
    for k, v in d.items():
        keys = result.setdefault(v, [])
        keys.append(k)
    return result
834114
def _get_pseudo_key(self, row):
        
        ret = list()
        for key in self._pseudo_key:
            ret.append(row[key])

        return tuple(ret)
11965
function del(/* key-1, key-N, req */) {
  var args = slice.call(arguments, 0)
    , req = typeof args[args.length-1] === 'object' ? args.pop() : null;
  var deleted = 0;
  for(var i = 0;i < args.length;i++) {
    if(this.keyExists(args[i])) {
      this.delKey(args[i], req);
      deleted++;
    }
  }
  return deleted;
}
1143974
private static int getIndexOfPair(String value, Map<Integer, String> row_data) {
        for(Integer i : row_data.keySet()) {
            if(row_data.get(i).equals(value)) {
                return i.intValue();
            }
        } 
        return -1;
    }
846617
def _filter_rows_keys(self):
        
        return [
            row_key
            for row_key in self.message.rows.row_keys
            if row_key > self.last_scanned_key
        ]
242094
private Iterator<Record> decodeRows(List<Map.Entry<ByteBuffer, Key>> keys, final Rows<ByteBuffer, DeltaKey> rows,
                                        final int largeRowThreshold, final ReadConsistency consistency) {
        // Avoiding pinning multiple decoded rows into memory at once.
        return Iterators.transform(keys.iterator(), new Function<Map.Entry<ByteBuffer, Key>, Record>() {
            @Override
            public Record apply(Map.Entry<ByteBuffer, Key> entry) {
                Row<ByteBuffer, DeltaKey> row = rows.getRow(entry.getKey());
                if (row == null) {
                    return emptyRecord(entry.getValue());
                }
                // Convert the results into a Record object, lazily fetching the rest of the columns as necessary.
                return newRecord(entry.getValue(), row.getRawKey(), row.getColumns(), largeRowThreshold, consistency, null);
            }
        });
    }
1223260
int findDeleteInRight(
    Object           delKey)
  {
    int idx = -1;
    int r = rightMostIndex();
    int m = midPoint();
    if (r > m)
      idx = findDelete(m, r, delKey);
    return idx;
  }
101913
def get_rows(self, sort=False):
        
        ret = []
        for _, rows in sorted(self._rows.items()) if sort else self._rows.items():
            self._rows_int2date(rows)
            ret.extend(rows)

        return ret