<commit_before><!doctype html>
<!-- example at: http://www.sitepoint.com/dynamic-geo-maps-svg-jquery/ -->
<html>
<head>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <meta charset="UTF-8">
    <title>Map Sample</title>
    <style type="text/css" media="all">
        .map svg {
            height: auto;
            width: 650px;
        }
        .map g {
            fill: #ccc;
            stroke: #333;
            stroke-width: 1;
        }
    </style>
    <script type="text/javascript">
	function updateGraph(svgRoot) {
		$.getJSON( "/tasks", function() {
			console.log( "success" );
			}).done(function(data) {
				for(i=0; i < data.length; i++) {
					switch (data[i].status) {
						case 0:
							color = 'rgba(100,100,0,0.5)'
							break;
						default:
							color = 'rgba(100,0,0,0.5)'
					}
					$("#" + data[i].id,svgRoot).children().css({'color': '#FFFFFF'});
					$("#" + data[i].id,svgRoot).children().css({'fill': color});
				}
			});
                 setTimeout(function() {
                        updateGraph(svgRoot);
                 }, 2000)
	}
	$(document).ready(function(){
		var a = document.getElementById("svg");

		// Some help from http://stackoverflow.com/questions/6793312/how-to-use-jquery-in-svg-scalable-vector-graphics
		//it's important to add an load event listener to the object, as it will load the svg doc asynchronously
		a.addEventListener("load",function(){
			var svgDoc = a.contentDocument; //get the inner DOM of alpha.svg
			var svgRoot  = svgDoc.documentElement;
			updateGraph(svgRoot);
			$(svgRoot).css({'width': '100%'});
			$(svgRoot).css({'height': '100%'});
			//now we can query stuff with jquery like this
			//note that we pass in the svgRoot as the context node!
		},false);
	})
    </script>
</head>
<body>
    <div class="map">
        <object data="/svg" type="image/svg+xml" id="svg"/>
    </div>
</body>
</html>
<commit_msg>Color is different regarding the status<commit_after><!doctype html>
<!-- example at: http://www.sitepoint.com/dynamic-geo-maps-svg-jquery/ -->
<html>
<head>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <meta charset="UTF-8">
    <title>Map Sample</title>
    <style type="text/css" media="all">
        .map svg {
            height: auto;
            width: 650px;
        }
        .map g {
            fill: #ccc;
            stroke: #333;
            stroke-width: 1;
        }
    </style>
    <script type="text/javascript">
	function updateGraph(svgRoot) {
		$.getJSON( "/tasks", function() {
			console.log( "success" );
			}).done(function(data) {
				for(i=0; i < data.length; i++) {
					switch (data[i].status) {
						case 0:
							color = 'rgba(34, 209, 23, 0.3)'
							break;
						case -3:
							color = 'rgba(10, 0, 0, 0.5)'
							break;
						case -2:
							color = 'rgba(73, 151, 41, 0.3)'
							break;
						case -1:
							color = 'rgba(34, 131, 201, 0.3)'
							break;
						default:
							color = 'rgba(230, 0, 0, 0.5)'
					}
					$("#" + data[i].id,svgRoot).children().css({'color': '#FFFFFF'});
					$("#" + data[i].id,svgRoot).children().css({'fill': color});
				}
			});
                 setTimeout(function() {
                        updateGraph(svgRoot);
                 }, 2000)
	}
	$(document).ready(function(){
		var a = document.getElementById("svg");

		// Some help from http://stackoverflow.com/questions/6793312/how-to-use-jquery-in-svg-scalable-vector-graphics
		//it's important to add an load event listener to the object, as it will load the svg doc asynchronously
		a.addEventListener("load",function(){
			var svgDoc = a.contentDocument; //get the inner DOM of alpha.svg
			var svgRoot  = svgDoc.documentElement;
			updateGraph(svgRoot);
			$(svgRoot).css({'width': '100%'});
			$(svgRoot).css({'height': '100%'});
			//now we can query stuff with jquery like this
			//note that we pass in the svgRoot as the context node!
		},false);
	})
    </script>
</head>
<body>
    <div class="map">
        <object data="/svg" type="image/svg+xml" id="svg"/>
    </div>
</body>
</html>

{'fraction_non_alphanumeric': 0.18370800096688422, 'fraction_numerical': 0.029006526468455404, 'mean_word_length': 2.366965012205045, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '3273711', 'n_tokens_mistral': 1674, 'n_tokens_neox': 1385, 'n_words': 317}