<commit_before>require 'awscreds/credentials'

module AWSCreds
  class InvalidKeyTab < Exception; end

  class Store < Hash
    def initialize opts={}

      if opts[:load_user_keytab].nil? or opts[:load_user_keytab]
        import_keytab '~/.awscreds'
      end

      @default = opts[:default]
      @default ||= ENV['AWS_IDENTITY'] unless opts[:ignore_environment]
      @default ||= 'default'
    end

    def identities
      keys
    end
<commit_msg>store.rb: handle arbitrary keytab paths in initialize<commit_after>require 'awscreds/credentials'

module AWSCreds
  class InvalidKeyTab < Exception; end

  class Store < Hash
    def initialize opts={}
      # :keytab => false to disable autoloading
      keytab = opts[:keytab] || '~/.awscreds'
      import_keytab keytab if keytab

      @default = opts[:default]
      @default ||= ENV['AWS_IDENTITY'] unless opts[:ignore_environment]
      @default ||= 'default'
    end

    def identities
      keys
    end

{'fraction_non_alphanumeric': 0.10092687950566426, 'fraction_numerical': 0.0, 'mean_word_length': 3.1012658227848102, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 4, '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': '7181823', 'n_tokens_mistral': 311, 'n_tokens_neox': 309, 'n_words': 79}