<commit_before># A simple usage example for Beetle
require "rubygems"
require File.expand_path(File.dirname(__FILE__)+"/../lib/beetle")

# suppress debug messages
Beetle.config.logger.level = Logger::DEBUG
Beetle.config.servers = "localhost:5672, localhost:5673"
# instantiate a client

client = Beetle::Client.new

# register a durable queue named 'test'
# this implicitly registers a durable topic exchange called 'test'
client.register_queue(:echo)
client.register_message(:echo)

if ARGV.include?("--server")
  # register a handler for the test message, listing on queue "test"
  # echoing all data sent to it
  client.register_handler(:echo) do |m|
    # send data back to publisher
    m.data
  end
<commit_msg>adapted outdated comment in rpc example<commit_after># A simple usage example for Beetle
require "rubygems"
require File.expand_path(File.dirname(__FILE__)+"/../lib/beetle")

# suppress debug messages
Beetle.config.logger.level = Logger::DEBUG
Beetle.config.servers = "localhost:5672, localhost:5673"
# instantiate a client

client = Beetle::Client.new

# register a durable queue named 'echo'
# this implicitly registers a durable topic exchange called 'echo'
client.register_queue(:echo)
client.register_message(:echo)

if ARGV.include?("--server")
  # register a handler for the echo message, listing on queue "echo"
  # echoing all data sent to it
  client.register_handler(:echo) do |m|
    # send data back to publisher
    m.data
  end

{'fraction_non_alphanumeric': 0.10273972602739725, 'fraction_numerical': 0.010958904109589041, 'mean_word_length': 4.939024390243903, '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': '3254688', 'n_tokens_mistral': 460, 'n_tokens_neox': 441, 'n_words': 145}