<commit_before>require 'singleton'

require 'amqp'
require 'amqp/utilities/event_loop_helper.rb'

module Communications
  class Amqp
    include Singleton

    def channel
      AMQP::Channel.new(connection)
    end

    private

    def connection
      AMQP.connect
    end
  end
end<commit_msg>Cache items<commit_after>require 'singleton'

require 'amqp'
require 'amqp/utilities/event_loop_helper.rb'

module Communications
  class Amqp
    include Singleton

    def channel
      @channel ||= AMQP::Channel.new(connection)
    end

    private

    def connection
      @connection ||= AMQP.connect
    end
  end
end
{'fraction_non_alphanumeric': 0.07085346215780998, 'fraction_numerical': 0.0, 'mean_word_length': 3.1466666666666665, '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': '4409442', 'n_tokens_mistral': 200, 'n_tokens_neox': 189, 'n_words': 48}