<commit_before>module WpApi
  class Client
    include Api::Post

    attr_reader :connection
    attr_accessor :host, :path, :port, :proxy_host, :proxy_port, :use_ssl, :conn_username, :conn_password, :timeout, :blog_id, :wp_username, :wp_password

    DEFAULT_OPTIONS = {
        :host       => nil,
        :path       => '/xmlrpc.php',
        :port       => 80,
        :proxy_host => nil,
        :proxy_port => nil,
        :use_ssl    => false,
        :conn_username   => nil,
        :conn_password   => nil,
        :timeout    => nil,

        #WP Settings
        :blog_id    => 0,
        :wp_username   => nil,
        :wp_password   => <PASSWORD>
      }

    def initialize(options = {})
      opts = DEFAULT_OPTIONS
      opts.merge!(options)

      self.host          = opts[:host]
      self.path          = opts[:path]
      self.port          = opts[:port]<commit_msg>modified client to clean up host inputs and paths<commit_after>module WpApi
  class Client
    include Api::Post

    attr_reader :connection
    attr_accessor :host, :path, :port, :proxy_host, :proxy_port, :use_ssl, :conn_username, :conn_password, :timeout, :blog_id, :wp_username, :wp_password

    DEFAULT_OPTIONS = {
        :host       => nil,
        :path       => 'xmlrpc.php',
        :port       => 80,
        :proxy_host => nil,
        :proxy_port => nil,
        :use_ssl    => false,
        :conn_username   => nil,
        :conn_password   => <PASSWORD>,
        :timeout    => nil,

        #WP Settings
        :blog_id    => 0,
        :wp_username   => nil,
        :wp_password   => <PASSWORD>
      }

    def initialize(options = {})
      opts = DEFAULT_OPTIONS
      opts.merge!(options)

      host = opts[:host].gsub('http://','').split('/')
      path = "/"+(host[1..-1]+[opts[:path]]).join('/')


      self.host          = host[0]
      self.path          = path
      self.port          = opts[:port]
{'fraction_non_alphanumeric': 0.13742842269651223, 'fraction_numerical': 0.004685059864653826, 'mean_word_length': 1.881559220389805, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '4782932', 'n_tokens_mistral': 616, 'n_tokens_neox': 602, 'n_words': 129}