Returns True if the interface is in monitor mode.
        Only available with Npcap.
161081
def ismonitor(self):
        """"""
        if self.cache_mode is not None:
            return self.cache_mode
        try:
            res = (self.mode() == "monitor")
            self.cache_mode = res
            return res
        except Scapy_Exception:
            return False
131958
def isInteractive():
    
    if sys.stdout.isatty() and os.name != 'nt':
        #Hopefully everything but ms supports '\r'
        try:
            import threading
        except ImportError:
            return False
        else:
            return True
    else:
        return False
1165444
def is_kdump_iommu_enabled(self):
        

        for line in self._boot_entries:
            if line.cmdline and IOMMU in line.cmdline:
                return True
        return False
24650
def is_kernel_driver_active(self, interface):
        
        """
        self._ctx.managed_open()
        return self._ctx.backend.is_kernel_driver_active(
                self._ctx.handle,
                interface)
595343
def monitor(self):
        """"""
        if self._monitor_api is None:
            self._monitor_api = self.get_monitor_api()
        return self._monitor_api
1208494
private static boolean acquireAnalysisPermitUnlessCancelled(IProgressMonitor monitor) throws InterruptedException {
        do {
            if (analysisSem.tryAcquire(1, TimeUnit.SECONDS)) {
                return true;
            }
        } while (!monitor.isCanceled());

        return false;
    }
1154778
def has_netmask(interface_name):
    
    for interface in interfaces():
        if interface["name"] == interface_name:
            if interface["netmask"] and len(interface["netmask"]) > 0:
                return True
            return False
    return False
872690
def _is_program_selected(progs):
    """"""
    mode = False
    for prog in progs:
        if getattr(Settings, prog.__name__):
            mode = True
            break
    return mode
567468
def cmp_mode(b, a):
        
        tmp = cmp(Q.CGDisplayModeIsUsableForDesktopGUI(a),
                  Q.CGDisplayModeIsUsableForDesktopGUI(b))
        if tmp != 0: return tmp
        tmp = cmp(our_IsUsableForDesktopGUI(a),
                  our_IsUsableForDesktopGUI(b))
        if tmp != 0: return tmp
        tmp = cmp(guess_bitDepth(Q.CGDisplayModeCopyPixelEncoding(a)),
                  guess_bitDepth(Q.CGDisplayModeCopyPixelEncoding(b)))
        if tmp != 0: return tmp
        tmp = cmp(Q.CGDisplayModeGetHeight(a) * Q.CGDisplayModeGetWidth(a),
                  Q.CGDisplayModeGetHeight(b) * Q.CGDisplayModeGetWidth(b))
        if tmp != 0: return tmp
        tmp = cmp(Q.CGDisplayModeGetHeight(a),
                  Q.CGDisplayModeGetHeight(b))
        if tmp != 0: return tmp
        tmp = cmp(Q.CGDisplayModeGetWidth(a),
                  Q.CGDisplayModeGetWidth(b))
        if tmp != 0: return tmp
        return cmp(Q.CGDisplayModeGetRefreshRate(a),
                   Q.CGDisplayModeGetRefreshRate(b))
460075
def is_connected(self):
        
        if self._is_open:
            err = hidapi.hid_read_timeout(self._device, ffi.NULL, 0, 0)
            if err == -1:
                return False
            else:
                return True
        else:
            en = Enumeration(vid=self.vendor_id, pid=self.product_id).find(path=self.path)
            if len(en) == 0:
                return False
            else:
                return True
1192254
def is_displayed(self):
        
        t = self.wait_timeout
        self.wait_timeout = 0
        try:
            self.reload()
            return any(e.is_displayed() for e in self)
        finally:
            self.wait_timeout = t
1359256
def with_condition(self, condition: Callable[[MonitorContext], bool]) -> 'MonitorTask':
        
        self._condition = condition
        return self
353050
public boolean isMonitorable(Class<?> clazz) {
        // Faster(?) path
        if (notMonitorable.contains(clazz)) {
            return false;
        } else if (monitorable.contains(clazz)) {
            return true;
        }

        boolean isMonitorable = true;
        if (!instrumentation.isModifiableClass(clazz)) {
            isMonitorable = false;
        } else if (clazz.isInterface()) {
            isMonitorable = false;
        } else if (clazz.isArray()) {
            isMonitorable = false;
        } else if (Proxy.isProxyClass(clazz)) {
            isMonitorable = false;
        } else if (clazz.isPrimitive()) {
            isMonitorable = false;
        } else if (isExcludedClass(Type.getInternalName(clazz))) {
            isMonitorable = false;
        } else if (!includeBootstrap && clazz.getClassLoader() == null) {
            isMonitorable = false;
        }

        // Update collections
        if (!isMonitorable) {
            synchronized (notMonitorable) {
                notMonitorable.add(clazz);
            }
        } else {
            monitorable.add(clazz);
        }
        return isMonitorable;
    }
1024890
def is_enabled():
    
    output = subprocess.check_output(['ufw', 'status'],
                                     universal_newlines=True,
                                     env={'LANG': 'en_US',
                                          'PATH': os.environ['PATH']})

    m = re.findall(r'^Status: active\n', output, re.M)

    return len(m) >= 1
1027493
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
    public static boolean hasPortraitScreenFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_SCREEN_PORTRAIT);
    }
308080
def monitor_exit(self):
        
        return pyhsm.debug_cmd.YHSM_Cmd_Monitor_Exit(self.stick).execute(read_response=False)
900544
private boolean shouldAnimate() {
        if (!mAnimationEnabled) {
            return false;
        }
        Display display = currentDisplay();
        if (display == null) {
            return false;
        }
        if (mVisibleStartTime <= 0) {
            return false;
        }
        long threshold = (long) (1000 / display.getRefreshRate());
        long millisVisible = elapsedRealtime() - mVisibleStartTime;
        return millisVisible > threshold;
    }