State of this instance. One of ``OFFLINE``, ``INITIALIZING``,
        ``INITIALIZED``, ``STARTING``, ``RUNNING``, ``STOPPING`` or
        ``FAILED``.
774554
def state(self):
        
        if self._proto.HasField('state'):
            return yamcsManagement_pb2.YamcsInstance.InstanceState.Name(self._proto.state)
        return None
133679
def _get_state():
    '''
    
    '''
    try:
        return pyconnman.ConnManager().get_property('State')
    except KeyError:
        return 'offline'
    except dbus.DBusException as exc:
        raise salt.exceptions.CommandExecutionError('Connman daemon error: {0}'.format(exc))
745533
def status(self):
        
        if 'sandbox_type' in self.engine.data:
            if self.engine.sandbox_type == 'none':
                return False
            return True
        return False
935551
def status(self):
        
        myNow = timezone.localtime(timezone=self.tz)
        if getAwareDatetime(self.date_to, self.time_to, self.tz) < myNow:
            return "finished"
        elif getAwareDatetime(self.date_from, self.time_from, self.tz) < myNow:
            return "started"
105308
def is_running(self):
        
        return self._process.state() in [self._process.Running, self._process.Starting]
17987
def getstate(self):
        
        state = "RUNNING"
        exit_code = -1

        exitcode_file = os.path.join(self.workdir, "exit_code")
        pid_file = os.path.join(self.workdir, "pid")

        if os.path.exists(exitcode_file):
            with open(exitcode_file) as f:
                exit_code = int(f.read())
        elif os.path.exists(pid_file):
            with open(pid_file, "r") as pid:
                pid = int(pid.read())
            try:
                (_pid, exit_status) = os.waitpid(pid, os.WNOHANG)
                if _pid != 0:
                    exit_code = exit_status >> 8
                    with open(exitcode_file, "w") as f:
                        f.write(str(exit_code))
                    os.unlink(pid_file)
            except OSError:
                os.unlink(pid_file)
                exit_code = 255

        if exit_code == 0:
            state = "COMPLETE"
        elif exit_code != -1:
            state = "EXECUTOR_ERROR"

        return state, exit_code
578183
private boolean isInstanceStopped(Instance myInstance) {
        InstanceState instanceState = myInstance.getState();
        return (instanceState.getName().equals("stopped"));
    }
31561
def _execution(self):
        

        did_start_executing = False

        if self.state == STATE_DEFAULT:
            did_start_executing = True
            self.state = STATE_EXECUTING

        def close():
            if did_start_executing and self.state == STATE_EXECUTING:
                self.state = STATE_DEFAULT

        yield close
        close()
924064
def failing(self):
        
        log_levels = {key: conn.log_level for key, conn in self.conns.items()
                      if hasattr(conn, 'log_level')}
        for key in log_levels:
            self.conns[key].log_level = logging.CRITICAL
        failing_conns = {key: conn for key, conn in self.active.items()
                         if not conn.check_status}
        for key, level in log_levels.items():
            self.conns[key].log_level = level
        return failing_conns
561771
def status
      output = run("info")
      result = output.scan(/^state:\s+([\w]+)|pid:\s+(-?[\d]+)$/).flatten

      LXC::Status.new(result.first, result.last)
    end
1154402
def initial_state(self) -> StateTensor:
        ''''''
        s0 = []
        for fluent in self._compiler.compile_initial_state(self._batch_size):
            s0.append(self._output_size(fluent))
        s0 = tuple(s0)
        return s0
852507
def state(self):
        
        return Emitter(weakref.proxy(self.lib), self.lib.jit_new_state())
949225
def is_all_initialized(self):
        '''
        '''
        return frozenset(self._class_map.keys()) == \
            frozenset(self._instance_map.keys())
707124
ServerStatus getState() {
        final InternalState requiredState = this.requiredState;
        final InternalState state = internalState;
        if(requiredState == InternalState.FAILED) {
            return ServerStatus.FAILED;
        }
        switch (state) {
            case STOPPED:
                return ServerStatus.STOPPED;
            case SERVER_STARTED:
                return  ServerStatus.STARTED;
            default: {
                if(requiredState == InternalState.SERVER_STARTED) {
                    return ServerStatus.STARTING;
                } else {
                    return ServerStatus.STOPPING;
                }
            }
        }
    }
976828
def status(self):
        """"""
        my_name = os.path.basename(sys.argv[0])
        if self._already_running():
            message = "{0} (pid  {1}) is running...\n".format(my_name, self.pid)
            sys.stdout.write(message)
            return 0
        sys.stdout.write("{0} is stopped\n".format(my_name))
        return 3
582022
def _startstop_bool(startb, stopb, runflag, stopextend):
    
    # All false at start
    res = np.zeros(len(startb)) == True  # NOQA

    start_slices = slicelist(startb)
    stop_slices = slicelist(stopb)

    # Special case when there is a start but no stop slice or vice versa:
    # if start_slices and not stop_slices:
    if runflag == 'startonly':
        try:
            start = start_slices[0]
            # Make True from first start and rest of array.
            res[start.start:] = True
            return res
        except IndexError:
            # Only start specified but no start condition
            # fullfilled. Return all False.
            return res

    elif runflag == 'stoponly':
        try:
            stop = stop_slices[0]
            res[:stop.start + stopextend] = True  # Make True up to first stop.
            return res
        except IndexError:
            # Only stop specified but no stop condition fullfilled
            # Return all True
            return res == False  # NOQA

    stop = slice(0, 0)           # For first check
    start = slice(0, 0)          # For a possibly empty list start_slices.
    for start in start_slices:
        if start.start < stop.start:
            continue
        for stop in stop_slices:
            if stop.start > start.start:
                res[start.start: stop.start + stopextend] = True
                break           # Next start
        else:
            # On a given start slice, the entire list of stop slices was
            # exhausted, none being later than the given start. It must mean
            # that from this given start, the rest is to be True:
            break

    # There was no stop for the last start in loop
    if start.start > stop.start:
        res[start.start:] = True

    return res
1245540
def state_name(self):
        
        if self.state == 1:
            return 'New Issue'

        elif self.state == 2:
            return 'Shutdown in 1 week'

        elif self.state == 3:
            return 'Shutdown in 1 day'

        elif self.state == 4:
            return 'Pending Shutdown'

        elif self.state == 5:
            return 'Stopped, delete in 12 weeks'

        elif self.state == 6:
            return 'Instance deleted'

        else:
            raise ValueError('Invalid state: {}'.format(self.state))