<commit_before>function getProjectData(){
	var dictPost={"plugin":"pano","action":"get_project_data"};
	console.log(dictPost);
	var jsonResp=[];
	$.ajax({
		type:"POST",
                url:"/plugin/",
                data:dictPost,
                success:function(response){
        	        console.log(response);
        	        jsonResp=JSON.parse(response);
        	        if(jsonResp['success']==true){
                                get_user_info_by_id(1,jsonResp);
        	        }
        	        else{
                        alert("Error!");
        	        }
                }
	});
}

function add0(m){return m<10?'0'+m:m }
function date(shijianchuo)
{
var time = new Date(1000*shijianchuo);
var y = time.getFullYear();
var m = time.getMonth()+1;
var d = time.getDate();
var h = time.getHours();
var mm = time.getMinutes();
var s = time.getSeconds();
return y+'-'+add0(m)+'-'+add0(d)+' '+add0(h)+':'+add0(mm)+':'+add0(s);
}

function get_user_info_by_id(i,obj) {
    var num=obj.project.length;
    var  dictPost  =  {"plugin":"user_model","action":"get_user_data_by_id","user_id":obj.project[i-1].user_id};
    console.log(dictPost);
    var jsonResp=[];
    $.ajax({
        type: "POST",
        url: "/plugin/",
        data: dictPost,
        success: function(response){
            console.log(response);
            jsonResp = JSON.parse(response);
            i++;
            if(jsonResp['success']==true) {
                 obj.project[i-1].user_name=jsonResp.user_name;
                 if (jsonResp.project[i-1].public==true){
                                    jsonResp.project[i-1].private="Public";
                                }
                                else {
                                    jsonResp.project[i-1].private="Private";
                                }
                                if (jsonResp.project[i-1].img_src==""){
                                    jsonResp.project[i-1].img_src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAAAuUlEQVR4Ae2XP8rCUBAHp5F4gPxBsA45mpUgXkt4Se4Rkc97fIQkhVZrK+JbxGwhujN9Bh77K8IPsWTPkSsXOnYkGLPmjNx5YoUhCX/Igx0LzNgiT9zwBhU1AxLxQEpGQCJOtFT653tEMQUgRxR7LVEjqhkABaLaEGVAVAM5BQ2iOhJFjPSAXeBVPKADfqa+Aw/4Dr53Bx6wD/iZfkZgQgwcidIiBgb0H5CZ/lOClmgYZzxOoMRxjLkBL3E6cltSSnYAAAAASUVORK5CYII=';
                                }

                loadproject(obj.project[i-1]);
                get_user_info_by_id(i,obj);
            }
            else {
                Materialize.toast(jsonResp['error'], 2500, 'rounded');
            }
        }
    });
}

function prepareRemoveData(i){
    return function(){
        var id="fdrg";
        document.getElementById("remove_project_id").innerHTML=id;
    }
}

function sendRemoveRequest(i){
   return function(){
        var user=document.getElementById("this_is_a_user_name").innerHTML;
        var id=obj.project[i-1].id;
        var dictPost={"plugin":"pano","action":"delete","id":id};
        console.log(dictPost);
        var jsonResp=[];
        $.ajax({
                type:"POST",
                url:"/plugin/",
                data:dictPost,<commit_msg>cesgvf<commit_after>function getProjectData(){
	var dictPost={"plugin":"pano","action":"get_project_data"};
	console.log(dictPost);
	var jsonResp=[];
	$.ajax({
		type:"POST",
                url:"/plugin/",
                data:dictPost,
                success:function(response){
        	        console.log(response);
        	        jsonResp=JSON.parse(response);
        	        if(jsonResp['success']==true){
                                get_user_info_by_id(1,jsonResp);
        	        }
        	        else{
                        alert("Error!");
        	        }
                }
	});
}

function add0(m){return m<10?'0'+m:m }
function date(shijianchuo)
{
var time = new Date(1000*shijianchuo);
var y = time.getFullYear();
var m = time.getMonth()+1;
var d = time.getDate();
var h = time.getHours();
var mm = time.getMinutes();
var s = time.getSeconds();
return y+'-'+add0(m)+'-'+add0(d)+' '+add0(h)+':'+add0(mm)+':'+add0(s);
}

function get_user_info_by_id(i,obj) {
    var num=obj.project.length;
    var  dictPost  =  {"plugin":"user_model","action":"get_user_data_by_id","user_id":obj.project[i-1].user_id};
    console.log(dictPost);
    var jsonResp=[];
    $.ajax({
        type: "POST",
        url: "/plugin/",
        data: dictPost,
        success: function(response){
            console.log(response);
            jsonResp = JSON.parse(response);
            i++;
            if(jsonResp['success']==true) {
                 obj.project[i-1].user_name=jsonResp.user_name;
                 if (obj.project[i-1].public==true){
                                    obj.project[i-1].private="Public";
                                }
                                else {
                                    obj.project[i-1].private="Private";
                                }
                                if (obj.project[i-1].img_src==""){
                                    obj.project[i-1].img_src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAAAuUlEQVR4Ae2XP8rCUBAHp5F4gPxBsA45mpUgXkt4Se4Rkc97fIQkhVZrK+JbxGwhujN9Bh77K8IPsWTPkSsXOnYkGLPmjNx5YoUhCX/Igx0LzNgiT9zwBhU1AxLxQEpGQCJOtFT653tEMQUgRxR7LVEjqhkABaLaEGVAVAM5BQ2iOhJFjPSAXeBVPKADfqa+Aw/4Dr53Bx6wD/iZfkZgQgwcidIiBgb0H5CZ/lOClmgYZzxOoMRxjLkBL3E6cltSSnYAAAAASUVORK5CYII=';
                                }

                loadproject(obj.project[i-1]);
                get_user_info_by_id(i,obj);
            }
            else {
                Materialize.toast(jsonResp['error'], 2500, 'rounded');
            }
        }
    });
}

function prepareRemoveData(i){
    return function(){
        var id="fdrg";
        document.getElementById("remove_project_id").innerHTML=id;
    }
}

function sendRemoveRequest(i){
   return function(){
        var user=document.getElementById("this_is_a_user_name").innerHTML;
        var id=obj.project[i-1].id;
        var dictPost={"plugin":"pano","action":"delete","id":id};
        console.log(dictPost);
        var jsonResp=[];
        $.ajax({
                type:"POST",
                url:"/plugin/",
                data:dictPost,
{'fraction_non_alphanumeric': 0.14051973051010588, 'fraction_numerical': 0.021174205967276226, 'mean_word_length': 1.9341176470588235, 'pattern_counts': {'":': 16, '<': 5, '<?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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1621489', 'n_tokens_mistral': 2263, 'n_tokens_neox': 2107, 'n_words': 221}