Return True if Glances is running in standalone mode.
347792
def is_standalone(self):
        """"""
        return (not self.args.client and
                not self.args.browser and
                not self.args.server and
                not self.args.webserver)
133678
def _is_master_running(self):
        '''
        
        '''
        # Windows doesn't have IPC. Assume the master is running.
        # At worse, it will error 500.
        if salt.utils.platform.is_windows():
            return True

        if self.opts['transport'] == 'tcp':
            ipc_file = 'publish_pull.ipc'
        else:
            ipc_file = 'workers.ipc'
        return os.path.exists(os.path.join(
            self.opts['sock_dir'],
            ipc_file))
727933
def is_running(self):
        
        try:
            return graceful_get(self.inspect(refresh=True), "State", "Running")
        except subprocess.CalledProcessError:
            return False
869343
private boolean remoteViewerActive() {
        if (remoteQueue == null) {
            return false;
        }
        
        if (!remoteQueue.isAlive()) {
            remoteQueue = null;
            return false;
        }
        
        return true;
    }
56285
def is_block_device(path):
    '''
    
    '''
    if not os.path.exists(path):
        return False
    return S_ISBLK(os.stat(path).st_mode)
1194689
function isScreenOnFully (dumpsys) {
  let m = /mScreenOnFully=\w+/gi.exec(dumpsys);
  return !m || // if information is missing we assume screen is fully on
         (m && m.length > 0 && m[0].split('=')[1] === 'true') || false;
}
1360713
def _interactive_mode(interactive_flag=False):
    
    return any([interactive_flag, sys.flags.interactive, len(sys.argv) <= 1])
1276272
def _sysv_is_enabled(name, runlevel=None):
    '''
    
    '''
    # Try chkconfig first.
    result = _chkconfig_is_enabled(name, runlevel)
    if result:
        return True

    if runlevel is None:
        runlevel = _runlevel()
    return (
        len(glob.glob('/etc/rc.d/rc{0}.d/S??{1}'.format(runlevel, name))) > 0)
1175445
def has_scope(context=None):
    '''
    
    '''
    if not booted(context):
        return False
    _sd_version = version(context)
    if _sd_version is None:
        return False
    return _sd_version >= 205
853344
def is_runnnig(self):
        
        resp = None
        try:
            resp = requests.get("http://%s:%s" %(self._ip, self._port))

            if resp.status_code == 200:
                return True
            else:
                return False
        except:
            return False
612751
def is_enabled(iface):
    '''
    
    '''
    cmd = ['netsh', 'interface', 'show', 'interface', 'name={0}'.format(iface)]
    iface_found = False
    for line in __salt__['cmd.run'](cmd, python_shell=False).splitlines():
        if 'Connect state:' in line:
            iface_found = True
            return line.split()[-1] == 'Connected'
    if not iface_found:
        raise CommandExecutionError(
            'Interface \'{0}\' not found'.format(iface)
        )
    return False
450411
public static function is_running() {
		if (!file_exists(Config::$pid_file)) {
			return false;
		}

		$pid = file_get_contents(Config::$pid_file);
		if (posix_getpgid($pid) === false) {
			unlink(Config::$pid_file);
			return false;
		}

		return true;
	}
650468
def single_shot(self, check_status=True, **kwargs):
        
        self.check_pid_file()
        self.set_spectator_mode(False)
        if check_status: self.check_status()
        from .launcher import PyLauncher
        return PyLauncher(self, **kwargs).single_shot()
256161
def determine_interactive(self):
		
		try:
			if not sys.stdout.isatty() or os.getpgrp() != os.tcgetpgrp(sys.stdout.fileno()):
				self.interactive = 0
				return False
		except Exception:
			self.interactive = 0
			return False
		if self.interactive == 0:
			return False
		return True
450752
def detectUbuntuTablet(self):
        
        if UAgentInfo.deviceUbuntu in self.__userAgent \
           and UAgentInfo.deviceTablet in self.__userAgent:
            return True

        return False
126236
def is_screen_on(self):
        '''
        
        '''

        _screenOnRE = re.compile('mScreenOnFully=(true|false)')
        m = _screenOnRE.search(self.shell('dumpsys', 'window', 'policy'))
        if m:
            return (m.group(1) == 'true')
        raise RuntimeError("Couldn't determine screen ON state")
686384
def has_slave(self):
        ''''''
        slave = first(x for x in self.slaves.itervalues()
                      if not x.is_standalone)
        return slave is not None