<commit_before>import json
import glob
import os
import re
import copy
import numpy

# write scalefactor in ifb
scaleFactor = 2

# edit with the path to the files you're looking at, so we can figure out did to group mapping
pathToFiles = r'./TA02_MBJ13V4-6/'

# this holds a list of various subset of counts
count_types = ['raw', 'weighted', 'scaled']

# this holds a structure of a group with the control region counts and signal region counts
groups = {}

# get the did to group mapping
files = glob.glob(os.path.join(pathToFiles, "*_*L/fetch/data-optimizationTree/*.root"))
p = re.compile(os.path.join(pathToFiles, r'(.*?)_\dL/fetch/data-optimizationTree/.*(\d{6}).*root'))
did_to_group = {}<commit_msg>some quick changes to be more flexible<commit_after>import json
import glob
import os
import re
import copy
import numpy

# write scalefactor in ifb
scaleFactor = 2

# edit with the path to the files you're looking at, so we can figure out did to group mapping
pathToFiles = r'./TA03'

# this holds a list of various subset of counts
count_types = ['raw', 'weighted', 'scaled']

# this holds a structure of a group with the control region counts and signal region counts
groups = {}

# get the did to group mapping
files = glob.glob(os.path.join(pathToFiles, "*_*L/fetch/data-optimizationTree/*"))
p = re.compile(os.path.join(pathToFiles, r'(.*?)_\dL/fetch/data-optimizationTree/.*(\d{6}).*'))
did_to_group = {}
{'fraction_non_alphanumeric': 0.11644318983768526, 'fraction_numerical': 0.008468595624558928, 'mean_word_length': 4.626984126984127, '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': '3268536', 'n_tokens_mistral': 453, 'n_tokens_neox': 441, 'n_words': 170}