<commit_before>"use strict";

const drawGroup = function() {
    let start = 0
    let end = 0
    let color = 0
    Object.keys(parts).forEach(function(name) {
        if (parts[name] == 0) {
            color = (color + 1) % colors.length
            return
        }
        start = end
        end = start + parts[name]
        wheel.beginPath()
        wheel.arc(SIZE / 2, SIZE / 2, SIZE / 2 - 60, start + angle, end + angle, false)
        wheel.lineTo(SIZE / 2, SIZE / 2)
        wheel.fillStyle = colors[color]
        wheel.strokeStyle = '#000'
        wheel.lineWidth = 3
        wheel.fill()
        wheel.stroke()
        color = (color + 1) % colors.length

        const text = name + ' (' + (Math.round(10000 * parts[name] / (2 * Math.PI)) / 100) + '%)'
        wheel.translate(SIZE / 2, SIZE / 2)
        wheel.rotate(start + (end - start) / 2 + angle)
        wheel.fillStyle = '#000'
        wheel.font = '14pt sans-serif'
        wheel.fillText(text, SIZE / 2 - 65 - wheel.measureText(text).width, 7)
        wheel.rotate(-start - (end - start) / 2 - angle)
        wheel.translate(-SIZE / 2, -SIZE / 2)
    })
    drawNeedle()
}

const drawNeedle = function() {
    wheel.beginPath()
    wheel.moveTo(SIZE - 100, SIZE / 2)
    wheel.lineTo(SIZE - 10, SIZE / 2 - 10)
    wheel.lineTo(SIZE, SIZE / 2)
    wheel.lineTo(SIZE - 10, SIZE / 2 + 10)
    wheel.fillStyle = '#000'
    wheel.fill()
}

const setColors = function() {
    if (group.choices !== undefined) {
        colors = []
        for (let i = 0; i < group.choices.length; i++) {
            colors.push(getRainbowColor(i, group.choices.length))
        }
    }
}

const run = function(finished) {
    if (parts === undefined) {
        return
    }<commit_msg>Increase the wheel font a bit after all<commit_after>"use strict";

const drawGroup = function() {
    let start = 0
    let end = 0
    let color = 0
    Object.keys(parts).forEach(function(name) {
        if (parts[name] == 0) {
            color = (color + 1) % colors.length
            return
        }
        start = end
        end = start + parts[name]
        wheel.beginPath()
        wheel.arc(SIZE / 2, SIZE / 2, SIZE / 2 - 60, start + angle, end + angle, false)
        wheel.lineTo(SIZE / 2, SIZE / 2)
        wheel.fillStyle = colors[color]
        wheel.strokeStyle = '#000'
        wheel.lineWidth = 3
        wheel.fill()
        wheel.stroke()
        color = (color + 1) % colors.length

        const text = name + ' (' + (Math.round(10000 * parts[name] / (2 * Math.PI)) / 100) + '%)'
        wheel.translate(SIZE / 2, SIZE / 2)
        wheel.rotate(start + (end - start) / 2 + angle)
        wheel.fillStyle = '#000'
        const fontSize = 18
        wheel.font = fontSize + 'pt sans-serif'
        wheel.fillText(text, SIZE / 2 - 65 - wheel.measureText(text).width, fontSize / 2)
        wheel.rotate(-start - (end - start) / 2 - angle)
        wheel.translate(-SIZE / 2, -SIZE / 2)
    })
    drawNeedle()
}

const drawNeedle = function() {
    wheel.beginPath()
    wheel.moveTo(SIZE - 100, SIZE / 2)
    wheel.lineTo(SIZE - 10, SIZE / 2 - 10)
    wheel.lineTo(SIZE, SIZE / 2)
    wheel.lineTo(SIZE - 10, SIZE / 2 + 10)
    wheel.fillStyle = '#000'
    wheel.fill()
}

const setColors = function() {
    if (group.choices !== undefined) {
        colors = []
        for (let i = 0; i < group.choices.length; i++) {
            colors.push(getRainbowColor(i, group.choices.length))
        }
    }
}

const run = function(finished) {
    if (parts === undefined) {
        return
    }
{'fraction_non_alphanumeric': 0.14667792792792791, 'fraction_numerical': 0.033783783783783786, 'mean_word_length': 1.8630136986301369, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5485562', 'n_tokens_mistral': 1281, 'n_tokens_neox': 1147, 'n_words': 296}