Return internal temperature value in degrees celsius.
764496
def readInternalC(self):
        """"""
        v = self._read32()
        # Ignore bottom 4 bits of thermocouple data.
        v >>= 4
        # Grab bottom 11 bits as internal temperature data.
        internal = v & 0x7FF
        if v & 0x800:
            # Negative value, take 2's compliment. Compute this with subtraction
            # because python is a little odd about handling signed/unsigned.
            internal -= 4096
        # Scale by 0.0625 degrees C per bit and return value.
        return internal * 0.0625
36216
def in6_isllsnmaddr(str):
    
    temp = in6_and(b"\xff" * 13 + b"\x00" * 3, inet_pton(socket.AF_INET6, str))
    temp2 = b'\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00\x00'
    return temp == temp2
312888
private function _temperature()
    {
        foreach ($this->_lines as $line) {
            $buffer = preg_split("/\s*\|\s*/", $line);
            if (isset($buffer[2]) && $buffer[2] == "Temperature"
               && $buffer[1] == "Full"
               && isset($buffer[6]) && preg_match("/^(\S+)\sC$/", $buffer[6], $value)
               && $buffer[5] !== "Init") {
                $dev = new SensorDevice();
                $dev->setName($buffer[4]);
                $dev->setValue($value[1]);
                if (isset($buffer[7]) && $buffer[7] == "Thresholds") {
                    if ((isset($buffer[8]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[8], $limits))
                        ||(isset($buffer[9]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[9], $limits))
                        ||(isset($buffer[10]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[10], $limits))
                        ||(isset($buffer[11]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[11], $limits))) {
                        $dev->setMax($limits[1]);
                    }
                }
                if ($buffer[5] != "OK") $dev->setEvent($buffer[5]);
                $this->mbinfo->setMbTemp($dev);
            }
        }
    }
315248
public function temperature($input = 0)
    {
        $input = (float) $input;

        if ($this->input == 'si' && $this->output == 'si') {
            $this->displayFormat = 'C';
            $output              = (float) $input;
        } elseif ($this->input == 'si' && $this->output == 'uscs') {
            $this->displayFormat = 'F';
            $output              = (float) ((($input / 5) * 9) + 32);
        } elseif ($this->input == 'uscs' && $this->output == 'si') {
            $this->displayFormat = 'C';
            $output              = (float) ((($input - 32) / 9) * 5);
        } elseif ($this->input == 'uscs' && $this->output == 'uscs') {
            $this->displayFormat = 'F';
            $output              = (float) $input;
        }

        return (float) $output;
    }
1363294
private function _temperature()
    {
        if (isset($this->_filecontent["temp"]) && (trim($this->_filecontent["temp"]) !== "")) {
            $values = preg_split("/ /", trim($this->_filecontent["temp"]));
            foreach ($values as $id=>$value) {
                $dev = new SensorDevice();
                $dev->setName("temp".$id);
                $dev->setValue($value);
                $this->mbinfo->setMbTemp($dev);
            }
        }
    }
672200
def _read_temp(data):
    '''
    
    '''
    tout = StringIO()
    tout.write(data)
    tout.seek(0)
    output = tout.readlines()
    tout.close()

    return output
646545
def get_current_goal_temperature(self, refresh=False):
        """"""
        if refresh:
            self.refresh()
        try:
            return float(self.get_value('setpoint'))
        except (TypeError, ValueError):
            return None
1035766
def _verify_temperature(self, temp):
        
        if temp < self.min_temp or temp > self.max_temp:
            raise TemperatureException('Temperature {} out of range [{}, {}]'
                                       .format(temp, self.min_temp, self.max_temp))
1274180
def internal_temperature(self):
        
        temp_msb = self.bus.read_byte_data(AXP209_ADDRESS, INTERNAL_TEMPERATURE_MSB_REG)
        temp_lsb = self.bus.read_byte_data(AXP209_ADDRESS, INTERNAL_TEMPERATURE_LSB_REG)
        # MSB is 8 bits, LSB is lower 4 bits
        temp = temp_msb << 4 | temp_lsb & 0x0f
        # -144.7c -> 000h,	0.1c/bit	FFFh -> 264.8c
        return temp*0.1-144.7
1197924
def set_temperature(self, zone, temperature, until=None):
        """"""
        if until is None:
            data = {"Value": temperature, "Status": "Hold", "NextTime": None}
        else:
            data = {"Value": temperature,
                    "Status": "Temporary",
                    "NextTime": until.strftime('%Y-%m-%dT%H:%M:%SZ')}

        self._set_heat_setpoint(zone, data)
645293
def valid_daily_min_temperature(comp, units='K'):
    """

    @wraps(comp)
    def func(tasmin, *args, **kwds):
        check_valid_temperature(tasmin, units)
        check_valid(tasmin, 'cell_methods', 'time: minimum within days')
        return comp(tasmin, **kwds)

    return func
456109
def check_valid_temperature(var, units):
    """

    check_valid(var, 'standard_name', 'air_temperature')
    check_valid(var, 'units', units)
    assert_daily(var)
559573
def current_bed_temp(self):
        """"""
        try:
            bedtemps = self.intervals[0]['timeseries']['tempBedC']
            num_temps = len(bedtemps)

            if num_temps == 0:
                return None

            bedtemp = bedtemps[num_temps-1][1]
        except KeyError:
            bedtemp = None
        return bedtemp
814021
def read_raw_temp(self):
        """"""
        self.i2c.write8(BMP085_CONTROL, BMP085_READTEMPCMD)
        time.sleep(0.005)  # Wait 5ms
        raw = self.i2c.read_U16BE(BMP085_TEMPDATA)
        self.logger.debug('Raw temp 0x{0:X} ({1})', raw & 0xFFFF, raw)
        return raw
465239
def temperature_offset(self, offset):
        """"""
        _LOGGER.debug("Setting offset: %s", offset)
        # [-3,5 .. 0  .. 3,5 ]
        # [00   .. 07 .. 0e ]
        if offset < -3.5 or offset > 3.5:
            raise TemperatureException("Invalid value: %s" % offset)

        current = -3.5
        values = {}
        for i in range(15):
            values[current] = i
            current += 0.5

        value = struct.pack('BB', PROP_OFFSET, values[offset])
        self._conn.make_request(PROP_WRITE_HANDLE, value)
1224837
def compile_temp(d, key, value):
    
    if not value:
        d[key] = None
    elif len(value) == 1:
        d[key] = value[0]
    else:
        d[key] = value
    return d
94005
private double svp( double temp ) {
        double SVP;

        SVP = A_SVP * Math.exp((B_SVP * temp) / (C_SVP + temp));

        if (temp < 0)
            SVP *= 1.0 + .00972 * temp + .000042 * temp * temp;

        return (SVP);
    }