<commit_before>define [
  "chaplin"
  "models/posts"
  "views/posts"
], (Chaplin, Posts, PostsView) ->
  "use strict"

  class PostsController extends Chaplin.Controller

    show: (params) ->
      # Unescape matched parts of url.
      # Why the hell chaplin doesn't do it by himself?
      # XXX: Seems like what we should use encodeURIComponent
      # and then decode it for each url parameter like user or id
      # but we hope that they will not contain "bad" characters
      # in future.
      params.tag = decodeURIComponent params.tag if params.tag?
      params.club = decodeURIComponent params.club if params.club?

      query = use_bl: 1
      if params.user?
        query.user = params.user
        query.tag = params.tag if params.tag?
        params.title = "@#{params.user}"
      else if params.club?
        query.club = params.club
        params.title = "!#{params.club}"
      else if params.tag?
        query.tag = params.tag
        params.title = "*#{params.tag}"

      @collection = new Posts [], id: params.id, query: query
      @view = new PostsView collection: @collection, pageble: params.pageble
      @adjustTitle params.title<commit_msg>Disable use_bl for /top request<commit_after>define [
  "chaplin"
  "models/posts"
  "views/posts"
], (Chaplin, Posts, PostsView) ->
  "use strict"

  class PostsController extends Chaplin.Controller

    show: (params) ->
      # Unescape matched parts of url.
      # Why the hell chaplin doesn't do it by himself?
      # XXX: Seems like what we should use encodeURIComponent
      # and then decode it for each url parameter like user or id
      # but we hope that they will not contain "bad" characters
      # in future.
      params.tag = decodeURIComponent params.tag if params.tag?
      params.club = decodeURIComponent params.club if params.club?

      query = use_bl: 1
      if params.user?
        query.user = params.user
        query.tag = params.tag if params.tag?
        params.title = "@#{params.user}"
      else if params.club?
        query.club = params.club
        params.title = "!#{params.club}"
      else if params.tag?
        query.tag = params.tag
        params.title = "*#{params.tag}"
      else
        query = {}

      @collection = new Posts [], id: params.id, query: query
      @view = new PostsView collection: @collection, pageble: params.pageble
      @adjustTitle params.title
{'fraction_non_alphanumeric': 0.09991673605328892, 'fraction_numerical': 0.0008326394671107411, 'mean_word_length': 2.472543352601156, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '401241', 'n_tokens_mistral': 702, 'n_tokens_neox': 701, 'n_words': 233}