<commit_before>#!/home/pi/.virtualenvs/stephmeter/bin/python

import nextbus
import pwm_calibrate
import led
import time
from settings import *

def main():
	l = led.LED(SERIAL_DEVICE, SERIAL_SPEED)
	p = pwm_calibrate.PWMCalibrator()
	p_range = p.get_range()
	nb = nextbus.NextbusPredictor(NEXTBUS_ROUTES)

	while True:
		nb.refresh_if_necessary()
		(route, minutes) = nb.get_closest_arrival()
		minutes = min(max(minutes, p_range[0]), p_range[1])
		if int(route)==43:
			l.set(0, 255, 0)
		elif int(route)==42:
			l.set(0, 0, 255)
		P.setPWM(minutes)

		time.sleep(0.1)

if __name__ == '__main__':
	main()<commit_msg>load calibration file properly; typo on variable name<commit_after>#!/home/pi/.virtualenvs/stephmeter/bin/python

import nextbus
import pwm_calibrate
import led
import time
from settings import *

def main():
	l = led.LED(SERIAL_DEVICE, SERIAL_SPEED)
	p = pwm_calibrate.PWMCalibrator()
	p.load()
	p_range = p.get_range()
	nb = nextbus.NextbusPredictor(NEXTBUS_ROUTES)

	while True:
		nb.refresh_if_necessary()
		(route, minutes) = nb.get_closest_arrival()
		minutes = min(max(minutes, p_range[0]), p_range[1])
		if int(route)==43:
			l.set(0, 255, 0)
		elif int(route)==42:
			l.set(0, 0, 255)
		p.setPWM(minutes)

		time.sleep(0.1)

if __name__ == '__main__':
	main()
{'fraction_non_alphanumeric': 0.14152410575427682, 'fraction_numerical': 0.027993779160186624, 'mean_word_length': 4.823529411764706, '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': '4373151', 'n_tokens_mistral': 589, 'n_tokens_neox': 529, 'n_words': 105}