<commit_before>#ODB2 datalogger

import obd

connection = obd.OBD()

while true:
    request = connection.query(obd.commands.RPM)

    if not r.is_null():
        print(r.value)<commit_msg>Handle ctrl+c with signal Fix more typos<commit_after>#ODB2 datalogger

import obd
import signal
import sys

#What to do when we receive a signal
def signal_handler(signal, frame):
    connection.close()
    sys.exit(0)
	
#Register our signal handler
signal.signal(signal.SIGINT, signal_handler)

#Find and connect OBD adapter
connection = obd.OBD()

while True:
    request = connection.query(obd.commands.RPM)

    if not request.is_null():
        print(request.value)
{'fraction_non_alphanumeric': 0.09545454545454546, 'fraction_numerical': 0.004545454545454545, 'mean_word_length': 4.007575757575758, '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': '3640943', 'n_tokens_mistral': 223, 'n_tokens_neox': 218, 'n_words': 61}