Returns a map of RowColumn changes given an operation
346310
public Map<RowColumn, Bytes> getOperationMap(LogEntry.Operation op) {
    Map<RowColumn, Bytes> opMap = new HashMap<>();
    for (LogEntry entry : logEntries) {
      if (entry.getOp().equals(op)) {
        opMap.put(new RowColumn(entry.getRow(), entry.getColumn()), entry.getValue());
      }
    }
    return opMap;
  }
1300985
def getshapestring(self, startrow=1, nrow=-1, rowincr=1):
        """"""
        return self._table.getcolshapestring(self._column,
                                             startrow, nrow, rowincr)
1154542
def _cell_changed(self, *a):
        

        # block all signals during the update (to avoid re-calling this)
        self.block_events()

        # loop over the rows
        for n in range(self.get_row_count()):

            # get the keys and values (as text)
            key   = self.get_value(0,n)
            value = self.get_value(1,n)

            # get rid of the None's
            if key   == None:
                key = ''
                self.set_value(0,n, '')
            if value == None:
                value = ''
                self.set_value(1,n, '')

            # if it's not an empty entry make sure it's valid
            if not key == '':

                # clean up the key
                key = self._clean_up_key(key)

                # now make sure the value is python-able
                try:
                    eval(value)
                    self._widget.item(n,1).setData(_g.QtCore.Qt.BackgroundRole, _g.Qt.QtGui.QColor('white'))
                except:
                    self._widget.item(n,1).setData(_g.QtCore.Qt.BackgroundRole, _g.Qt.QtGui.QColor('pink'))

        # unblock all signals
        self.unblock_events()
307514
def number_of_changes(slots, events, original_schedule, X, **kwargs):
    
    changes = 0
    original_array = schedule_to_array(original_schedule, events=events,
                                       slots=slots)
    for row, event in enumerate(original_array):
        for col, slot in enumerate(event):
            if slot == 0:
                changes += X[row, col]
            else:
                changes += 1 - X[row, col]
    return changes
826417
def _get_no_rowscols(self, bbox):
        """"""

        if bbox is None:
            return 1, 1
        else:
            (bb_top, bb_left), (bb_bottom, bb_right) = bbox
            if bb_top is None:
                bb_top = 0
            if bb_left is None:
                bb_left = 0
            if bb_bottom is None:
                bb_bottom = self.grid.code_array.shape[0] - 1
            if bb_right is None:
                bb_right = self.grid.code_array.shape[1] - 1

            return bb_bottom - bb_top + 1, bb_right - bb_left + 1
1242861
public void updateColumnMappings() {
        columnMapping = new HashMap<>();
        int realIdx = 0;
        int renderCol = 0;
        for (final SheetColumn column : getColumns()) {
            if (column.isRendered()) {
                columnMapping.put(renderCol, realIdx);
                renderCol++;
            }
            realIdx++;
        }
    }
192654
private void addColumn(String storeName, String rowKey, String colName, byte[] colValue) {
        Map<String, Map<String, byte[]>> rowMap = m_columnAdds.get(storeName);
        if (rowMap == null) {
            rowMap = new HashMap<>();
            m_columnAdds.put(storeName, rowMap);
        }
        
        Map<String, byte[]> colMap = rowMap.get(rowKey);
        if (colMap == null) {
            colMap = new HashMap<>();
            rowMap.put(rowKey, colMap);
        }
        
        byte[] oldValue = colMap.put(colName, colValue);
        if (oldValue == null) {
            m_totalUpdates++;
        } else if (!Arrays.equals(oldValue, colValue)) {
            m_logger.debug("Warning: duplicate column mutation with different value: " +
                           "store={}, row={}, col={}, old={}, new={}",
                           new Object[]{storeName, rowKey, colName, oldValue, colValue});
        }
    }
85370
def _get_column_change_options(self, fluent):
        
        options = super(MySQLSchemaGrammar, self)._get_column_change_options(fluent)

        if fluent.type == "enum":
            options["extra"] = {
                "definition": "('{}')".format("','".join(fluent.allowed))
            }

        return options
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
593181
function _getColumns(matrix) {
  var cols = [];
  for (var i=0; i<matrix.size.columns; i++) {
    cols.push([]);
    for (var j=0; j<matrix.size.rows; j++)
      cols[i].push(matrix.values[i + j * matrix.size.columns]);
  }
  return cols;
}
874349
def rowIdColumns(self, table, catalog=None, schema=None,  # nopep8
                     nullable=True):
        
        fut = self._run_operation(self._impl.rowIdColumns, table,
                                  catalog=catalog, schema=schema,
                                  nullable=nullable)
        return fut
1135610
private Map<String, OperationResult<ModelMetadataKey>> getChangedMetadataKeys(Map<String, ModelMetadataKey> keyMap){
        return this.getDirectoryServiceClient().getChangedMetadataKeys(keyMap);
    }
937959
function (aOldColumns, aNewColumns, fnFormatterChanged) {
				var oNewColumn,
					oOldColumn,
					iResult = 0,
					i,
					n;

				if (!aOldColumns || aOldColumns.length !== aNewColumns.length) {
					return 2;
				}
				if (aOldColumns !== aNewColumns) {
					for (i = 0, n = aOldColumns.length; i < n; i += 1) {
						oOldColumn = aOldColumns[i];
						oNewColumn = aNewColumns[i];
						if (oOldColumn.grouped !== oNewColumn.grouped
							|| oOldColumn.inResult !== oNewColumn.inResult
							|| oOldColumn.level !== oNewColumn.level
							|| oOldColumn.name !== oNewColumn.name
							|| oOldColumn.total !== oNewColumn.total
							|| oOldColumn.visible !== oNewColumn.visible) {
							return 2;
						}
						if (oOldColumn.formatter !== oNewColumn.formatter) {
							iResult = 1;
							if (fnFormatterChanged) {
								fnFormatterChanged(oNewColumn);
							}
						}
					}
				}

				return iResult;
			}
1335793
def _get_column_names_in_altered_table(self, diff):
        
        columns = OrderedDict()

        for column_name, column in diff.from_table.get_columns().items():
            columns[column_name.lower()] = column.get_name()

        for column_name, column in diff.removed_columns.items():
            column_name = column_name.lower()
            if column_name in columns:
                del columns[column_name]

        for old_column_name, column in diff.renamed_columns.items():
            column_name = column.get_name()
            columns[old_column_name.lower()] = column_name
            columns[column_name.lower()] = column_name

        for old_column_name, column_diff in diff.changed_columns.items():
            column_name = column_diff.column.get_name()
            columns[old_column_name.lower()] = column_name
            columns[column_name.lower()] = column_name

        for column_name, column in diff.added_columns.items():
            columns[column_name.lower()] = column_name

        return columns
1260814
@SuppressWarnings("unchecked")
	public Map<String, Object> getColumns() {
		if (columns == null) {
			if (DbKit.config == null)
				columns = DbKit.brokenConfig.containerFactory.getColumnsMap();
			else
				columns = DbKit.config.containerFactory.getColumnsMap();
		}
		return columns;
	}
1064302
def _get_indexes_in_altered_table(self, diff):
        
        indexes = diff.from_table.get_indexes()
        column_names = self._get_column_names_in_altered_table(diff)

        for key, index in OrderedDict([(k, v) for k, v in indexes.items()]).items():
            for old_index_name, renamed_index in diff.renamed_indexes.items():
                if key.lower() == old_index_name.lower():
                    del indexes[key]

            changed = False
            index_columns = []
            for column_name in index.get_columns():
                normalized_column_name = column_name.lower()
                if normalized_column_name not in column_names:
                    del indexes[key]
                    break
                else:
                    index_columns.append(column_names[normalized_column_name])
                    if column_name != column_names[normalized_column_name]:
                        changed = True

            if changed:
                indexes[key] = Index(
                    index.get_name(),
                    index_columns,
                    index.is_unique(),
                    index.is_primary(),
                    index.get_flags(),
                )

            for index in diff.removed_indexes.values():
                index_name = index.get_name().lower()
                if index_name and index_name in indexes:
                    del indexes[index_name]

            changed_indexes = (
                list(diff.changed_indexes.values())
                + list(diff.added_indexes.values())
                + list(diff.renamed_indexes.values())
            )
            for index in changed_indexes:
                index_name = index.get_name().lower()
                if index_name:
                    indexes[index_name] = index
                else:
                    indexes[len(indexes)] = index

        return indexes
1105234
def _log_changes(ret, changekey, changevalue):
    '''
    
    '''
    cl = ret['changes'].get('new', [])
    cl.append({changekey: _object_reducer(changevalue)})
    ret['changes']['new'] = cl
    return ret