<commit_before>import requests #if this doesn't run, then try 'pip install requests'

def main():
	#this is a simple get example
	try:
		res = requests.get('http://www.google.com')
		res.raise_for_status()
		print res.text
	except requests.exceptions.HTTPError as e:
		 print "HTTP Error:", e.message
	except requests.exceptions.ConnectionError as e:
		print "Connection Error:", e.message

if __name__ == "__main__":
    main()<commit_msg>add a value error exception error case<commit_after>import requests #if this doesn't run, then try 'pip install requests'

def main():
	#this is a simple get example
	try:
		res = requests.get('http://www.google.com')
		res.raise_for_status()
		print res.text

		#if it is json...
		data = res.json()
		print data
	except ValueError as e:
		#catches value errors..example, if we wanted json and it couldn't decode it
		print "Value Error: ", e.message
	except requests.exceptions.HTTPError as e:
		 print "HTTP Error:", e.message
	except requests.exceptions.ConnectionError as e:
		print "Connection Error:", e.message

if __name__ == "__main__":
    main()
{'fraction_non_alphanumeric': 0.11030082041932543, 'fraction_numerical': 0.0, 'mean_word_length': 4.083333333333333, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '384491', 'n_tokens_mistral': 356, 'n_tokens_neox': 339, 'n_words': 123}