<commit_before>YUI.add("model-list-tweets", function(Y) {
    "use strict";
    
    var tristis    = Y.namespace("Tristis"),
        models     = Y.namespace("Tristis.Models"),
        extensions = Y.namespace("Extensions"),
        
        Tweets;
    
    Tweets = Y.Base.create("tweets", Y.LazyModelList, [
        extensions.ModelListMore,
    ], {
        model   : models.Tweet,
        
        sync : function(action, options, done) {
            var args = {};
            
            if(this.size()) {
                args.since_id = this.item(0).id_str;
            }
            
            args = Y.merge(
                { count : 50 },
                this.get("config") || {},
                args
            );
            
            this.loading = true;
            
            tristis.twitter.get(this.get("api"), args, function(err, resp) {
                if(err) {
                    return done(err);
                }
                
                done(err, resp);
            });
        },
        
        // Ensure that tweets use string IDs instead of Numbers
        parse : function(response) {
            return response.map(function(tweet) {
                tweet.id = tweet.id_str;
                
                return tweet;
            });
        }
    }, {
        ATTRS : {
            api     : null,
            config  : null
        }
    });
    
    models.Tweets = Tweets;
    
}, "@VERSION@", {
    requires : [
        // YUI
        "base-build",
        "lazy-model-list",
        
        // Extensions
        "extension-model-list-more",
        <commit_msg>Get 200 tweets & sort them by date<commit_after>YUI.add("model-list-tweets", function(Y) {
    "use strict";
    
    var tristis    = Y.namespace("Tristis"),
        models     = Y.namespace("Tristis.Models"),
        extensions = Y.namespace("Extensions"),
        
        Tweets;
    
    Tweets = Y.Base.create("tweets", Y.LazyModelList, [
        extensions.ModelListMore,
    ], {
        model   : models.Tweet,
        
        sync : function(action, options, done) {
            var args = {};
            
            if(this.size()) {
                args.since_id = this.item(0).id_str;
            }
            
            args = Y.merge(
                { count : 200 },
                this.get("config") || {},
                args
            );
            
            this.loading = true;
            
            tristis.twitter.get(this.get("api"), args, function(err, resp) {
                if(err) {
                    return done(err);
                }
                
                done(err, resp);
            });
        },
        
        // Ensure that tweets use string IDs instead of Numbers
        parse : function(response) {
            return response.map(function(tweet) {
                tweet.id = tweet.id_str;
                
                return tweet;
            });
        },
        
        comparator : function(tweet) {
            return Date.parse(tweet.created_at);
        },
        
        _sort : function(a, b) {
            return this.comparator(b) - this.comparator(a);
        }
    }, {
        ATTRS : {
            api     : null,
            config  : null
        }
    });
    
    models.Tweets = Tweets;
    
}, "@VERSION@", {
    requires : [
        // YUI
        "base-build",
        "lazy-model-list",
        
        // Extensions
        "extension-model-list-more",
        
{'fraction_non_alphanumeric': 0.12038890477552187, 'fraction_numerical': 0.0028595939376608523, 'mean_word_length': 1.0432242990654206, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2105479', 'n_tokens_mistral': 1010, 'n_tokens_neox': 973, 'n_words': 166}