<commit_before>require 'net/irc'
require 'slop'

module Hackway
  class Server < Net::IRC::Server
    def initialize(opts = nil)
      opts ||= parse_options
      super(opts[:server], opts[:port], Hackway::Session, opts)
    end

    def parse_options
      opts = Slop.parse(help: true) do
        banner 'Usage: iig [options]'
        on :p, :port,    'Port number to listen (default: 16705)',                 argument: :optional, as: :integer, default: 16705
        on :s, :server,  'Host name or IP address to listen (default: localhost)', argument: :optional, as: :string,  default: :localhost
        on :w, :wait,    'Wait SECONDS between retrievals (default: 360)',         argument: :optional, as: :integer, default: 360
        on :l, :log,     'Log file (default: STDOUT)',                             argument: :optional, as: :string,  default: nil
        on :v, :version, 'Print the version' do
          puts Hackway::VERSION
          exit
        end<commit_msg>change default port<commit_after>require 'net/irc'
require 'slop'

module Hackway
  class Server < Net::IRC::Server
    def initialize(opts = nil)
      opts ||= parse_options
      super(opts[:server], opts[:port], Hackway::Session, opts)
    end

    def parse_options
      opts = Slop.parse(help: true) do
        banner 'Usage: iig [options]'
        on :p, :port,    'Port number to listen (default: 16706)',                 argument: :optional, as: :integer, default: 16706
        on :s, :server,  'Host name or IP address to listen (default: localhost)', argument: :optional, as: :string,  default: :localhost
        on :w, :wait,    'Wait SECONDS between retrievals (default: 360)',         argument: :optional, as: :integer, default: 360
        on :l, :log,     'Log file (default: STDOUT)',                             argument: :optional, as: :string,  default: nil
        on :v, :version, 'Print the version' do
          puts Hackway::VERSION
          exit
        end
{'fraction_non_alphanumeric': 0.1209349593495935, 'fraction_numerical': 0.016260162601626018, 'mean_word_length': 2.4849557522123895, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6775720', 'n_tokens_mistral': 609, 'n_tokens_neox': 568, 'n_words': 203}