code: def killCells(self, percent = 0.05):
      
  
      if self.zombiePermutation is None:
        self.zombiePermutation = numpy.random.permutation(self.numberOfCells())
  
      self.numDead = int(round(percent * self.numberOfCells()))
      if self.numDead > 0:
        self.deadCells = set(self.zombiePermutation[0:self.numDead])
      else:
        self.deadCells = set()
  
      print "Total number of dead cells=",len(self.deadCells)
  
      numSegmentDeleted = 0
  
      for cellIdx in self.deadCells:
        # Destroy segments.  self.destroySegment() takes care of deleting synapses
        for segment in self.connections.segmentsForCell(cellIdx):
          self.connections.destroySegment(segment)
          numSegmentDeleted += 1
  
      print "Total number of segments removed=", numSegmentDeleted
  
      # Strip out segments for dead cells
      self.activeSegments = [s for s in self.activeSegments if
                             s.cell not in self.deadCells]
      self.matchingSegments = [s for s in self.matchingSegments if
                               s.cell not in self.deadCells]
docs: Changes the percentage of cells that are now considered dead. The first
      time you call this method a permutation list is set up. Calls change the
      number of cells considered dead.