Is this cell a code cell?
484857
def is_code(self):
        """"""
        if self.cell_type == 'code':
            return True
        if self.cell_type == 'raw' and 'active' in self.metadata:
            return True
        return False
474668
def iter_code_cells(self):
        """"""
        for ws in self.nb.worksheets:
            for cell in ws.cells:
                if cell.cell_type == 'code':
                    yield cell
1325048
function Code( buffer, start, end ) {

  if( !(this instanceof Code) )
    return new Code( buffer, start, end )

  this.offset = start || 0x00

  if( Buffer.isBuffer( buffer ) ) {
    this.data = buffer.slice( start, end )
  } else {
    this.data = Buffer.alloc( 446 )
  }

}
244850
function(cell) {

        var cellId = (joint.util.isString(cell) || joint.util.isNumber(cell)) ? cell : cell.id;
        var ancestor = this.getRelationshipAncestor();

        return !!ancestor && (ancestor.id === cellId || ancestor.isEmbeddedIn(cellId));
    }
928992
def parse_cell(self, cell, coords, cell_mode=CellMode.cooked):
    
    try:
      return int(cell)
    except ValueError:
      pass
    try:
      return float(cell)
    except ValueError:
      pass
    # TODO Check for dates?
    return cell
478699
def create_code_cell(block):
        """"""
        code_cell = nbbase.new_code_cell(source=block['content'])

        attr = block['attributes']
        if not attr.is_empty:
            code_cell.metadata \
                = nbbase.NotebookNode({'attributes': attr.to_dict()})
            execution_count = attr.kvs.get('n')
            if not execution_count:
                code_cell.execution_count = None
            else:
                code_cell.execution_count = int(execution_count)

        return code_cell
97
function(obj) {
    if (obj instanceof Cell) {
      return {
        inside: obj.inside
      };
    } else {
      return {
        back : serialize(obj.back),
        front : serialize(obj.front),
        plane: obj.plane,
        shp: obj.shp,
        complemented: obj.complemented,
      };
    }
  }
987331
def add_cell_code(self, cell_str, pos=None):
        

        cell_str = cell_str.strip()

        logging.debug("add_cell_code: {}".format(cell_str))
        cell = nbf.v4.new_code_cell(cell_str)

        if pos is None:
            self.nb['cells'].append(cell)
        else:
            self.nb['cells'].insert(pos, cell)
973507
static <R, C, V> Cell<R, C, V> cellOf(R rowKey, C columnKey, V value) {
    return Tables.immutableCell(checkNotNull(rowKey), checkNotNull(columnKey), checkNotNull(value));
  }
878814
function(){
		var bd = this.board;
		bd.disableInfo(); /* mv.set51cell()用 */
		this.decodeCellExcell(function(obj,ca){
			if(ca==="."){ return;}
			else if(obj.group==='excell'){
				if     (obj.bx!==-1 && obj.by===-1){ obj.qnum2 = +ca;}
				else if(obj.bx===-1 && obj.by!==-1){ obj.qnum  = +ca;}
			}
			else if(obj.group==='cell'){
				var inp = ca.split(",");
				obj.set51cell();
				obj.qnum  = +inp[0];
				obj.qnum2 = +inp[1];
			}
		});
		bd.enableInfo(); /* mv.set51cell()用 */
	}
563299
def isCode(self, blockOrBlockNumber, column):
        
        if isinstance(blockOrBlockNumber, QTextBlock):
            block = blockOrBlockNumber
        else:
            block = self.document().findBlockByNumber(blockOrBlockNumber)

        return self._highlighter is None or \
               self._highlighter.isCode(block, column)
687346
function(){
		this.decodeCell( function(cell,ca){
			if(cell.enableSubNumberArray && ca.indexOf('[')>=0){ ca = this.setCellSnum(cell,ca);}
			if     (ca==="+"){ cell.qsub = 1;}
			else if(ca==="-"){ cell.qsub = 2;}
			else if(ca==="="){ cell.qsub = 3;}
			else if(ca==="%"){ cell.qsub = 4;}
			else if(ca!=="."){ cell.anum = +ca;}
		});
	}
361455
def get_cell_type(cell):
    '''
    
    '''
    cell_type = None
    if isinstance(cell, basestring) and cell:
        cell_type = basestring
    elif isinstance(cell, (int, float)):
        cell_type = (int, float)

    return cell_type
1117956
function(oCellRef) {
			var oInfo = TableGrouping.TableUtils.getCellInfo(oCellRef);

			if (oInfo.isOfType(TableGrouping.TableUtils.CELLTYPE.DATACELL)) {
				return oInfo.cell.parent().hasClass("sapUiTableGroupHeader");
			} else if (oInfo.isOfType(TableGrouping.TableUtils.CELLTYPE.ROWHEADER | TableGrouping.TableUtils.CELLTYPE.ROWACTION)) {
				return oInfo.cell.hasClass("sapUiTableGroupHeader");
			}

			return false;
		}
841089
public boolean mapsCell(String cell) {
        return mappers.values().stream().anyMatch(mapper -> mapper.mapsCell(cell));
    }
637418
def code_to_text(self):
        """"""
        active = is_active(self.ext, self.metadata)
        if self.language != self.default_language and 'active' not in self.metadata:
            active = False

        source = copy(self.source)
        escape_code_start(source, self.ext, self.language)

        if active:
            comment_magic(source, self.language, self.comment_magics)
        else:
            source = [self.comment + ' ' + line if line else self.comment for line in source]

        if self.explicit_start_marker(source):
            self.metadata['endofcell'] = self.cell_marker_end or endofcell_marker(source, self.comment)

        if not self.metadata or not self.use_cell_markers:
            return source

        lines = []
        endofcell = self.metadata['endofcell']
        if endofcell == '-' or self.cell_marker_end:
            del self.metadata['endofcell']

        cell_start = [self.comment, self.cell_marker_start or '+']
        if not self.cell_marker_start:
            cell_start.append(metadata_to_json_options(self.metadata))
        elif self.metadata:
            if 'title' in self.metadata:
                cell_start.append(self.metadata.pop('title'))
            if self.metadata:
                cell_start.append(metadata_to_json_options(self.metadata))

        lines.append(' '.join(cell_start))
        lines.extend(source)
        lines.append(self.comment + ' {}'.format(endofcell))
        return lines
1359213
function(){
		this.decodeCell( function(cell,ca){
			if     (ca==="#"){ cell.qans = 1;}
			else if(ca==="+"){ cell.qsub = 1;}
			else if(ca==="-"){ cell.qnum = -2;}
			else if(ca!=="."){ cell.qnum = +ca;}
		});
	}