<commit_before><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>verdant-octo-squeegee</title>
</head>

<body>
<h1>it works!</h1>
</body>
</html><commit_msg>canvas test scripting<commit_after><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>canvas tutorial</title>
<style type="text/css">
<!--
body { margin:0; padding:0; }
#tutorial { /*width:100%; height:100%;*/ background-color:#000; }
-->
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript">
onload = function() {
    init();
};
const   NUM = 500,
        WIDTH = 640,
        HEIGHT = 480;
var speedX  = new Array(NUM),
    speedY  = new Array(NUM),
    locX    = new Array(NUM),
    locY    = new Array(NUM),
    radius  = new Array(NUM),
    r       = new Array(NUM),
    g       = new Array(NUM),
    b       = new Array(NUM),
    ctx;

function init() {
    var canvas = document.getElementById('tutorial');
    if(canvas.getContext){
        ctx = canvas.getContext('2d');
        for( var i = 0; i < NUM; i++ ) {
            speedX[i] = Math.random() * 8.0 - 4.0;
            speedY[i] = Math.random() * 8.0 - 4.0;
            locX[i] = WIDTH / 2;
            locY[i] = HEIGHT / 2;
            radius[i] = Math.random() * 8.0 + 1.0;
            r[i] = Math.floor(Math.random() * 64);
            g[i] = Math.floor(Math.random() * 64);
            b[i] = Math.floor(Math.random() * 64);
        }
        setInterval(draw, 100);
    }
}

function draw() {

    ctx.globalCompositeOperation = 'source-over';
    ctx.fillStyle = 'rgba(8,8,12,.1)';
    ctx.fillRect(0,0,WIDTH,HEIGHT);
    ctx.globalCompositeOperation = 'lighter';

    for( var i = 0; i < NUM; i++ ) {
        //位置を更新
        locX[i] += speedX[i];
        locY[i] += speedY[i];

        if(locX[i] < 0 || locX[i] > WIDTH) {
            speedX[i] *= -1.0;
        }

        if(locY[i] < 0 || locY[i] > HEIGHT) {
            speedY[i] *= -1.0;
        }

        ctx.beginPath();
        ctx.fillStyle = 'rgb(' + r[i] + ',' + g[i] + ',' + b[i] +')';
        ctx.arc(locX[i], locY[i], radius[i], 0, Math.PI*2.0, true);
        ctx.fill();

    }


}
</script>
</head>
<body>
<canvas id="tutorial" width="640" height="480"></canvas>
</body>
</html>
{'fraction_non_alphanumeric': 0.20590828924162258, 'fraction_numerical': 0.03306878306878307, 'mean_word_length': 2.2414285714285715, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 36, 'https://': 1, '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': '2514595', 'n_tokens_mistral': 932, 'n_tokens_neox': 864, 'n_words': 171}