<commit_before>module LastNumber
  class Store

    def initialize(config)
      @config = {}
      config.each { |k,v| @config[k.to_sym] = v }
    end

    def read
      # unimplemented
      # Should return json
    end

    def update(hash)
      # unimplemented
    end
  end
end<commit_msg>One-liner to symbolize keys in hash.<commit_after>module LastNumber
  class Store

    def initialize(config)
      # convert keys to symbols
      @config = Hash[*config.flat_map { |k,v| [k.to_sym, v] }]
    end

    def read
      # must return json
      # subclasses must implement
    end

    def update(hash)
      # subclasses must implement
    end
  end
end
{'fraction_non_alphanumeric': 0.07993966817496229, 'fraction_numerical': 0.0, 'mean_word_length': 2.2390243902439027, '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': '84831', 'n_tokens_mistral': 214, 'n_tokens_neox': 203, 'n_words': 62}