<commit_before>require 'bertrpc'
require 'logger'
require 'eventmachine'

module BERTEM
  # NOTE: ernie (and all other BERTRPC servers?) closes connections after
  #       responding, so we can't send multiple requests per connection.
  #       Hence, the default for persistent is false.  If you are dealing
  #       with a more sophisticated server that supports more than one
  #       request per connection, call BERTEM.service with
  #       persistent = true and it should Just Work.

  class Client < EventMachine::Connection
    include BERTRPC::Encodes

    attr_accessor :requests

    class Request
      attr_accessor :kind, :options

      def initialize(svc, kind, options)
        @svc = svc
        @kind = kind
        @options = options
      end

      def method_missing(cmd, *args)
        BERTRPC::Mod.new(@svc, self, cmd)
      end

    end

    class << self<commit_msg>Renamed to bertrem for lulz<commit_after>require 'bertrpc'
require 'logger'
require 'eventmachine'

module BERTREM
  # NOTE: ernie (and all other BERTRPC servers?) closes connections after
  #       responding, so we can't send multiple requests per connection.
  #       Hence, the default for persistent is false.  If you are dealing
  #       with a more sophisticated server that supports more than one
  #       request per connection, call BERTREM.service with
  #       persistent = true and it should Just Work.

  class Client < EventMachine::Connection
    include BERTRPC::Encodes

    attr_accessor :requests

    class Request
      attr_accessor :kind, :options

      def initialize(svc, kind, options)
        @svc = svc
        @kind = kind
        @options = options
      end

      def method_missing(cmd, *args)
        BERTRPC::Mod.new(@svc, self, cmd)
      end

    end

    class << self
{'fraction_non_alphanumeric': 0.06747787610619468, 'fraction_numerical': 0.0, 'mean_word_length': 2.6545454545454548, 'pattern_counts': {'":': 0, '<': 9, '<?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': '5861666', 'n_tokens_mistral': 525, 'n_tokens_neox': 501, 'n_words': 191}