<commit_before>window.addEventListener("deviceorientation", on_device_orientation);

function on_device_orientation(evt)
{
	var alpha = evt.alpha;
	var beta = evt.beta;
	var gamma = evt.gamma;
		
	document.getElementById("a").innerHTML = "alpha = "+alpha;
	document.getElementById("b").innerHTML = "beta = "+beta;
	document.getElementById("c").innerHTML = "gamma = "+gamma;
	
	var canvas = document.getElementById("canvas");
	var context = canvas.getContext("2d");
	context.setTransform(1, 0, 0, 1, 0, 0);
	context.clearRect(0,0,canvas.width, canvas.height);
	var centru = {x:canvas.width/2, y:canvas.height/2}
	var latura_patrat = 50;
	

	context.translate(centru.x/2, centru.y/2);
	context.rotate(alpha * Math.PI / 180);
	
	context.beginPath();
	context.rect(-latura_patrat/2, -latura_patrat/2, latura_patrat, latura_patrat)
	context.stroke();
}<commit_msg>modificari<commit_after>window.addEventListener("deviceorientation", on_device_orientation);

function on_device_orientation(evt)
{
	var alpha = evt.alpha;
	var beta = evt.beta;
	var gamma = evt.gamma;
		
	document.getElementById("a").innerHTML = "alpha = "+alpha;
	document.getElementById("b").innerHTML = "beta = "+beta;
	document.getElementById("c").innerHTML = "gamma = "+gamma;
	
	var canvas = document.getElementById("canvas");
	var context = canvas.getContext("2d");
	var centru = {x:canvas.width/2, y:canvas.height/2}
	var latura_patrat = 50;
	
	context.setTransform(1, 0, 0, 1, 0, 0);
	
	context.clearRect(0,0,canvas.width, canvas.height);
	
	context.translate(centru.x/2, centru.y/2);
	
	context.rotate(alpha * Math.PI / 180);
	
	context.beginPath();
	context.rect(-latura_patrat/2, -latura_patrat/2, latura_patrat, latura_patrat)
	context.stroke();
}
{'fraction_non_alphanumeric': 0.15930232558139534, 'fraction_numerical': 0.023255813953488372, 'mean_word_length': 5.327205882352941, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2054824', 'n_tokens_mistral': 632, 'n_tokens_neox': 590, 'n_words': 108}