<commit_before>function update() {
    // Get the latest temperature and data about the program that's running
    http("current", 'GET', null, function(data){
        console.log("i'm un update")
        // Update the most important stats
        $("#current_temp").html("Temp: " + data.temp)
        $("#current_temperature_setting").html("Current Setting: " + data.next_steps[0])
        $("#time_left").html("Time remaining: " + data.time_left)
        var show_stop_button = (data.time_left != '---')

        // Build up the table of next steps
        var next_steps = "<table><thead class='setting'><tr><th scope='col'>Step</th><th>Starts In</th></tr></thead><tfoot class='setting'>"
        for (i=1; i<Object.keys(data.next_steps).length; i++) {
            line = "<tr><td>" + data.next_steps[i] + "</td><td>" + data.times_until[i] + "</td></tr>"
            next_steps += line
        }
        next_steps += "</tfoot></table>"
        $("#next_steps").html(next_steps)
        if (show_stop_button) {
            $("#stop").prop('disabled', false);
            $("#stop").val("STOP");
            $("#stop").attr('style', 'background-color: #FF2020; color: #FFFFFF;')
        }
        else {
            $("#stop").prop('disabled', true);
            $("#stop").val("No program running");
            $("#stop").attr('style', 'background-color: #806666; color: #FFFFFF;')
        }
    });
}
<commit_msg>resolves #115: good enough<commit_after>function update() {
    // Get the latest temperature and data about the program that's running
    http("current", 'GET', null, function(data){
        console.log("i'm un update")
        // Update the most important stats
        $("#current_temp").html("Temp: " + data.temp)
        $("#current_temperature_setting").html("Current Setting: " + data.next_steps[0])
        $("#time_left").html("Time remaining: " + data.time_left)
        var show_stop_button = (data.time_left != '---')

        // Build up the table of next steps
        var next_steps = "<table><thead class='setting'><tr><th scope='col'>Next Step</th><th>Starts In</th></tr></thead><tfoot class='setting'>"
            if (Object.keys(data.next_steps).length > 1) {
                for (i=1; i<Object.keys(data.next_steps).length; i++) {
                    line = "<tr><td>" + data.next_steps[i] + "</td><td>" + data.times_until[i] + "</td></tr>"
                    next_steps += line
                }
            }
            else {
                next_steps += "<tr><td>---</td><td>---</td></tr>"
            }

        next_steps += "</tfoot></table>"

        $("#next_steps").html(next_steps)

        if (show_stop_button) {
            $("#stop").prop('disabled', false);
            $("#stop").val("STOP");
            $("#stop").attr('style', 'background-color: #FF2020; color: #FFFFFF;')
        }
        else {
            $("#stop").prop('disabled', true);
            $("#stop").val("No program running");
            $("#stop").attr('style', 'background-color: #806666; color: #FFFFFF;')
        }
    });
}

{'fraction_non_alphanumeric': 0.20287487749101601, 'fraction_numerical': 0.00914733747141457, 'mean_word_length': 2.357456140350877, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 46, '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': '7290886', 'n_tokens_mistral': 927, 'n_tokens_neox': 909, 'n_words': 182}