<commit_before>{% extends 'admin/master.html' %}
{% block head %}
  <script src="{{ url_for('static', filename='build/flask_admin.min.js') }}"></script>
  <script>
    {% set stats = get_stats() %}
    {% set users = get_users() %}
    {% set schools = get_schools() %}
    window.onload = function () {
      initLog();
      initUsers();
      initSchools();
      function initSchools() {
        var ctx = document.getElementById("schools");
        var data = {
          labels: {{ schools.get('labels')|tojson }},
          datasets: [
            {
              data: {{ schools.get('count')|tojson }},
              backgroundColor: ['rgba(255, 99, 132, 0.4)', 'rgba(54, 162, 235, 0.4)', 'rgba(255, 206, 86, 0.4)', 'rgba(75, 192, 192, 0.4)', 'rgba(120, 150, 132, 0.4)']
            }
          ]
        };
        var chartSchools = new Chart(ctx, {
          type: 'pie',
          data: data,
          options: {
            title: {
              display: true,
              text: 'Nombre d\'inscrits par école'
            }
          }
        });
      }
      function initUsers() {
        var ctx = document.getElementById("users");
        var data = {
          labels: {{ users.get('labels')|safe }},
          datasets: [
            {
              label: "confirmés",
              backgroundColor: 'rgba(54, 162, 235, 0.4)',
              data: {{ users.get('confirmed') }}
            }, {
              label: "inscrits",
              data: {{ users.get('registered') }}
            }, {
              label: "forum-rhone-alpes",
              backgroundColor: 'rgba(255, 99, 132, 0.4)',
              data: {{ users.get('fra') }}
            }
          ]
        };
        var chartUsers = new Chart(ctx, {
          type: 'line',
          data: data,
          options: {
            title: {
              display: true,
              text: 'Nombre d\'inscrits'
            },
            scales: {
              yAxes: [
                {
                  ticks: {
                    min: 0
                  }
                }
              ]
            }
          }
        });
      }
      function initLog() {
        var ctx = document.getElementById("log");
        var data = {
          labels: [
            'Badges', 'Equipement', 'Programme', 'Restauration', 'Transport'
          ],
          datasets: [
            {
              label: "FRA",
              backgroundColor: 'rgba(54, 162, 235, 0.4)',
              data: {{ stats.get('fra').values() }}
            }, {
              label: "CM",
              backgroundColor: 'rgba(255, 206, 86, 0.4)',
              data: {{ stats.get('cm').values() }}
            }, {
              label: "SI",
              backgroundColor: 'rgba(255, 99, 132, 0.4)',
              data: {{ stats.get('si').values() }}
            }, {
              label: "Ecoles",
              backgroundColor: 'rgba(75, 192, 192, 0.4)',
              data: {{ stats.get('school').values() }}
            }
          ]
        };
        var chart = new Chart(ctx, {
          type: 'bar',
          data: data,
          fill: true,
          backgroundColor: 'rgba(255, 206, 86, 0.4)',
          options: {
            title: {
              display: true,
              text: 'Avancement Suivi Logistique'
            },
            barValueSpacing: 20,
            scales: {
              yAxes: [
                {
                  ticks: {
                    min: 0,
                    max: 120
                  }
                }
              ]
            }
          }
        });
      }
    }
  </script>
{% endblock %}
{% block body %}
  <p class="lead">Tip: Filtrer les catégories en cliquant sur les légendes.</p>
  <canvas id="log" style="width:100%; height:300px" class="model-list"></canvas>
  <canvas id="users" style="width:100%; height:300px" class="model-list"></canvas>
  <canvas id="schools" style="width:100%; height:300px" class="model-list"></canvas>
{% endblock %}<commit_msg>Change style for tip<commit_after>{% extends 'admin/master.html' %}
{% block head %}
  <script src="{{ url_for('static', filename='build/flask_admin.min.js') }}"></script>
  <script>
    {% set stats = get_stats() %}
    {% set users = get_users() %}
    {% set schools = get_schools() %}
    window.onload = function () {
      initLog();
      initUsers();
      initSchools();
      function initSchools() {
        var ctx = document.getElementById("schools");
        var data = {
          labels: {{ schools.get('labels')|tojson }},
          datasets: [
            {
              data: {{ schools.get('count')|tojson }},
              backgroundColor: ['rgba(255, 99, 132, 0.4)', 'rgba(54, 162, 235, 0.4)', 'rgba(255, 206, 86, 0.4)', 'rgba(75, 192, 192, 0.4)', 'rgba(120, 150, 132, 0.4)']
            }
          ]
        };
        var chartSchools = new Chart(ctx, {
          type: 'pie',
          data: data,
          options: {
            title: {
              display: true,
              text: 'Nombre d\'inscrits par école'
            }
          }
        });
      }
      function initUsers() {
        var ctx = document.getElementById("users");
        var data = {
          labels: {{ users.get('labels')|safe }},
          datasets: [
            {
              label: "confirmés",
              backgroundColor: 'rgba(54, 162, 235, 0.4)',
              data: {{ users.get('confirmed') }}
            }, {
              label: "inscrits",
              data: {{ users.get('registered') }}
            }, {
              label: "forum-rhone-alpes",
              backgroundColor: 'rgba(255, 99, 132, 0.4)',
              data: {{ users.get('fra') }}
            }
          ]
        };
        var chartUsers = new Chart(ctx, {
          type: 'line',
          data: data,
          options: {
            title: {
              display: true,
              text: 'Nombre d\'inscrits'
            },
            scales: {
              yAxes: [
                {
                  ticks: {
                    min: 0
                  }
                }
              ]
            }
          }
        });
      }
      function initLog() {
        var ctx = document.getElementById("log");
        var data = {
          labels: [
            'Badges', 'Equipement', 'Programme', 'Restauration', 'Transport'
          ],
          datasets: [
            {
              label: "FRA",
              backgroundColor: 'rgba(54, 162, 235, 0.4)',
              data: {{ stats.get('fra').values() }}
            }, {
              label: "CM",
              backgroundColor: 'rgba(255, 206, 86, 0.4)',
              data: {{ stats.get('cm').values() }}
            }, {
              label: "SI",
              backgroundColor: 'rgba(255, 99, 132, 0.4)',
              data: {{ stats.get('si').values() }}
            }, {
              label: "Ecoles",
              backgroundColor: 'rgba(75, 192, 192, 0.4)',
              data: {{ stats.get('school').values() }}
            }
          ]
        };
        var chart = new Chart(ctx, {
          type: 'bar',
          data: data,
          fill: true,
          backgroundColor: 'rgba(255, 206, 86, 0.4)',
          options: {
            title: {
              display: true,
              text: 'Avancement Suivi Logistique'
            },
            barValueSpacing: 20,
            scales: {
              yAxes: [
                {
                  ticks: {
                    min: 0,
                    max: 120
                  }
                }
              ]
            }
          }
        });
      }
    }
  </script>
{% endblock %}
{% block body %}
  <canvas id="log" style="width:100%; height:300px" class="model-list"></canvas>
  <canvas id="users" style="width:100%; height:300px" class="model-list"></canvas>
  <canvas id="schools" style="width:100%; height:300px" class="model-list"></canvas>
  <p class="lead" style="font-size:14px">Tip: Filtrer les catégories en cliquant sur les légendes.</p>
{% endblock %}
{'fraction_non_alphanumeric': 0.15615653040877367, 'fraction_numerical': 0.03664007976071785, 'mean_word_length': 1.2554806070826308, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '5778327', 'n_tokens_mistral': 2592, 'n_tokens_neox': 2292, 'n_words': 482}