<commit_before>module RbtcArbitrage
  class Trader
    attr_reader :buy_client, :sell_client, :received
    attr_accessor :buyer, :seller, :options

    def initialize config={}
      @buyer   = {}
      @seller  = {}
      @options = {}
      set_key config, :volume, 0.01
      set_key config, :cutoff, 2
      set_key config, :logger, Logger.new(STDOUT)
      set_key config, :verbose, true
      set_key config, :live, false
      exchange = config[:buyer] || :bitstamp
      @buy_client = client_for_exchange(exchange)
      exchange = config[:seller] || :mtgox
      @sell_client = client_for_exchange(exchange)<commit_msg>symbolize options in trader.initialize<commit_after>module RbtcArbitrage
  class Trader
    attr_reader :buy_client, :sell_client, :received
    attr_accessor :buyer, :seller, :options

    def initialize config={}
      config = config.to_hash
      config.each { |k,v| config[k.to_sym] = v unless k.is_a?(Symbol) }
      @buyer   = {}
      @seller  = {}
      @options = {}
      set_key config, :volume, 0.01
      set_key config, :cutoff, 2
      set_key config, :logger, Logger.new(STDOUT)
      set_key config, :verbose, true
      set_key config, :live, false
      exchange = config[:buyer] || :bitstamp
      @buy_client = client_for_exchange(exchange)
      exchange = config[:seller] || :mtgox
      @sell_client = client_for_exchange(exchange)
{'fraction_non_alphanumeric': 0.11191335740072202, 'fraction_numerical': 0.005776173285198556, 'mean_word_length': 3.1373134328358208, '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': '638171', 'n_tokens_mistral': 490, 'n_tokens_neox': 454, 'n_words': 106}