<commit_before>require 'curb'

module VpsbClient
  class CurlWrapper
    CONNECT_TIMEOUT = 5
    TIMEOUT = 5

    def initialize(auth_token)
      @auth_token = auth_token
    end

    def get(url, query_params, &block)
      Curl.get(url, query_params) do |curl|
        curl.ssl_verify_host = false
        curl.ssl_verify_peer = false
        curl.timeout = TIMEOUT
        curl.connect_timeout = CONNECT_TIMEOUT
        curl.headers['Authorization'] = "Token #{@auth_token}"

        yield curl if block_given?
      end
    end
<commit_msg>higher timeouts (seeing timeout errors connecting to new vpsb)<commit_after>require 'curb'

module VpsbClient
  class CurlWrapper
    CONNECT_TIMEOUT = 10
    TIMEOUT = 10

    def initialize(auth_token)
      @auth_token = auth_token
    end

    def get(url, query_params, &block)
      Curl.get(url, query_params) do |curl|
        curl.ssl_verify_host = false
        curl.ssl_verify_peer = false
        curl.timeout = TIMEOUT
        curl.connect_timeout = CONNECT_TIMEOUT
        curl.headers['Authorization'] = "Token #{@auth_token}"

        yield curl if block_given?
      end
    end

{'fraction_non_alphanumeric': 0.07712532865907099, 'fraction_numerical': 0.0052585451358457495, 'mean_word_length': 2.6957928802588995, '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': '3844297', 'n_tokens_mistral': 373, 'n_tokens_neox': 354, 'n_words': 88}