<commit_before>require 'rubygems'

require 'turd'
require 'mixlib/cli'
require 'mixlib/config'
require 'mixlib/log'
require 'yajl/json_gem'
require 'thin'
require 'statsd'
require 'open-uri'
require 'iconv' if RUBY_VERSION =~ /1.8/
require 'timeout'

__DIR__ = File.dirname(__FILE__)

$LOAD_PATH.unshift __DIR__ unless
  $LOAD_PATH.include?(__DIR__) ||
  $LOAD_PATH.include?(File.expand_path(__DIR__))

require 'nugget/config'
require 'nugget/log'
require 'nugget/cli'
require 'nugget/service'
require 'nugget/web'
require 'nugget/backstop'
require 'nugget/statsd'
require 'nugget/version'

TIMEOUT = 60

module  Nugget
  class << self

    def main
      cli = Nugget::CLI.new
      cli.parse_options
      Nugget::Config.merge!(cli.config)

      Nugget::Log.level(Nugget::Config.log_level)

      if Nugget::Config.web
        Nugget::Web.run()
      else
        if Nugget::Config.config
          if Nugget::Config.daemon
            Nugget::Service.run_daemon(Nugget::Config.test)
          else
            Nugget::Service.run_once(Nugget::Config.test)
          end
        else
          Nugget::Log.error("No config supplied! Use \"-c FILE\".")
        end
      end
    end
<commit_msg>bump timeout<commit_after>require 'rubygems'

require 'turd'
require 'mixlib/cli'
require 'mixlib/config'
require 'mixlib/log'
require 'yajl/json_gem'
require 'thin'
require 'statsd'
require 'open-uri'
require 'iconv' if RUBY_VERSION =~ /1.8/
require 'timeout'

__DIR__ = File.dirname(__FILE__)

$LOAD_PATH.unshift __DIR__ unless
  $LOAD_PATH.include?(__DIR__) ||
  $LOAD_PATH.include?(File.expand_path(__DIR__))

require 'nugget/config'
require 'nugget/log'
require 'nugget/cli'
require 'nugget/service'
require 'nugget/web'
require 'nugget/backstop'
require 'nugget/statsd'
require 'nugget/version'

TIMEOUT = 180

module  Nugget
  class << self

    def main
      cli = Nugget::CLI.new
      cli.parse_options
      Nugget::Config.merge!(cli.config)

      Nugget::Log.level(Nugget::Config.log_level)

      if Nugget::Config.web
        Nugget::Web.run()
      else
        if Nugget::Config.config
          if Nugget::Config.daemon
            Nugget::Service.run_daemon(Nugget::Config.test)
          else
            Nugget::Service.run_once(Nugget::Config.test)
          end
        else
          Nugget::Log.error("No config supplied! Use \"-c FILE\".")
        end
      end
    end

{'fraction_non_alphanumeric': 0.12280701754385964, 'fraction_numerical': 0.0037593984962406013, 'mean_word_length': 3.1010273972602738, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4573769', 'n_tokens_mistral': 876, 'n_tokens_neox': 860, 'n_words': 167}