<commit_before><!DOCTYPE html>
<html>
<head>
    <title>Cosmic ...</title>
    <link rel="stylesheet" type="text/css" href="main.css">
    <script src="test.js"></script>
    <script src="main.js"></script>
    
    <script>
        function initGame() {
            var _ctx;
            var _removed = [];
            var _actors = [];

            function resetGraphicsContexts() {
                _ctx.fillStyle = "#000000";
                _ctx.font = "20px sans-serif";
                _ctx.globalAlpha = 1;
                _ctx.globalCompositeOperation = "source-over";
                _ctx.imageSmoothingEnabled = true;
                _ctx.lineCap = "butt";
                _ctx.lineDashOffset = 0;
                _ctx.lineJoin = "miter";
                _ctx.lineWidth = 1;
                _ctx.miterLimit = 10;
                _ctx.shadowBlur = 0;
                _ctx.shadowColor = "rgba(0, 0, 0, 0)";
                _ctx.shadowOffsetX = 0;
                _ctx.shadowOffsetY = 0;
                _ctx.strokeStyle = "#000000";
                _ctx.textAlign = "start";
                _ctx.textBaseline = "alphabetic";
            }

            function App() {
                Object.defineProperty(this, "CANVAS_ID", {
                    value: "game-canvas",
                    writable: false,
                    enumerable: true,
                    configurable: false
                });
                
                Object.defineProperty(this, "canvas", {
                    get: function() { return document.getElementById(app.CANVAS_ID); },
                    enumerable: true,
                    configurable: false
                });
                
                Object.defineProperty(this, "GAME_NAME", {
                    value: window.document.head.firstElementChild.firstChild,
                    writable: false,
                    enumerable: true,
                    configurable: false
                });
                
                Object.defineProperty(this, "actors", {
                    get: function() { return _actors; },
                    enumerable: true,
                    configurable: false
                });
                
                Object.defineProperty(this, "kill", {
                    value: function(actor) {
                        if (actor) {
                            _removed.push(actor);
                        }
                    },
                    writable: false,
                    enumerable: true,
                    configurable: false
                });
                
                Object.defineProperty(this, "removeKilled", {
                    value: function() {
                        if (_removed.length) {
                            var len = _actors.length;
                            var newLength = len - _removed.length;
                            for (var next = _removed.pop(); next; next = _removed.pop()) {
                                for (var i = 0; i < len; ++i) {
                                    if (_actors[i] === next) {
                                        _actors[i] = null;
                                    }
                                }
                            }

                            var n = 0;
                            var tmp = new Array(newLength);
                            for (var i = 0; i < len; ++i) {
                                if (_actors[i]) {
                                    tmp[n++] = _actors[i];
                                }
                            }

                            _actors = tmp;
                        }
                    },
                    writable: false,
                    enumerable: true,
                    configurable: false
                }); 
                
                var context = {
                    get: function() { return _ctx; },
                    enumerable: true,
                    configurable: false
                };
                
                Object.defineProperty(this, "ctx", context);
                Object.defineProperty(this, "context", context);
                Object.defineProperty(this, "graphics", context);
                
                Object.defineProperty(this, "resetGraphics", {
                    value: resetGraphicsContexts,
                    enumerable: true,
                    writable: false,
                    configurable: false
                });
            }

            function getWindowDimension(dim) {
                dim = dim.charAt(0).toUpperCase() + dim.slice(1).toLowerCase();
                var tmp = document.documentElement["client" + dim];
                return Math.max(tmp , window["inner"+dim] || 0);
            }

            function resetCanvas() {
                var canvas = document.getElementById(app.CANVAS_ID);
                if (canvas) {
                    canvas.parentNode.removeChild(canvas);
                }

                canvas = document.createElement("canvas");
                canvas.id = app.CANVAS_ID;
                canvas.width = getWindowDimension("width");
                canvas.height = getWindowDimension("height");
                canvas.style.position = "absolute";
                canvas.style.top = "0";
                canvas.style.left = "0";

                document.body.appendChild(canvas);
                _ctx = canvas.getContext("2d");
                resetGraphicsContexts();
            }

            window.app = new App();
            window.addEventListener("resize", resetCanvas);
            window.addEventListener("re", resetCanvas);
            resetCanvas();
        }
        initGame();
        //window.addEventListener("DOMContentLoaded", );
    </script>

</head>
<body></body><commit_msg>fixed another bug in index<commit_after><!DOCTYPE html>
<html>
<head>
    <title>Cosmic ...</title>
    <link rel="stylesheet" type="text/css" href="main.css">
    <script src="test.js"></script>
    <script src="main.js"></script>
    
    <script>
        function initGame() {
            var _ctx;
            var _removed = [];
            var _actors = [];

            function resetGraphicsContexts() {
                _ctx.fillStyle = "#000000";
                _ctx.font = "20px sans-serif";
                _ctx.globalAlpha = 1;
                _ctx.globalCompositeOperation = "source-over";
                _ctx.imageSmoothingEnabled = true;
                _ctx.lineCap = "butt";
                _ctx.lineDashOffset = 0;
                _ctx.lineJoin = "miter";
                _ctx.lineWidth = 1;
                _ctx.miterLimit = 10;
                _ctx.shadowBlur = 0;
                _ctx.shadowColor = "rgba(0, 0, 0, 0)";
                _ctx.shadowOffsetX = 0;
                _ctx.shadowOffsetY = 0;
                _ctx.strokeStyle = "#000000";
                _ctx.textAlign = "start";
                _ctx.textBaseline = "alphabetic";
            }

            function App() {
                Object.defineProperty(this, "CANVAS_ID", {
                    value: "game-canvas",
                    writable: false,
                    enumerable: true,
                    configurable: false
                });
                
                Object.defineProperty(this, "canvas", {
                    get: function() { return document.getElementById(app.CANVAS_ID); },
                    enumerable: true,
                    configurable: false
                });
                
                Object.defineProperty(this, "GAME_NAME", {
                    value: window.document.head.firstElementChild.firstChild,
                    writable: false,
                    enumerable: true,
                    configurable: false
                });
                
                Object.defineProperty(this, "actors", {
                    get: function() { return _actors; },
                    enumerable: true,
                    configurable: false
                });
                
                Object.defineProperty(this, "kill", {
                    value: function(actor) {
                        if (actor) {
                            _removed.push(actor);
                        }
                    },
                    writable: false,
                    enumerable: true,
                    configurable: false
                });
                
                Object.defineProperty(this, "removeKilled", {
                    value: function() {
                        if (_removed.length) {
                            var len = _actors.length;
                            var newLength = len - _removed.length;
                            for (var next = _removed.pop(); next; next = _removed.pop()) {
                                for (var i = 0; i < len; ++i) {
                                    if (_actors[i] === next) {
                                        _actors[i] = null;
                                    }
                                }
                            }

                            var n = 0;
                            var tmp = new Array(newLength);
                            for (var i = 0; i < len; ++i) {
                                if (_actors[i]) {
                                    tmp[n++] = _actors[i];
                                }
                            }

                            _actors = tmp;
                        }
                    },
                    writable: false,
                    enumerable: true,
                    configurable: false
                }); 
                
                var context = {
                    get: function() { return _ctx; },
                    enumerable: true,
                    configurable: false
                };
                
                Object.defineProperty(this, "ctx", context);
                Object.defineProperty(this, "context", context);
                Object.defineProperty(this, "graphics", context);
                
                Object.defineProperty(this, "resetGraphics", {
                    value: resetGraphicsContexts,
                    enumerable: true,
                    writable: false,
                    configurable: false
                });
            }

            function getWindowDimension(dim) {
                dim = dim.charAt(0).toUpperCase() + dim.slice(1).toLowerCase();
                var tmp = document.documentElement["client" + dim];
                return Math.max(tmp , window["inner"+dim] || 0);
            }

            function resetCanvas() {
                var canvas = document.getElementById(app.CANVAS_ID);
                if (canvas) {
                    canvas.parentNode.removeChild(canvas);
                }

                canvas = document.createElement("canvas");
                canvas.id = app.CANVAS_ID;
                canvas.width = getWindowDimension("width");
                canvas.height = getWindowDimension("height");
                canvas.style.position = "absolute";
                canvas.style.top = "0";
                canvas.style.left = "0";

                document.body.appendChild(canvas);
                _ctx = canvas.getContext("2d");
                resetGraphicsContexts();
            }

            window.app = new App();
            window.addEventListener("resize", resetCanvas);
            window.addEventListener("re", resetCanvas);
            resetCanvas();
        }
        
        //window.addEventListener("DOMContentLoaded", );
    </script>

</head>
    <body><script>initGame();</script></body>
{'fraction_non_alphanumeric': 0.10030890681311137, 'fraction_numerical': 0.006006521366054574, 'mean_word_length': 0.9654300168634065, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7334792', 'n_tokens_mistral': 2856, 'n_tokens_neox': 2591, 'n_words': 516}