<commit_before>require 'net/http'
require 'json'

class CrunchAccessService

	ORGANIZATIONS_URL = "http://api.crunchbase.com/v/2/organizations"
	ORGANIZATION_URL = "http://api.crunchbase.com/v/2/organization"
	PRODUCTS_URL = "http://api.crunchbase.com/v/2/products"
	PRODUCT_URL = "http://api.crunchbase.com/v/2/product"

	def get_companies(page=1)
		uri = URI("#{ORGANIZATIONS_URL}?user_key=e314b958fbba5e68116283cf9f8cd96e&page=#{page}&order=created_at+DESC")
		JSON.parse(Net::HTTP.get(uri))
	end

	def get_company(permalink)
		uri = URI("#{ORGANIZATION_URL}/#{permalink}?user_key=<KEY>")
		JSON.parse(Net::HTTP.get(uri))
	end

	def get_products(page=1)
		uri = URI("#{PRODUCTS_URL}?user_key=e314b958fbba5e68116283cf9f8cd96e&page=#{page}&order=created_at+DESC")
		JSON.parse(Net::HTTP.get(uri))
	end

	def get_product(permalink)
		uri = URI("#{PRODUCT_URL}/#{permalink}?user_key=<KEY>")
		JSON.parse(Net::HTTP.get(uri))
	end
end<commit_msg>Every crunh base uri parameter in a constant in the Service<commit_after>require 'net/http'
require 'json'

class CrunchAccessService

	ORGANIZATIONS_URL = "http://api.crunchbase.com/v/2/organizations"
	ORGANIZATION_URL = "http://api.crunchbase.com/v/2/organization"
	PRODUCTS_URL = "http://api.crunchbase.com/v/2/products"
	PRODUCT_URL = "http://api.crunchbase.com/v/2/product"
	USER_KEY = "<KEY>"
	ORDER = "created_at+DESC"

	def get_companies(page=1)
		uri = URI("#{ORGANIZATIONS_URL}?user_key=#{USER_KEY}&page=#{page}&order=#{ORDER}")
		JSON.parse(Net::HTTP.get(uri))
	end

	def get_company(permalink)
		uri = URI("#{ORGANIZATION_URL}/#{permalink}?user_key=#{USER_KEY}")
		JSON.parse(Net::HTTP.get(uri))
	end

	def get_products(page=1)
		uri = URI("#{PRODUCTS_URL}?user_key=#{USER_KEY}&page=#{page}&order=#{ORDER}")
		JSON.parse(Net::HTTP.get(uri))
	end

	def get_product(permalink)
		uri = URI("#{PRODUCT_URL}/#{permalink}?user_key=#{USER_KEY}")
		JSON.parse(Net::HTTP.get(uri))
	end
end
{'fraction_non_alphanumeric': 0.17829457364341086, 'fraction_numerical': 0.025839793281653745, 'mean_word_length': 6.533073929961089, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '1671922', 'n_tokens_mistral': 859, 'n_tokens_neox': 798, 'n_words': 91}