<commit_before>"""fontTools.misc.textTools.py -- miscellaneous routines."""


from __future__ import print_function, division
from fontTools.misc.py23 import *
import string


def safeEval(data, eval=eval):
	"""A (kindof) safe replacement for eval."""
	return eval(data, {"__builtins__":{}})


def readHex(content):
	"""Convert a list of hex strings to binary data."""<commit_msg>Use ast.literal_eval to implement safeEval<commit_after>"""fontTools.misc.textTools.py -- miscellaneous routines."""


from __future__ import print_function, division
from fontTools.misc.py23 import *
import ast
import string


safeEval = ast.literal_eval

def readHex(content):
	"""Convert a list of hex strings to binary data."""
{'fraction_non_alphanumeric': 0.11954992967651196, 'fraction_numerical': 0.005625879043600563, 'mean_word_length': 5.592592592592593, 'pattern_counts': {'":': 1, '<': 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': '1983231', 'n_tokens_mistral': 218, 'n_tokens_neox': 201, 'n_words': 67}