<commit_before>"""The setup plugin: when the meta-problem counter reaches a high level"""
import pbt
import os
from glob import glob
from os.path import join, dirname, basename
from collections import defaultdict
from xdg.BaseDirectory import save_data_path, load_data_paths
import time


def test_or_compiled_file(path):
    return (('__pycache__' in path) or
            path[-4:] == '.pyc' or
            path[-4:] == '.pyo' or
            basename(path)[:5] == 'test_')


def only_interesting_files(l):
    """Weeds out all compiled modules and test files."""
    return filter(lambda path: not test_or_compiled_file(path), l)


def recursive(root, spec):
    files = defaultdict(lambda: [])
    ans = []

    for path in only_interesting_files(glob(spec)):
        base = join(root, dirname(path))

        files[base].append(path)
<commit_msg>cleanup after the output of pbt check, setp 3.1: the setup plugin.<commit_after>"""The setup plugin: when the meta-problem counter reaches a high level"""
import pbt
import os
from glob import glob
from os.path import join, dirname, basename
from collections import defaultdict
import time


def test_or_compiled_file(path):
    return (('__pycache__' in path) or
            path[-4:] == '.pyc' or
            path[-4:] == '.pyo' or
            basename(path)[:5] == 'test_')


def only_interesting_files(l):
    """Weeds out all compiled modules and test files."""
    return filter(lambda path: not test_or_compiled_file(path), l)


def recursive(root, spec):
    files = defaultdict(lambda: [])
    ans = []

    for path in only_interesting_files(glob(spec)):
        base = join(root, dirname(path))

        files[base].append(path)

{'fraction_non_alphanumeric': 0.11604499703966845, 'fraction_numerical': 0.004736530491415038, 'mean_word_length': 3.543010752688172, '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': '2843373', 'n_tokens_mistral': 531, 'n_tokens_neox': 502, 'n_words': 168}