<commit_before>def random_string(length=32,upper=True,lower=True,digits=True):
    # Generates a random string with selectable characters
    # By: <NAME>
    from random import choice
    chars = ""
    if upper:
        chars+="QWERTYUIOPASDFGHJKLZXCVBNM"
    if lower:
        chars+="qwertyuiopasdfghjklzxcvbnm"
    if digits:
        chars+="1234567890"
    return(''.join(choice(chars) for _ in range(length)))<commit_msg>improved random letter generator memory usage.<commit_after>def random_string(length=32,upper=True,lower=True,digits=True):
    # Generates a random string with selectable characters
    # By: <NAME>
    from random import choice
    letters = "qwertyuiopasdfghjklzxcvbnm"
    chars = ""
    if upper:
        chars+=letters.upper()
    if lower:
        chars+=letters
    if digits:
        chars+="1234567890"
    return(''.join(choice(chars) for _ in range(length)))
{'fraction_non_alphanumeric': 0.10801781737193764, 'fraction_numerical': 0.026726057906458798, 'mean_word_length': 3.6102564102564103, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1599225', 'n_tokens_mistral': 320, 'n_tokens_neox': 284, 'n_words': 64}