<commit_before>namespace Canvas {
    const el = document.querySelector("canvas") as HTMLCanvasElement
    export const cx = el.getContext("2d")

    export let w: number
    export let h: number

    const ratio = devicePixelRatio || 1

    // resize the canvas to be the size of the window
    export function resize(): void {
        w = innerWidth
        h = innerHeight
        el.width = w * ratio
        el.height = h * ratio
        el.style.width = `${w}px`
        el.style.height = `${h}px`
        cx.scale(ratio, ratio)<commit_msg>lgw/canvas: rename ratio -> pxRatio<commit_after>namespace Canvas {
    const el = document.querySelector("canvas") as HTMLCanvasElement
    export const cx = el.getContext("2d")

    export let w: number
    export let h: number

    const pxRatio = devicePixelRatio || 1

    // resize the canvas to be the size of the window
    export function resize(): void {
        w = innerWidth
        h = innerHeight
        el.width = w * pxRatio
        el.height = h * pxRatio
        el.style.width = `${w}px`
        el.style.height = `${h}px`
        cx.scale(pxRatio, pxRatio)
{'fraction_non_alphanumeric': 0.10142348754448399, 'fraction_numerical': 0.0035587188612099642, 'mean_word_length': 2.3382789317507418, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '7097563', 'n_tokens_mistral': 330, 'n_tokens_neox': 328, 'n_words': 108}