<commit_before>module Blocktrain
  class Client

    def self.results query
      r = Curl::Easy.http_post(endpoint, query.to_json) do |c|
        c.ssl_verify_peer = false
      end

      JSON.parse r.body_str
    end

    def self.endpoint
      "#{url}/#{index}/_search"
    end

    def self.url
      ENV['ES_URL']
    end

    def self.index
      ENV['ES_INDEX'] || 'train_data'
    end
  end
end<commit_msg>Verify the peer<commit_after>module Blocktrain
  class Client

    def self.results query
      r = Curl::Easy.http_post(endpoint, query.to_json)
      JSON.parse r.body_str
    end

    def self.endpoint
      "#{url}/#{index}/_search"
    end

    def self.url
      ENV['ES_URL']
    end

    def self.index
      ENV['ES_INDEX'] || 'train_data'
    end
  end
end
{'fraction_non_alphanumeric': 0.10485933503836317, 'fraction_numerical': 0.0, 'mean_word_length': 2.2222222222222223, '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': '84776', 'n_tokens_mistral': 280, 'n_tokens_neox': 269, 'n_words': 62}