<commit_before>module Panda
  class Config
    
    def config
      @config ||= {}
    end
    
    [:api_host, :api_port, 
     :access_key, :secret_key, 
     :api_version, :cloud_id].each do |attr|
      define_method "#{attr}" do |value|
        config["#{attr.to_s}"] = value
      end
    end
    
    def to_hash
      config
    end
    
    def http_client(http_client_name)
      Panda.http_client = http_client_name
    end
    
    #shortcuts
    
    def key(val)
      config['access_key'] = val
    end
    
    def secret(val)
      config['secret_key'] = val
    end
    
    # Setup connection for Heroku<commit_msg>fix old configure method with block and arties<commit_after>module Panda
  class Config
    
    def config
      @config ||= {}
    end
    
    [:api_host, :api_port, 
     :access_key, :secret_key, 
     :api_version, :cloud_id].each do |attr|
      define_method "#{attr}" do |value|
        config["#{attr.to_s}"] = value
      end

      define_method "#{attr}=" do |value|
        config["#{attr.to_s}"] = value
      end
    end
    
    def to_hash
      config
    end
    
    def http_client(http_client_name)
      Panda.http_client = http_client_name
    end
    
    def http_client=(http_client_name)
      Panda.http_client = http_client_name
    end
    
    #shortcuts
    
    def key(val)
      config['access_key'] = val
    end
    
    def secret(val)
      config['secret_key'] = val
    end
    
    # Setup connection for Heroku
{'fraction_non_alphanumeric': 0.09664429530201342, 'fraction_numerical': 0.0, 'mean_word_length': 1.9939759036144578, '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': '2442172', 'n_tokens_mistral': 509, 'n_tokens_neox': 502, 'n_words': 114}