<commit_before>#Django command helper to apply django related fields patch programattically
import django
import os
from subprocess import Popen, PIPE

patch_file = os.path.join(os.path.abspath('.'),'bin','django-related-fields.patch')
dir_to_file_in_need_of_patch = os.path.dirname(django.__file__)
process = Popen(['patch','-p1'],stdin=PIPE,shell=False,cwd=dir_to_file_in_need_of_patch)
process.communicate(open(patch_file).read())<commit_msg>Attempt at logging<commit_after>#Django command helper to apply django related fields patch programattically
import django
import os
from subprocess import Popen, PIPE

patch_file = os.path.join(os.path.abspath('.'),'bin','django-related-fields.patch')
dir_to_file_in_need_of_patch = os.path.dirname(django.__file__)
process = Popen(['patch','-p1'],stdin=PIPE,shell=False,cwd=dir_to_file_in_need_of_patch)
print process.communicate(open(patch_file).read())
{'fraction_non_alphanumeric': 0.12652608213096558, 'fraction_numerical': 0.0022197558268590455, 'mean_word_length': 9.022222222222222, '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': '4433791', 'n_tokens_mistral': 303, 'n_tokens_neox': 301, 'n_words': 54}