<commit_before>require_relative "registry"
require_relative "command_helper"
require_relative "../errors"
require "socket"
require "timeout"

begin
  require "openssl"
rescue LoadError
  # Not all systems have OpenSSL support
end

if RUBY_VERSION < "1.9.3"
  class String
    # Ruby 1.8.7 does not have byteslice, but it handles encodings differently anyway.
    # We can simply slice the string, which is a byte array there.
    def byteslice(*args)
      slice(*args)
    end
  end
end

class Redis
  module Connection
    module SocketMixin

      CRLF = "\r\n".freeze

      # Exceptions raised during non-blocking I/O ops that require retrying the op
      if RUBY_VERSION >= "1.9.3"
        NBIO_READ_EXCEPTIONS = [IO::WaitReadable]
        NBIO_WRITE_EXCEPTIONS = [IO::WaitWritable]<commit_msg>This no longer needed.<commit_after>require_relative "registry"
require_relative "command_helper"
require_relative "../errors"
require "socket"
require "timeout"

begin
  require "openssl"
rescue LoadError
  # Not all systems have OpenSSL support
end

class Redis
  module Connection
    module SocketMixin

      CRLF = "\r\n".freeze

      # Exceptions raised during non-blocking I/O ops that require retrying the op
      if RUBY_VERSION >= "1.9.3"
        NBIO_READ_EXCEPTIONS = [IO::WaitReadable]
        NBIO_WRITE_EXCEPTIONS = [IO::WaitWritable]
{'fraction_non_alphanumeric': 0.07982261640798226, 'fraction_numerical': 0.008869179600886918, 'mean_word_length': 3.5436241610738257, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, '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': '6932222', 'n_tokens_mistral': 439, 'n_tokens_neox': 412, 'n_words': 133}