<commit_before>import QtQuick 2.0


Item {

    property int array_width: 12 //Number of cells. Default value
    property int array_height: 8

    property int cell_width: 12
    property int cell_height: 12

    anchors.centerIn: parent

    Grid {
        columns: array_width
        Repeater {
            model: array_width * array_height
            Rectangle {
                id: cell
                color: "#25e617"
                border.color: "black"
                width: cell_width
                height: cell_width
            }
        }<commit_msg>Added BackgroundArray.getElement(x,y)<commit_after>import QtQuick 2.0


Item {

    property int array_width: 12 //Number of cells. Default value
    property int array_height: 8

    property int cell_width: 12
    property int cell_height: 12

    anchors.centerIn: parent

    Grid {
        id: grid
        columns: array_width
        Repeater {
            model: array_width * array_height
            Rectangle {
                id: cell
                color: "#25e617"
                border.color: "black"
                width: cell_width
                height: cell_width
            }

        }

        function getElement(x, y) {
            console.assert(x >= 0 && x <= array_width)
            console.assert(y >= 0 && y <= array_height)
            var key = x + array_width * y
            return grid.children[key]
        }

{'fraction_non_alphanumeric': 0.07047216349541931, 'fraction_numerical': 0.021141649048625793, 'mean_word_length': 1.5088339222614842, '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': '1037996', 'n_tokens_mistral': 421, 'n_tokens_neox': 372, 'n_words': 111}