<commit_before><commit_msg>Add rake:track task<commit_after>desc "Runs the tracker [LOG_LEVEL=[INFO]]"
task :track do
  Rake::Task["db:migrate:db_connect"].invoke
  require "./lib/cloud_cost_tracker"

  # Setup logging
  log = FogTracker.default_logger(STDOUT)
  log.level = ::Logger.const_get((ENV['LOG_LEVEL'] || 'INFO').to_sym)

  log.info "Loading account information..."
  accounts = YAML.load(File.read './config/accounts.yml')

  log.info "Loading custom coding policies..."
  Dir["./config/policies/*.rb"].each {|f| require f}

  CloudCostTracker::Tracker.new(accounts, {:logger => log}).start
  while true do ; sleep 60 end    # Loop forever

end

{'fraction_non_alphanumeric': 0.15853658536585366, 'fraction_numerical': 0.003048780487804878, 'mean_word_length': 4.615384615384615, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1029891', 'n_tokens_mistral': 227, 'n_tokens_neox': 218, 'n_words': 48}