<commit_before>/*global Reveal, Raphael, RSA, document, setTimeout*/
(function (Reveal, Raphael, RSA) {
    'use strict';

    var power = new RSA.Number('5');

    var p = new RSA.Number('37');
    var q = new RSA.Number('53');
    var product = new RSA.Product(p, q);
    var difference = new RSA.Difference(q, p);
    var modulo = new RSA.Modulus(q, p);
    var powerMod = new RSA.PowerMod(q, power, p);
    var phi = new RSA.Phi(p, q);

    Reveal.addEventListener('poc', function () {
        var input = document.getElementById('entry');
        var pSpan = document.getElementById('p');
        var qSpan = document.getElementById('q');
        var powerSpan = document.getElementById('power');
        var productSpan = document.getElementById('product');
        var differenceSpan = document.getElementById('difference');
        var moduloSpan = document.getElementById('modulo');
        var powerModSpan = document.getElementById('powermod');
        var phiSpan = document.getElementById('phi');

        new RSA.EditableNumberView(input, p);
        new RSA.NumberView(pSpan, p);
        new RSA.NumberView(qSpan, q);
        new RSA.NumberView(powerSpan, power);
        new RSA.NumberView(productSpan, product);
        new RSA.NumberView(differenceSpan, difference);
        new RSA.NumberView(moduloSpan, modulo);
        new RSA.NumberView(powerModSpan, powerMod);
        new RSA.NumberView(phiSpan, phi);

        setTimeout(function () {
            p.set(3);
        }, 2000);
    });

    var paper;
    Reveal.addEventListener('poc-svg', function () {
        var container = document.getElementById('clock');
        if (!paper) {
            paper = new Raphael(container, 640, 640);

            var c = paper.circle(320, 320, 310);
            c.attr({ 'stroke': 'black', 'stroke-width': 5, 'fill': 'white' });

            var n = 35;
            var angle = 360 / n;
            for (var index = 0; index < n; index++) {
                var mark = paper.rect(-15, 0, 30, 5);
                mark.transform('t320,320r' + (angle * index - 90) + 't280,0');
                mark.attr({ 'stroke': 'black', 'fill': 'black' });
                if (index === 0) {
                    mark.attr({ 'stroke': 'red', 'fill': 'red' });
                }
            }


        }
    });

})(Reveal, Raphael, RSA);<commit_msg>add a dial to clock arithmetic proof of concept<commit_after>/*global Reveal, Raphael, RSA, document, setTimeout*/
(function (Reveal, Raphael, RSA) {
    'use strict';

    var power = new RSA.Number('5');

    var p = new RSA.Number('37');
    var q = new RSA.Number('53');
    var product = new RSA.Product(p, q);
    var difference = new RSA.Difference(q, p);
    var modulo = new RSA.Modulus(q, p);
    var powerMod = new RSA.PowerMod(q, power, p);
    var phi = new RSA.Phi(p, q);

    Reveal.addEventListener('poc', function () {
        var input = document.getElementById('entry');
        var pSpan = document.getElementById('p');
        var qSpan = document.getElementById('q');
        var powerSpan = document.getElementById('power');
        var productSpan = document.getElementById('product');
        var differenceSpan = document.getElementById('difference');
        var moduloSpan = document.getElementById('modulo');
        var powerModSpan = document.getElementById('powermod');
        var phiSpan = document.getElementById('phi');

        new RSA.EditableNumberView(input, p);
        new RSA.NumberView(pSpan, p);
        new RSA.NumberView(qSpan, q);
        new RSA.NumberView(powerSpan, power);
        new RSA.NumberView(productSpan, product);
        new RSA.NumberView(differenceSpan, difference);
        new RSA.NumberView(moduloSpan, modulo);
        new RSA.NumberView(powerModSpan, powerMod);
        new RSA.NumberView(phiSpan, phi);

        setTimeout(function () {
            p.set(3);
        }, 2000);
    });

    var paper;
    Reveal.addEventListener('poc-svg', function () {
        var container = document.getElementById('clock');
        if (!paper) {
            paper = new Raphael(container, 640, 640);


            var c = paper.circle(0, 0, 310);
	    c.transform('t320,320');
            c.attr({ 'stroke': 'black', 'stroke-width': 5, 'fill': 'white' });

            var n = 35;
            var angle = 360 / n;
            for (var index = 0; index < n; index++) {
                var mark = paper.rect(-15, -3, 30, 6);
                mark.transform('t320,320r' + (angle * index - 90) + ',0,0t280,0');
                mark.attr({ 'stroke': 'black', 'fill': 'black' });
                if (index === 0) {
                    mark.attr({ 'stroke': 'red', 'fill': 'red' });
                }
            }

            var m = 6;
            var dial = paper.rect(-20, -5, 220, 10);
	    dial.transform('t320,320r' + (angle * m - 90) + ',0,0');
            dial.attr({ 'stroke': 'black', 'fill': 'black' });


        }
    });

})(Reveal, Raphael, RSA);
{'fraction_non_alphanumeric': 0.15288422751109318, 'fraction_numerical': 0.025211778943122227, 'mean_word_length': 2.2582128777923787, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2784839', 'n_tokens_mistral': 1622, 'n_tokens_neox': 1431, 'n_words': 379}