<commit_before>if(ko === undefined) {
    throw "KnockoutJS not properly loaded!";
}
function plusOne(num) {
    return num+1;
}
function cardViewModel() {
	'use strict';
	var self = this;

    self.flipped = ko.observable(false);
    self.content = ko.observable('content');
    self.identifier = ko.observable('identifier');
    self.className = ko.computed(function() {
        if(self.flipped()){
            return 'pair' + self.identifier() + ' card flipped';
        } else {
            return 'pair' + self.identifier() + ' card';
        }
    });
    self.flip = function() {
        console.log('flipping', self.flipped());
        if(self.flipped()){
            self.flipped(false);
        } else {
            self.flipped(true);
        }
    };

}

function AppViewModel() {
	'use strict';
	var self = this;
	self.result = 0;
	self.cards = ko.observableArray([]);
	self.addCards = function (code, visual) {
        console.log('adding multiple cards');
        var identifier = Date.now();
        console.log(identifier);
        self.addCard(identifier, code);
        self.addCard(identifier, visual);
        console.log("tada!");
	};
    self.addCard = function(identifier, content) {
        var card = new cardViewModel();
        console.log('adding card');
        card.content(content);
        card.identifier(identifier);
        self.cards.push(card);
        card = null;
    };
}
var app = new AppViewModel();
ko.applyBindings( app );
app.addCards('code1', 'visual1');
app.addCards('code2', 'visual2');
app.addCards('code3', 'visual3');
app.addCards('code4', 'visual4');<commit_msg>Add some more cards to the testing data.<commit_after>if(ko === undefined) {
    throw "KnockoutJS not properly loaded!";
}
function plusOne(num) {
    return num+1;
}
function cardViewModel() {
	'use strict';
	var self = this;

    self.flipped = ko.observable(false);
    self.content = ko.observable('content');
    self.identifier = ko.observable('identifier');
    self.className = ko.computed(function() {
        if(self.flipped()){
            return 'pair' + self.identifier() + ' card flipped';
        } else {
            return 'pair' + self.identifier() + ' card';
        }
    });
    self.flip = function() {
        console.log('flipping', self.flipped());
        if(self.flipped()){
            self.flipped(false);
        } else {
            self.flipped(true);
        }
    };

}

function AppViewModel() {
	'use strict';
	var self = this;
	self.result = 0;
	self.cards = ko.observableArray([]);
	self.addCards = function (code, visual) {
        console.log('adding multiple cards');
        var identifier = Date.now();
        console.log(identifier);
        self.addCard(identifier, code);
        self.addCard(identifier, visual);
        console.log("tada!");
	};
    self.addCard = function(identifier, content) {
        var card = new cardViewModel();
        console.log('adding card');
        card.content(content);
        card.identifier(identifier);
        self.cards.push(card);
        card = null;
    };
}
var app = new AppViewModel();
ko.applyBindings( app );
app.addCards('code1', 'visual1');
app.addCards('code2', 'visual2');
app.addCards('code3', 'visual3');
app.addCards('code4', 'visual4');
app.addCards('code5', 'visual5');
app.addCards('code6', 'visual6');
app.addCards('code7', 'visual7');
app.addCards('code8', 'visual8');
{'fraction_non_alphanumeric': 0.16475095785440613, 'fraction_numerical': 0.00825228411435308, 'mean_word_length': 2.792178770949721, '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': '3783392', 'n_tokens_mistral': 1110, 'n_tokens_neox': 1079, 'n_words': 214}