The system status codes.
178613
def system_status(self):
        """"""
        flag, timestamp, status = self._query(('GETDAT? 1', (Integer, Float, Integer)))
        return {
            # convert unix timestamp to datetime object
            'timestamp': datetime.datetime.fromtimestamp(timestamp),
            # bit 0-3 represent the temperature controller status
            'temperature': STATUS_TEMPERATURE[status & 0xf],
            # bit 4-7 represent the magnet status
            'magnet': STATUS_MAGNET[(status >> 4) & 0xf],
            # bit 8-11 represent the chamber status
            'chamber': STATUS_CHAMBER[(status >> 8) & 0xf],
            # bit 12-15 represent the sample position status
            'sample_position': STATUS_SAMPLE_POSITION[(status >> 12) & 0xf],
        }
243838
def status_line(self):
        
        if not self.phrase:
            self.phrase = HttpStatus(self.status_code).phrase
        return "{} {} {}".format("HTTP/1.1", self.status_code, self.phrase)
97534
protected function status()
	{
		if ($len = strspn($this->data, '0123456789', $this->position))
		{
			$this->status_code = (int) substr($this->data, $this->position, $len);
			$this->position += $len;
			$this->state = 'reason';
		}
		else
		{
			$this->state = false;
		}
	}
701453
def pdbe_status_code(code):
    
    url = 'http://www.ebi.ac.uk/pdbe/entry-files/download/{0}_1.mmol'.format(code)
    r = requests.head(url=url)
    return r.status_code
827431
def system_info(self):
        """"""
        res = self.client.service.SystemInfo()
        res = {ustr(x[0]): x[1] for x in res[0]}

        to_str = lambda arr: '.'.join([ustr(x) for x in arr[0]])
        res['OSVersion'] = to_str(res['OSVersion'])
        res['RuntimeVersion'] = to_str(res['RuntimeVersion'])
        res['Version'] = to_str(res['Version'])

        res['Name'] = ustr(res['Name'])
        res['Server'] = ustr(res['Server'])
        res['LocalNameCheck'] = ustr(res['LocalNameCheck'])
        res['UserHostAddress'] = ustr(res['UserHostAddress'])

        return res
1202650
def extract_status(self, status_headers):
        
        self['status'] = status_headers.get_statuscode()
        if not self['status']:
            self['status'] = '-'
        elif self['status'] == '204' and 'Error' in status_headers.statusline:
            self['status'] = '-'
498014
def status(self):
        
        return {
            self.original: {
                'formatted_filename': self.out_location,
                'state': self.state,
                'messages': '\n\t'.join(self.messages),
            }
        }
331446
public function status()
    {
        return array_key_exists($this->statusCode(), self::$statuses)
            ? self::$statuses[$this->statusCode()]
            : 'Unknown';
    }
128497
private function checkStatus()
    {
        if (!$this->running) {
            return;
        }

        if ($this->running) {
            foreach (proc_get_status($this->resource) as $key => $value) {
                if ($key == 'command') {
                    continue;
                }

                $this->$key = $value;
            }
        }

        if (!$this->running) {
            $this->cleanup();
        }
    }
273906
def status_bar(self):
        
        print("")
        self.msg.template(78)
        print("| Repository         Status")
        self.msg.template(78)
971561
def status(self):
        ''''''
        self.status_callcount += 1
        self.last_bored = time.time() # status entertains us
        return("status called %(status_callcount)d times.  My target positions=%(packets_mytarget)u  Other target positions=%(packets_mytarget)u" %
               {"status_callcount": self.status_callcount,
                "packets_mytarget": self.packets_mytarget,
                "packets_othertarget": self.packets_othertarget,
               })
831858
def status(value = nil)
      response.status = Rack::Utils.status_code(value) if value
      response.status
    end
406956
def system_status():  # noqa: E501
    
    if(not hasAccess()):
        return redirectUnauthorized()

    body = State.config.serialize(["driver", "log", "log-file", "log-colorize"])
    body.update({'debug': State.options.debug, 'sensitive': State.options.sensitive})
    return Response(status=200, body=body)
1173449
def wrongstatus(data, sb, msb, lsb):
    

    # status bit, most significant bit, least significant bit
    status = int(data[sb-1])
    value = bin2int(data[msb-1:lsb])

    if not status:
        if value != 0:
            return True

    return False
1204374
def normal_check(name, status, device_type):
    """"""
    status_string = NORMAL_STATE.get(int(status), "unknown")

    if status_string == "ok":
        return ok, "{} '{}': {}".format(device_type, name, status_string)

    elif status_string == "unknown":
        return unknown, "{} '{}': {}".format(device_type, name, status_string)

    return critical, "{} '{}': {}".format(device_type, name, status_string)
619084
def deps_status(self):
        """"""
        if not self.deps:
            return [self.S_OK]

        return [d.status for d in self.deps]
229952
def ok(body='', code=200, **kw):
    """"""
    if not 200 <= code < 300:
        raise ValueError("Not a 2xx status code: '%s'" % code)
    return response(code=code, body=body, **kw)