<commit_before>module Builderator
  module Model
    ##
    # Shared model interface
    ##
    class Base
      attr_reader :resources

      def initialize(*args)
        fetch(*args)
      end

      def fetch
        @resources = {}
      end

      def find(filters = {})
        Util.filter(resources, filters)
      end

      def select(set = [])
        resources.select { |k, _| set.include?(k) }
      end

      def reject(set)
        resources.reject { |k, _| set.include?(k) }
      end

      def in_use(options = {})
        find(options.fetch('filters', {}))
      end

      def unused(options = {})
        Util.filter(reject(in_use(options)), options.fetch('filters', {}))
      end
    end
  end
end

require_relative './model/images'
require_relative './model/instances'
require_relative './model/launch_configs'
require_relative './model/scaling_groups'
require_relative './model/snapshots'
require_relative './model/volumes'
<commit_msg>Add default to reject argument<commit_after>module Builderator
  module Model
    ##
    # Shared model interface
    ##
    class Base
      attr_reader :resources
      LIMIT = 4

      def initialize(*args)
        fetch(*args)
      end

      def fetch
        @resources = {}
      end

      def find(filters = {})
        Util.filter(resources, filters)
      end

      def select(set = [])
        resources.select { |k, _| set.include?(k) }
      end

      def reject(set = [])
        resources.reject { |k, _| set.include?(k) }
      end

      def in_use(options = {})
        find(options.fetch('filters', {}))
      end

      def unused(options = {})
        Util.filter(reject(in_use(options)), options.fetch('filters', {}))
      end
    end
  end
end

require_relative './model/images'
require_relative './model/instances'
require_relative './model/launch_configs'
require_relative './model/scaling_groups'
require_relative './model/snapshots'
require_relative './model/volumes'

{'fraction_non_alphanumeric': 0.12538226299694188, 'fraction_numerical': 0.0005096839959225281, 'mean_word_length': 2.349829351535836, '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': '2609611', 'n_tokens_mistral': 585, 'n_tokens_neox': 574, 'n_words': 126}