<commit_before>"Customize this file to change the default client etc."

import string

HOST = 'voorn.cwi.nl'
PORT = 4127
DIRECTORY = '/ufs/guido/voorn/python-RCS/Demo/pdist'
VERBOSE = 1

def openrcsclient(opts = []):
	"open an RCSProxy client based on a list of options returned by getopt"
	import RCSProxy
	host = HOST
	port = PORT
	directory = DIRECTORY
	verbose = VERBOSE
	for o, a in opts:
		if o == '-h':
			host = a
			if ':' in host:
				i = string.find(host, ':')
				host, p = host[:i], host[i+1:]
				if p:
					port = string.atoi(p)
		if o == '-p':
			port = string.atoi(a)
		if o == '-d':
			directory = a
		if o == '-v':
			verbose = verbose + 1
		if o == '-q':
			verbose = 0
	address = (host, port)
	x = RCSProxy.RCSProxyClient(address, verbose)
	if directory:
		x.cd(directory)
	return x<commit_msg>get default directory from CVS/Repository<commit_after>"Customize this file to change the default client etc."

import string

# These defaults don't belong here -- they should be taken from the
# environment or from a hidden file in the current directory

HOST = 'voorn.cwi.nl'
PORT = 4127
VERBOSE = 1

def openrcsclient(opts = []):
	"open an RCSProxy client based on a list of options returned by getopt"
	import RCSProxy
	host = HOST
	port = PORT
	verbose = VERBOSE
	directory = None
	for o, a in opts:
		if o == '-h':
			host = a
			if ':' in host:
				i = string.find(host, ':')
				host, p = host[:i], host[i+1:]
				if p:
					port = string.atoi(p)
		if o == '-p':
			port = string.atoi(a)
		if o == '-d':
			directory = a
		if o == '-v':
			verbose = verbose + 1
		if o == '-q':
			verbose = 0
	address = (host, port)
	x = RCSProxy.RCSProxyClient(address, verbose)
	if not directory:
		try:
			directory = open("CVS/Repository").readline()
		except IOError:
			pass
		else:
			if directory[-1] == '\n':
				directory = directory[:-1]
	if directory:
		x.cd(directory)
	return x
{'fraction_non_alphanumeric': 0.13428120063191154, 'fraction_numerical': 0.009478672985781991, 'mean_word_length': 2.9583333333333335, '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': '2450218', 'n_tokens_mistral': 785, 'n_tokens_neox': 687, 'n_words': 235}