<commit_before># Initializers
$(document).on 'ready page:load', ->
  # jQuery datepickers (also evaluates dynamically added HTML)
  $(document).on 'focus', 'input.datepicker:not(.hasDatepicker)', ->
    $input = $(@)

    # Only applying datepicker to compatible browsers
    return if $input[0].type is 'date'

    defaults = dateFormat: 'yy-mm-dd'
    options = $input.data 'datepicker-options'
    $input.datepicker $.extend(defaults, options)

  # Clear Filters button
  $('.clear_filters_btn').click ->
    params = window.location.search.split('&')
    regex = /^(q\[|q%5B|q%5b|page|commit)/
    window.location.search = (param for param in params when not param.match(regex)).join('&')

  # Filter form: don't send any inputs that are empty
  $('.filter_form').submit -><commit_msg>Fix clear filters button<commit_after># Initializers
$(document).on 'ready page:load', ->
  # jQuery datepickers (also evaluates dynamically added HTML)
  $(document).on 'focus', 'input.datepicker:not(.hasDatepicker)', ->
    $input = $(@)

    # Only applying datepicker to compatible browsers
    return if $input[0].type is 'date'

    defaults = dateFormat: 'yy-mm-dd'
    options = $input.data 'datepicker-options'
    $input.datepicker $.extend(defaults, options)

  # Clear Filters button
  $('.clear_filters_btn').click ->
    params = window.location.search.slice(1).split('&')
    regex = /^(q\[|q%5B|q%5b|page|commit)/
    window.location.search = (param for param in params when not param.match(regex)).join('&')

  # Filter form: don't send any inputs that are empty
  $('.filter_form').submit ->
{'fraction_non_alphanumeric': 0.1583229036295369, 'fraction_numerical': 0.004380475594493116, 'mean_word_length': 3.9813084112149535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '7586775', 'n_tokens_mistral': 506, 'n_tokens_neox': 479, 'n_words': 129}