Return a fully-qualified scan_run string.
199517
def scan_run_path(cls, project, scan_config, scan_run):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}",
            project=project,
            scan_config=scan_config,
            scan_run=scan_run,
        )
1007590
def scantree(path: str) -> Generator:
    """"""
    for entry in os.scandir(path):
        if entry.is_dir(follow_symlinks=False):
            yield from scantree(entry.path)
        else:
            if entry.name.endswith('.py'):
                yield entry
647980
def scan_band(self, band, **kwargs):
        

        kal_run_line = fn.build_kal_scan_band_string(self.kal_bin,
                                                     band, kwargs)
        raw_output = subprocess.check_output(kal_run_line.split(' '),
                                             stderr=subprocess.STDOUT)
        kal_normalized = fn.parse_kal_scan(raw_output)
        return kal_normalized
786315
function scan(str, re) {
  var match = null;
  var ret = [];

  while (match = re.exec(str)) {
    ret.push(match);
  }

  return ret;
}
199621
def scan(self):
        """"""

        log.debug("scanning machine: %s..." % self.name)

        deployed = set()
        services = yield self.client.get_children(self.path + "/services")

        for name in services:
            log.debug("checking service: '%s'..." % name)

            try:
                value, metadata = yield self.client.get(
                    self.path + "/services/" + name + "/machines"
                    )
            except NoNodeException:
                log.warn(
                    "missing machines declaration for service: %s." %
                    name
                    )
                machines = []
            else:
                machines = json.loads(value)

            if machines:
                log.debug("machines: %s." % ", ".join(machines))

                if self.name in machines:
                    deployed.add(name)
            else:
                log.debug("service not configured for any machine.")

        count = len(deployed)
        log.debug("found %d service(s) configured for this machine." % count)

        running = yield self.client.get_children(
            self.path + "/machines/" + self.name
            )

        self.stopped = deployed - set(running)

        if self.stopped:
            log.debug("services not running: %s." % ", ".join(
                map(repr, self.stopped)))
        elif running:
            log.debug("all services are up.")
1374322
def runner(self, classpath, main, jvm_options=None, args=None, cwd=None):
    """"""
    return self._runner(*self._scrub_args(classpath, main, jvm_options, args, cwd=cwd))
938761
def was_run_code(self, get_all=True):
        """"""
        if self.stored is None:
            return ""
        else:
            if get_all:
                self.stored = ["\n".join(self.stored)]
            return self.stored[-1]
882846
def scan(pattern, string, *args, **kwargs):
    
    return compile(pattern, *args, **kwargs).scan(string)
538919
def get_runs():
    """"""
    data = current_app.config["data"]
    draw = parse_int_arg("draw", 1)
    start = parse_int_arg("start", 0)
    length = parse_int_arg("length", -1)
    length = length if length >= 0 else None
    order_column = request.args.get("order[0][column]")
    order_dir = request.args.get("order[0][dir]")

    query = parse_query_filter()

    if order_column is not None:
        order_column = \
            request.args.get("columns[%d][name]" % int(order_column))
        if order_column == "hostname":
            order_column = "host.hostname"

    runs = data.get_run_dao().get_runs(
        start=start, limit=length,
        sort_by=order_column, sort_direction=order_dir, query=query)
    # records_total should be the total size of the records in the database,
    # not what was returned
    records_total = runs.count()
    records_filtered = runs.count()
    return Response(render_template(
        "api/runs.js", runs=runs,
        draw=draw, recordsTotal=records_total,
        recordsFiltered=records_filtered),
        mimetype="application/json")
654572
def scanned(self):
        """"""
        if self.request["Select"] == "COUNT":
            while not self.exhausted:
                next(self, None)
        return self._scanned
890825
def DirScanner(**kw):
    """"""
    kw['node_factory'] = SCons.Node.FS.Entry
    kw['recursive'] = only_dirs
    return SCons.Scanner.Base(scan_on_disk, "DirScanner", **kw)
720525
def scan_results(self):
        """"""
        
        bsses = self._wifi_ctrl.scan_results(self._raw_obj)

        if self._logger.isEnabledFor(logging.INFO):
            for bss in bsses:
                self._logger.info("Find bss:")
                self._logger.info("\tbssid: %s", bss.bssid)
                self._logger.info("\tssid: %s", bss.ssid)
                self._logger.info("\tfreq: %d", bss.freq)
                self._logger.info("\tauth: %s", bss.auth)
                self._logger.info("\takm: %s", bss.akm)
                self._logger.info("\tsignal: %d", bss.signal)

        return bsses
829342
def scan(self):
        """"""
        devices = []
        diff = 65
        rom = False
        count = 0
        for _ in range(0xff):
            rom, diff = self._search_rom(rom, diff)
            if rom:
                count += 1
                if count > self.maximum_devices:
                    raise RuntimeError(
                        "Maximum device count of {} exceeded."\
                        .format(self.maximum_devices))
                devices.append(OneWireAddress(rom))
            if diff == 0:
                break
        return devices
1094843
def run_check(self, template_name=None, service_dir=None):
        "  "

        print_header('Check requirements', sep='-')
        map(lambda cmd: call("bash %s" % cmd), self._gen_scripts(
            'check', template_name=template_name, service_dir=service_dir))
        return True
605525
def run(self):
        '''
        
        '''
        # Print documentation only
        if self.opts.get('doc', False):
            self.print_docs()
        else:
            return self._run_runner()
109377
def lrun(command, *args, **kwargs):
    ''''''
    return run('cd {0} && {1}'.format(ROOT, command), *args, **kwargs)
897248
def scanStoVars(self, strline):
        
        for wd in strline.split():
            if wd in self.stodict:
                strline = strline.replace(wd, str(self.stodict[wd]))
        return strline