<commit_before>require 'csv'

player_avail = []
playerids = []
play_count = 0
#read in players file, get player id
players_file = File.open('../players.txt')

#sort out the known and unknown ids
players_file.readlines.each do |line|
	if line !~ /playerid/
		playerids << "unknown"
	else
		playerid = line.scan(/playerid=(\w+)/)
		playerids << playerid[0]
	end
end

updated_csv = CSV.open('../updated_tjanalysis.csv', 'w')
updated_csv << ['Player', 'Player ID', 'TJ Surgery Date', 'Team', 'Majors']
players = CSV.foreach('../tjanalysis.csv', headers:true) do |row|
	updated_row =  [row['Player'], playerids[play_count][0], row['TJ Surgery Date'], row['Team'], row['Majors']]
	updated_csv.puts updated_row
	play_count = play_count + 1
end
<commit_msg>Cleaned up unnecessary code.<commit_after>require 'csv'

playerids = []
play_count = 0
#read in players file, get player id
players_file = File.open('../players.txt')

#sort out the known and unknown ids
players_file.readlines.each do |line|
	if line !~ /playerid/
		playerids << "unknown"
	else
		playerid = line.scan(/playerid=(\w+)/)
		playerids << playerid[0]
	end
end

updated_csv = CSV.open('../updated_tjanalysis.csv', 'w')
updated_csv << ['Player', 'Player ID', 'TJ Surgery Date', 'Team', 'Majors']
players = CSV.foreach('../tjanalysis.csv', headers:true) do |row|
	updated_row =  [row['Player'], playerids[play_count][0], row['TJ Surgery Date'], row['Team'], row['Majors']]
	updated_csv.puts updated_row
	play_count = play_count + 1
end

{'fraction_non_alphanumeric': 0.16856187290969898, 'fraction_numerical': 0.005351170568561873, 'mean_word_length': 4.984, 'pattern_counts': {'":': 0, '<': 15, '<?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': '7162524', 'n_tokens_mistral': 554, 'n_tokens_neox': 533, 'n_words': 138}