<commit_before>package threed

import org.khronos.webgl.WebGLRenderingContext
import org.w3c.dom.HTMLCanvasElement
import org.w3c.dom.HTMLDivElement
import kotlin.browser.document
import kotlin.browser.window


fun main(args: Array<String>) {

    val container = document.getElementById("container") as HTMLDivElement
    val canvas = document.createElement("canvas") as HTMLCanvasElement

    val webGlContext = canvas.getContext("webgl")


    if (webGlContext == null) {

        val text = document.createTextNode("WebGl not available in this browser!")
        container.appendChild(text)

    } else {

        container.appendChild(canvas)
        webGlContext as WebGLRenderingContext

        fun render() {

            webGlContext.viewport(0, 0, canvas.width, canvas.height)
            drawTriangle(webGlContext)
            window.requestAnimationFrame { render() }

        }
        render()

    }

}


<commit_msg>Set canvas HTML element height to 100% so it follows the height of the browser.<commit_after>package threed

import org.khronos.webgl.WebGLRenderingContext
import org.w3c.dom.HTMLCanvasElement
import org.w3c.dom.HTMLDivElement
import kotlin.browser.document
import kotlin.browser.window


fun main(args: Array<String>) {

    val container = document.getElementById("container") as HTMLDivElement
    val canvas = document.createElement("canvas") as HTMLCanvasElement
    canvas.style.height = "100%"

    val webGlContext = canvas.getContext("webgl")


    if (webGlContext == null) {

        val text = document.createTextNode("WebGl not available in this browser!")
        container.appendChild(text)

    } else {

        container.appendChild(canvas)
        webGlContext as WebGLRenderingContext

        fun render() {

            webGlContext.viewport(0, 0, canvas.width, canvas.height)
            drawTriangle(webGlContext)
            window.requestAnimationFrame { render() }

        }
        render()

    }

}



{'fraction_non_alphanumeric': 0.08854961832061069, 'fraction_numerical': 0.0071246819338422395, 'mean_word_length': 3.1215932914046123, 'pattern_counts': {'":': 0, '<': 5, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5977568', 'n_tokens_mistral': 565, 'n_tokens_neox': 535, 'n_words': 126}