Query the status of a specific pin (or all configured pins if pin is ommitted)
516702
def get_device(self, pin=None):
        
        url = self.base_url + '/device'
        try:
            r = requests.get(url, params={'pin': pin}, timeout=10)
            return r.json()
        except RequestException as err:
            raise Client.ClientError(err)
300507
def set_pin_retries(ctx, pw_attempts, admin_pin, force):
    
    controller = ctx.obj['controller']
    resets_pins = controller.version < (4, 0, 0)
    if resets_pins:
        click.echo('WARNING: Setting PIN retries will reset the values for all '
                   '3 PINs!')
    force or click.confirm('Set PIN retry counters to: {} {} {}?'.format(
        *pw_attempts), abort=True, err=True)
    controller.set_pin_retries(*(pw_attempts + (admin_pin.encode('utf8'),)))
    click.echo('PIN retries successfully set.')
    if resets_pins:
        click.echo('Default PINs are set.')
        echo_default_pins()
700796
def query_status(self):
        ''''''
        try:
            data = self.api_iface._api_get(self.link)
            self._update_details(data)
        except APIError as e:
            print("API error: ")
            for key,value in e.data.iteritems:
                print(str(key) + ": " + str(value))
823489
def _check_status(status):
    """"""
    if status != constants.STATUS_SUCCESS:
        exception = STATUS_TO_EXCEPTION.get(status, CairoError)
        status_name = ffi.string(ffi.cast("cairo_status_t", status))
        message = 'cairo returned %s: %s' % (
            status_name, ffi.string(cairo.cairo_status_to_string(status)))
        raise exception(message, status)
649164
def get_status(address=None):
    
    address = address or (config.dbserver.host, DBSERVER_PORT)
    return 'running' if socket_ready(address) else 'not-running'
310463
function ( )
			{
				for ( var Counter = 0; Counter < _Pins.length; Counter++) {
					_Pins [ Counter ].getElement ( ).style.visibility = 'visible';
				}
			}
873868
def is_pinned(self, color: Color, square: Square) -> bool:
        
        return self.pin_mask(color, square) != BB_ALL
413119
def statusEnquiry():
    """"""
    a = TpPd(pd=0x3)
    b = MessageType(mesType=0x34)  # 00110100
    packet = a / b
    return packet
492897
def device_status(self):
        """"""
        try:
            return self.device_status_simple(
                self.data.get('status').get('status1'))
        except (KeyError, AttributeError):
            return self.device_status_simple('')
171620
def pin(value):
    ''''''
    if value is False:
        return draw_pin('Build Failed', 'red')
    elif value is True:
        return draw_pin('Build Passed')
    elif value is NOT_FOUND:
        return draw_pin('Build N / A', 'lightGray', 'black')
    return draw_pin('In progress ...', 'lightGray', 'black')
481733
def status(self, obj):
        """"""

        data_size = DWORD()
        data = PDWORD()
        opcode_value_type = DWORD()
        self._wlan_query_interface(self._handle, obj['guid'], 6,
                                   byref(data_size), byref(data),
                                   byref(opcode_value_type))

        return status_dict[data.contents.value]
845181
def encode_pin(self, pin, matrix=None):
        """"""
        if matrix is None:
            _, matrix = self.read_pin()
        return "".join([str(matrix.index(p) + 1) for p in pin])
1225484
def status(self):
        """"""

        resp = requests.get("http://{0}/get_status.cgi".format(self.address))
        data = resp.text.replace(";", "")
        data = data.replace("var", "")
        data_s = data.split("\n")
        # Last is an empty line 
        data_s.pop()
        data_array = [s.split("=") for s in data_s]
        return dict(data_array)
19440
def kpl_status(self, address, group):
        """"""
        addr = Address(address)
        device = self.plm.devices[addr.id]
        device.states[group].async_refresh_state()
358316
def get_gpio_pin(self, pin_number, dest_addr_long=None):
        
        frame = self._send_and_wait(
            command=const.IO_PIN_COMMANDS[pin_number],
            dest_addr_long=dest_addr_long
        )
        value = frame["parameter"]
        return const.GPIO_SETTINGS[value]
124428
def get_status(self):
        """"""
        headers = {
            "X-AppName": "MusicCast/0.1(python)",
            "X-AppPort": str(self._udp_port)
        }
        req_url = ENDPOINTS["getStatus"].format(self.ip_address, 'main')
        return request(req_url, headers=headers)
915916
def _get_vpn_status(self):
        """"""
        # Sleep for a bit to let any changes in state finish
        sleep(0.3)
        # Check if any active connections are a VPN
        bus = SystemBus()
        ids = []
        for name in self.active:
            conn = bus.get(".NetworkManager", name)
            if conn.Vpn:
                ids.append(conn.Id)
        # No active VPN
        return ids