<commit_before>
document.addEventListener('DOMContentLoaded', function() {
    gridDiv = document.querySelector('#myGrid');
    new agGrid.Grid(gridDiv, gridOptions);
    createData();
});

var gridDiv;

var colNames = ["Station","Railway","Street","Address","Toy","Soft Box","Make and Model","Longest Day","Shortest Night"];

var countries = [
    {country: "Ireland", continent: "Europe", language: "English"},
    {country: "Spain", continent: "Europe", language: "Spanish"},
    {country: "United Kingdom", continent: "Europe", language: "English"},
    {country: "France", continent: "Europe", language: "French"},
    {country: "Germany", continent: "Europe", language: "(other)"},
    {country: "Sweden", continent: "Europe", language: "(other)"},
    {country: "Norway", continent: "Europe", language: "(other)"},
    {country: "Italy", continent: "Europe", language: "(other)"},
    {country: "Greece", continent: "Europe", language: "(other)"},
    {country: "Iceland", continent: "Europe", language: "(other)"},
    {country: "Portugal", continent: "Europe", language: "Portuguese"},
    {country: "Malta", continent: "Europe", language: "(other)"},
    {country: "Brazil", continent: "South America", language: "Portuguese"},
    {country: "Argentina", continent: "South America", language: "Spanish"},
    {country: "Colombia", continent: "South America", language: "Spanish"},
    {country: "Peru", continent: "South America", language: "Spanish"},
    {country: "Venezuela", continent: "South America", language: "Spanish"},
    {country: "Uruguay", continent: "South America", language: "Spanish"}
];

var games = ["Chess","Cross and Circle","Daldøs","Downfall","DVONN","Fanorona","Game of the Generals","Ghosts",
    "Abalone","Agon","Backgammon","Battleship","Blockade","Blood Bowl","Bul","Camelot","Checkers",
    "Go","Gipf","Guess Who?","Hare and Hounds","Hex","Hijara","Isola","Janggi (Korean Chess)","Le Jeu de la Guerre",
    "Patolli","Plateau","PÜNCT","Rithmomachy","Sáhkku","Senet","Shogi","Space Hulk","Stratego","Sugoroku",
    "Tâb","Tablut","Tantrix","Wari","Xiangqi (Chinese chess)","YINSH","ZÈRTZ","Kalah","Kamisado","Liu po",
    "Lost Cities","Mad Gab","Master Mind","Nine Men's Morris","Obsession","Othello"
];
var booleanValues = [true, "true", false, "false", null, undefined, ""];

var firstNames = ["Sophie","Isabelle","Emily","Olivia","Lily","Chloe","Isabella",
    "Amelia","Jessica","Sophia","Ava","Charlotte","Mia","Lucy","Grace","Ruby",
    "Ella","Evie","Freya","Isla","Poppy","Daisy","Layla"];
var lastNames = ["Beckham","Black","Braxton","Brennan","Brock","Bryson","Cadwell",
    "Cage","Carson","Chandler","Cohen","Cole","Corbin","Dallas","Dalton","Dane",
    "Donovan","Easton","Fisher","Fletcher","Grady","Greyson","Griffin","Gunner",
    "Hayden","Hudson","Hunter","Jacoby","Jagger","Jaxon","Jett","Kade","Kane",
    "Keating","Keegan","Kingston","Kobe"];

var months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];

var dataSize = '1x22';

var size = 'fill'; // model for size select
var width = '100%'; // the div gets it's width and height from here
var height = '100%';

var style = 'ag-fresh';
var rowSelection = 'checkbox';

var groupColumn = {
    headerName: "Group",
    width: 200,
    field: 'name',
    comparator: agGrid.defaultGroupComparator,
    cellRenderer: {
        renderer: "group",
        checkbox: true
    }
};

var gridOptions = {
    debug: true,
    //minColWidth: 50,
    //maxColWidth: 300,
    //rowsBuffer: 1,
    columnDefs: [],
    //singleClickEdit: true,
    rowData: null,
    rowsAlreadyGrouped: false, // set this to true, if you are passing in data alrady in nodes and groups
    groupKeys: undefined, //set as string of keys eg ["region","country"],
//            groupUseEntireRow: true, //one of [true, false]
//        groupDefaultExpanded: 9999, //one of [true, false], or an integer if greater than 1
//            headerHeight: 100, // set to an integer, default is 25, or 50 if grouping columns
//        groupSuppressAutoColumn: true,
    //groupSuppressBlankHeader: true,
    //suppressMovingCss: true,
    //suppressMovableColumns: true,
    //groupIncludeFooter: true,
    groupHideGroupColumns: true,
    //unSortIcon: true,
    //rowHeight: 30, // defaults to 25, can be any integer
    enableColResize: true, //one of [true, false]
    enableSorting: true, //one of [true, false]
    enableFilter: true, //one of [true, false]
    rowSelection: "multiple", // one of ['single','multiple'], leave blank for no selection
    rowDeselection: true,
    groupSelectsChildren: true, // one of [true, false]
    suppressRowClickSelection: true, // if true, clicking rows doesn't select (useful for checkbox selection)
    groupColumnDef: groupColumn,
    //suppressCellSelection: true,
    //suppressMultiSort: true,
    showToolPanel: false,
    //toolPanelSuppressGroups: true,
    //toolPanelSuppressValues: true,
    //groupSuppressAutoColumn: true,
    //groupAggFunction: groupAggFunction,
    //groupAggFields: ['bankBalance','totalWinnings'],
    checkboxSelection: function(params) {
        // we show checkbox selection in the first column, unless we are grouping,
        // as the group column is configured to always show selection
        var isGrouping = gridOptions.columnApi.getRowGroupColumns().length > 0;
        return params.colIndex === 0 && !isGrouping;
    },
    //forPrint: true,<commit_msg>refactoring of header rendering<commit_after>
document.addEventListener('DOMContentLoaded', function() {
    gridDiv = document.querySelector('#myGrid');
    new agGrid.Grid(gridDiv, gridOptions);
    createData();
});

var gridDiv;

var colNames = ["Station","Railway","Street","Address","Toy","Soft Box","Make and Model","Longest Day","Shortest Night"];

var countries = [
    {country: "Ireland", continent: "Europe", language: "English"},
    {country: "Spain", continent: "Europe", language: "Spanish"},
    {country: "United Kingdom", continent: "Europe", language: "English"},
    {country: "France", continent: "Europe", language: "French"},
    {country: "Germany", continent: "Europe", language: "(other)"},
    {country: "Sweden", continent: "Europe", language: "(other)"},
    {country: "Norway", continent: "Europe", language: "(other)"},
    {country: "Italy", continent: "Europe", language: "(other)"},
    {country: "Greece", continent: "Europe", language: "(other)"},
    {country: "Iceland", continent: "Europe", language: "(other)"},
    {country: "Portugal", continent: "Europe", language: "Portuguese"},
    {country: "Malta", continent: "Europe", language: "(other)"},
    {country: "Brazil", continent: "South America", language: "Portuguese"},
    {country: "Argentina", continent: "South America", language: "Spanish"},
    {country: "Colombia", continent: "South America", language: "Spanish"},
    {country: "Peru", continent: "South America", language: "Spanish"},
    {country: "Venezuela", continent: "South America", language: "Spanish"},
    {country: "Uruguay", continent: "South America", language: "Spanish"}
];

var games = ["Chess","Cross and Circle","Daldøs","Downfall","DVONN","Fanorona","Game of the Generals","Ghosts",
    "Abalone","Agon","Backgammon","Battleship","Blockade","Blood Bowl","Bul","Camelot","Checkers",
    "Go","Gipf","Guess Who?","Hare and Hounds","Hex","Hijara","Isola","Janggi (Korean Chess)","Le Jeu de la Guerre",
    "Patolli","Plateau","PÜNCT","Rithmomachy","Sáhkku","Senet","Shogi","Space Hulk","Stratego","Sugoroku",
    "Tâb","Tablut","Tantrix","Wari","Xiangqi (Chinese chess)","YINSH","ZÈRTZ","Kalah","Kamisado","Liu po",
    "Lost Cities","Mad Gab","Master Mind","Nine Men's Morris","Obsession","Othello"
];
var booleanValues = [true, "true", false, "false", null, undefined, ""];

var firstNames = ["Sophie","Isabelle","Emily","Olivia","Lily","Chloe","Isabella",
    "Amelia","Jessica","Sophia","Ava","Charlotte","Mia","Lucy","Grace","Ruby",
    "Ella","Evie","Freya","Isla","Poppy","Daisy","Layla"];
var lastNames = ["Beckham","Black","Braxton","Brennan","Brock","Bryson","Cadwell",
    "Cage","Carson","Chandler","Cohen","Cole","Corbin","Dallas","Dalton","Dane",
    "Donovan","Easton","Fisher","Fletcher","Grady","Greyson","Griffin","Gunner",
    "Hayden","Hudson","Hunter","Jacoby","Jagger","Jaxon","Jett","Kade","Kane",
    "Keating","Keegan","Kingston","Kobe"];

var months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];

var dataSize = '1x22';

var size = 'fill'; // model for size select
var width = '100%'; // the div gets it's width and height from here
var height = '100%';

var style = 'ag-fresh';
var rowSelection = 'checkbox';

var groupColumn = {
    headerName: "Group",
    width: 200,
    field: 'name',
    comparator: agGrid.defaultGroupComparator,
    cellRenderer: {
        renderer: "group",
        checkbox: true
    }
};

var gridOptions = {
    debug: true,
    //minColWidth: 50,
    //maxColWidth: 300,
    //rowsBuffer: 1,
    columnDefs: [],
    //singleClickEdit: true,
    rowData: null,
    rowsAlreadyGrouped: false, // set this to true, if you are passing in data alrady in nodes and groups
    groupKeys: undefined, //set as string of keys eg ["region","country"],
//            groupUseEntireRow: true, //one of [true, false]
//        groupDefaultExpanded: 9999, //one of [true, false], or an integer if greater than 1
//            headerHeight: 100, // set to an integer, default is 25, or 50 if grouping columns
//        groupSuppressAutoColumn: true,
    //groupSuppressBlankHeader: true,
    //suppressMovingCss: true,
    //suppressMovableColumns: true,
    //groupIncludeFooter: true,
    groupHideGroupColumns: true,
    //unSortIcon: true,
    //rowHeight: 30, // defaults to 25, can be any integer
    enableColResize: true, //one of [true, false]
    enableSorting: true, //one of [true, false]
    enableFilter: true, //one of [true, false]
    rowSelection: "multiple", // one of ['single','multiple'], leave blank for no selection
    rowDeselection: true,
    groupSelectsChildren: true, // one of [true, false]
    suppressRowClickSelection: true, // if true, clicking rows doesn't select (useful for checkbox selection)
    //suppressFieldDotNotation: true,
    groupColumnDef: groupColumn,
    //suppressCellSelection: true,
    //suppressMultiSort: true,
    showToolPanel: false,
    //toolPanelSuppressGroups: true,
    //toolPanelSuppressValues: true,
    //groupSuppressAutoColumn: true,
    //groupAggFunction: groupAggFunction,
    //groupAggFields: ['bankBalance','totalWinnings'],
    checkboxSelection: function(params) {
        // we show checkbox selection in the first column, unless we are grouping,
        // as the group column is configured to always show selection
        var isGrouping = gridOptions.columnApi.getRowGroupColumns().length > 0;
        return params.colIndex === 0 && !isGrouping;
    },
    //forPrint: true,
{'fraction_non_alphanumeric': 0.18641592112470332, 'fraction_numerical': 0.006572941391272595, 'mean_word_length': 4.711678832116788, 'pattern_counts': {'":': 0, '<': 3, '<?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': '713701', 'n_tokens_mistral': 3580, 'n_tokens_neox': 3367, 'n_words': 872}