<commit_before># takes data in the format of top 10 lists and aggregates a rating
# 1. <NAME> Truth: 0.26319335065 (60) degree: 269
# 2. <NAME>: 0.233173296203 (82) degree: 81
# 3. <NAME>: 0.228159937465 (90) degree: 99
# 4. T.I.: 0.226115197565 (80) degree: 96
# 5. Ludacris: 0.201772441884 (77) degree: 100
# 6. Jeezy: 0.196197456087 (77) degree: 65


file = open("rankingData.txt", "r")

def data(file):
	d = {}
	i = 0
	for line in file:
		if line.strip() != '':
			start = line.index(". ")
			key = line[start+2:line.index(":")]
			val = abs(i - 9) + 1
			i += 1
			i %= 10

			if key in d.keys():
				d[key] = d[key] + val
			else:
				d[key] = val

	for key in sorted(d.keys(), key=d.get, reverse=True):
		print key, d[key]

artists = data(file)<commit_msg>updated file<commit_after># takes data in the format of top 10 lists and aggregates a rating
# 1. Trae Tha Truth: 0.26319335065 (60) degree: 269
# 2. <NAME>: 0.233173296203 (82) degree: 81
# 3. <NAME>: 0.228159937465 (90) degree: 99
# 4. T.I.: 0.226115197565 (80) degree: 96
# 5. Ludacris: 0.201772441884 (77) degree: 100
# 6. Jeezy: 0.196197456087 (77) degree: 65


file = open("data.txt", "r")

def data(file):
	d = {}
	i = 0
	for line in file:
		if line.strip() != '':
			start = line.index(". ")
			key = line[start+2:line.index(":")]
			val = abs(i - 9) + 1
			i += 1
			i %= 10

			if key in d.keys():
				d[key] = d[key] + val
			else:
				d[key] = val

	for key in sorted(d.keys(), key=d.get, reverse=True):
		print key, d[key]

artists = data(file)
{'fraction_non_alphanumeric': 0.17894736842105263, 'fraction_numerical': 0.15526315789473685, 'mean_word_length': 3.0344827586206895, 'pattern_counts': {'":': 2, '<': 8, '<?xml version=': 0, '>': 8, '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': '1301528', 'n_tokens_mistral': 849, 'n_tokens_neox': 628, 'n_words': 197}