<commit_before>/**
 * New and Noteworthy Projects
 */

var $ = require('jquery');
var m = require('mithril');
var $osf = require('js/osfHelpers');

// CSS
require('css/quick-project-search-plugin.css');

// XHR config for apiserver connection
var xhrconfig = function(xhr) {
    xhr.withCredentials = true;
};


var newAndNoteworthy = {
    controller: function() {
        var self = this;
        self.newAndNoteworthyNodes = m.prop([]);
        self.popularNodes = m.prop([]);
        self.contributorsMapping = {};

        //// Load new and noteworthy nodes
        //var newUrl = $osf.apiV2Url('nodes/', { query : { 'embed': 'contributors', 'sort': '-date_created'}});
        //var newPromise = m.request({method: 'GET', url : newUrl, config: xhrconfig});
        //newPromise.then(function(result){
        //    for (var i = 0; i <= 4; i++) {
        //        self.newAndNoteworthyNodes().push(result.data[i])
        //    }
        //    return newPromise
        //});

        // Load new and noteworthy nodes<commit_msg>Remove old code.<commit_after>/**
 * New and Noteworthy Projects
 */

var $ = require('jquery');
var m = require('mithril');
var $osf = require('js/osfHelpers');

// CSS
require('css/quick-project-search-plugin.css');

// XHR config for apiserver connection
var xhrconfig = function(xhr) {
    xhr.withCredentials = true;
};


var newAndNoteworthy = {
    controller: function() {
        var self = this;
        self.newAndNoteworthyNodes = m.prop([]);
        self.popularNodes = m.prop([]);
        self.contributorsMapping = {};

        // Load new and noteworthy nodes
{'fraction_non_alphanumeric': 0.16024844720496895, 'fraction_numerical': 0.0018633540372670807, 'mean_word_length': 2.6202247191011234, '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': '3215391', 'n_tokens_mistral': 526, 'n_tokens_neox': 489, 'n_words': 117}