<commit_before>{% extends "base.html" %}
{% load simile %}
{% block title_matter %}{{ tree }} l10n stats{% endblock %}
{% block head_matter %}
<script type="application/javascript"
src="{% url static path="jquery.js" %}"></script>
<script type="application/javascript" src="{% url static path="jquery.ui/ui/ui.core.js" %}"></script>
<script type="application/javascript" src="{% url static path="jquery.ui/ui/ui.slider.js" %}"></script>

{% timeplot autoCreate=false %}
<style type="text/css">
  .hist_block {width:100%; height:100px; font-size:small; position:relative;}
  .bar {position: absolute; border: 1px solid black;
border-bottom-width: 0px;}
  .cluster_a {background-color: blue;}
  .cluster_b {background-color: red;}
  .cluster_c {background-color: green;}
  .hd {text-align: center; font-size: small;}
  td:nth-child(even) {background-color: #E6E6E6;}
</style>
<link rel="stylesheet" href="{% url static path="jquery.ui/themes/base/ui.all.css" %}" type="text/css" >
<script type="text/javascript" src="{% url static path="clusterer.js" %}"></script>
<script type="text/javascript">
var timeplot, timeGeometry;
var loc_data = [
{% for item in data %}
    {time: SimileAjax.DateTime.parseIso8601DateTime("{{item.srctime.isoformat }}Z"),
     locales: {{ item.locales|safe }}
    },{% endfor %}
  ];
var locales = [];
var localesSource, changesSource;
function onLoad() {
  var theme = Timeline.ClassicTheme.create();
  theme.event.bubble.width = 50;
  theme.event.bubble.height = 50; 
  localesSource = new Timeplot.DefaultEventSource();
  changesSource = new Timeplot.DefaultEventSource();
  timeGeometry = new Timeplot.MagnifyingTimeGeometry({
    gridColor: new Timeplot.Color("#000000"),
    axisLabelsPlacement: "top",
    min: "{{ startTime.isoformat }}Z",
    max: "{{ endTime.isoformat }}Z"
  });

  var valueGeometry = new Timeplot.DefaultValueGeometry({
    gridColor: "#000000",
    min: 0
  });
  var plotInfo = [
    Timeplot.createPlotInfo({
      id: "checkins",
      timeGeometry: timeGeometry,
      eventSource: changesSource,
      lineColor: "blue",
      bubbleWidth: 250,
      bubbleHeight: 100,
      theme: theme
    }),
    Timeplot.createPlotInfo({
      id: "bad",
      dataSource: new Timeplot.ColumnSource(localesSource,1),
      valueGeometry: valueGeometry,
      timeGeometry: timeGeometry,      
      lineColor: "#000000",
      fillColor: "#808080",
      flat: true,
      showValues: true
    }),
    Timeplot.createPlotInfo({
      id: "good",
      dataSource: new Timeplot.ColumnSource(localesSource,2),
      valueGeometry: valueGeometry,
      timeGeometry: timeGeometry,      
      lineColor: "#ff0000",
      fillColor: "rgba(204, 128, 128, .5)",
      flat: true,
      showValues: true
    })
  ];
            
  timeplot = Timeplot.create(document.getElementById("my-timeplot"), plotInfo);
  var i=0;
  var good = total = 0;
  var latest = {};
  var _data = {};
  for (var loc in loc_data[i].locales) {
    total += 1;
    locales.push(loc);
    latest[loc] = loc_data[i].locales[loc] ? false : true;
    _data[loc] = loc_data[i].locales[loc];
    if (latest[loc]) {
      good += 1;
    }
  }
  var NE = Timeplot.DefaultEventSource.NumericEvent;
  var E = Timeline.DefaultEventSource.Event;
  var locEvents = [new NE(loc_data[i].time,[good, total-good])];
  var changeEvents = [];
  for (var i=1; i<loc_data.length; ++i) {
    var loclist = [];
    for (var loc in loc_data[i].locales) {
      _data[loc] = loc_data[i].locales[loc];
      isGood = loc_data[i].locales[loc] ? false : true;
      if (isGood != latest[loc]) {
        good += isGood ? 1 : -1;
        loclist.push(loc);
        latest[loc] = isGood;
      }
    }
    if (loclist.length) {
      loclist.sort();
      changeEvents.push(new E({start: loc_data[i].time,
                              description: loclist.join(" "),
                               instant: false}));
    }
    locEvents.push(new NE(loc_data[i].time,[good, total-good]));
  }
  locEvents.push(new NE(SimileAjax.DateTime.parseIso8601DateTime("{{ endTime.isoformat }}Z"), [good, total-good]));
  localesSource.addMany(locEvents);
  changesSource.addMany(changeEvents);
  timeplot.repaint();
  paintHistogram(_data);
  $('#my-timeplot').click(onClickPlot).dblclick(onDblClickPlot);
}

var resizeTimerID = null;<commit_msg>fix tree progress for locales starting to build<commit_after>{% extends "base.html" %}
{% load simile %}
{% block title_matter %}{{ tree }} l10n stats{% endblock %}
{% block head_matter %}
<script type="application/javascript"
src="{% url static path="jquery.js" %}"></script>
<script type="application/javascript" src="{% url static path="jquery.ui/ui/ui.core.js" %}"></script>
<script type="application/javascript" src="{% url static path="jquery.ui/ui/ui.slider.js" %}"></script>

{% timeplot autoCreate=false %}
<style type="text/css">
  .hist_block {width:100%; height:100px; font-size:small; position:relative;}
  .bar {position: absolute; border: 1px solid black;
border-bottom-width: 0px;}
  .cluster_a {background-color: blue;}
  .cluster_b {background-color: red;}
  .cluster_c {background-color: green;}
  .hd {text-align: center; font-size: small;}
  td:nth-child(even) {background-color: #E6E6E6;}
</style>
<link rel="stylesheet" href="{% url static path="jquery.ui/themes/base/ui.all.css" %}" type="text/css" >
<script type="text/javascript" src="{% url static path="clusterer.js" %}"></script>
<script type="text/javascript">
var timeplot, timeGeometry;
var loc_data = [
{% for item in data %}
    {time: SimileAjax.DateTime.parseIso8601DateTime("{{item.srctime.isoformat }}Z"),
     locales: {{ item.locales|safe }}
    },{% endfor %}
  ];
var locales = [];
var localesSource, changesSource;
function onLoad() {
  var theme = Timeline.ClassicTheme.create();
  theme.event.bubble.width = 50;
  theme.event.bubble.height = 50; 
  localesSource = new Timeplot.DefaultEventSource();
  changesSource = new Timeplot.DefaultEventSource();
  timeGeometry = new Timeplot.MagnifyingTimeGeometry({
    gridColor: new Timeplot.Color("#000000"),
    axisLabelsPlacement: "top",
    min: "{{ startTime.isoformat }}Z",
    max: "{{ endTime.isoformat }}Z"
  });

  var valueGeometry = new Timeplot.DefaultValueGeometry({
    gridColor: "#000000",
    min: 0
  });
  var plotInfo = [
    Timeplot.createPlotInfo({
      id: "checkins",
      timeGeometry: timeGeometry,
      eventSource: changesSource,
      lineColor: "blue",
      bubbleWidth: 250,
      bubbleHeight: 100,
      theme: theme
    }),
    Timeplot.createPlotInfo({
      id: "bad",
      dataSource: new Timeplot.ColumnSource(localesSource,1),
      valueGeometry: valueGeometry,
      timeGeometry: timeGeometry,      
      lineColor: "#000000",
      fillColor: "#808080",
      flat: true,
      showValues: true
    }),
    Timeplot.createPlotInfo({
      id: "good",
      dataSource: new Timeplot.ColumnSource(localesSource,2),
      valueGeometry: valueGeometry,
      timeGeometry: timeGeometry,      
      lineColor: "#ff0000",
      fillColor: "rgba(204, 128, 128, .5)",
      flat: true,
      showValues: true
    })
  ];
            
  timeplot = Timeplot.create(document.getElementById("my-timeplot"), plotInfo);
  var i=0;
  var good = bad = 0;
  var latest = {};
  var _data = {};
  for (var loc in loc_data[i].locales) {
    locales.push(loc);
    latest[loc] = loc_data[i].locales[loc] ? false : true;
    _data[loc] = loc_data[i].locales[loc];
    if (latest[loc]) {
      good += 1;
    } else {
      bad += 1;
    }
  }
  var NE = Timeplot.DefaultEventSource.NumericEvent;
  var E = Timeline.DefaultEventSource.Event;
  var locEvents = [new NE(loc_data[i].time,[good, bad])];
  var changeEvents = [];
  for (var i=1; i<loc_data.length; ++i) {
    var loclist = [];
    for (var loc in loc_data[i].locales) {
      _data[loc] = loc_data[i].locales[loc];
      isGood = loc_data[i].locales[loc] ? false : true;
      if (isGood != latest[loc]) {
        if (loc in latest) {
          good += isGood ? 1 : -1;
          bad += isGood ? -1 : 1;
        } else {
          if (isGood) good += 1; else bad += 1;
        }
        loclist.push(loc);
        latest[loc] = isGood;
      }
    }
    if (loclist.length) {
      loclist.sort();
      changeEvents.push(new E({start: loc_data[i].time,
                              description: loclist.join(" "),
                               instant: false}));
    }
    locEvents.push(new NE(loc_data[i].time,[good, bad]));
  }
  locEvents.push(new NE(SimileAjax.DateTime.parseIso8601DateTime("{{ endTime.isoformat }}Z"), [good, bad]));
  localesSource.addMany(locEvents);
  changesSource.addMany(changeEvents);
  timeplot.repaint();
  paintHistogram(_data);
  $('#my-timeplot').click(onClickPlot).dblclick(onDblClickPlot);
}

var resizeTimerID = null;
{'fraction_non_alphanumeric': 0.1603131381892444, 'fraction_numerical': 0.018379850238257316, 'mean_word_length': 3.3380905511811023, 'pattern_counts': {'":': 0, '<': 29, '<?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': '5556212', 'n_tokens_mistral': 3080, 'n_tokens_neox': 2901, 'n_words': 619}