<commit_before>/** Global variables for processing.js access **/
var waveSpeed = 3;
var timestep = 0.3
var w = 0.3;
var w2 = 0.45;
var playing = false;

/** Page setup **/
$(document).ready(function() {
    $("#speed-slider").slider({min: -5, max: 5, step: 0.1, slide: setAnimSpeed,
                           value: timestep});
    $("#wave1-w-slider").slider({min: 0, max: 1, step: 0.03, slide: setW1,
                           value: w});
    $("#wave2-w-slider").slider({min: 0, max: 1, step: 0.03, slide: setW2,
                           value: w2});
    $("#play").click(function() {
        var processing = Processing.getInstanceById("wave-sum-sim");
        if (playing) {
            processing.noLoop();
            $("#play").html("Play");
        } else {
            processing.loop();
            processing.draw();
            $("#play").html("Pause");
        }
        playing = !playing;
    });
});

function setAnimSpeed(event, ui) {
    timestep = ui.value;
}

function setW1(event, ui) {
    w = ui.value;
}

function setW2(event, ui) {
    w2 = ui.value;
}<commit_msg>Adjust starting frequency to be more fun.<commit_after>/** Global variables for processing.js access **/
var waveSpeed = 3;
var timestep = 0.3
var w = 0.25;
var w2 = 0.45;
var playing = false;

/** Page setup **/
$(document).ready(function() {
    $("#speed-slider").slider({min: -5, max: 5, step: 0.1, slide: setAnimSpeed,
                           value: timestep});
    $("#wave1-w-slider").slider({min: 0, max: 1, step: 0.03, slide: setW1,
                           value: w});
    $("#wave2-w-slider").slider({min: 0, max: 1, step: 0.03, slide: setW2,
                           value: w2});
    $("#play").click(function() {
        var processing = Processing.getInstanceById("wave-sum-sim");
        if (playing) {
            processing.noLoop();
            $("#play").html("Play");
        } else {
            processing.loop();
            processing.draw();
            $("#play").html("Pause");
        }
        playing = !playing;
    });
});

function setAnimSpeed(event, ui) {
    timestep = ui.value;
}

function setW1(event, ui) {
    w = ui.value;
}

function setW2(event, ui) {
    w2 = ui.value;
}
{'fraction_non_alphanumeric': 0.18358141632837166, 'fraction_numerical': 0.028416779431664412, 'mean_word_length': 2.0550964187327825, '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': '3486255', 'n_tokens_mistral': 746, 'n_tokens_neox': 719, 'n_words': 172}