<s> from __future__ import absolute_import <EOL> import logging <EOL> from collections import namedtuple <EOL> import random <EOL> from apparent_temperature . measure_generator import MeasureGeneratorSpout <EOL> log = logging . getLogger ( '<STR_LIT>' ) <EOL> TemperatureMeasure = namedtuple ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" ) <EOL> class TemperatureSpout ( MeasureGeneratorSpout ) : <EOL> OUTPUT_FIELDS = TemperatureMeasure <EOL> SENSORS = { <EOL> <NUM_LIT> : ( <NUM_LIT> , <NUM_LIT:12> ) , <EOL> <NUM_LIT> : ( <NUM_LIT> , <NUM_LIT:10> ) , <EOL> <NUM_LIT> : ( <NUM_LIT> , <NUM_LIT:20> ) , <EOL> <NUM_LIT> : ( <NUM_LIT> , <NUM_LIT:8> ) , <EOL> <NUM_LIT> : ( <NUM_LIT> , <NUM_LIT:4> ) , <EOL> <NUM_LIT> : ( <NUM_LIT> , <NUM_LIT:10> ) , <EOL> <NUM_LIT> : ( <NUM_LIT> , <NUM_LIT:5> ) , <EOL> <NUM_LIT> : ( <NUM_LIT> , <NUM_LIT:11> ) , <EOL> <NUM_LIT> : ( <NUM_LIT> , <NUM_LIT> ) , <EOL> <NUM_LIT> : ( <NUM_LIT> , <NUM_LIT:16> ) , <EOL> <NUM_LIT> : ( <NUM_LIT> , <NUM_LIT:6> ) , <EOL> <NUM_LIT> : ( <NUM_LIT> , <NUM_LIT:8> ) , <EOL> <NUM_LIT> : ( <NUM_LIT> , <NUM_LIT:6> ) , <EOL> } <EOL> def measure ( self , * args ) : <EOL> return random . normalvariate ( * args ) <EOL> def log ( self , measure ) : <EOL> log . debug ( "<STR_LIT>" <EOL> . format ( * measure ) ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> logging . basicConfig ( <EOL> level = logging . DEBUG , <EOL> filename = '<STR_LIT>' , <EOL> filemode = '<STR_LIT:a>' , <EOL> ) <EOL> TemperatureSpout ( ) . run ( ) </s>
