
'''simple docstring'''






from pathlib import Path

import fire





def    UpperCAmelCase							(  UpperCAmelCase__							:							str       ,							UpperCAmelCase__							:							str       ,							UpperCAmelCase__							:							int):
				lowerCamelCase					:			Any									= Path(UpperCAmelCase__)
				lowerCamelCase					:			Tuple									= Path(UpperCAmelCase__)
				dest_dir.mkdir(exist_ok=UpperCAmelCase__)
				for path in src_dir.iterdir():
								lowerCamelCase					:			Union[str, Any]									= [x.rstrip() for x in list(path.open().readlines())][:n]
								lowerCamelCase					:			Dict									= dest_dir.joinpath(path.name)
								print(UpperCAmelCase__)
								dest_path.open('w').write('\n'.join(UpperCAmelCase__))


if __name__ == "__main__":
					fire.Fire(minify)


'''simple docstring'''






def    UpperCAmelCase							(  UpperCAmelCase__							:							list[int]):
				if not nums:  # Makes sure that the list is not empty
								raise ValueError('List is empty')

				lowerCamelCase					:			int									= sum(UpperCAmelCase__) / len(UpperCAmelCase__)  # Calculate the average
				return sum(abs(x - average) for x in nums) / len(UpperCAmelCase__)


if __name__ == "__main__":
					import doctest

					doctest.testmod()
