run the algorithm to find the path list
346688
def solve(m,c):
    
    G={ (m,c,1):[] }
    frontier=[ (m,c,1) ]  # 1 as boat starts on left bank 
    while len(frontier) > 0:
        hold=list(frontier)
        for node in hold:
            newnode=[]
            frontier.remove(node)
            newnode.extend(pick_next_boat_trip(node, m,c, frontier))
            for neighbor in newnode:
                if neighbor not in G:
                    G[node].append(neighbor)
                    G[neighbor]=[node]
                    frontier.append(neighbor)
    return mod_plan.find_path_BFS(G,(m,c,1),(0,0,0))
1126716
def process_paths(options, candidates=None, error=True):
    """"""
    errors = check_path(options, rootdir=CURDIR, candidates=candidates)

    if options.format in ['pycodestyle', 'pep8']:
        pattern = "%(filename)s:%(lnum)s:%(col)s: %(text)s"
    elif options.format == 'pylint':
        pattern = "%(filename)s:%(lnum)s: [%(type)s] %(text)s"
    else:  # 'parsable'
        pattern = "%(filename)s:%(lnum)s:%(col)s: [%(type)s] %(text)s"

    for er in errors:
        if options.abspath:
            er._info['filename'] = op.abspath(er.filename)
        LOGGER.warning(pattern, er._info)

    if error:
        sys.exit(int(bool(errors)))

    return errors
490869
def check_path(options, rootdir=None, candidates=None, code=None):
    
    if not candidates:
        candidates = []
        for path_ in options.paths:
            path = op.abspath(path_)
            if op.isdir(path):
                for root, _, files in walk(path):
                    candidates += [op.relpath(op.join(root, f), CURDIR)
                                   for f in files]
            else:
                candidates.append(path)

    if rootdir is None:
        rootdir = path if op.isdir(path) else op.dirname(path)

    paths = []
    for path in candidates:

        if not options.force and not any(l.allow(path)
                                         for _, l in options.linters):
            continue

        if not op.exists(path):
            continue

        paths.append(path)

    if options.concurrent:
        return check_async(paths, options, rootdir)

    errors = []
    for path in paths:
        errors += run(path=path, code=code, rootdir=rootdir, options=options)
    return errors
1290270
def run():
    """"""
    args = parse()
    build_results = [build(p) for p in glob.iglob(glob_path)]

    if not args['publish']:
        return

    for entry in build_results:
        publish(entry)
702536
private Stream<ConceptList> runComputePath(GraqlCompute.Path query) {
        ConceptId fromID = ConceptId.of(query.from());
        ConceptId toID = ConceptId.of(query.to());

        if (!scopeContainsInstances(query, fromID, toID)) throw GraqlQueryException.instanceDoesNotExist();
        if (fromID.equals(toID)) return Stream.of(new ConceptList(ImmutableList.of(fromID)));

        Set<LabelId> scopedLabelIds = convertLabelsToIds(scopeTypeLabels(query));

        ComputerResult result = compute(new ShortestPathVertexProgram(fromID, toID), null, scopedLabelIds);

        Multimap<ConceptId, ConceptId> pathsAsEdgeList = HashMultimap.create();
        Map<String, Set<String>> resultFromMemory = result.memory().get(ShortestPathVertexProgram.SHORTEST_PATH);
        resultFromMemory.forEach((id, idSet) -> idSet.forEach(id2 -> {
            pathsAsEdgeList.put(Schema.conceptIdFromVertexId(id), Schema.conceptIdFromVertexId(id2));
        }));

        List<List<ConceptId>> paths;
        if (!resultFromMemory.isEmpty()) {
            paths = getComputePathResultList(pathsAsEdgeList, fromID);
            if (scopeIncludesAttributes(query)) {
                paths = getComputePathResultListIncludingImplicitRelations(paths);
            }
        }
        else {
            paths = Collections.emptyList();
        }

        return paths.stream().map(ConceptList::new);
    }
413217
def runpath(path, argv, filename=None, threads=True, verbose=False):
    
    _run(threads, verbose, 'runpath', filename, path, argv)
968325
def run(self):
        
        x, y = 1,0  # set the direction
        num_steps = 0
        while self.s.get_state() != 'Halted':
            self.s.command({'name':'walk', 'type':'move', 'direction':[x, y]}, self.a1)
            self.s.command({'name':'walk', 'type':'run', 'direction':[x, y+1]}, self.a2)
            num_steps += 1
            if num_steps >= 3:
                break
        for a in self.s.agents:
            print(a.name, 'finished at position ', a.coords['x'], a.coords['y'])
28136
def _run_apps(self, paths):
        

        for path in paths:
            common.shell_process(path, background=True)
            time.sleep(0.2)
1167688
def path_list(self, sep=os.pathsep):
        '''  '''
        from pathlib import Path
        return [ Path(pathstr) for pathstr in self.split(sep) ]
1373186
def run(self):
        
        while True:
            path, params = self.path_queue.get()
            errors = run(path, **params)
            self.result_queue.put(errors)
            self.path_queue.task_done()
800724
def _run_algorithm(self):
        
        nan_entries = np.isnan(self._X)

        NNlist = [self._find_neighbors(datalen) for datalen in range(self._datalen)]

        scores = np.sum(Parallel(n_jobs=self.n_jobs)(delayed(
            MultiSURF_compute_scores)(instance_num, self.attr, nan_entries, self._num_attributes, self.mcmap,
                                      NN_near, self._headers, self._class_type, self._X, self._y, self._labels_std, self.data_type)
            for instance_num, NN_near in zip(range(self._datalen), NNlist)), axis=0)

        return np.array(scores)
666947
def run(self, path=""):
        """"""
        username, project, run = self._parse_path(path)
        if not self._runs.get(path):
            self._runs[path] = Run(self.client, username, project, run)
        return self._runs[path]
1007835
def run(self):
        

        init_folder = os.getcwd()
        os.chdir(self.folder)

        with zopen(self.log_file, 'w') as fout:
            subprocess.call([self._NWCHEM2FIESTA_cmd, self._nwcheminput_fn,
                             self._nwchemoutput_fn, self._nwchemmovecs_fn],
                            stdout=fout)

        os.chdir(init_folder)
502635
def run(path, code=None, params=None, **meta):
        
        if 'ignore_decorators' in params:
            ignore_decorators = params['ignore_decorators']
        else:
            ignore_decorators = None
        check_source_args = (code, path, ignore_decorators) if THIRD_ARG else (code, path)
        return [{
            'lnum': e.line,
            # Remove colon after error code ("D403: ..." => "D403 ...").
            'text': (e.message[0:4] + e.message[5:]
                     if e.message[4] == ':' else e.message),
            'type': 'D',
            'number': e.code
        } for e in PyDocChecker().check_source(*check_source_args)]
913173
def _walker(self, path):
        """"""
        for root, dnames, fnames in _walk(self.recursion)(path):
            yield (root, dnames, fnames)
1260752
def run(self, cmd):
        """"""
        cmd = ['git', '--git-dir=%s' % self.path] + cmd
        print("cmd list", cmd)
        print("cmd", ' '.join(cmd))
        res = None
        try:
            res = subprocess.check_output(cmd)
        except BaseException:
            pass
        if res:
            try:
                res = res.decode()
            except UnicodeDecodeError:
                res = res.decode('utf-8')
        return res
985751
public void run() {
    // Input step
    Database db = inputStep.getDatabase();
    hier = db.getHierarchy();

    // Algorithms - Data Mining Step
    algorithmStep.runAlgorithms(db);

    // TODO: this could be nicer
    hier.add(db, new SettingsResult(settings));

    // Evaluation
    evaluationStep.runEvaluators(hier, db);

    // Output / Visualization
    outputStep.runResultHandlers(hier, db);
  }