<commit_before>extends layout

block css
    style.
        .floor_plan_element {
            position: absolute;
            top: 0;
            left: 0;
        }

block content
    div(class='container')
        div(class="page-header")
            h1 一般偵測
        h2 平面圖
        div(class="text-center")
            div(style="position: relative; display: inline-block")
                img(id="floor_plan" src="/images/floor_plan.png" class="img-responsive")
                div(id="room0" class="floor_plan_element" style="height: 202px; width: 402px; background-color: rgba(0, 255, 0, 0.5)")
                div(id="room1" class="floor_plan_element" style="height: 149px; width: 198px; background-color: rgba(0, 255, 0, 0.5)")
        h2 偵測器資料&nbsp;
            small (更新頻率：5秒)
        h3 溫度
            div(id="chart_temperature")
        h3 濕度
            div(id="chart_humidity")
        h3 瓦斯
            div(id="chart_gas")
        h3 CO
            div(id="chart_co")

block javascript
    script(type="text/javascript" src="/javascripts/floor_plan.js")
    script(type="text/javascript" src="https://www.gstatic.com/charts/loader.js")
    script(type="text/javascript").
        $(function () {
            // Load the Visualization API and the corechart package.
            google.charts.load('current', {'packages': ['corechart']});

            // Set a callback to run when the Google Visualization API is loaded.
            google.charts.setOnLoadCallback(function () {
                drawLineChart(!{JSON.stringify(data_temperature)}, 'chart_temperature');
                drawLineChart(!{JSON.stringify(data_humidity)}, 'chart_humidity');
                drawLineChart(!{JSON.stringify(data_gas)}, 'chart_gas');
                drawLineChart(!{JSON.stringify(data_co)}, 'chart_co');
            });
        });

        function drawLineChart(data, div_name) {
            var data = google.visualization.arrayToDataTable(data);

            var options = {
                curveType: 'function',
                legend: {position: 'none'}
            };

            var chart = new google.visualization.LineChart(document.getElementById(div_name));

            chart.draw(data, options);
        }
<commit_msg>改變變數名稱<commit_after>extends layout

block css
    style.
        .floor_plan_element {
            position: absolute;
            top: 0;
            left: 0;
        }

block content
    div(class='container')
        div(class="page-header")
            h1 一般偵測
        h2 平面圖
        div(class="text-center")
            div(style="position: relative; display: inline-block")
                img(id="floor_plan" src="/images/floor_plan.png" class="img-responsive")
                div(id="room0" class="floor_plan_element" style="height: 202px; width: 402px; background-color: rgba(0, 255, 0, 0.5)")
                div(id="room1" class="floor_plan_element" style="height: 149px; width: 198px; background-color: rgba(0, 255, 0, 0.5)")
        h2 偵測器資料&nbsp;
            small (更新頻率：5秒)
        h3 溫度
            div(id="chart_temperature")
        h3 濕度
            div(id="chart_humidity")
        h3 瓦斯
            div(id="chart_gas")
        h3 CO
            div(id="chart_co")

block javascript
    script(type="text/javascript" src="/javascripts/floor_plan.js")
    script(type="text/javascript" src="https://www.gstatic.com/charts/loader.js")
    script(type="text/javascript").
        $(function () {
            // Load the Visualization API and the corechart package.
            google.charts.load('current', {'packages': ['corechart']});

            // Set a callback to run when the Google Visualization API is loaded.
            google.charts.setOnLoadCallback(function () {
                drawLineChart(!{JSON.stringify(data_temperature)}, 'chart_temperature');
                drawLineChart(!{JSON.stringify(data_humidity)}, 'chart_humidity');
                drawLineChart(!{JSON.stringify(data_gas)}, 'chart_gas');
                drawLineChart(!{JSON.stringify(data_co)}, 'chart_co');
            });
        });

        function drawLineChart(data, div_name) {
            var dataTable = google.visualization.arrayToDataTable(data);

            var options = {
                curveType: 'function',
                legend: {position: 'none'}
            };

            var chart = new google.visualization.LineChart(document.getElementById(div_name));

            chart.draw(dataTable, options);
        }

{'fraction_non_alphanumeric': 0.12865758320303775, 'fraction_numerical': 0.016975653339289704, 'mean_word_length': 2.138051857042747, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '5143198', 'n_tokens_mistral': 1412, 'n_tokens_neox': 1319, 'n_words': 250}