Step to a given temperature.

        :param temperature: Get to this temperature.
185182
def _to_temperature(self, temperature):
        
        self._to_value(self._temperature, temperature,
                       self.command_set.temperature_steps,
                       self._warmer, self._cooler)
294511
def temperature(self, what):
        """"""
        self._temperature = units.validate_quantity(what, u.K)
1337437
def step(self, actions):
    
    for index, (env, action) in enumerate(zip(self._envs, actions)):
      if not env.action_space.contains(action):
        message = 'Invalid action at index {}: {}'
        raise ValueError(message.format(index, action))
    if self._blocking:
      transitions = [
          env.step(action)
          for env, action in zip(self._envs, actions)]
    else:
      transitions = [
          env.step(action, blocking=False)
          for env, action in zip(self._envs, actions)]
      transitions = [transition() for transition in transitions]
    observs, rewards, dones, infos = zip(*transitions)
    observ = np.stack(observs)
    reward = np.stack(rewards)
    done = np.stack(dones)
    info = tuple(infos)
    return observ, reward, done, info
1156598
def main():
    """"""

    fcodes = collections.OrderedDict((
        ('f.i', protocol.FLG_FORMAT_FDI),
        ('fi', protocol.FLG_FORMAT_FI),
        ('f.i.c', protocol.FLG_FORMAT_FDIDC),
        ('f.ic', protocol.FLG_FORMAT_FDIC),
        ('fi.c', protocol.FLG_FORMAT_FIDC),
        ('fic', protocol.FLG_FORMAT_FIC), ))

    def make_parser():
        # command line parsing

        parser = argparse.ArgumentParser()

        # positional args
        parser.add_argument('uri', metavar='URI', nargs='?', default='/',
                            help='[owserver:]//hostname:port/path')

        # optional args for temperature scale
        parser.set_defaults(t_flags=protocol.FLG_TEMP_C)
        tempg = parser.add_mutually_exclusive_group()
        tempg.add_argument('-C', '--Celsius', const=protocol.FLG_TEMP_C,
                           help='Celsius(default) temperature scale',
                           dest='t_flags', action='store_const', )
        tempg.add_argument('-F', '--Fahrenheit', const=protocol.FLG_TEMP_F,
                           help='Fahrenheit temperature scale',
                           dest='t_flags', action='store_const', )
        tempg.add_argument('-K', '--Kelvin', const=protocol.FLG_TEMP_K,
                           help='Kelvin temperature scale',
                           dest='t_flags', action='store_const', )
        tempg.add_argument('-R', '--Rankine', const=protocol.FLG_TEMP_R,
                           help='Rankine temperature scale',
                           dest='t_flags', action='store_const', )

        # optional arg for address format
        parser.set_defaults(format='f.i')
        parser.add_argument('-f', '--format', choices=fcodes,
                            help='format for 1-wire unique serial IDs display')

        # optional arg for output format
        tempg = parser.add_mutually_exclusive_group()
        tempg.add_argument('--hex', action='store_true',
                           help='write data in hex format')
        tempg.add_argument('-b', '--binary', action='store_true',
                           help='output binary data')

        # debug output
        parser.add_argument('-d', '--debug', action='store_true',
                            help='debug output')

        return parser

    def print_data(data):
        # format and print data

        if args.binary:
            if sys.version_info < (3, ):
                sys.stdout.write(data)
            else:
                sys.stdout.buffer.write(data)
        else:
            if args.hex:
                data = hexlify(data)
            else:
                try:
                    data = data.decode('ascii')
                except UnicodeDecodeError:
                    data = repr(data)
            print(data)

    #
    # main program starts here
    #

    #
    # parse command line arguments
    #
    parser = make_parser()
    args = parser.parse_args()

    #
    # parse args.uri and substitute defaults
    #
    urlc = urlsplit(args.uri, scheme='owserver', allow_fragments=False)
    assert urlc.fragment == ''
    if urlc.scheme != 'owserver':
        parser.error("Invalid URI scheme '{0}:'".format(urlc.scheme))
    if urlc.query:
        parser.error("Invalid URI, query component '?{0}' not allowed"
                     .format(urlc.query))
    try:
        host = urlc.hostname or 'localhost'
        port = urlc.port or 4304
    except ValueError as error:
        parser.error("Invalid URI: invalid net location '//{0}/'"
                     .format(urlc.netloc))

    #
    # create owserver proxy object
    #
    try:
        owproxy = protocol.proxy(
            host, port, flags=args.t_flags | fcodes[args.format],
            verbose=args.debug, )
    except protocol.ConnError as error:
        print("Unable to open connection to '{0}:{1}'\nSystem error: {2}"
              .format(host, port, error), file=sys.stderr)
        sys.exit(1)
    except protocol.ProtocolError as error:
        print("'{0}:{1}' not an owserver?\nProtocol error: {2}"
              .format(host, port, error), file=sys.stderr)
        sys.exit(1)

    #
    # query owserver and print results
    #
    try:
        if urlc.path.endswith('/'):
            for path in owproxy.dir(urlc.path, bus=True):
                print(path)
        else:
            data = owproxy.read(urlc.path)
            print_data(data)
    except protocol.OwnetError as error:
        print("Remote server error: {2}"
              .format(host, port, error), file=sys.stderr)
        sys.exit(1)
    except protocol.ProtocolError as error:
        print("'{0}:{1}' buggy?\nProtocol error: {2}"
              .format(host, port, error), file=sys.stderr)
        sys.exit(1)
1075060
def step(self):
        """"""
        op = self.code[self.instruction_pointer]
        self.instruction_pointer += 1
        op(self)
382282
def step(self):
        # type: () -> bool
        
        with self.__lock:
            self.__value -= 1
            if self.__value == 0:
                # All done
                self.__event.set()
                return True
            elif self.__value < 0:
                # Gone too far
                raise ValueError("The counter has gone below 0")

        return False
141779
def add_step(self, setting, duration):
        
        if len(self._prog_steps) < 10:
            self._prog_steps.append(ProgramStep(self, setting, duration))
        else:
            raise IndexError("Maximum of 10 steps are allowed")
247084
def move(self, particle, u, v, w, modelTimestep, **kwargs):
        

        # Kill the particle if it isn't settled and isn't already dead.
        if not particle.settled and not particle.dead:
            particle.die()

        # Still save the temperature and salinity for the model output
        temp = kwargs.get('temperature', None)
        if temp is not None and math.isnan(temp):
            temp = None
        particle.temp = temp

        salt = kwargs.get('salinity', None)
        if salt is not None and math.isnan(salt):
            salt = None
        particle.salt = salt

        u = 0
        v = 0
        w = 0

        # Do the calculation to determine the new location
        result = AsaTransport.distance_from_location_using_u_v_w(u=u, v=v, w=w, timestep=modelTimestep, location=particle.location)
        result['u'] = u
        result['v'] = v
        result['w'] = w
        return result
651011
def step(self, action):
    
    observ, reward, done, info = self._env.step(action)
    observ = self._convert_observ(observ)
    reward = self._convert_reward(reward)
    return observ, reward, done, info
198807
def step(self, observations):
        
        q_values = self(observations)

        return {
            'actions': self.q_head.sample(q_values),
            'q': q_values
        }
1147461
def step(self):
        
        assert len(self._agents_to_act) == 0
        self.next()
        while len(self._agents_to_act) > 0:
            self.next()
747774
def step(self):
        """"""
        if self.index >= len(self.tasklist):
            raise TaskError("step(): sequential compound task %s finished" % self)

        self.check_state()

        # Select next task from the set and advance the index
        self.task = self.tasklist[self.index]
        self.index += 1

        return self.runTask(self.task)
1046918
def target_temperature(self, temperature):
        """"""
        dev_temp = int(temperature * 2)
        if temperature == EQ3BT_OFF_TEMP or temperature == EQ3BT_ON_TEMP:
            dev_temp |= 0x40
            value = struct.pack('BB', PROP_MODE_WRITE, dev_temp)
        else:
            self._verify_temperature(temperature)
            value = struct.pack('BB', PROP_TEMPERATURE_WRITE, dev_temp)

        self._conn.make_request(PROP_WRITE_HANDLE, value)
1217116
def readTempC(self):
		""""""
		# Read temperature register value.
		t = self._device.readU16BE(MCP9808_REG_AMBIENT_TEMP)
		self._logger.debug('Raw ambient temp register value: 0x{0:04X}'.format(t & 0xFFFF))
		# Scale and convert to signed value.
		temp = (t & 0x0FFF) / 16.0
		if t & 0x1000:
			temp -= 256.0
		return temp
547775
def learn(self, steps=1, **kwargs):
        
        # TODO add some housekeeping
        for i in range(steps):
            self.step(**kwargs)
678871
def step(self, t, x_im1, v_im1_2, dt):
        

        x_i = x_im1 + v_im1_2 * dt
        F_i = self.F(t, np.vstack((x_i, v_im1_2)), *self._func_args)
        a_i = F_i[self.ndim:]

        v_i = v_im1_2 + a_i * dt / 2
        v_ip1_2 = v_i + a_i * dt / 2

        return x_i, v_i, v_ip1_2
971852
private static UnitValue temperature(UnitValue value, Unit target) {
    BigDecimal n = value.amount();
    if (target == Unit.TEMPERATURE_GENERIC) {
      return new UnitValue(n, Unit.TEMPERATURE_GENERIC);
    }

    switch (value.unit()) {
      case FAHRENHEIT:
        if (target == Unit.CELSIUS) {
            n = n.subtract(THIRTY_TWO);
            n = new Rational(n, BigDecimal.ONE).multiply(FIVE_NINTHS).compute(RoundingMode.HALF_EVEN);
        } else if (target == Unit.KELVIN) {
            n = n.add(KELVIN_FAHRENHEIT);
            n = new Rational(n, BigDecimal.ONE).multiply(FIVE_NINTHS).compute(RoundingMode.HALF_EVEN);
        }
        break;
        
      case CELSIUS:
        if (target == Unit.FAHRENHEIT) {
          Rational r = new Rational(n, BigDecimal.ONE);
          n = r.multiply(NINE_FIFTHS).compute(RoundingMode.HALF_EVEN).add(THIRTY_TWO);
        } else if (target == Unit.KELVIN) {
          n = n.add(KELVIN_CELSIUS);
        }
        break;
        
      case KELVIN:
        if (target == Unit.CELSIUS) {
          n = n.subtract(KELVIN_CELSIUS);
        } else if (target == Unit.FAHRENHEIT) {
          Rational r = new Rational(n, BigDecimal.ONE).multiply(NINE_FIFTHS);
          n = r.compute(RoundingMode.HALF_EVEN).subtract(KELVIN_FAHRENHEIT);
        }
        break;
        
      default:
        return new UnitValue(n, Unit.TEMPERATURE_GENERIC);
    }

    return new UnitValue(n.stripTrailingZeros(), target);
  }