<commit_before># memoised fib

cache = {}

def fib(n):
    try:
       result = cache[n]
    except:
       if n <= 1: result = 1
       else:
          result = fib(n-1) + fib(n-2)
    cache[n] = result
    return result

print(fib(300))
<commit_msg>Fixed indentation of cache update line in fib function - avoids unnecessary update of the cache<commit_after># memoised fib

cache = {}

def fib(n):
    try:
       result = cache[n]
    except:
       if n <= 1: result = 1
       else:
          result = fib(n-1) + fib(n-2)
       cache[n] = result
    return result

print(fib(300))

{'fraction_non_alphanumeric': 0.12095400340715502, 'fraction_numerical': 0.02385008517887564, 'mean_word_length': 2.127659574468085, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7383379', 'n_tokens_mistral': 212, 'n_tokens_neox': 200, 'n_words': 62}