<commit_before>import time
import re

import serial
import gspread

from settings import *


def approved_id_list():
	for x in ['74E81E0587']:
		yield x

def main():

	re_identifiers = re.compile(r'\[([0-9A-F])\]')

	# open serial connection
	ser = serial.Serial(SERIAL_PORT, SERIAL_RATE)

	# wait for Arduino to restart due to serial connection
	time.sleep(2) 

	while line = ser.readline():
		match = re_identifiers.search(line)
		if match is not None:
			if match.group(1) in approved_id_list():
				ser.write('G')
			else:
				ser.write('R')


if __name__ == '__main__':
	main()<commit_msg>working demo, hey, how about that<commit_after>import time
import re

import serial
import gspread

from settings import *


def approved_id_list():
	for x in ['74E81E0587', 'A43D6FBB4D']:
		yield x

def main():

	re_identifiers = re.compile(r'\[(.{10})\]')

	print 'starting...'

	# open serial connection
	ser = serial.Serial(SERIAL_PORT, SERIAL_RATE)

	# wait for Arduino to restart due to serial connection
	time.sleep(2) 

	while True:
		print 'waiting...'
		line = ser.readline()
		print 'got %s' % line
		match = re_identifiers.search(line)
		if match is not None:
			print 'found ID %s' % match.group(1)
			if match.group(1) in approved_id_list():
				ser.write('G')
			else:
				ser.write('R')


if __name__ == '__main__':
	main()
{'fraction_non_alphanumeric': 0.1312828207051763, 'fraction_numerical': 0.02175543885971493, 'mean_word_length': 3.7985611510791366, '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': '2161327', 'n_tokens_mistral': 543, 'n_tokens_neox': 478, 'n_words': 139}