Get the most recent state of the physics engine.
335387
def update_rigid_body_tick(self, rigid_body_tick: RigidBodyTick):
        """"""
        rlbot_status = self.game.UpdateRigidBodyTick(rigid_body_tick)
        self.game_status(None, rlbot_status)
        return rigid_body_tick
1357559
def updated(self):
        ''
        return dateutil.parser.parse(str(self.f.currentRevision.updated))
1189209
def status(self):
        ''''''
        if self.download is None:
            return "Not started"

        transferred = self.download - self.prev_download
        self.prev_download = self.download
        now = time.time()
        interval = now - self.last_status_time
        self.last_status_time = now
        return("DFLogger: %(state)s Rate(%(interval)ds):%(rate).3fkB/s "
               "Block:%(block_cnt)d Missing:%(missing)d Fixed:%(fixed)d "
               "Abandoned:%(abandoned)d" %
               {"interval": interval,
                "rate": transferred/(interval*1000),
                "block_cnt": self.last_seqno,
                "missing": len(self.missing_blocks),
                "fixed": self.missing_found,
                "abandoned": self.abandoned,
                "state": "Inactive" if self.stopped else "Active"})
128439
def state(self, time=None):
        
        if time is None:
            return max(self.infos(type=State), key=attrgetter('creation_time'))
        else:
            states = [
                s for s in self.infos(type=State) if s.creation_time < time]
            return max(states, key=attrgetter('creation_time'))
391823
def _get_status(self):
        """"""
        if self._state in ["processed", "error"]:
            return self._state
        
        get_resp = requests.get(self.location, cookies={"session": self.session})

        self._state = get_resp.json()["status"]
        self.slice_time = get_resp.json()["slice_time"]
        
        return self._state
381264
def status(self):
        ''''''
        transfered = self.download - self.prev_download
        now = time.time()
        interval = now - self.last_status_time
        self.last_status_time = now
        return("DFLogger: %(state)s Rate(%(interval)ds):%(rate).3fkB/s Block:%(block_cnt)d Missing:%(missing)d Fixed:%(fixed)d Abandoned:%(abandoned)d" %
              {"interval": interval,
               "rate": transfered/(interval*1000),
               "block_cnt": self.block_cnt,
               "missing": len(self.missing_blocks),
               "fixed": self.missing_found,
               "abandoned": self.abandoned,
               "state": "Inactive" if self.stopped else "Active"
           })
362528
def get_state(self):
        
        return {
            REG_X: self.index_x.value,
            REG_Y: self.index_y.value,

            REG_U: self.user_stack_pointer.value,
            REG_S: self.system_stack_pointer.value,

            REG_PC: self.program_counter.value,

            REG_A: self.accu_a.value,
            REG_B: self.accu_b.value,

            REG_DP: self.direct_page.value,
            REG_CC: self.get_cc_value(),

            "cycles": self.cycles,
            "RAM": tuple(self.memory._mem) # copy of array.array() values,
        }
473834
def last_datetime(self):
        """"""
        from datetime import datetime

        try:
            return datetime.fromtimestamp(self.state.lasttime)
        except TypeError:
            return None
1173139
def compute_state(self):
        
        data = {}
        data['directory'] = self._dir.path
        data['files'] = list(self._dir.files())
        data['subdirs'] = list(self._dir.subdirs())
        data['index'] = self.index()
        return data
793806
def get_recent_state(self, current_observation):
        
        # This code is slightly complicated by the fact that subsequent observations might be
        # from different episodes. We ensure that an experience never spans multiple episodes.
        # This is probably not that important in practice but it seems cleaner.
        state = [current_observation]
        idx = len(self.recent_observations) - 1
        for offset in range(0, self.window_length - 1):
            current_idx = idx - offset
            current_terminal = self.recent_terminals[current_idx - 1] if current_idx - 1 >= 0 else False
            if current_idx < 0 or (not self.ignore_episode_boundaries and current_terminal):
                # The previously handled observation was terminal, don't add the current one.
                # Otherwise we would leak into a different episode.
                break
            state.insert(0, self.recent_observations[current_idx])
        while len(state) < self.window_length:
            state.insert(0, zeroed_observation(state[0]))
        return state
656749
def get(self):
        """"""
        elapsed = datetime.now() - self._previous
        self._previous += elapsed
        return elapsed.total_seconds()
863757
def data(self):
        
        return self.model.state.entity_data(
            self.entity_type, self.entity_id, self._history_index)
1027780
def get_current(self):
        

        where = slice(self._oldest_frame_idx(), self._pos)
        major_axis = pd.DatetimeIndex(deepcopy(self.date_buf[where]), tz='utc')
        return pd.Panel(self.buffer.values[:, where, :], self.items,
                        major_axis, self.minor_axis, dtype=self.dtype)
519301
def current_index(self):
        """"""
        i = self._parent.proxy_model.mapToSource(self._parent.currentIndex())
        return i
1229263
def current_state(self):
        """"""
        state = {}
        for s in self._state:
            state[s] = getattr(self, s)
        return state
734784
synchronized CacheManager.CacheStatus toCacheStatus() {
        AtomicInteger oldestGeneration = new AtomicInteger(Integer.MAX_VALUE);
        AtomicInteger newestGeneration = new AtomicInteger(0);
        this.generations.keySet().forEach(g -> {
            if (oldestGeneration.get() > g) {
                oldestGeneration.set(g);
            }

            if (newestGeneration.get() < g) {
                newestGeneration.set(g);
            }
        });

        return new CacheManager.CacheStatus(this.totalSize, Math.min(newestGeneration.get(), oldestGeneration.get()), newestGeneration.get());
    }
391681
def get_status(self):
        
        if self.driver is None:
            return WhatsAPIDriverStatus.NotConnected
        if self.driver.session_id is None:
            return WhatsAPIDriverStatus.NotConnected
        try:
            self.driver.find_element_by_css_selector(self._SELECTORS['mainPage'])
            return WhatsAPIDriverStatus.LoggedIn
        except NoSuchElementException:
            pass
        try:
            self.driver.find_element_by_css_selector(self._SELECTORS['qrCode'])
            return WhatsAPIDriverStatus.NotLoggedIn
        except NoSuchElementException:
            pass
        return WhatsAPIDriverStatus.Unknown