<commit_before>/*
 * Copyright 2012 - present by OpenGamma Inc. and the OpenGamma group of companies
 * Please see distribution for license.
 */
$.register_module({
    name: 'og.analytics.Cell',
    dependencies: ['og.api.rest', 'og.analytics.Data', 'og.common.events'],
    obj: function () {
        var events = og.common.events, constructor = function (config) {
            var cell = this;
            cell.dataman = new og.analytics.Data(config.source)
                .viewport({rows: [config.row], cols: [config.col], expanded: true})
                .on('data', function (data) {events.fire(cell.events.data, data[0]);});
            cell.events = {data: []};
        };
        constructor.prototype.kill = function () {this.dataman.kill();};
        constructor.prototype.on = events.on;
        return constructor;
    }
});<commit_msg>changing og.analytics.Cell to account for data initializing<commit_after>/*
 * Copyright 2012 - present by OpenGamma Inc. and the OpenGamma group of companies
 * Please see distribution for license.
 */
$.register_module({
    name: 'og.analytics.Cell',
    dependencies: ['og.api.rest', 'og.analytics.Data', 'og.common.events'],
    obj: function () {
        var events = og.common.events, constructor = function (config) {
            var cell = this;
            cell.dataman = new og.analytics.Data(config.source)
                .viewport({rows: [config.row], cols: [config.col], expanded: true})
                .on('data', function (data) {
                    var cell_data = data[0];
                    if (cell_data.t === 'PRIMITIVE') return; // we never subscribe to primitives
                    events.fire(cell.events.data, cell_data.v || cell_data);
                });
            cell.events = {data: []};
        };
        constructor.prototype.kill = function () {this.dataman.kill();};
        constructor.prototype.on = events.on;
        return constructor;
    }
});
{'fraction_non_alphanumeric': 0.14307771487390633, 'fraction_numerical': 0.0051466803911477095, 'mean_word_length': 2.31740614334471, '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': '5454623', 'n_tokens_mistral': 554, 'n_tokens_neox': 536, 'n_words': 137}