<commit_before>// provide row comparison, post-processing, pre-processing, etc

// these are the "generic" types that some of our rows classify as
// preprocess takes in the cell value, then turns it into something compare can use
// compare should return the "best" out of both parameters
// postprocess takes the original value and turns it into hooman-readable form
// preprocess and postprocess may be omitted
const unitToNum = inStr => {
    const splitUp = inStr.split(' ');
    const units = {
        'KiB': 1024,
        'MiB': 1024 * 1024,
        'GiB': 1024 * 1024 * 1024,
        'KB': 1000,
        'MB': 1000 * 1000,
        'GB': 1000 * 1000 * 1000,
        'KiB/s': 1024,
        'MiB/s': 1024 * 1024,
        'GiB/s': 1024 * 1024 * 1024,
        'KB/s': 1000,
        'MB/s': 1000 * 1000,
        'GB/s': 1000 * 1000 * 1000,
        'Hz': 1,
        'KHz': 1000,
        'MHz': 1000 * 1000,
        'GHz': 1000 * 1000 * 1000,
        'KFLOPS': 1000,
        'MFLOPS': 1000 * 1000,
        'GFLOPS': 1000 * 1000 * 1000,
        'TFLOPS': 1000 * 1000 * 1000 * 1000,
    }
    return units[splitUp[1]] ? splitUp[0] * units[splitUp[1]] : +splitUp[0];
}

const versionCompare = (a, b) => {
	if (a == 'N/A')
		a = '0.0'
	if (b == 'N/A')
		b = '0.0'
    const aSplit = a.split('.').map(Number);
    const bSplit = b.split('.').map(Number);<commit_msg>Get rid of N/A version comparisons<commit_after>// provide row comparison, post-processing, pre-processing, etc

// these are the "generic" types that some of our rows classify as
// preprocess takes in the cell value, then turns it into something compare can use
// compare should return the "best" out of both parameters
// postprocess takes the original value and turns it into hooman-readable form
// preprocess and postprocess may be omitted
const unitToNum = inStr => {
    const splitUp = inStr.split(' ');
    const units = {
        'KiB': 1024,
        'MiB': 1024 * 1024,
        'GiB': 1024 * 1024 * 1024,
        'KB': 1000,
        'MB': 1000 * 1000,
        'GB': 1000 * 1000 * 1000,
        'KiB/s': 1024,
        'MiB/s': 1024 * 1024,
        'GiB/s': 1024 * 1024 * 1024,
        'KB/s': 1000,
        'MB/s': 1000 * 1000,
        'GB/s': 1000 * 1000 * 1000,
        'Hz': 1,
        'KHz': 1000,
        'MHz': 1000 * 1000,
        'GHz': 1000 * 1000 * 1000,
        'KFLOPS': 1000,
        'MFLOPS': 1000 * 1000,
        'GFLOPS': 1000 * 1000 * 1000,
        'TFLOPS': 1000 * 1000 * 1000 * 1000,
    }
    return units[splitUp[1]] ? splitUp[0] * units[splitUp[1]] : +splitUp[0];
}

const versionCompare = (a, b) => {
    const aSplit = a.split('.').map(Number);
    const bSplit = b.split('.').map(Number);
{'fraction_non_alphanumeric': 0.15295868998883513, 'fraction_numerical': 0.1243021957573502, 'mean_word_length': 2.2424607961399277, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6568505', 'n_tokens_mistral': 1231, 'n_tokens_neox': 879, 'n_words': 300}