<commit_before># Monkey patch to handle the case where Content-Type headers returned by servers
# say "gzip" by the resulting message body isn't in gzip format.
# TODO Remove this when we upgrade Berkshelf and the gzip response goes away.
# https://github.com/berkshelf/berkshelf-api-client/blob/v1.3.0/lib/berkshelf/api_client/connection.rb#L37
require 'faraday_middleware'

module FaradayMiddleware
  class Gzip
    alias_method :__uncompress_gzip__, :uncompress_gzip
    def uncompress_gzip(body)
      __uncompress_gzip__(body)
    rescue Zlib::GzipFile::Error
      StringIO.new(body).read
    end
  end
end

Faraday::Response.register_middleware :gzip => FaradayMiddleware::Gzip

# Force Berkshelf to use the gecode dependency solver
require 'solve'

Solve.engine = :gecode
<commit_msg>Removes the explicit solver setting from the Berkshelf patch.<commit_after># Monkey patch to handle the case where Content-Type headers returned by servers
# say "gzip" by the resulting message body isn't in gzip format.
# TODO Remove this when we upgrade Berkshelf and the gzip response goes away.
# https://github.com/berkshelf/berkshelf-api-client/blob/v1.3.0/lib/berkshelf/api_client/connection.rb#L37
require 'faraday_middleware'

module FaradayMiddleware
  class Gzip
    alias_method :__uncompress_gzip__, :uncompress_gzip
    def uncompress_gzip(body)
      __uncompress_gzip__(body)
    rescue Zlib::GzipFile::Error
      StringIO.new(body).read
    end
  end
end

Faraday::Response.register_middleware :gzip => FaradayMiddleware::Gzip

{'fraction_non_alphanumeric': 0.07742355237475602, 'fraction_numerical': 0.006506180871828237, 'mean_word_length': 4.80377358490566, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '6795746', 'n_tokens_mistral': 507, 'n_tokens_neox': 485, 'n_words': 138}