<commit_before>import wiringpi
from time import sleep                         # import library WiringPi-Python

wiringpi.wiringPiSetup()                       # Must be called before using IO function
wiringpi.pinMode(1,0)                          # Set pin 1 to 0 (INPUT)
wiringpi.pinMode(21,1)                         # Set pin 21 to 1 (OUTPUT)

try:
	while True:                                   # endless loop
		if wiringpi.digitalRead(1)== 1:        # read pin 1, if pin 1 is 0 (LOW)
			print "Moving Object Detected"
			#sleep(0.5)
			wiringpi.digitalWrite(21,1)     # if True, write pin 21 to 1 (HIGH)
		else:
			print "No Object Detected"
			#sleep(0.5)
			wiringpi.digitalWrite(21,0)     # if False, write pin 21 to 0 (LOW)
			
except KeyboardInterrupt:
	wiringpi.softPwmWrite(21,0)		# PWM pulse on pin 21
	print "exit"<commit_msg>Update 04_Motion_Detector.py<commit_after>import wiringpi # import library WiringPi-Python
from time import sleep

wiringpi.wiringPiSetup() # Must be called before using IO function
wiringpi.pinMode(1, 0) # Set pin 1 to 0 (INPUT)
wiringpi.pinMode(21, 1) # Set pin 21 to 1 (OUTPUT)

try:
	while True: # endless loop
		if wiringpi.digitalRead(1) == True:
			print("Moving Object Detected")
			sleep(0.5)
			wiringpi.digitalWrite(21, 1) # if True, write pin 21 to 1 (HIGH)
		else:
			print("No Object Detected")
			sleep(0.5)
			wiringpi.digitalWrite(21, 0) # if False, write pin 21 to 0 (LOW)
			
except KeyboardInterrupt:
	wiringpi.pinMode(21, 1)
	wiringpi.digitalWrite(21, 0)
	print("exit")
{'fraction_non_alphanumeric': 0.09797517962116264, 'fraction_numerical': 0.046374918354016983, 'mean_word_length': 2.727493917274939, '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': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6331492', 'n_tokens_mistral': 609, 'n_tokens_neox': 511, 'n_words': 164}