Return detection of Nintendo

        Detects if the current device is a Nintendo game device.
488436
def detectNintendo(self):
        
        return UAgentInfo.deviceNintendo in self.__userAgent \
            or UAgentInfo.deviceNintendo in self.__userAgent \
            or UAgentInfo.deviceNintendo in self.__userAgent
289367
def detectAndroid(self):
        
        if UAgentInfo.deviceAndroid in self.__userAgent \
           or self.detectGoogleTV():
            return True

        return False
968055
def get_device_category(self, cat):
        """"""
        if cat in self.device_categories:
            return self.device_categories[cat]
        else:
            return False
323314
def _check_device(self, requested_device, map_device):
        
        type_1 = torch.device(requested_device)
        type_2 = torch.device(map_device)
        if type_1 != type_2:
            warnings.warn(
                'Setting self.device = {} since the requested device ({}) '
                'is not available.'.format(map_device, requested_device),
                DeviceWarning)
            return map_device
        # return requested_device instead of map_device even though we
        # checked for *type* equality as we might have 'cuda:0' vs. 'cuda:1'.
        return requested_device
202576
def has_member(self, device_object):
        
        if device_object.tag == "computer":
            container_search = "computers/computer"
        elif device_object.tag == "mobile_device":
            container_search = "mobile_devices/mobile_device"
        else:
            raise ValueError

        return len([device for device in self.findall(container_search) if
                    device.findtext("id") == device_object.id]) is not 0
370383
def detect(self):
        """"""
        for theip in self.rips:
            LOG.debug("detected %s", str(theip))
            self.set_current_value(str(theip))
            return str(theip)
1190608
def detectUbuntuPhone(self):
        
        if UAgentInfo.deviceUbuntu in self.__userAgent \
           and UAgentInfo.mobile in self.__userAgent:
            return True

        return False
27033
def _check_devices(self):
        ""
        for i in range(1, len(self.poses)):
            pose = self.poses[i]
            if not pose.bDeviceIsConnected:
                continue
            if not pose.bPoseIsValid:
                continue
            if self.show_controllers_only:
                device_class = openvr.VRSystem().getTrackedDeviceClass(i)
                if not device_class == openvr.TrackedDeviceClass_Controller:
                    continue
            model_name = openvr.VRSystem().getStringTrackedDeviceProperty(i, openvr.Prop_RenderModelName_String)
            # Create a new mesh object, if necessary
            if model_name not in self.meshes:
                self.meshes[model_name] = TrackedDeviceMesh(model_name)
1022530
def detect_firefox_o_s_tablet()

      if (detect_ios() || detect_android() || detect_sailfish())
        return false
      end

      if ((user_agent.include?(ENGINE_FIREFOX)) && (user_agent.include?(DEVICE_TABLET)))
        return true
      end

      return false
    end
817330
private static boolean isKnxInterfaceId(final String device)
	{
		boolean knownVendor = false;
		boolean knownProduct = false;
		final String[] split = device.split(":", -1);
		try {
			final int vend = Integer.parseInt(split[0], 16);
			final int prod = Integer.parseInt(split[1], 16);
			for (final int v : vendorIds)
				knownVendor |= v == vend;
			for (final int p : productIds)
				knownProduct |= p == prod;
		}
		catch (final NumberFormatException ignore) {}
		return knownVendor && knownProduct;
	}
1199924
function DetectBrewDevice()
   {
       if (stripos($this->useragent, $this->deviceBrew) > -1)
         return $this->true; 
      else
         return $this->false; 
   }
1052474
def is_discovered(self):
        """"""
        if self.target_device is None:
            return False

        if None in (self.target_device.version_text, self.target_device.os_type, self.target_device.os_version,
                    self.target_device.inventory_text, self.target_device.family, self.target_device.platform):
            return False
        return True
872234
def detectIphone(self):
        
        # The iPad and iPod touch say they're an iPhone! So let's disambiguate.
        return UAgentInfo.deviceIphone in self.__userAgent \
            and not self.detectIpad() \
            and not self.detectIpod()
998976
function DetectMeego()
   {
      if (stripos($this->useragent, $this->deviceMeego) > -1)
         return $this->true; 
      else
         return $this->false; 
   }
304293
def is_up(self):
        '''  '''

        # Get existing device flags
        ifreq = struct.pack('16sh', self.name, 0)
        flags = struct.unpack('16sh', fcntl.ioctl(sockfd, SIOCGIFFLAGS, ifreq))[1]

        # Set new flags
        if flags & IFF_UP:
            return True
        else:
            return False
802854
function DetectGarminNuvifone()
   {
      if (stripos($this->useragent, $this->deviceNuvifone) > -1)
         return $this->true; 
      else
         return $this->false; 
   }
1148727
def detectSmartphone(self):
        
        return self.detectTierIphone() \
            or self.detectS60OssBrowser() \
            or self.detectSymbianOS() \
            or self.detectWindowsMobile() \
            or self.detectBlackBerry() \
            or self.detectMeegoPhone() \
            or self.detectPalmWebOS()