<commit_before>function toggle_filters() {
	if ($('#filters').style("display") == "none") {
		$('#filters').style("display", "table-row");
	}

	else {
		$('#filters').hide();
	}
}

function update_filters() {
	// Pull all filters into array and get the values of checked ones
	filters = [...document.getElementsByClassName("filter-parameter")].filter(x => x.checked).map(x => x.value)

	// Pull all items
	items = [...document.getElementsByClassName("inventory-item")]
	
	for (var i = items.length - 1; i >= 0; i--) {
		// default to hidden
		items[i].style.display = "none";
		
		// Pull item ids
		let ids = [...items[i].childNodes].map(x => x.id);
		
		// Find matches between ids and search paramets
		let matches = filters.filter(x => ids.includes(x)).length

		if (matches == filters.length) {
			items[i].style.display = "table-row";
		}
	}
}

function sort_table(column) {
	rows = [...document.getElementsByClassName("inventory-item")]
	sorted = rows.sort(a, b => {
		return (a > b)? 1 : -1;
	})
	for (var i = rows.length - 1; i >= 0; i--) {
		rows[i] = sorted[i]
	}
}

function fuzzy_search(column) {
	console.log("searching " + column)
}<commit_msg>So apparently JS has built in string support...<commit_after>function toggle_filters() {
	if ($('#filters').style("display") == "none") {
		$('#filters').style("display", "table-row");
	}

	else {
		$('#filters').hide();
	}
}

function update_filters() {
	// Pull all filters into array and get the values of checked ones
	filters = [...document.getElementsByClassName("filter-parameter")].filter(x => x.checked).map(x => x.value)

	// Pull all items
	items = [...document.getElementsByClassName("inventory-item")]
	
	for (var i = items.length - 1; i >= 0; i--) {
		// default to hidden
		items[i].style.display = "none";
		
		// Pull item ids
		let ids = [...items[i].childNodes].map(x => x.id);
		
		// Find matches between ids and search paramets
		let matches = filters.filter(x => ids.includes(x)).length

		if (matches == filters.length) {
			items[i].style.display = "table-row";
		}
	}
}

function sort_table(column) {
	rows = [...document.getElementsByClassName("inventory-item")]
	sorted = rows.sort()
	for (var i = rows.length - 1; i >= 0; i--) {
		rows[i] = sorted[i]
	}
}

function fuzzy_search(column) {
	console.log("searching " + column)
}
{'fraction_non_alphanumeric': 0.19230769230769232, 'fraction_numerical': 0.00432152117545376, 'mean_word_length': 3.4864341085271318, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '4083799', 'n_tokens_mistral': 826, 'n_tokens_neox': 778, 'n_words': 189}