Checks if the port belongs to a supported vendor.

        Returns True for supported_pci_devs.
976884
def _check_for_supported_vendor(self, profile):
        
        vendor_info = profile.get('pci_vendor_info')
        if not vendor_info:
            return False
        if vendor_info not in self.supported_pci_devs:
            return False
        return True
595715
public function useAssociatedPort() : bool
   {

      if ( null === $this->port )
      {
         return true;
      }

      switch ( $this->scheme )
      {

         case UrlScheme::HTTP:
            return ( $this->port === 80 );

         case UrlScheme::SSL:
            return ( $this->port === 443 );

         case UrlScheme::FTP:
            return ( $this->port === 21 );

         default :
            return false;

      }

   }
369677
def port_is_used(port, host='127.0.0.1'):
    
    unused = _can_bind(port, host) and _refuses_connection(port, host)
    return not unused
376645
public static function isSupported()
    {
        if (null === self::$supported) {
            self::$supported = function_exists('cli_set_process_title') || function_exists('setproctitle');
        }

        return self::$supported;
    }
18953
def is_available(self):
        
        if self.scheme in NOOP_PROTOCOLS:
            return True

        if not self.port:
            raise RuntimeError('port is required')

        s = socket.socket()
        try:
            s.connect((self.host, self.port))
        except Exception:
            return False
        else:
            return True
1151248
private static boolean anyInterfaceSupportsIpV6() {
        try {
            Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
            while (interfaces.hasMoreElements()) {
                NetworkInterface iface = interfaces.nextElement();
                Enumeration<InetAddress> addresses = iface.getInetAddresses();
                while (addresses.hasMoreElements()) {
                    if (addresses.nextElement() instanceof Inet6Address) {
                        return true;
                    }
                }
            }
        } catch (SocketException e) {
            logger.debug("Unable to detect if any interface supports IPv6, assuming IPv4-only", e);
            // ignore
        }
        return false;
    }
364031
def is_reseller(self):
        """"""
        return self.role == self.roles.reseller.value and self.state == State.approved
992837
def referenced_ports(self):
        
        from mbuild.port import Port
        return [port for port in self.labels.values()
                if isinstance(port, Port)]
1276916
def is_compatible(self):
        ''''''
        supported_tags = pep425tags.get_supported()
        return next((True for t in self.tags() if t in supported_tags), False)
1325863
def has_tsm(self):
        
        if (self.oemid['manufacturer_id'] == 19046 and
                self.oemid['device_id'] == 32):
            try:
                self.ipmicmd.xraw_command(netfn=0x3a, command=0xf)
            except pygexc.IpmiException as ie:
                if ie.ipmicode == 193:
                    return False
                raise
            return True
        return False
34487
def device_is_attached_to_network(device, network_name):
        
        try:
            backing = device.backing
        except:
            return False
        if hasattr(backing, 'network') and hasattr(backing.network, 'name'):
            return network_name == backing.network.name
        elif hasattr(backing, 'port') and hasattr(backing.port, 'portgroupKey'):
            return network_name == backing.port.portgroupKey

        return False
789282
def _valid_baremetal_port(port):
        """"""
        if port.get(portbindings.VNIC_TYPE) != portbindings.VNIC_BAREMETAL:
            return False
        sgs = port.get('security_groups', [])
        if len(sgs) == 0:
            # Nothing to do
            return False
        if len(port.get('security_groups', [])) > 1:
            LOG.warning('SG provisioning failed for %(port)s. Only one '
                        'SG may be applied per port.',
                        {'port': port['id']})
            return False
        return True
667125
def find_bled112_devices(cls):
        """"""
        found_devs = []

        ports = serial.tools.list_ports.comports()
        for port in ports:
            if not hasattr(port, 'pid') or not hasattr(port, 'vid'):
                continue

            # Check if the device matches the BLED112's PID/VID combination
            if port.pid == 1 and port.vid == 9304:
                found_devs.append(port.device)

        return found_devs
1325662
def isset(alias_name):
    
    warnings.warn('Will be removed in v1.0', DeprecationWarning, stacklevel=2)
    raw_value = read(alias_name, allow_none=True)
    if raw_value:
        if re.compile(r'.+://.+:\d+').match(raw_value):
            return True
        else:
            warnings.warn('"{0}_PORT={1}" does not look like a docker link.'.format(alias_name, raw_value), stacklevel=2)
            return False

    return False
686042
def isAuthorized(self, pid, action, vendorSpecific=None):
        """"""
        response = self.isAuthorizedResponse(pid, action, vendorSpecific)
        return self._read_boolean_401_response(response)
483596
public static function isSupported()
	{
		// Check for native PHP engine support in the password extension
		if (version_compare(PHP_VERSION, '7.2', '>=') && \defined('PASSWORD_ARGON2I'))
		{
			return true;
		}

		// Check if the sodium_compat polyfill is installed and look for compatibility through that
		if (class_exists('\\ParagonIE_Sodium_Compat') && method_exists('\\ParagonIE_Sodium_Compat', 'crypto_pwhash_is_available'))
		{
			return \ParagonIE_Sodium_Compat::crypto_pwhash_is_available();
		}

		// Check for support from the (lib)sodium extension
		return \function_exists('sodium_crypto_pwhash_str') || \extension_loaded('libsodium');
	}
1294238
def is_micropython_usb_port(portName):
    
    for port in serial.tools.list_ports.comports():
        if port.device == portName:
            return is_micropython_usb_device(port)
    return False