<commit_before>'use strict';

var styles = {
    0: 'stroke:#000',
    1: 'stroke:#000',
    2: 'stroke:#F00',
    3: 'stroke:#00F',
    4: 'stroke:#0F0',
    5: 'stroke:#FF0',
    6: 'stroke:#0FF',
    7: 'stroke:#F0F'
};

function renderOverUnder (el, key, lane) {
    var xs = lane.xs;
    var ys = lane.ys;
    var period = (el.period || 1) * 2 * xs;
    var xoffset = -(el.phase || 0) * 2 * xs;
    var gap1 = 12;
    var style;

    var y = (key === 'under') ? ys : 0;

    if (el[key]) {
        var res = ['g', {
            transform: 'translate(' + xoffset + ',' + y + ')',
            style: 'stroke-width:3'
        }];

        let start;
        const arr = el[key].split('');
        arr.map(function (dot, i) {
            if ((dot !== '.') && (start !== undefined)) {
                res.push(['line', {
                    style: style,
                    x1: period * start + gap1,
                    x2: period * i // + gap2
                }]);
            }
            if (dot === '0') {
                start = undefined;
            } else
            if (dot !== '.') {
                start = i;
                style = styles[dot] || styles[0];
            }
        });
        if (start !== undefined) {
            res.push(['line', {
                style: style,
                x1: period * start + gap1,
                x2: period * arr.length // + gap2
            }]);
        }
        return [res];
    }
    return [];
}

module.exports = renderOverUnder;<commit_msg>color scheme<commit_after>'use strict';

var styles = {
    1: 'stroke:#000000',
    2: 'stroke:#e90000',
    3: 'stroke:#3edd00',
    4: 'stroke:#0074cd',
    5: 'stroke:#ff15db',
    6: 'stroke:#af9800',
    7: 'stroke:#00864f',
    8: 'stroke:#a076ff'
};

function renderOverUnder (el, key, lane) {
    var xs = lane.xs;
    var ys = lane.ys;
    var period = (el.period || 1) * 2 * xs;
    var xoffset = -(el.phase || 0) * 2 * xs;
    var gap1 = 12;
    var style;

    var y = (key === 'under') ? ys : 0;

    if (el[key]) {
        var res = ['g', {
            transform: 'translate(' + xoffset + ',' + y + ')',
            style: 'stroke-width:3'
        }];

        let start;
        const arr = el[key].split('');
        arr.map(function (dot, i) {
            if ((dot !== '.') && (start !== undefined)) {
                res.push(['line', {
                    style: style,
                    x1: period * start + gap1,
                    x2: period * i // + gap2
                }]);
            }
            if (dot === '0') {
                start = undefined;
            } else
            if (dot !== '.') {
                start = i;
                style = styles[dot] || styles[1];
            }
        });
        if (start !== undefined) {
            res.push(['line', {
                style: style,
                x1: period * start + gap1,
                x2: period * arr.length // + gap2
            }]);
        }
        return [res];
    }
    return [];
}

module.exports = renderOverUnder;
{'fraction_non_alphanumeric': 0.17560013153567905, 'fraction_numerical': 0.03321275896086814, 'mean_word_length': 1.2837837837837838, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2725841', 'n_tokens_mistral': 1050, 'n_tokens_neox': 961, 'n_words': 240}