<commit_before>import os, difflib, time, gc, codecs
from pprint import pprint
import textwrap
        
markdown = None

TEST_DIR = "tests"
TMP_DIR = "./tmp/"
WRITE_BENCHMARK = True
WRITE_BENCHMARK = False
ACTUALLY_MEASURE_MEMORY = True

######################################################################

_proc_status = '/proc/%d/status' % os.getpid()

_scale = {'kB': 1024.0, 'mB': 1024.0*1024.0,
          'KB': 1024.0, 'MB': 1024.0*1024.0}

def _VmB(VmKey):
    '''Private.
    '''
    global _proc_status, _scale
     # get pseudo file  /proc/<pid>/status<commit_msg>Fixed memory measure for MacOS.<commit_after>import os, difflib, time, gc, codecs, platform
from pprint import pprint
import textwrap
        
markdown = None

TEST_DIR = "tests"
TMP_DIR = "./tmp/"
WRITE_BENCHMARK = True
WRITE_BENCHMARK = False
ACTUALLY_MEASURE_MEMORY = True

######################################################################

if platform.system().lower() == "darwin": # Darwin
    _proc_status = '/proc/%d/stat' % os.getpid()
else: # Linux
    _proc_status = '/proc/%d/status' % os.getpid()

_scale = {'kB': 1024.0, 'mB': 1024.0*1024.0,
          'KB': 1024.0, 'MB': 1024.0*1024.0}

def _VmB(VmKey):
    '''Private.
    '''
    global _proc_status, _scale
     # get pseudo file  /proc/<pid>/status
{'fraction_non_alphanumeric': 0.24305555555555555, 'fraction_numerical': 0.046296296296296294, 'mean_word_length': 3.857677902621723, 'pattern_counts': {'":': 1, '<': 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': '1408204', 'n_tokens_mistral': 507, 'n_tokens_neox': 450, 'n_words': 105}