Set self.cells to function :cells in file pathname.py
        :param cells_location: cells location, format 'pathname.py:cells'
        :return:
552706
def set_cells(self, cells_location):
        

        if ':' in cells_location:
            pathname, func_name = cells_location.split(':')
        else:
            pathname = cells_location
            func_name = 'cells'

        check_isfile(pathname)

        try:
            self.cells = get_func(func_name, pathname)
        except SyntaxError as e:
            fatal(traceback.format_exc(limit=1))

        return pathname, func_name
95331
def _fill_function(func, globals, defaults, dict, module, closure_values):
    
    func.__globals__.update(globals)
    func.__defaults__ = defaults
    func.__dict__ = dict
    func.__module__ = module

    cells = func.__closure__
    if cells is not None:
        for cell, value in zip(cells, closure_values):
            if value is not _empty_cell_value:
                cell_set(cell, value)

    return func
733212
def add_cell(self, keypath, cell):
        
        keypath = keypath[:] # copy
        inner = self  # the most inner dict where cell is added
        cellname = keypath  # the name of the cell
        assert keypath not in self, "Already exists: %s " % (str(keypath))
        if isinstance(keypath, list):
            while len(keypath) > 1:
                cellname = keypath.pop(0)
                if cellname not in inner:
                    inner.__dict__['p'][cellname] = DictCell()
                inner = inner[cellname] # move in one
            cellname = keypath[0]
        # now we can add 'cellname'->(Cell) to inner (DictCell)
        inner.__dict__['p'][cellname] = cell
        return inner[cellname]
67887
def location (self, pos):
    
    result = ''
    if self.filename:
      result += self.filename + ':'
    if pos:
      result += str(pos)
    return result
103395
def setCell(self, x, y, v):
        """"""
        self.cells[y][x] = v
847634
public void setupCellPositoin(final Cell cell) {
        ArgUtils.notNull(cell, "cell");
        setupCellPositoin(cell.getRowIndex(), cell.getColumnIndex());
    }
995400
def __addLocationsToURL(self, locations):
        
        for l in self.__locations:
            self.__urlLocations += "+location:\""\
             + str(quote(l)) + "\""
1114320
def update_cell(self, row, col, value):
        
        range_label = '%s!%s' % (self.title, rowcol_to_a1(row, col))

        data = self.spreadsheet.values_update(
            range_label,
            params={
                'valueInputOption': 'USER_ENTERED'
            },
            body={
                'values': [[value]]
            }
        )

        return data
60793
def writerow(self, cells):
        
        if self.default_sheet is None:
            self.default_sheet = self.new_sheet()
        self.default_sheet.writerow(cells)
110339
function(cells, opt) {

        var preparedCells = joint.util.toArray(cells).map(function(cell) {
            return this._prepareCell(cell, opt);
        }, this);
        this.get('cells').reset(preparedCells, opt);

        return this;
    }
1071652
private void placeCell(ArrayList<Row> someRows, Cell aCell, Point aPosition) {
        int i;
        Row row = null;
        int rowCount = aPosition.x + aCell.getRowspan() - someRows.size();
        assumeTableDefaults(aCell);
        if ( (aPosition.x + aCell.getRowspan()) > someRows.size() ) {
            for (i = 0; i < rowCount; i++) {
                row = new Row(columns);
                someRows.add(row);
            }
        }
        
        // reserve cell in rows below
        for (i = aPosition.x + 1; i < (aPosition.x  + aCell.getRowspan()); i++) {
            if ( !someRows.get(i).reserve(aPosition.y, aCell.getColspan())) {
                
                // should be impossible to come here :-)
                throw new RuntimeException("addCell - error in reserve");
            }
        }
        row = someRows.get(aPosition.x);
        row.addElement(aCell, aPosition.y);
        
    }
823974
def parse_cell(cell, rules):
    

    parsed_cell = {}
    for key in rules:
        rule = rules[key]
        parsed_cell.update({key: rule(cell)})
    return parsed_cell
559760
def add_file_locations(self, file_locations=[]):
        
        if not hasattr(self, '__file_locations__'):
            self.__file_locations__ = copy.copy(file_locations)
        else:
            self.__file_locations__ += copy.copy(file_locations)
973560
def function_path(func):
    
    if getattr(func, 'func_code', None):
        return func.__code__.co_filename.replace('\\', '/')
    else:
        return func.__code__.co_filename.replace('\\', '/')
173831
def _manage_location(attr):
    
    return property(lambda self: getattr(self, '_%s' % attr),
                    lambda self, value: self._set_location(attr, value))
993944
def mapCellsToPoints(self):
        
        c2p = vtk.vtkCellDataToPointData()
        c2p.SetInputData(self.polydata(False))
        c2p.Update()
        return self.updateMesh(c2p.GetOutput())
1059023
def cell(filename=None, mass=None, instrument=None, logging_mode="INFO",
         cycle_mode=None, auto_summary=True):
    """"""

    from cellpy import log

    log.setup_logging(default_level=logging_mode)
    cellpy_instance = setup_cellpy_instance()

    if instrument is not None:
        cellpy_instance.set_instrument(instrument=instrument)

    if cycle_mode is not None:
        cellpy_instance.cycle_mode = cycle_mode

    if filename is not None:
        filename = Path(filename)

        if filename.suffix in [".h5", ".hdf5", ".cellpy", ".cpy"]:
            logging.info(f"Loading cellpy-file: {filename}")
            cellpy_instance.load(filename)
        else:
            logging.info(f"Loading raw-file: {filename}")
            cellpy_instance.from_raw(filename)
            if mass is not None:
                logging.info("Setting mass")
                cellpy_instance.set_mass(mass)
            if auto_summary:
                logging.info("Creating step table")
                cellpy_instance.make_step_table()
                logging.info("Creating summary data")
                cellpy_instance.make_summary()

    logging.info("Created CellpyData object")
    return cellpy_instance