<commit_before>import time, datetime
import sys
from display.display import Display
from fakesensor import FakeSensor
from sensors import Sensor
from display.graph import Graph
from display.clock import Clock
from teensy import Peripherals
from scheduler import Scheduler


class SleepApp:

	def __init__(self):
		self.quitting = False
		Peripherals.init()
		#self.sensor = Sensor(Peripherals.devices["Pillow"])
		#self.sensor = FakeSensor()
		self.display = Display(320, 240)
		#self.graph = Graph(self.display, self.sensor)
		self.clock = Clock(self.display)
		self.scheduler = Scheduler()

		#self.sensor.startLogging()

	def start(self):
		while True:
			if self.scheduler.elapsed(0.02):
				#self.sensor.readData()
				self.clock.render()
				#self.graph.render((1,2,3))
				#self.scheduler.check()

	def quit(self):
		print "Quit..."
		self.quitting = True
		time.sleep(1)
		sys.exit()<commit_msg>Beginn Scheduler<commit_after>import time, datetime
import sys
from display.display import Display
from fakesensor import FakeSensor
from sensors import Sensor
from display.graph import Graph
from display.clock import Clock
from teensy import Peripherals
from scheduler import Scheduler


class SleepApp:

	def __init__(self):
		self.quitting = False
		Peripherals.init()
		self.sensor = Sensor(Peripherals.devices["Pillow"])
		#self.sensor = FakeSensor()
		self.display = Display(320, 240)
		self.graph = Graph(self.display, self.sensor)
		self.clock = Clock(self.display)
		self.scheduler = Scheduler()

		#self.sensor.startLogging()

	def start(self):
		while True:
			if self.scheduler.elapsed(0.02):
				self.sensor.readData()
				self.clock.render()
				self.graph.render((1,2,3))
				#self.scheduler.check()

	def quit(self):
		print "Quit..."
		self.quitting = True
		time.sleep(1)
		sys.exit()
{'fraction_non_alphanumeric': 0.11634349030470914, 'fraction_numerical': 0.014404432132963989, 'mean_word_length': 4.280701754385965, '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': '41867', 'n_tokens_mistral': 672, 'n_tokens_neox': 593, 'n_words': 146}