<commit_before>define(['model', 'notify'], function (model, notify) {
    'use strict';
    return new Promise(function (resolve, reject) {
        var todoModel = model.create('todoModel', {
                // enhance the model to deal with our data more conveniently
                getAllPending: function () {
                    // return all todos where done === false
                    return this.todos.query('notEqual', ['done', true]).found;
                },

                getAllComplete: function () {
                    // return all todos where done === true
                    return this.todos.query('isEqual', ['done', true]).found;
                },

                remainingCount: function () {
                    return this.getNodeFromPath('todos').length;
                }
            });

        //todoModel._update = notify.update;
        //todoModel.dataBind = notify.subscribe;

        // create a named data array and insert into the model
        var dataArray = todoModel.newDataArray('todos', '');

        // copy the data array we got from the server in the dataArray we just made
        // this will convert all the data into dataObjects and add query to the array
        dataArray.cloneArray([
            {
                title: 'Sample Todo #1',
                done: false,
                id: 1
            },
            {
                title: 'Sample Todo #2',<commit_msg>comments<commit_after>define(['model', 'notify'], function (model, notify) {
    'use strict';
    return new Promise(function (resolve, reject) {
        var todoModel = model.create('todoModel', {
                // enhance the model to deal with our data more conveniently
                getAllPending: function () {
                    // return all todos where done === false
                    return this.todos.query('notEqual', ['done', true]).found;
                },

                getAllComplete: function () {
                    // return all todos where done === true
                    return this.todos.query('isEqual', ['done', true]).found;
                },

                remainingCount: function () {
                    return this.getNodeFromPath('todos').length;
                }
            });

        // create a named data array and insert into the model
        var dataArray = todoModel.newDataArray('todos', '');

        // copy the data array we got from the server in the dataArray we just made
        // this will convert all the data into dataObjects and add query to the array
        // ...since there is no server data, we'll use a mock
        dataArray.cloneArray([
            {
                title: 'Sample Todo #1',
                done: false,
                id: 1
            },
            {
                title: 'Sample Todo #2',
{'fraction_non_alphanumeric': 0.10155697098372257, 'fraction_numerical': 0.0021231422505307855, 'mean_word_length': 1.484182776801406, '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': '3845640', 'n_tokens_mistral': 696, 'n_tokens_neox': 655, 'n_words': 229}