<commit_before>import os
import path

def read_environ_keys():
	environ_file = path.makepath('~/.jab/environ').expanduser()
	lines = [ l.strip() for l in environ_file.lines() ]
	lines = [ l for l in lines if l and l[0] != '#' ]
	lines = [ l for l in lines if 'export' in l and '=' in l ]
	while_i_was_debugging ='\n'.join([l for l in lines if l.count('=') > 1])
	lines = [ l.replace('export','') for l in lines ]
	lines = [ l.strip() for l in lines ]
	lines = [ l.split('=',1) for l in lines ]
	lines = [ (key,value.strip('"').strip("'")) for key,value in lines ]
	lines = [ (key,value) for key,value in lines if '033' not in value]
	keys = []
	for key,value in lines:
		if key not in keys:
			keys.append(key)
	return sorted(keys)

def read_bash(keys):
	result = {}
	for key in keys:
		try: result[key] = os.environ[key]<commit_msg>makepath is better than path, because it is more jab-ish<commit_after>import os
import path

def read_environ_keys():
	environ_file = path.path('~/.jab/environ').expanduser()
	lines = [ l.strip() for l in environ_file.lines() ]
	lines = [ l for l in lines if l and l[0] != '#' ]
	lines = [ l for l in lines if 'export' in l and '=' in l ]
	while_i_was_debugging ='\n'.join([l for l in lines if l.count('=') > 1])
	lines = [ l.replace('export','') for l in lines ]
	lines = [ l.strip() for l in lines ]
	lines = [ l.split('=',1) for l in lines ]
	lines = [ (key,value.strip('"').strip("'")) for key,value in lines ]
	lines = [ (key,value) for key,value in lines if '033' not in value]
	keys = []
	for key,value in lines:
		if key not in keys:
			keys.append(key)
	return sorted(keys)

def read_bash(keys):
	result = {}
	for key in keys:
		try: result[key] = os.environ[key]
{'fraction_non_alphanumeric': 0.16774193548387098, 'fraction_numerical': 0.007038123167155425, 'mean_word_length': 3.673972602739726, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6922691', 'n_tokens_mistral': 643, 'n_tokens_neox': 634, 'n_words': 216}