<commit_before>import path

class glob_path:
	def __init__(self,p):
		self.path = path.path(p)
		self.get_parent(self.path.parent)
		self.get_glob(self.path.name)

	def get_parent(self,parent):
		if not parent:
			parent = path.path('.')
		self.dirs = parent.dirs
		self.expand = parent.expand
		self.parent = parent

	def get_glob(self,name):
		if not name:
			name = '*'
		elif '*' not in name:
			name = '%s*' % name
		self.glob = name

	def __str__(self):
		return '%s/%s' % (self.parent,self.glob)

	def __repr__(self):
		return '<glob_path %s>' % self

	def files(self):
		return self.parent.files(self.glob)

	def exists(self):
		for f in self.parent.files(self.glob):
			return True
		return False

<commit_msg>refactoring<commit_after>import path

class glob_path:
	def __init__(self,p):
		self.path = path.path(p)
		self.get_parent(self.path.parent)
		self.get_glob(self.path.name)

	def get_parent(self,parent):
		if not parent:
			parent = path.path('.')
		self.dirs = parent.dirs
		self.expand = parent.expand
		self.parent = parent

	def get_glob(self,name):
		if not name:
			name = '*'
		elif '*' not in name:
			name = '%s*' % name
		self.glob = name

	def __str__(self):
		return '%s/%s' % (self.parent,self.glob)

	def __repr__(self):
		return '<glob_path %s>' % self

	def files(self):
		return self.parent.files(self.glob)

	def exists(self):
		for f in self.parent.files(self.glob):
			return True
		return False

def any_fnmatch(f,globs):
	for glob in globs:
		if f.fnmatch(glob):
			return True
	return False


{'fraction_non_alphanumeric': 0.14146023468057367, 'fraction_numerical': 0.0, 'mean_word_length': 3.5414201183431953, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1167330', 'n_tokens_mistral': 643, 'n_tokens_neox': 578, 'n_words': 138}