<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

# External module imports
import pigpio
import time

# Pin Definitons:
pi = pigpio.pi()
butPin = 17 # Broadcom pin 17 (P1 pin 11)



print("Here we go! Press CTRL+C to exit")
try:
    for i in range(20):
        pi.read(17)
        time.sleep(0.5)
except KeyboardInterrupt: # If CTRL+C is pressed, exit cleanly:
    exit()<commit_msg>re-added while 1: (...)<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

# External module imports
import pigpio
import time

# Pin Definitons:
pi = pigpio.pi()



print("Here we go! Press CTRL+C to exit")
try:
    while 1:
        if pi.read(17): # button is released
            print("in 1")
            print(pi.read(17))
            time.sleep(0.5)
        else: # button is pressed:
            print("in 2")
            print(pi.read(17))
            time.sleep(0.5)
except KeyboardInterrupt: # If CTRL+C is pressed, exit cleanly:
    exit()
{'fraction_non_alphanumeric': 0.1382198952879581, 'fraction_numerical': 0.030366492146596858, 'mean_word_length': 2.4265232974910393, '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': '5287001', 'n_tokens_mistral': 353, 'n_tokens_neox': 329, 'n_words': 99}