<commit_before>var fs = require("fs");
exports.loadcards = function(Cards, CardCodes, Targeting){
	var names = ["pillar", "weapon", "shield", "permanent", "spell", "creature"];
	for(var i=0; i<names.length; i++){
		var csv = fs.readFileSync(names[_i] + ".csv").split("\n");
		var keys = csv[0].split(",");
		for(var j=1; j<csv.length; j++){
			var carddata = csv[j].split(",");
			var cardcode = carddata[2];
			var cardinfo = {};
			for(var k=0; k<carddata.length; k++){
				if (carddata[k].charAt(0) == '"'){
					for (var kk=k+1; kk<carddata.length; kk++){
						carddata[k] += "," + carddata[kk];
					}
					cardinfo[keys[k]] = carddata[k].substring(1, carddata[k].length-1).replace(/""/g, '"');
					break;
				}else{
					cardinfo[keys[k]] = carddata[k];
				}
			}
			var nospacename = carddata[1].replace(/ |'/g,"");
			Cards[nospacename in Cards?nospacename+"Up":nospacename] = CardCodes[cardcode] = new Card(_i, cardinfo);
		}
	}
	var csv = fs.readFileSync("active.csv").split("\n");
	for (var i=0; i<csv.length; i++){
		var keypair = csv[i].split(",");
		Targeting[keypair[0]] = getTargetFilter(keypair[1]);<commit_msg>Update etg.server.js with require(etg)<commit_after>var fs = require("fs");
var etg = require("./etg");
exports.loadcards = function(Cards, CardCodes, Targeting){
	var names = ["pillar", "weapon", "shield", "permanent", "spell", "creature"];
	for(var i=0; i<names.length; i++){
		var csv = fs.readFileSync(names[_i] + ".csv").split("\n");
		var keys = csv[0].split(",");
		for(var j=1; j<csv.length; j++){
			var carddata = csv[j].split(",");
			var cardcode = carddata[2];
			var cardinfo = {};
			for(var k=0; k<carddata.length; k++){
				if (carddata[k].charAt(0) == '"'){
					for (var kk=k+1; kk<carddata.length; kk++){
						carddata[k] += "," + carddata[kk];
					}
					cardinfo[keys[k]] = carddata[k].substring(1, carddata[k].length-1).replace(/""/g, '"');
					break;
				}else{
					cardinfo[keys[k]] = carddata[k];
				}
			}
			var nospacename = carddata[1].replace(/ |'/g,"");
			Cards[nospacename in Cards?nospacename+"Up":nospacename] = CardCodes[cardcode] = new etg.Card(_i, cardinfo);
		}
	}
	var csv = fs.readFileSync("active.csv").split("\n");
	for (var i=0; i<csv.length; i++){
		var keypair = csv[i].split(",");
		Targeting[keypair[0]] = etg.getTargetFilter(keypair[1]);
{'fraction_non_alphanumeric': 0.23245802841153682, 'fraction_numerical': 0.011192423590185106, 'mean_word_length': 4.164444444444444, 'pattern_counts': {'":': 2, '<': 13, '<?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': '3983294', 'n_tokens_mistral': 1038, 'n_tokens_neox': 916, 'n_words': 169}