<commit_before>require "pathname"
require "optparse"
require "securerandom"
require "ostruct"
require "net/imap"
require "mail"
require "fileutils"
require "date"
# require "digest/sha1"
begin ; require "pry" ; rescue LoadError ; end

module Bouncefetch
  ROOT = Pathname.new(File.expand_path("../..", __FILE__))
  BASH_ENABLED = "#{ENV["SHELL"]}".downcase["bash"]
  $:.unshift "#{ROOT}/lib"

  def self.configure *args, &block
    Thread.main[:app_config].setup(*args, &block)
  end

  def self.rules *args, &block
    Thread.main[:app_rules].setup(*args, &block)
  end
end

require "active_support/core_ext/object/blank"
require "active_support/core_ext/object/try"
require "banana/logger"

require "bouncefetch/version"
require "bouncefetch/rule"
require "bouncefetch/bbmail"
require "bouncefetch/application/configuration"
require "bouncefetch/application/rules"<commit_msg>Amend: Move code into modules<commit_after>require "pathname"
require "optparse"
require "securerandom"
require "ostruct"
require "net/imap"
require "mail"
require "fileutils"
require "date"
# require "digest/sha1"
begin ; require "pry" ; rescue LoadError ; end

module Bouncefetch
  ROOT = Pathname.new(File.expand_path("../..", __FILE__))
  BASH_ENABLED = "#{ENV["SHELL"]}".downcase["bash"]
  $:.unshift "#{ROOT}/lib"

  def self.configure *args, &block
    Thread.main[:app_config].setup(*args, &block)
  end

  def self.rules *args, &block
    Thread.main[:app_rules].setup(*args, &block)
  end
end

require "active_support/core_ext/object/blank"
require "active_support/core_ext/object/try"
require "banana/logger"

require "bouncefetch/version"
require "bouncefetch/rule"
require "bouncefetch/bbmail"
require "bouncefetch/application/setup"
require "bouncefetch/application/configuration"
require "bouncefetch/application/helper"
require "bouncefetch/application/rules"
{'fraction_non_alphanumeric': 0.14085267134376686, 'fraction_numerical': 0.0010793308148947653, 'mean_word_length': 5.892193308550186, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '464788', 'n_tokens_mistral': 633, 'n_tokens_neox': 622, 'n_words': 135}