<commit_before>"""
Flash an LED connected via a FTDI UM232R/245R module using pylibftdi

Copyright (c) 2010-2012 <NAME> <<EMAIL>>
All rights reserved.
"""

import time
from pylibftdi import BitBangDriver


def flash_forever(rate):
    "toggle bit zero at rate Hz"
    # put an LED with 1Kohm or similar series resistor
    # on D0 pin
    with BitBangDriver() as bb:
        while True:
            time.sleep(1.0 / (2 * rate))
            bb.port ^= 1

if __name__ == '__main__':
    flash_forever(1)
<commit_msg>fix led_flash example<commit_after>"""
Flash an LED connected via a FTDI UM232R/245R module using pylibftdi

Copyright (c) 2010-2012 <NAME> <<EMAIL>>
All rights reserved.
"""

import time
from pylibftdi import BitBangDevice


def flash_forever(rate):
    "toggle bit zero at rate Hz"
    # put an LED with 1Kohm or similar series resistor
    # on D0 pin
    with BitBangDevice() as bb:
        while True:
            time.sleep(1.0 / (2 * rate))
            bb.port ^= 1

if __name__ == '__main__':
    flash_forever(1)

{'fraction_non_alphanumeric': 0.0945945945945946, 'fraction_numerical': 0.04054054054054054, 'mean_word_length': 2.8838951310861423, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6415311', 'n_tokens_mistral': 391, 'n_tokens_neox': 348, 'n_words': 124}