<commit_before>import subprocess
import os

def get_memory_usage():
    """Return int containing memory used by this process.
    Don't trust this too much, I'm not totally sure what ps rss measures
    """

    pid = os.getpid()
    process = subprocess.Popen("ps -o rss %s | awk '{sum+=$1} END {print sum}'" % pid,
                                    shell=True,
                                    stdout=subprocess.PIPE,
                                    )
    stdout_list = process.communicate()[0].split('\n')
    return int(stdout_list[0])
<commit_msg>Format docstrings in utils/mem.py<commit_after>"""
.. todo::

    WRITEME
"""
import subprocess
import os

def get_memory_usage():
    """
    Return int containing memory used by this process. Don't trust this too
    much, I'm not totally sure what ps rss measures.
    """

    pid = os.getpid()
    process = subprocess.Popen("ps -o rss %s | awk '{sum+=$1} END {print sum}'" % pid,
                                    shell=True,
                                    stdout=subprocess.PIPE,
                                    )
    stdout_list = process.communicate()[0].split('\n')
    return int(stdout_list[0])

{'fraction_non_alphanumeric': 0.11450381679389313, 'fraction_numerical': 0.005089058524173028, 'mean_word_length': 1.7962085308056872, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1420020', 'n_tokens_mistral': 344, 'n_tokens_neox': 329, 'n_words': 98}