Check if gatttool is available on the system.
771435
def check_backend() -> bool:
        """"""
        try:
            call('gatttool', stdout=PIPE, stderr=PIPE)
            return True
        except OSError as os_err:
            msg = 'gatttool not found: {}'.format(str(os_err))
            _LOGGER.error(msg)
        return False
253970
def is_available(self) -> bool:
        """"""
        status_response = self.get_state(
            'api/host/daemonCheck.json'
        )

        if not status_response:
            return False

        return status_response.get('result') == 1
778060
def is_available(self):
        
        if self.is_always_available:
            return True
        for viewname in self.__views__:
            if getattr(self, viewname).is_available():
                return True
        return False
1049135
def check(cls):
        
        attribs = [
            'app_version',
            'app_name',
            'config_file_path',
            'config_sep_str',
        ]
        for attrib in attribs:
            if getattr(cls, attrib) == 'not_set':
                raise IncompleteSetupError(f'elib_config setup is incomplete; missing: {attrib}')
1213510
function available(dependencies) {
    if (!dependencies) return false;

    return Object.keys(dependencies).every(function every(key) {
      var dependency = dependencies[key];

      if (!dependency) return false;

      if (dependency.name !== name) return true;
      if (dependency.version === version) return true;

      return false;
    });
  }
1075133
def _check_if_downloaded(self):
        
        if not os.path.isfile(self.path + self.file_name):
            print("")
            self.msg.template(78)
            print("| Download '{0}' file [ {1}FAILED{2} ]".format(
                self.file_name, self.meta.color["RED"],
                self.meta.color["ENDC"]))
            self.msg.template(78)
            print("")
            if not self.msg.answer() in ["y", "Y"]:
                raise SystemExit()
267609
def is_available(cls, disk, kernel):
        
        kmap = cls.list(disk['datacenter_id'], None, kernel, True)
        for flavor in kmap:
            if kernel in kmap[flavor]:
                return True
        return False
657523
def check_backend() -> bool:
        """"""
        try:
            import bluepy.btle  # noqa: F401 #pylint: disable=unused-import
            return True
        except ImportError as importerror:
            _LOGGER.error('bluepy not found: %s', str(importerror))
        return False
1204782
def check_dependencies():
    

    # Check that git is installed
    if not shutil.which("git"):
        raise Error(_("You don't have git. Install git, then re-run!"))

    # Check that git --version > 2.7
    version = subprocess.check_output(["git", "--version"]).decode("utf-8")
    matches = re.search(r"^git version (\d+\.\d+\.\d+).*$", version)
    if not matches or pkg_resources.parse_version(matches.group(1)) < pkg_resources.parse_version("2.7.0"):
        raise Error(_("You have an old version of git. Install version 2.7 or later, then re-run!"))
798992
def _pip_exists(self):
        """"""
        return os.path.isfile(os.path.join(self.path, 'bin', 'pip'))
766144
def check(self, radl):
        """"""

        if not radl.get_system_by_name(self.id):
            raise RADLParseException("Invalid system id in the deploy.", line=self.line)

        if self.vm_number < 0:
            raise RADLParseException("Invalid number of virtual machines to deploy.",
                                     line=self.line)
1202613
def is_installed(self, bot_name):
        
        self.check_bots_ready()
        return any(b.name == bot_name for b in self.bots.values())
658844
def check(self):
        

        #for path in self.path.values():
        #    if not os.path.exists(path):
        #        raise RuntimeError("File '{}' is missing".format(path))

        for tool in ('cd-hit', 'prank', 'hmmbuild', 'hmmpress', 'hmmscan', 'phmmer', 'mafft', 'meme'):
            if not self.pathfinder.exists(tool):
                raise RuntimeError("Dependency {} is missing".format(tool))
1294162
def is_available(self):
        """"""
        if hasattr(self._viewh.wrapped_func, 'is_available'):
            return self._viewh.wrapped_func.is_available(self._obj)
        return True
729374
def check_available!(name, endpoint)
      check_name_available!(name) unless name.nil?
      check_endpoint_available!(endpoint) unless endpoint.nil?
    end
115731
def is_installed(self, package):
        """"""
        if isinstance(package, tuple):
            package = '=='.join(package)
        if package.endswith('.git'):
            pkg_name = os.path.split(package)[1][:-4]
            return pkg_name in self.installed_package_names or \
                    pkg_name.replace('_', '-') in self.installed_package_names
        pkg_tuple = split_package_name(package)
        if pkg_tuple[1] is not None:
            return pkg_tuple in self.installed_packages
        else:
            return pkg_tuple[0].lower() in self.installed_package_names
1044659
def check_deps(deps):
        """"""
        if not isinstance(deps, list):
            deps = [deps]
        checks = list(Environment.has_apps(deps))
        if not all(checks):
            for name, available in list(dict(zip(deps, checks)).items()):
                if not available:
                    error_msg = "The required application/dependency '{0}'" \
                                " isn't available.".format(name)
                    raise SystemError(error_msg)