<commit_before><?php
// GET_CURRENT_SENSOR_VALUES.PHP
    include "sensor_col_names.php";
    require "hydropi_connect.php";
    // Get the latest sensor reading, round the result for each sensor and update webpage
    $sql = "SELECT * FROM sensors ORDER BY `timestamp` DESC LIMIT 1 ";
    $result = mysqli_query($conn, $sql);
    $row = mysqli_fetch_assoc($result);

    foreach ($colnames as $title) {
        if ($title == "ds18b20_temp") {
          echo "document.getElementById(\"".$title."_curr\").innerHTML = \"".round($row[$title],1)."<sup>&degC</sup>\";\n";
        }
        else if ($title == "atlas_temp") {
          echo "document.getElementById(\"".$title."_curr\").innerHTML = \"".round($row[$title],1)."<sup>&degC</sup>\";\n";
        }
        else if ($title == "ph") {
          echo "document.getElementById(\"".$title."_curr\").innerHTML = \"".round($row[$title],2)."\";\n";
        }
        else if ($title == "orp") {
          echo "document.getElementById(\"".$title."_curr\").innerHTML = \"".round($row[$title],0)."uS\";\n";
        }
        else if ($title == "ec") {
          echo "document.getElementById(\"".$title."_curr\").innerHTML = \"".round($row[$title],0)."ppm\";\n";
        }
    }
    mysqli_free_result($result);
    mysqli_close($conn);
?><commit_msg>Update get_current_sensor_values.php<commit_after><?php
// GET_CURRENT_SENSOR_VALUES.PHP
    include "sensor_col_names.php";
    require "hydropi_connect.php";
    // Get the latest sensor reading, round the result for each sensor and update webpage
    $sql = "SELECT * FROM sensors ORDER BY `timestamp` DESC LIMIT 1 ";
    $result = mysqli_query($conn, $sql);
    $row = mysqli_fetch_assoc($result);

    foreach ($colnames as $title) {
        if ($title == "ds18b20_temp") {
          echo "document.getElementById(\"".$title."_curr\").innerHTML = \"".round($row[$title],1)."<sup>&degC</sup>\";\n";
        }
        else if ($title == "atlas_temp") {
          echo "document.getElementById(\"".$title."_curr\").innerHTML = \"".round($row[$title],1)."<sup>&degC</sup>\";\n";
        }
        else if ($title == "ph") {
          echo "document.getElementById(\"".$title."_curr\").innerHTML = \"".round($row[$title],2)."\";\n";
        }
        else if ($title == "orp") {
          echo "document.getElementById(\"".$title."_curr\").innerHTML = \"".round($row[$title],0)."\\xb5S\";\n";
        }
        else if ($title == "ec") {
          echo "document.getElementById(\"".$title."_curr\").innerHTML = \"".round($row[$title],0)."ppm\";\n";
        }
    }
    mysqli_free_result($result);
    mysqli_close($conn);
?>
{'fraction_non_alphanumeric': 0.21768966831871903, 'fraction_numerical': 0.008006099885627144, 'mean_word_length': 2.841874084919473, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '5706667', 'n_tokens_mistral': 864, 'n_tokens_neox': 839, 'n_words': 151}