<commit_before>.uk-grid.uk-grid-match data-uk-grid-margin=""
  .uk-width-medium-1-2
    h2 = fa_icon 'users', text: @title
  .uk-width-medium-1-2
    = form_tag users_path, method: :get, class: 'uk-form right djname-search'
      = fa_icon 'search', text: 'DJNAMEから検索'
      .uk-form-row
        = text_field_tag :query, params[:query], place: 'DJNAME'
        button.uk-button.uk-button-primary onClick="$('.uk-panel > .uk-form').submit()"
          = fa_icon 'search', text: '検索'
hr
form.uk-form
  - if @scores_map
    = render 'shared/list'
  - else
    = render 'users/list'

javascript:
  function format(val) {
    const mapping = {
      '皆伝': 0,
      '中伝': 1,
      '十段': 2,
      '九段': 3,
      '八段': 4,
      '七段': 5,
      '六段': 6,
      '五段': 7,
      '四段': 8,
      '三段': 9,
      '二段': 10,
      '初段': 11,
      '初級': 12,
      '二級': 13,
      '三級': 14,
      '四級': 15,
      '五級': 16,
      '六級': 17,
      '七級': 18,
      '無段位': 19,
    };
    const res = mapping[val];
    return res || -1;
  }

  $.extend($.fn.dataTable.ext.type.order, {
    'grade-asc'(x, y) {
      const n1 = format(x);
      const n2 = format(y);
      return ((n1 < n2) ? -1 : ((n1 > n2) ? 1 : 0));
    },
    'grade-desc'(x, y) {
      const n1 = format(x);
      const n2 = format(y);
      return ((n1 < n2) ? 1 : ((n1 > n2) ? -1 : 0));
    },
  });<commit_msg>[#986] do not use const<commit_after>.uk-grid.uk-grid-match data-uk-grid-margin=""
  .uk-width-medium-1-2
    h2 = fa_icon 'users', text: @title
  .uk-width-medium-1-2
    = form_tag users_path, method: :get, class: 'uk-form right djname-search'
      = fa_icon 'search', text: 'DJNAMEから検索'
      .uk-form-row
        = text_field_tag :query, params[:query], place: 'DJNAME'
        button.uk-button.uk-button-primary onClick="$('.uk-panel > .uk-form').submit()"
          = fa_icon 'search', text: '検索'
hr
form.uk-form
  - if @scores_map
    = render 'shared/list'
  - else
    = render 'users/list'

javascript:
  function format(val) {
    const mapping = {
      '皆伝': 0,
      '中伝': 1,
      '十段': 2,
      '九段': 3,
      '八段': 4,
      '七段': 5,
      '六段': 6,
      '五段': 7,
      '四段': 8,
      '三段': 9,
      '二段': 10,
      '初段': 11,
      '初級': 12,
      '二級': 13,
      '三級': 14,
      '四級': 15,
      '五級': 16,
      '六級': 17,
      '七級': 18,
      '無段位': 19,
    };
    const res = mapping[val];
    return res || -1;
  }

  $.extend($.fn.dataTable.ext.type.order, {
    'grade-asc'(x, y) {
      x = format(x);
      y = format(y);
      return ((x < y) ? -1 : ((x > y) ? 1 : 0));
    },
    'grade-desc'(x, y) {
      x = format(x);
      y = format(y);
      return ((x < y) ? 1 : ((x > y) ? -1 : 0));
    },
  });
{'fraction_non_alphanumeric': 0.2081161578555473, 'fraction_numerical': 0.036857781087118395, 'mean_word_length': 1.825446898002103, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '5085264', 'n_tokens_mistral': 1206, 'n_tokens_neox': 1193, 'n_words': 254}