Return the state data from the master
768758
def compile_master(self):
        '''
        
        '''
        load = {'grains': self.grains,
                'opts': self.opts,
                'cmd': '_master_state'}
        try:
            return self.channel.send(load, tries=3, timeout=72000)
        except SaltReqTimeoutError:
            return {}
521637
def getStatus(self):
    """"""
    command = '$GS'
    status = self.sendCommand(command)
    return states[int(status[1])]
319534
def getstate(d):
    '''
    '''
    if not isinstance(d, dict):
        raise TypeError("Can only get the state of a dictionary")
    cpd = copy.deepcopy(d)
    cpd.pop('_links', None)
    cpd.pop('_embedded', None)
    return cpd
717119
def get(self, request, bot_id, format=None):
        
        return super(StateList, self).get(request, bot_id, format)
476144
def state(self):
        
        state = self._resource.get('state', self.default_state)
        if state not in State:
            state = getattr(State, state)

        if not self.parent:
            raise Exception('Unable to check the parent state')

        parent_state = self.parent.state

        return max([state, parent_state], key=attrgetter('value'))
1018730
def __load_state(self):
        
        try:
            return ConfigState(json.load(open(self.config_state_path)))
        except (OSError, IOError) as exc:
            if exc.errno == errno.ENOENT:
                self.__dump_state({})
                return json.load(open(self.config_state_path))
            raise
989398
def current(self):
        
        if self.obj is not None:
            return {name: mstate(self.obj, self.cls)
                for name, mstate in self.statemanager.states.items()
                if mstate(self.obj, self.cls)}
52056
def get_state(self, state):
        """"""
        # Check to see if we have a change request pending; if we do
        # return the value we expect it to change to.
        for data in list(self._send_queue.queue):
            desired_states = data['desired_states']
            for desired_state in desired_states:
                if desired_state['state'] == state:
                    return desired_state['enabled']
        if state == States.FILTER_LOW_SPEED:
            return (States.FILTER.value & self._flashing_states) != 0
        return (state.value & self._states) != 0
1293149
def get_controller_state(self):
        """"""
        dpos = self.pos - self.last_pos
        self.last_pos = np.array(self.pos)
        return dict(
            dpos=dpos,
            rotation=self.rotation,
            grasp=int(self.grasp),
            reset=self._reset_state,
        )
682378
def _get_lowstate(self):
        '''
        
        '''
        if not self.request.body:
            return
        data = self.deserialize(self.request.body)
        self.request_payload = copy(data)

        if data and 'arg' in data and not isinstance(data['arg'], list):
            data['arg'] = [data['arg']]

        if not isinstance(data, list):
            lowstate = [data]
        else:
            lowstate = data

        return lowstate
859
private void serializeMasterState(MasterState state, DataOutputStream dos) throws IOException {
		// magic number for error detection
		dos.writeInt(MASTER_STATE_MAGIC_NUMBER);

		// for safety, we serialize first into an array and then write the array and its
		// length into the checkpoint
		final ByteArrayOutputStream baos = new ByteArrayOutputStream();
		final DataOutputStream out = new DataOutputStream(baos);

		out.writeInt(state.version());
		out.writeUTF(state.name());

		final byte[] bytes = state.bytes();
		out.writeInt(bytes.length);
		out.write(bytes, 0, bytes.length);

		out.close();
		byte[] data = baos.toByteArray();

		dos.writeInt(data.length);
		dos.write(data, 0, data.length);
	}
25880
def get_state(self):
        ""
        return {'opt_state':self.opt.state_dict(), 'lr':self._lr, 'wd':self._wd, 'beta':self._beta, 'mom':self._mom,
                'opt_func':self.opt_func, 'true_wd':self.true_wd, 'bn_wd':self.bn_wd}
612420
def get_state(self, as_str=False):
        

        uid = self.user_id

        if self._iface_user.get_id() == uid:
            result = self._iface.get_my_state()

        else:
            result = self._iface.get_state(uid)

        if as_str:
            return UserState.get_alias(result)

        return result
295442
def get_state(self, minimal:bool=True):
        ""
        to_remove = ['exclude', 'not_min'] + getattr(self, 'exclude', []).copy()
        if minimal: to_remove += getattr(self, 'not_min', []).copy()
        return {k:v for k,v in self.__dict__.items() if k not in to_remove}
938677
def result(self, state, action):
        '''
        '''
        rows = string_to_list(state)
        row_e, col_e = find_location(rows, 'e')
        row_n, col_n = find_location(rows, action)

        rows[row_e][col_e], rows[row_n][col_n] = rows[row_n][col_n], rows[row_e][col_e]

        return list_to_string(rows)
773248
def get_state(self):
        
        D = {}
        for key in self._state_props:
            D[key] = getattr(self, key)
        return D
161551
def get_states(self, devices):
        """"""
        header = BASE_HEADERS.copy()
        header['Cookie'] = self.__cookie

        json_data = self._create_get_state_request(devices)

        request = requests.post(
            BASE_URL + 'getStates',
            headers=header,
            data=json_data,
            timeout=10)

        if request.status_code != 200:
            self.__logged_in = False
            self.login()
            self.get_states(devices)
            return

        try:
            result = request.json()
        except ValueError as error:
            raise Exception(
                "Not a valid result for" +
                "getStates, protocol error:" + error)

        self._get_states(result)