<commit_before>module JsonTestData
  module NumberHelper
    def adjust_for_maximum(number:, maximum: nil, step_size: nil)
      return number unless (maximum && maximum < number)

      num = !!step_size ? number - step_size : maximum
      adjust_for_maximum(number: num, maximum: maximum, step_size: step_size)
    end

    def adjust_for_minimum(number:, minimum:, step_size: nil)
      return number unless minimum && minimum > number

      num = !!step_size ? number + step_size : minimum

      adjust_for_minimum(number: num, minimum: minimum, step_size: step_size)
    end

    def between(min:, max:, integer: false)
      return integer ? mean(min, max).to_i : mean(min, max)
    end

    def mean(*numbers)
      numbers.inject(:+).to_f.quo(numbers.length)
    end

    def multiple(factor, min = 0)
      return factor if factor > min

      multiplier, multiplied = 2, factor

      while multiplied <= min
        multiplied *= multiplier
        multiplier += 1
      end

      multiplied
    end

    def infinity
      Math.atanh(1)
    end
  end
end<commit_msg>Delete more unused methods<commit_after>module JsonTestData
  module NumberHelper
    def adjust_for_maximum(number:, maximum: nil, step_size: nil)
      return number unless (maximum && maximum < number)

      num = !!step_size ? number - step_size : maximum
      adjust_for_maximum(number: num, maximum: maximum, step_size: step_size)
    end

    def adjust_for_minimum(number:, minimum:, step_size: nil)
      return number unless minimum && minimum > number

      num = !!step_size ? number + step_size : minimum

      adjust_for_minimum(number: num, minimum: minimum, step_size: step_size)
    end

    def between(min:, max:, integer: false)
      return integer ? mean(min, max).to_i : mean(min, max)
    end

    def mean(*numbers)
      numbers.inject(:+).to_f.quo(numbers.length)
    end

    def infinity
      Math.atanh(1)
    end
  end
end
{'fraction_non_alphanumeric': 0.09278350515463918, 'fraction_numerical': 0.002577319587628866, 'mean_word_length': 2.9856262833675564, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '3313110', 'n_tokens_mistral': 615, 'n_tokens_neox': 576, 'n_words': 171}