<commit_before>$(document).ready(function() {
    'use strict';

    /* General initialization */
    $('select').material_select();

    $('.button-collapse').sideNav({
        draggable: true
    });

    $('.dropdown-button').dropdown({
        belowOrigin: true
    });

    $('.modal').modal({
        inDuration: 170,
        outDuration: 115
    });

    // Notifications
    var notificationCount = $('.notif').length / 2;

    $(document).on('click', '.notif', deleteNotif);
    $.post('/notification/get_alerts', function(alerts) {
        generateToasts(alerts);
    });

    function generateToasts(alerts) {
        $.each(alerts, function (index, notif) {
            var $toastContent = '<i class="material-icons">' + notif.icon + '</i>'
                + '<span>' + notif.content + '</span>';

            Materialize.toast($toastContent, Infinity, 'notif notif-' + notif.type);
        });
    }

    function deleteNotif(event) {
        var notificationId = $(this).data('notif-id');

        if (notificationId) {
            // Session or seen notification
            var storage;
            if ($(this).hasClass('notif-session')) {
                storage = 'session';
            } else if ($(this).hasClass('notif-seen')) {
                storage = 'seen';
            } else {
                return;
            }<commit_msg>Normalisation confirmation<commit_after>$(document).ready(function() {
    'use strict';

    /* General initialization */
    $('select').material_select();

    $('.button-collapse').sideNav({
        draggable: true
    });

    $('.dropdown-button').dropdown({
        belowOrigin: true
    });

    $('.modal').modal({
        inDuration: 170,
        outDuration: 115
    });

    // Confirm modal
    $('form[data-confirm]').submit(confirm);
    $('a[data-confirm]').click(confirm);

    function confirm() {
        return window.confirm(this.getAttribute('data-confirm'));
    }

    // Notifications
    var notificationCount = $('.notif').length / 2;

    $(document).on('click', '.notif', deleteNotif);
    $.post('/notification/get_alerts', function(alerts) {
        generateToasts(alerts);
    });

    function generateToasts(alerts) {
        $.each(alerts, function (index, notif) {
            var $toastContent = '<i class="material-icons">' + notif.icon + '</i>'
                + '<span>' + notif.content + '</span>';

            Materialize.toast($toastContent, Infinity, 'notif notif-' + notif.type);
        });
    }

    function deleteNotif(event) {
        var notificationId = $(this).data('notif-id');

        if (notificationId) {
            // Session or seen notification
            var storage;
            if ($(this).hasClass('notif-session')) {
                storage = 'session';
            } else if ($(this).hasClass('notif-seen')) {
                storage = 'seen';
            } else {
                return;
            }
{'fraction_non_alphanumeric': 0.1701400751622822, 'fraction_numerical': 0.004783054321831227, 'mean_word_length': 2.05, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '6094629', 'n_tokens_mistral': 861, 'n_tokens_neox': 808, 'n_words': 153}