<commit_before><html>
<head>
<script src="http://www.google.com/jsapi"></script>
<script src="gvizapi.nocache.js"></script>
<script>
google.load("visualization", "1");
google.setOnLoadCallback(drawVisualization);
var c;
function drawVisualization() {
c = new chronoscope.ChronoscopeVisualization(document.getElementById('foo'));

  var data = new google.visualization.DataTable();
        data.addColumn('date', 'Date');
        data.addColumn('number', 'Sold Pencils');
        data.addColumn('number', 'Sold Pens');
        data.addColumn('string', 'Markers');
        data.addRows(6);
        data.setValue(0, 0, new Date(2008, 1 ,1));
        data.setValue(0, 1, 30000);
        data.setValue(0, 2, 40645);
        data.setValue(1, 0, new Date(2008, 1 ,2));
        data.setValue(1, 1, 14045);
        data.setValue(1, 2, 20374);
        data.setValue(2, 0, new Date(2008, 1 ,3));
        data.setValue(2, 1, 55022);
        data.setValue(2, 2, 50766);
        data.setValue(3, 0, new Date(2008, 1 ,4));
        data.setValue(3, 1, 75284);
        data.setValue(3, 2, 14334);
        data.setValue(3, 3, 'Ran out of stock on pens at 4pm');
        data.setValue(4, 0, new Date(2008, 1 ,5));
        data.setValue(4, 1, 46476);
        data.setValue(4, 2, 56467);
        data.setValue(4, 3, 'Bought 200k pens at 11am');
        data.setValue(5, 0, new Date(2008, 1 ,6));
        data.setValue(5, 1, 33322);
        data.setValue(5, 2, 39463);
        google.visualization.events.addListener(data, 'select', function() {
          var sel = c.getSelection();
          alert("someone selected row="+sel[0].row+", col="+sel[0].col);
        })
        
        c.draw(data, { legend: "false", overview: "false"});
}
</script>

</head>
<body>
<div id="foo" style="width: 600px; height: 400px"></div>

<input type="submit" onClick="c.setSelection([{col: 2, row: 3}])" value="Click Me">
</body>
</html><commit_msg>New sample shows select event syncing between Table and Chart<commit_after><html>
<head>
<script src="http://www.google.com/jsapi"></script>
<script src="gvizapi.nocache.js"></script>
<script>
google.load("visualization", "1", {packages:["table"]});
google.setOnLoadCallback(drawVisualization);
var c, table;
function drawVisualization() {
c = new chronoscope.ChronoscopeVisualization(document.getElementById('foo'));

  var data = new google.visualization.DataTable();
        data.addColumn('date', 'Date');
        data.addColumn('number', 'Sold Pencils');
        data.addColumn('number', 'Sold Pens');
        data.addColumn('string', 'Markers');
        data.addRows(6);
        data.setValue(0, 0, new Date(2008, 1 ,1));
        data.setValue(0, 1, 30000);
        data.setValue(0, 2, 40645);
        data.setValue(1, 0, new Date(2008, 1 ,2));
        data.setValue(1, 1, 14045);
        data.setValue(1, 2, 20374);
        data.setValue(2, 0, new Date(2008, 1 ,3));
        data.setValue(2, 1, 55022);
        data.setValue(2, 2, 50766);
        data.setValue(3, 0, new Date(2008, 1 ,4));
        data.setValue(3, 1, 75284);
        data.setValue(3, 2, 14334);
        data.setValue(3, 3, 'Ran out of stock on pens at 4pm');
        data.setValue(4, 0, new Date(2008, 1 ,5));
        data.setValue(4, 1, 46476);
        data.setValue(4, 2, 56467);
        data.setValue(4, 3, 'Bought 200k pens at 11am');
        data.setValue(5, 0, new Date(2008, 1 ,6));
        data.setValue(5, 1, 33322);
        data.setValue(5, 2, 39463);
        google.visualization.events.addListener(c, 'select', function(f) {
          var sel = c.getSelection();
          table.setSelection(sel);

        })

        
        c.draw(data, { legend: "false", overview: "false"});
       table = new google.visualization.Table(document.getElementById('table_div'));
       table.draw(data, {showRowNumber: true});
        google.visualization.events.addListener(table, 'select', function() {
          var sel = table.getSelection();
          c.setSelection([{row: sel[0].row, col: 1}]);
        })

}


</script>

</head>
<body>
<div id="foo" style="width: 600px; height: 400px"></div>
<div id="table_div"></div>
<input type="submit" onClick="c.setSelection([{col: 2, row: 3}])" value="Click Me">
</body>
</html>
{'fraction_non_alphanumeric': 0.1811061001661524, 'fraction_numerical': 0.0731070496083551, 'mean_word_length': 3.0480307396733908, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, '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': '3232912', 'n_tokens_mistral': 1639, 'n_tokens_neox': 1449, 'n_words': 335}