<commit_before># Utility to send JSON RPC messages

import requests
import json
import sys

verbose = False

def dorpc(port,meth,params):
	url = 'http://127.0.0.1:%d/api' % (port)
	id = '12345'
	data = '{ "jsonrpc": "2.0", "method": "'+meth+'", "params": '+params+', "id":"'+id+'" }\n'
	r = requests.post(url,data)
	print "r.text is ",r.text
	j = json.loads(r.text)
	if "error" in j:
		print "ERROR: "+str(j["error"]["message"])
	elif "result" in j:<commit_msg>Eliminate debug output<commit_after># Utility to send JSON RPC messages

import requests
import json
import sys

verbose = False

def dorpc(port,meth,params):
	url = 'http://127.0.0.1:%d/api' % (port)
	id = '12345'
	data = '{ "jsonrpc": "2.0", "method": "'+meth+'", "params": '+params+', "id":"'+id+'" }\n'
	r = requests.post(url,data)
	if verbose:
		print "r.text is ",r.text
	j = json.loads(r.text)
	if "error" in j:
		print "ERROR: "+str(j["error"]["message"])
	elif "result" in j:
{'fraction_non_alphanumeric': 0.21904761904761905, 'fraction_numerical': 0.027513227513227514, 'mean_word_length': 4.468208092485549, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '4475293', 'n_tokens_mistral': 398, 'n_tokens_neox': 381, 'n_words': 103}