<commit_before>import logging

log = logging.getLogger(__name__)

__all__ = ['User']
		
class User(object):
	"""A user object for the directory"""
	def __init__(self, user_id, password):
		super(User, self).__init__()
		self.user_id = user_id
		self.variables = []
		self.parameters = []
		self.addParameter('password', password)

	def addVariable(self, var, val):
		'''
			Set an extra variable for an user
		'''
		try:
			self.getVariable(var)
		except ValueError:
			self.variables.append({'name': var, 'value': val})
			return

		log.warning('Cannot replace existing variable.')
		raise ValueError


	def addParameter(self, param, val):
		'''
			Set an extra parameter for an user
		'''<commit_msg>Modify User to allow creating extensions for Group VM<commit_after>import logging

log = logging.getLogger(__name__)

__all__ = ['User']
		
class User(object):
	"""A user object for the directory"""
	def __init__(self, user_id, password=<PASSWORD>):
		super(User, self).__init__()
		self.user_id = user_id
		self.variables = []
		self.parameters = []
		if password:
			self.addParameter('password', password)

	def addVariable(self, var, val):
		'''
			Set an extra variable for an user
		'''
		try:
			self.getVariable(var)
		except ValueError:
			self.variables.append({'name': var, 'value': val})
			return

		log.warning('Cannot replace existing variable.')
		raise ValueError


	def addParameter(self, param, val):
		'''
			Set an extra parameter for an user
		'''
{'fraction_non_alphanumeric': 0.13052345343303876, 'fraction_numerical': 0.0, 'mean_word_length': 4.075862068965518, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '5302066', 'n_tokens_mistral': 516, 'n_tokens_neox': 459, 'n_words': 136}