<commit_before>define(['underscore', 'models/base'], function(_, Base) {

    var Machine = Base.extend({
        defaults: { 'model_name': 'machine' },
        parse: function(response) {
            response.id = response.alias;
            return response;
        }
    });

    _.extend(Machine.defaults, Base.defaults);

    return Machine;
});<commit_msg>Add version formatter on machine, convert start_date to javascript Date on parse<commit_after>define(['underscore', 'models/base'], function(_, Base) {

    var Machine = Base.extend({
        defaults: { 'model_name': 'machine' },
        parse: function(response) {
            response.id = response.alias;
            response.start_date = new Date(response.start_date);
            return response;
        },
        pretty_version: function() {
            var parts = this.get('version').split('.');
            for (var i = 0; i <= 3 - parts.length; i++)
                parts.push("0");
            return parts.join(".");
        }
    });

    _.extend(Machine.defaults, Base.defaults);

    return Machine;
});
{'fraction_non_alphanumeric': 0.1456221198156682, 'fraction_numerical': 0.0027649769585253456, 'mean_word_length': 2.2710843373493974, 'pattern_counts': {'":': 0, '<': 4, '<?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': '6425478', 'n_tokens_mistral': 301, 'n_tokens_neox': 288, 'n_words': 70}