<commit_before>/**
 * nyan nyan cat !
 */
(function() {

    /* return a int random num */
    function getRandomNum(min, max) {
        var range = max - min;
        var rand = Math.random();
        return(min + Math.round(rand * range));
    }

    /* cat class */
    function Cat() {

        /* reset position xy and speed */
        this.reset = function() {
            this.img.width = getRandomNum(100, 200);
            this.x = -this.img.width;
            this.y = getRandomNum(0, window.innerHeight);
            this.img.style.left = this.x + 'px';
            this.img.style.top = this.y + 'px';
            this.speed = getRandomNum(100, 500);
        }

        this.img = document.createElement('img');
        this.img.src = 'img/nyancat.gif';
        this.img.style.position = 'fixed';
        this.wait = true; /* ture is not display */
        document.body.appendChild(this.img);
        this.reset();

        /* this should call in loop update callback */
        this.update = function(dt) {
            if (this.wait) {
                if (getRandomNum(0, 180) === 0) { /* about 3 seconds */
                    this.wait = false;
                    this.reset();
                }
            } else {
                this.x += this.speed * dt;
                this.img.style.left = this.x + 'px';
                if (this.x > window.innerWidth + this.img.width) {
                    this.wait = true;
                }
            }
        }

    }

    /* cat array used to manage */
    var catArray = new Array();

    /* load callback */
    function load() {
        /* init cats */
        for (var n = 0; n < 10; n++) {
            catArray[n] = new Cat();
        }
        /* play bgm */
        var bgm = document.createElement('audio');
        bgm.src = 'bgm/nyancat.mp3';
        bgm.autoplay = 'autoplay';
        bgm.loop = 'loop'; /* this is not work , I don't know why */
        window.setInterval(function() {
            bgm.src = 'bgm/nyancat.mp3'; /* only this way is work , I am crazy !!! */
        }, 27097.687);
    }

    /* update callback */
    function update(dt) {
        for (var n = 0; n < catArray.length; n++) {<commit_msg>musit loop fixme tag<commit_after>/**
 * nyan nyan cat !
 */
(function() {

    /* return a int random num */
    function getRandomNum(min, max) {
        var range = max - min;
        var rand = Math.random();
        return(min + Math.round(rand * range));
    }

    /* cat class */
    function Cat() {

        /* reset position xy and speed */
        this.reset = function() {
            this.img.width = getRandomNum(100, 200);
            this.x = -this.img.width;
            this.y = getRandomNum(0, window.innerHeight);
            this.img.style.left = this.x + 'px';
            this.img.style.top = this.y + 'px';
            this.speed = getRandomNum(100, 500);
        }

        this.img = document.createElement('img');
        this.img.src = 'img/nyancat.gif';
        this.img.style.position = 'fixed';
        this.wait = true; /* ture is not display */
        document.body.appendChild(this.img);
        this.reset();

        /* this should call in loop update callback */
        this.update = function(dt) {
            if (this.wait) {
                if (getRandomNum(0, 180) === 0) { /* about 3 seconds */
                    this.wait = false;
                    this.reset();
                }
            } else {
                this.x += this.speed * dt;
                this.img.style.left = this.x + 'px';
                if (this.x > window.innerWidth + this.img.width) {
                    this.wait = true;
                }
            }
        }

    }

    /* cat array used to manage */
    var catArray = new Array();

    /* load callback */
    function load() {
        /* init cats */
        for (var n = 0; n < 10; n++) {
            catArray[n] = new Cat();
        }
        /* play bgm */
        var bgm = document.createElement('audio');
        bgm.src = 'bgm/nyancat.mp3';
        bgm.autoplay = 'autoplay';
        bgm.loop = 'loop'; /* FIXME : this is not work , I don't know why */
        window.setInterval(function() {
            bgm.src = 'bgm/nyancat.mp3'; /* FIXME : only this way is work , I am crazy !!! */
        }, 27097.687);
    }

    /* update callback */
    function update(dt) {
        for (var n = 0; n < catArray.length; n++) {
{'fraction_non_alphanumeric': 0.14509181591475856, 'fraction_numerical': 0.014962593516209476, 'mean_word_length': 1.4135667396061269, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5579885', 'n_tokens_mistral': 1398, 'n_tokens_neox': 1311, 'n_words': 337}