<commit_before>define('stats',[
  'app',
  'libs/jquery/jquery-ui.min',
  'libs/jquery/plugins/jquery.tablesorter.min',
  'libs/jquery/plugins/jquery.xmltojson',
  'libs/jquery/plugins/jquery.simplePagination'
],function(app){

    return stats = {
      name:'stats',
      model:null,
      pager:{
        page:1,
        max:0,
        offset:0,
        count:20
      },
      bind_events:function(){
        var _this = this;

        $('#tabs').tabs();
        $('#tabs').bind('tabsshow', function(_e, ui){
          switch(ui.index){
            case 0:
              _this.load_stats();
              break;
            case 1:
              _this.load_ranks();
              break;
            case 2:
              _this.load_season();
              break;
            case 3:
              _this.load_schedule();
              break;
            case 4:
              _this.load_injuries();
              break;
          }
        });
      },
      load_ranks:function(){
        var _this = this,
            tbl = $('.ranks-tbl'),
            hkeys = ['Team','City','Division','Conference Rank','Division Rank'],
            okeys = ['name','market','alias','conference','division'];

        _this.add_header(tbl, hkeys);

        _this.model = app.get_data('rankings');<commit_msg>--fix index for stats tabs switch<commit_after>define('stats',[
  'app',
  'libs/jquery/jquery-ui.min',
  'libs/jquery/plugins/jquery.tablesorter.min',
  'libs/jquery/plugins/jquery.xmltojson',
  'libs/jquery/plugins/jquery.simplePagination'
],function(app){

    return stats = {
      name:'stats',
      model:null,
      pager:{
        page:1,
        max:0,
        offset:0,
        count:20
      },
      bind_events:function(){
        var _this = this;

        $('#tabs').tabs();
        $('#tabs').bind('tabsshow', function(_e, ui){
          switch(ui.index){
            case 0:
              _this.load_stats();
              break;
            case 1:
              _this.load_ranks();
              break;
            case 2:
              _this.load_schedule();
              break;
            case 3:
              _this.load_injuries();
              break;
          }
        });
      },
      load_ranks:function(){
        var _this = this,
            tbl = $('.ranks-tbl'),
            hkeys = ['Team','City','Division','Conference Rank','Division Rank'],
            okeys = ['name','market','alias','conference','division'];

        _this.add_header(tbl, hkeys);

        _this.model = app.get_data('rankings');
{'fraction_non_alphanumeric': 0.15420928402832415, 'fraction_numerical': 0.007474429583005508, 'mean_word_length': 1.6082051282051282, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '2825658', 'n_tokens_mistral': 775, 'n_tokens_neox': 746, 'n_words': 122}