<commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
# Original code from: https://tutorials-raspberrypi.com/raspberry-pi-measure-humidity-temperature-dht11-dht22/
# <NAME> - v0.0.1 - 6/19/2018
import Adafruit_DHT
from datetime import datetime
#-----------------------------
sensor = Adafruit_DHT.DHT22
pin = 4
humidity, Celsius = Adafruit_DHT.read_retry(sensor, pin)
Fahrenheit = round((9.0/5.0 * Celsius + 32), 2)
humidity = round(humidity, 2)
#-----------------------------
var_Human_Output = "temperature: " + str(Fahrenheit) + "°F, Humidity: " + str(humidity) + "% at: " + datetime.now().strftime('%Y-%m-%d %H:%M:%S')
print str(var_Human_Output)<commit_msg>Update get_temps_basic.py<commit_after>#!/usr/bin/python
# -*- coding: utf-8 -*-
# Original code from: https://tutorials-raspberrypi.com/raspberry-pi-measure-humidity-temperature-dht11-dht22/
# <NAME> - v0.0.1 - 6/19/2018
from datetime import datetime
import Adafruit_DHT
#-----------------------------
sensor = Adafruit_DHT.DHT22
pin = 4
Humidity, Celsius = Adafruit_DHT.read_retry(sensor, pin)
Fahrenheit = round((9.0/5.0 * Celsius + 32), 2)
Celsius = round(Celsius, 2)
Humidity = round(Humidity, 2)
#-----------------------------
var_Human_Output = "Temperature: " + str(Fahrenheit) + "°F / " + str(Celsius) + "°C, Humidity: " + str(Humidity) + "% at: " + datetime.now().strftime('%Y-%m-%d %H:%M:%S')
print str(var_Human_Output)
{'fraction_non_alphanumeric': 0.24838940586972083, 'fraction_numerical': 0.03793843951324266, 'mean_word_length': 3.1607142857142856, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '5737027', 'n_tokens_mistral': 574, 'n_tokens_neox': 514, 'n_words': 91}