<commit_before># Fred
require 'rubygems'
gem 'httparty'
require 'httparty'
require 'uri'

module Fred
	
	def self.fred(parent, child, options={})
	  if secondary.nil?
      response = HTTParty.get("http://api.stlouisfed.org/fred/#{parent}?#{hash_to_query(options)}&api_key=#{FRED_API_KEY}")
    else
      response = HTTParty.get("http://api.stlouisfed.org/fred/#{parent}/#{child}?#{hash_to_query(options)}&api_key=#{FRED_API_KEY}")      
    end
	end
  
  private
  
  def hash_to_query(hash)
    hash.keys.inject('') do |query_string, key|
      query_string << '&' unless key == hash.keys.first
      query_string << "#{URI.encode(key.to_s)}=#{URI.encode(hash[key])}"
    end
  end

end<commit_msg>fixed tabs<commit_after># Fred
require 'rubygems'
gem 'httparty'
require 'httparty'
require 'uri'

module Fred
	def self.fred(parent, child, options={})
		if secondary.nil?
		  response = HTTParty.get("http://api.stlouisfed.org/fred/#{parent}?#{hash_to_query(options)}&api_key=#{FRED_API_KEY}")
		else
		  response = HTTParty.get("http://api.stlouisfed.org/fred/#{parent}/#{child}?#{hash_to_query(options)}&api_key=#{FRED_API_KEY}")      
		end
	end

	private
	
	def hash_to_query(hash)
		hash.keys.inject('') do |query_string, key|
		  query_string << '&' unless key == hash.keys.first
		  query_string << "#{URI.encode(key.to_s)}=#{URI.encode(hash[key])}"
		end
	end
end
{'fraction_non_alphanumeric': 0.17479970866715222, 'fraction_numerical': 0.0, 'mean_word_length': 4.496, 'pattern_counts': {'":': 0, '<': 11, '<?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': '1139154', 'n_tokens_mistral': 541, 'n_tokens_neox': 528, 'n_words': 82}