<commit_before>import sys
import Adafruit_DHT

# Specify AM203 Sensor on Raspberry Pi GPIO pin #4 (Physical Pin 7)
sensor = Adafruit_DHT.AM2302
pin = '4'

# Attempt to read sensor.  Uses read_retry method, trying up to 15 times. 
# Store results as variables.
humidity, temperature = Adafruit_DHT.read_retry(sensor, pin)

# Convert celsius temperature to Fahrenheit
tempFahrenheit = temperature * 9/5.0 + 32 

# Check for valid inputs before displaying results
# Print result to screen
if humidity is not None and temperature is not None and tempFahrenheit is not None:
    print('Temp Celsius = {0:0.1f} degrees + '\n' Temp Fahrenheit = {0:0.1f}  degrees + '\n'  Relative Humidity = {1:0.1f}%'.format(temperature, tempFahrenheit,humidity))
else:
    print('Failed to get reading. Try again!')
    sys.exit(1)
<commit_msg>more formatting<commit_after>import sys
import Adafruit_DHT

# Specify AM203 Sensor on Raspberry Pi GPIO pin #4 (Physical Pin 7)
sensor = Adafruit_DHT.AM2302
pin = '4'

# Attempt to read sensor.  Uses read_retry method, trying up to 15 times. 
# Store results as variables.
humidity, temperature = Adafruit_DHT.read_retry(sensor, pin)

# Convert celsius temperature to Fahrenheit
tempFahrenheit = temperature * 9/5.0 + 32 

# Check for valid inputs before displaying results
# Print result to screen
if humidity is not None and temperature is not None and tempFahrenheit is not None:
    print('Temp Celsius = {0:0.1f} degrees  \nTemp Fahrenheit = {0:0.1f}  degrees \nRelative Humidity = {1:0.1f}%'.format(temperature, tempFahrenheit, humidity))
else:
    print('Failed to get reading. Try again!')
    sys.exit(1)

{'fraction_non_alphanumeric': 0.08918753817959682, 'fraction_numerical': 0.032987171655467315, 'mean_word_length': 4.478260869565218, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4758238', 'n_tokens_mistral': 572, 'n_tokens_neox': 526, 'n_words': 194}