Determine whether or not the model's iteration number is one
        where the runner is expected to make an output snapshot.
485314
def is_snapshot_time(self, output_every=None, t_output_every=None):
        
        if t_output_every is not None:
            output_every = int(round(t_output_every // self.model.dt))
        return not self.model.i % output_every
1266298
def is_output(self, stream):
        

        for streamer in self.streamers:
            if streamer.selector.matches(stream):
                return True

        return False
751373
def detect_model_num(string):
    
    match = re.match(MODEL_NUM_REGEX, string)
    if match:
        return int(match.group())
    return None
65914
def snapshot(model, filename, pytest_args, exclusive, skip, solver,
             experimental, custom_tests, custom_config):
    
    model_obj, sbml_ver, notifications = api.validate_model(
        model)
    if model_obj is None:
        LOGGER.critical(
            "The model could not be loaded due to the following SBML errors.")
        utils.stdout_notifications(notifications)
        api.validation_report(model, notifications, filename)
        sys.exit(1)
    if not any(a.startswith("--tb") for a in pytest_args):
        pytest_args = ["--tb", "no"] + pytest_args
    # Add further directories to search for tests.
    pytest_args.extend(custom_tests)
    config = ReportConfiguration.load()
    # Update the default test configuration with custom ones (if any).
    for custom in custom_config:
        config.merge(ReportConfiguration.load(custom))
    model_obj.solver = solver
    _, results = api.test_model(model_obj, sbml_version=sbml_ver, results=True,
                                pytest_args=pytest_args, skip=skip,
                                exclusive=exclusive, experimental=experimental)
    with open(filename, "w", encoding="utf-8") as file_handle:
        LOGGER.info("Writing snapshot report to '%s'.", filename)
        file_handle.write(api.snapshot_report(results, config))
424752
def runner_check(self, auth_list, fun, args):
        '''
        
        '''
        return self.spec_check(auth_list, fun, args, 'runner')
1276232
public boolean isEveryOwnedOutputSpent(TransactionBag transactionBag) {
        for (TransactionOutput output : outputs) {
            if (output.isAvailableForSpending() && output.isMineOrWatched(transactionBag))
                return false;
        }
        return true;
    }
98192
def make_snapshot(self):
        
        filename = join(self.output_dir, '{:010d}.pkl'.format(self.model.i))
        output_utils.model_to_file(self.model, filename)
8306
def on_backward_end(self, iteration:int, **kwargs)->None:
        ""
        if iteration == 0: return
        self._update_batches_if_needed()
        #TODO:  This could perhaps be implemented as queues of requests instead but that seemed like overkill. 
        # But I'm not the biggest fan of maintaining these boolean flags either... Review pls.
        if iteration % self.stats_iters == 0: self.gen_stats_updated, self.crit_stats_updated = False, False
        if not (self.gen_stats_updated and self.crit_stats_updated): self._write_model_stats(iteration=iteration)
937241
def should_compile_incrementally(self, vts, ctx):
    
    if not vts.is_incremental:
      return False
    if not self._clear_invalid_analysis:
      return True
    return os.path.exists(ctx.analysis_file)
900845
def step_impl12(context, runs):
    
    executor_ = context.fuzz_executor
    stats = executor_.stats
    count = stats.cumulated_counts()
    assert count == runs, "VERIFY: Number of recorded runs."
666148
def num_model_per_iteration(self):
        
        model_per_iter = ctypes.c_int(0)
        _safe_call(_LIB.LGBM_BoosterNumModelPerIteration(
            self.handle,
            ctypes.byref(model_per_iter)))
        return model_per_iter.value
23979
def is_running(self) -> bool:
        """"""
        if self._proc is None or self._proc.returncode is not None:
            return False
        return True
1266335
def is_running(fun):
    '''
    
    '''
    run = running()
    ret = []
    for data in run:
        if fnmatch.fnmatch(data.get('fun', ''), fun):
            ret.append(data)
    return ret
614012
def is_selected(self, model):
        
        if model is None:
            return len(self._selected) == 0
        return model in self._selected
561820
def is_final(self):
        
        return (self.is_contiguous and self.fillorder == 1 and
                self.predictor == 1 and not self.is_subsampled)
128345
public boolean recordIdGenerator() {
    if (!currentInfo.isIdGenerator()) {
      currentInfo.setIdGenerator(true);
      populated = true;
      return true;
    } else {
      return false;
    }
  }
637699
def infer(self, bottomUpInput):
    

    self.iterationIdx = self.iterationIdx + 1

    if self.verbosity >= 3:
      print "\n==== Iteration: %d =====" % (self.iterationIdx)
      print "Active cols:", bottomUpInput.nonzero()[0]

    # Copy t into t-1
    # Don't need to copy learnState, which is not used in inference
    self.activeState['t-1'][:,:] = self.activeState['t'][:,:]
    self.predictedState['t-1'][:,:] = self.predictedState['t'][:,:]
    self.confidence['t-1'][:,:] = self.confidence['t'][:,:]
    self.activeState['t'].fill(0)
    self.predictedState['t'].fill(0)
    self.confidence['t'].fill(0.0)

    # Phase 1: calculate current state for each cell
    # For each column (winning in the SP):
    # - if the bottom up input was predicted by one of the sequence
    #   segments of a cell, this cell bursts,
    # - if the bottom up input was not predicted by any cell, the entire
    #   column bursts.
    activeColumns = bottomUpInput.nonzero()[0]

    for c in activeColumns:

      buPredicted = False
      predictingCells = numpy.where(self.predictedState['t-1'][c] == 1)[0]

      for i in predictingCells:
        buPredicted = True
        self.activeState['t'][c,i] = 1

      if not buPredicted:
        self.activeState['t'][c,:] = 1 # whole column bursts

    # Phase 2: calculate predictive output for each cell
    # A cell turns on its predictedState if any of its segments
    # has enough horizontal connections currently firing due to
    # bottom up input.
    self.computePhase2(doLearn=False)

    # Update the prediction score stats
    if self.collectStats:
      # import pdb; pdb.set_trace()
      self._updateStatsInferEnd(self._internalStats,
                                activeColumns,
                                self.predictedState['t-1'],
                                self.confidence['t-1'])



    # Get the output
    output = self.computeOutput()

    # Print diagnostic information based on the current verbosity level
    self.printComputeEnd(output, learn=False)

    self.resetCalled = False

    return output