<commit_before>(function( $, undefined ) {

$.KBWidget({
    name: "kbaseTabTable",
    version: "1.0.0",
    options: {
    },

    getData: function() {
        return {
            id: this.options.id,
            type: "Model",
            workspace: this.options.ws,
            title: this.options.title
        };
    },

    init: function(input) {
        this._super(input);
        var self = this;

        var imageURL = "http://bioseed.mcs.anl.gov/~chenry/jpeg/";

        var type = input.type;

        var tabs;

        // 0) No more clients.  Make this global.  please.
        this.kbapi = function(service, method, params) {
            var url, method;
            if (service == 'ws') {
                url = "https://kbase.us/services/ws/";
                method = 'Workspace.'+method;
            } else if (service == 'fba') {
                url = "https://kbase.us/services/KBaseFBAModeling/";
                method = 'fbaModelServices.'+method;
            }

            var rpc = {
                params: [params],
                method: method,
                version: "1.1",
                id: String(Math.random()).slice(2),
            };

            var prom = $.ajax({
                url: url,
                type: 'POST',
                processData: false,
                data: JSON.stringify(rpc),
                beforeSend: function (xhr) {
                    if ('token' in input)
                        xhr.setRequestHeader("Authorization", input.token);
                }
            }).then(function(data) {
                return data.result[0];
            })

            return prom;
        }


        //
        // 1) Looks at the type and instantiate the object
        //
        var obj;
        if (type == "KBaseFBA.FBAModel")
            obj = new KBase_FBAModel(self);
        else if (type == "KBaseFBA.FBA")
            obj = new KBase_FBA(self);

        //
        // 2) add the tabs
        //
        var tabList = obj.tabList;

        var uiTabs = [];
        for (var i = 0; i < tabList.length; i++) {
            var tab = tabList[i];<commit_msg>don't require token for tables<commit_after>(function( $, undefined ) {

$.KBWidget({
    name: "kbaseTabTable",
    version: "1.0.0",
    options: {
    },

    getData: function() {
        return {
            id: this.options.id,
            type: "Model",
            workspace: this.options.ws,
            title: this.options.title
        };
    },

    init: function(input) {
        this._super(input);
        var self = this;

        var imageURL = "http://bioseed.mcs.anl.gov/~chenry/jpeg/";

        var type = input.type;

        var tabs;

        // 0) No more clients.  Make this global.  please.
        this.kbapi = function(service, method, params) {
            var url, method;
            if (service == 'ws') {
                url = "https://kbase.us/services/ws/";
                method = 'Workspace.'+method;
            } else if (service == 'fba') {
                url = "https://kbase.us/services/KBaseFBAModeling/";
                method = 'fbaModelServices.'+method;
            }

            var rpc = {
                params: [params],
                method: method,
                version: "1.1",
                id: String(Math.random()).slice(2),
            };

            var prom = $.ajax({
                url: url,
                type: 'POST',
                processData: false,
                data: JSON.stringify(rpc),
                beforeSend: function (xhr) {
                    if ('token' in input && input.token)
                        xhr.setRequestHeader("Authorization", input.token);
                }
            }).then(function(data) {
                return data.result[0];
            })

            return prom;
        }


        //
        // 1) Looks at the type and instantiate the object
        //
        var obj;
        if (type == "KBaseFBA.FBAModel")
            obj = new KBase_FBAModel(self);
        else if (type == "KBaseFBA.FBA")
            obj = new KBase_FBA(self);

        //
        // 2) add the tabs
        //
        var tabList = obj.tabList;

        var uiTabs = [];
        for (var i = 0; i < tabList.length; i++) {
            var tab = tabList[i];
{'fraction_non_alphanumeric': 0.13013059701492538, 'fraction_numerical': 0.005130597014925373, 'mean_word_length': 1.2153925619834711, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '5548237', 'n_tokens_mistral': 1279, 'n_tokens_neox': 1203, 'n_words': 286}