<commit_before>define( 'argumenta/sandbox',
[
    "require-jquery",
    "argumenta/widgets"
],
function( $, Widgets ) {

    var Sandbox = {

        // Inits the sandbox.
        init: function() {
            var self = this;
            self.initNotify();
        },

        // Inits notifications property and element.
        initNotify: function() {
            var self = this;
            var notifications = $('.argumenta .notifications');
            self.notifications = notifications.length > 0
                ? notifications
                : $('<div class="argumenta"><div class="notifications"></div></div>')
                    .appendTo('body');
            self.notifications.children().delay(8000).fadeOut(2000);
            return self.notifications;
        },

        // Gets the notifications element.
        getNotifications: function() {
            var self = this;
            var notifications = self.notifications || self.initNotify();
            return notifications;
        },

        // Shows a notification message.
        notify: function( message ) {
            message = message || '';
            var self = this;
            var notifications = self.getNotifications();
            var elem = $('<div class="info"></div>')
                .text( message )
                .appendTo( notifications )
                .delay(8000).fadeOut(2000);
        },
<commit_msg>Add Sandbox.error() method.<commit_after>define( 'argumenta/sandbox',
[
    "require-jquery",
    "argumenta/widgets"
],
function( $, Widgets ) {

    var Sandbox = {

        // Inits the sandbox.
        init: function() {
            var self = this;
            self.initNotify();
        },

        // Inits notifications property and element.
        initNotify: function() {
            var self = this;
            var notifications = $('.argumenta .notifications');
            self.notifications = notifications.length > 0
                ? notifications
                : $('<div class="argumenta"><div class="notifications"></div></div>')
                    .appendTo('body');
            self.notifications.children().delay(8000).fadeOut(2000);
            return self.notifications;
        },

        // Gets the notifications element.
        getNotifications: function() {
            var self = this;
            var notifications = self.notifications || self.initNotify();
            return notifications;
        },

        // Shows a notification message.
        notify: function( message ) {
            message = message || '';
            var self = this;
            var notifications = self.getNotifications();
            var elem = $('<div class="info"></div>')
                .text( message )
                .appendTo( notifications )
                .delay(8000).fadeOut(2000);
        },

        // Handle an error response.
        error: function( data ) {
            try {
                Sandbox.warn( JSON.parse(data.responseText).error );
            }
            catch (e) {
                Sandbox.warn( data.responseText );
            }
        },

{'fraction_non_alphanumeric': 0.1230324445872149, 'fraction_numerical': 0.01092194025056216, 'mean_word_length': 1.5629629629629629, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, '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': '2988461', 'n_tokens_mistral': 817, 'n_tokens_neox': 739, 'n_words': 178}