<commit_before>function draw(){
    canvas.clearRect(0,0,width,height);

    /*create 5 stars at random positions*/
    i = 4;
    do{
        stars.push([
            Math.random()*width,/*star x*/
            Math.random()*height,/*star y*/
            0/*star brightness*/
        ])
    }while(i--);

    i = stars.length-1;
    do{
        if(stars[i][0]<0 || stars[i][0]>width || stars[i][1]<0 || stars[i][1]>height){
            /*splice stars that are outside the canvas boundaries*/
            stars.splice(i,1)
        }else{
            /*increase star brightness*/
            stars[i][2] += 9;

            /*update star positions based on brightness*/
            stars[i][0] += Math.abs((stars[i][0]-x)/x) * ((stars[i][0]>x?ratio:-ratio)*9) * (stars[i][2]/99);
            stars[i][1] += Math.abs((stars[i][1]-y)/y) * (stars[i][1]>y?9:-9) * (stars[i][2]/99);

            /*draw stars*/
            canvas.fillStyle = 'rgb('+stars[i][2]+','+stars[i][2]+','+stars[i][2]+')';
            canvas.fillRect(stars[i][0],stars[i][1],3,3)
        }
    }while(i--)
}
function get(i){
    return document.getElementById(i)
}
function resize(){
    width = get('canvas').width = window.innerWidth;
    height = get('canvas').height = window.innerHeight;

    x = width/2;
    y = height/2;

    ratio = width/height
}
var canvas = get('canvas').getContext('2d');
var height = 0;
var i = 0;
var ratio = 0;
var stars = [];
var width = 0;
var x = 0;
var y = 0;

resize();
<commit_msg>improved formatting<commit_after>function draw(){
    canvas.clearRect(
        0,
        0,
        width,
        height
    );

    /*create 5 stars at random positions*/
    i = 4;
    do{
        stars.push([
            Math.random() * width,/*star x*/
            Math.random() * height,/*star y*/
            0/*star brightness*/
        ])
    }while(i--);

    i = stars.length - 1;
    do{
        if(stars[i][0] < 0 || stars[i][0] > width || stars[i][1] < 0 || stars[i][1] > height){
            /*splice stars that are outside the canvas boundaries*/
            stars.splice(
                i,
                1
            )
        }else{
            /*increase star brightness*/
            stars[i][2] += 9;

            /*update star positions based on brightness*/
            stars[i][0] += Math.abs((stars[i][0] - x) / x) * ((stars[i][0] > x ? ratio : -ratio) * 9) * (stars[i][2] / 99);
            stars[i][1] += Math.abs((stars[i][1] - y) / y) * (stars[i][1] > y ? 9 : -9) * (stars[i][2] / 99);

            /*draw stars*/
            canvas.fillStyle = 'rgb('+stars[i][2]+','+stars[i][2]+','+stars[i][2]+')';
            canvas.fillRect(
                stars[i][0],
                stars[i][1],
                3,
                3
            )
        }
    }while(i--)
}
function get(i){
    return document.getElementById(i)
}
function resize(){
    width = get('canvas').width = window.innerWidth;
    height = get('canvas').height = window.innerHeight;

    x = width / 2;
    y = height / 2;

    ratio = width/height
}
var canvas = get('canvas').getContext('2d');
var height = 0;
var i = 0;
var ratio = 0;
var stars = [];
var width = 0;
var x = 0;
var y = 0;

resize();

{'fraction_non_alphanumeric': 0.19668023802067022, 'fraction_numerical': 0.028813028499843407, 'mean_word_length': 1.890497737556561, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '5672508', 'n_tokens_mistral': 1152, 'n_tokens_neox': 1069, 'n_words': 241}