<commit_before>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<style type="text/css">
canvas{
        width: 100% !important;
		max-width: 800px;
		height: 400px;
		max-height: 600px;
        height: auto !important;
    }
</style>
	<script src="<?php echo base_url().'resources/js/Chart.js'?>"></script>
	<div class="row container-fluid">
        <div class="graph span6">
            <h3 class="title"> The Chart</h3>
            <canvas id="myChart" width="100%" height="100%"></canvas>
        </div>
		<br/>
		<button class="btn btn-primary btn-lg" id="total">Total</button>
        <button class="btn btn-primary btn-lg" id="text">Text</button>
		<button class="btn btn-primary btn-lg" id="word">Word</button>
		<button class="btn btn-primary btn-lg" id="defi">Definition</button>
	</div>
	<script type="text/javascript">
	$(window).on('resize',function(){location.reload();});
var text_result = JSON.parse('<?php echo json_encode($Nvoca['text_result']); ?>');
var dateArray = new Array();
var lengthArray= new Array();
var ctx = $("#myChart").get(0).getContext("2d");
var vocadbchart;
//Total
$('#total').click(function(){
	dateArray = Object.keys(text_result.total);
	for( i=0; i<dateArray.length; i++ )
	{
		lengthArray.push( text_result.total[dateArray[i]] );
	}
	var data = {
		labels: dateArray,
		datasets: [
			{
				label: "My First dataset",
				fillColor: "rgba(151,187,205,0.2)",
				strokeColor: "rgba(151,187,205,1)",
				pointColor: "rgba(151,187,205,1)",
				pointStrokeColor: "#fff",
				pointHighlightFill: "#fff",
				pointHighlightStroke: "rgba(220,220,220,1)",
				data: lengthArray
			},
		]
	};
	// vocadbchart.removeData();
	if(typeof(vocadbchart) != 'undefined')
		vocadbchart.destroy();
	vocadbchart = new Chart(ctx).Line(data);
});
	
//Text
$('#text').click(function(){
	dateArray = Object.keys(text_result.text);
	for( i=0; i<dateArray.length; i++ )
	{
		lengthArray.push( text_result.text[dateArray[i]] );
	}
	var data = {
		labels: dateArray,
		datasets: [
			{
				label: "My First dataset",
				fillColor: "rgba(151,187,205,0.2)",
				strokeColor: "rgba(151,187,205,1)",
				pointColor: "rgba(151,187,205,1)",
				pointStrokeColor: "#fff",
				pointHighlightFill: "#fff",
				pointHighlightStroke: "rgba(220,220,220,1)",
				data: lengthArray
			},
		]
	};
	// new Chart(ctx).Line(data);
	vocadbchart.destroy();
	vocadbchart = new Chart(ctx).Line(data);
});

//Word
$('#word').click(function(){
	dateArray = Object.keys(text_result.word);
	for( i=0; i<dateArray.length; i++ )
	{
		lengthArray.push( text_result.word[dateArray[i]] );
	}
	var data = {
		labels: dateArray,
		datasets: [
			{
				label: "My First dataset",
				fillColor: "rgba(151,187,205,0.2)",
				strokeColor: "rgba(151,187,205,1)",
				pointColor: "rgba(151,187,205,1)",
				pointStrokeColor: "#fff",
				pointHighlightFill: "#fff",
				pointHighlightStroke: "rgba(220,220,220,1)",
				data: lengthArray
			},
		]
	};
	vocadbchart.destroy();
	vocadbchart = new Chart(ctx).Line(data);
});

//Word
$('#defi').click(function(){
	dateArray = Object.keys(text_result.defi);
	for( i=0; i<dateArray.length; i++ )
	{
		lengthArray.push( text_result.defi[dateArray[i]] );
	}
	var data = {
		labels: dateArray,
		datasets: [
			{
				label: "My First dataset",
				fillColor: "rgba(151,187,205,0.2)",
				strokeColor: "rgba(151,187,205,1)",
				pointColor: "rgba(151,187,205,1)",
				pointStrokeColor: "#fff",
				pointHighlightFill: "#fff",
				pointHighlightStroke: "rgba(220,220,220,1)",
				data: lengthArray
			},
		]
	};
	vocadbchart.destroy();
	vocadbchart = new Chart(ctx).Line(data);
});

$( "#total" ).trigger( "click" );
</script>

<commit_msg>commit stats table<commit_after><script src="<?php echo base_url().'resources/js/Chart.js'?>"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<style type="text/css">
canvas{
        width: 100% !important;
		max-width: 800px;
		height: 400px;
		max-height: 600px;
        height: auto !important;
    }
</style>
	
	<div class="row container-fluid">
        <div class="graph span6">
            <h3 class="title"> The Chart</h3>
            <canvas id="myChart" width="100%" height="100%"></canvas>
        </div>
		<br/>
		<button class="btn btn-primary btn-lg" id="total">Total</button>
        <button class="btn btn-primary btn-lg" id="text">Text</button>
		<button class="btn btn-primary btn-lg" id="word">Word</button>
		<button class="btn btn-primary btn-lg" id="defi">Definition</button>
		<br/>
		<?php echo "<pre>";print_r($Nvoca['text_result']); ?>
	</div>
	<script type="text/javascript">
	$(window).on('resize',function(){location.reload();});
var text_result = JSON.parse('<?php echo json_encode($Nvoca['text_result']); ?>');
var dateArray = new Array();
var lengthArray= new Array();
var ctx = $("#myChart").get(0).getContext("2d");
var vocadbchart;
//Total
$('#total').click(function(){
	dateArray = Object.keys(text_result.total);
	lengthArray = [];
	for( i=0; i<dateArray.length; i++ )
	{
		lengthArray.push( text_result.total[dateArray[i]] );
	}
	var data = {
		labels: dateArray,
		datasets: [
			{
				
				label: "Total",
				fillColor: "rgba(151,187,205,0.2)",
				strokeColor: "rgba(151,187,205,1)",
				pointColor: "rgba(151,187,205,1)",
				pointStrokeColor: "#fff",
				pointHighlightFill: "#fff",
				pointHighlightStroke: "rgba(220,220,220,1)",
				data: lengthArray
			},
		]
	};
	// vocadbchart.removeData();
	if(typeof(vocadbchart) != 'undefined')
		vocadbchart.destroy();
	vocadbchart = new Chart(ctx).Line(data);
	$(this).siblings().removeClass('active');
	$(this).addClass('active');
	// console.log(lengthArray);
});
	
//Text
$('#text').click(function(){
	dateArray = Object.keys(text_result.text);
	lengthArray = [];
	for( i=0; i<dateArray.length; i++ )
	{
		lengthArray.push( text_result.text[dateArray[i]] );
	}
	var data = {
		labels: dateArray,
		datasets: [
			{
				
				label: "My First dataset",
				fillColor: "rgba(151,187,205,0.2)",
				strokeColor: "rgba(151,187,205,1)",
				pointColor: "rgba(151,187,205,1)",
				pointStrokeColor: "#fff",
				pointHighlightFill: "#fff",
				pointHighlightStroke: "rgba(220,220,220,1)",
				data: lengthArray
			},
		]
	};
	// new Chart(ctx).Line(data);
	vocadbchart.destroy();
	vocadbchart = new Chart(ctx).Line(data);
	$(".active").removeClass('active');
	$(this).addClass('active');
	// console.log(lengthArray);
});

//Word
$('#word').click(function(){
	dateArray = Object.keys(text_result.word);
	lengthArray = [];
	for( i=0; i<dateArray.length; i++ )
	{
		lengthArray.push( text_result.word[dateArray[i]] );
	}
	var data = {
		labels: dateArray,
		datasets: [
			{
				
				label: "My First dataset",
				fillColor: "rgba(151,187,205,0.2)",
				strokeColor: "rgba(151,187,205,1)",
				pointColor: "rgba(151,187,205,1)",
				pointStrokeColor: "#fff",
				pointHighlightFill: "#fff",
				pointHighlightStroke: "rgba(220,220,220,1)",
				data: lengthArray
			},
		]
	};
	vocadbchart.destroy();
	vocadbchart = new Chart(ctx).Line(data);
	$(".active").removeClass('active');
	$(this).addClass('active');
	// console.log(lengthArray);
});

//Word
$('#defi').click(function(){
	dateArray = Object.keys(text_result.defi);
	lengthArray = [];
	for( i=0; i<dateArray.length; i++ )
	{
		lengthArray.push( text_result.defi[dateArray[i]] );
	}
	var data = {
		labels: dateArray,
		datasets: [
			{
				
				label: "My First dataset",
				fillColor: "rgba(151,187,205,0.2)",
				strokeColor: "rgba(151,187,205,1)",
				pointColor: "rgba(151,187,205,1)",
				pointStrokeColor: "#fff",
				pointHighlightFill: "#fff",
				pointHighlightStroke: "rgba(220,220,220,1)",
				data: lengthArray
			},
		]
	};
	vocadbchart.destroy();
	vocadbchart = new Chart(ctx).Line(data);
	$(".active").removeClass('active');
	$(this).addClass('active');
	// console.log(lengthArray);
});

$( "#total" ).trigger( "click" );
</script>


{'fraction_non_alphanumeric': 0.2045625470042617, 'fraction_numerical': 0.04863374279267987, 'mean_word_length': 4.1980456026058635, 'pattern_counts': {'":': 0, '<': 68, '<?xml version=': 0, '>': 60, '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': '4596341', 'n_tokens_mistral': 3493, 'n_tokens_neox': 2965, 'n_words': 497}