<commit_before>function Torrent(id, data) {
    this.id = id;
    this.name = data.name;
    this.progress = data.progress;
    this.state = data.state;
    this.size = data.total_size;
    this.position = data.queue;
    this.speed_download = data.download_payload_rate;
    this.speed_upload = data.upload_payload_rate;
    this.eta = data.eta;
    this.auto_managed = data.is_auto_managed;
}

Torrent.prototype.calc_size = function(size) {
    bytes = size / 1024.0;
    if (bytes < 1024) {
        return bytes.toFixed(1) + ' KiB';
    }

    bytes = bytes / 1024;
    if (bytes < 1024) {
        return bytes.toFixed(1) + ' MiB';
    }

    return (bytes / 1024).toFixed(1) + ' GiB';
};

Torrent.prototype.get_human_size = function() {
    return this.calc_size(this.size);
};

Torrent.prototype.get_position = function() {
    if (this.position < 0) {
        return '';
    }
    return this.position;
};

Torrent.prototype.get_percent = function() {
    return (Math.round(this.progress * Math.pow(10, 2)) / Math.pow(10, 2)) + '%';
};

Torrent.prototype.get_download = function() {
    return this.calc_size(this.speed_download) + '/s';
};

Torrent.prototype.get_upload = function() {
    return this.calc_size(this.speed_upload) + '/s';
};

Torrent.prototype.get_speeds = function() {
    return this.get_download() + ' - ' + this.get_upload();
};

Torrent.prototype.get_eta = function() {
    var secs = 0, mins = 0, hours = 0, days = 0;
    var time = this.eta;

    if (time === 0) {
        return '&infin;';
    }

    time = time.toFixed(0);
    if (time < 60) {
        return time + 's';
    }

    time = time / 60;
    if (time < 60) {
        mins = Math.floor(time);
        secs = Math.round(60 * (time - mins));

        if (secs > 0) {
            return mins + 'm' + ' ' + secs + 's';
        }
        return mins + 'm';
    }

    time = time / 60;<commit_msg>CamelCased<commit_after>function Torrent(id, data) {
    this.id = id;
    this.name = data.name;
    this.progress = data.progress;
    this.state = data.state;
    this.size = data.total_size;
    this.position = data.queue;
    this.speedDownload = data.download_payload_rate;
    this.speedUpload = data.upload_payload_rate;
    this.eta = data.eta;
    this.autoManaged = data.is_auto_managed;
}

Torrent.prototype.calcSize = function(size) {
    bytes = size / 1024.0;
    if (bytes < 1024) {
        return bytes.toFixed(1) + ' KiB';
    }

    bytes = bytes / 1024;
    if (bytes < 1024) {
        return bytes.toFixed(1) + ' MiB';
    }

    return (bytes / 1024).toFixed(1) + ' GiB';
};

Torrent.prototype.getHumanSize = function() {
    return this.calcSize(this.size);
};

Torrent.prototype.getPosition = function() {
    if (this.position < 0) {
        return '';
    }
    return this.position;
};

Torrent.prototype.getPercent = function() {
    return (Math.round(this.progress * Math.pow(10, 2)) / Math.pow(10, 2)) + '%';
};

Torrent.prototype.getDownload = function() {
    return this.calcSize(this.speedDownload) + '/s';
};

Torrent.prototype.getUpload = function() {
    return this.calcSize(this.speedUpload) + '/s';
};

Torrent.prototype.getSpeeds = function() {
    return this.getDownload() + ' - ' + this.get_upload();
};

Torrent.prototype.getEta = function() {
    var secs = 0, mins = 0, hours = 0, days = 0;
    var time = this.eta;

    if (time === 0) {
        return '&infin;';
    }

    time = time.toFixed(0);
    if (time < 60) {
        return time + 's';
    }

    time = time / 60;
    if (time < 60) {
        mins = Math.floor(time);
        secs = Math.round(60 * (time - mins));

        if (secs > 0) {
            return mins + 'm' + ' ' + secs + 's';
        }
        return mins + 'm';
    }

    time = time / 60;
{'fraction_non_alphanumeric': 0.15933919531041832, 'fraction_numerical': 0.025579536370903277, 'mean_word_length': 2.3911472448057816, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5848886', 'n_tokens_mistral': 1412, 'n_tokens_neox': 1307, 'n_words': 269}