



'''simple docstring'''







_UpperCamelCase  						=			{
    "kilogram": 1,
    "gram": pow(10, 3),
    "milligram": pow(10, 6),
    "metric-ton": pow(10, -3),
    "long-ton": 0.0009842073,
    "short-ton": 0.0011023122,
    "pound": 2.2046244202,
    "stone": 0.1574731728,
    "ounce": 35.273990723,
    "carrat": 5000,
    "atomic-mass-unit": 6.0_2213_6652e26,
}

_UpperCamelCase  						=			{
    "kilogram": 1,
    "gram": pow(10, -3),
    "milligram": pow(10, -6),
    "metric-ton": pow(10, 3),
    "long-ton": 1016.04608,
    "short-ton": 907.184,
    "pound": 0.453592,
    "stone": 6.35029,
    "ounce": 0.0283495,
    "carrat": 0.0002,
    "atomic-mass-unit": 1.6_6054_0199e-27,
}
def 			_lowerCAmelCase(      UpperCAmelCase_      :	str					, UpperCAmelCase_      :	str					, UpperCAmelCase_      :	float						) ->							float:
							if to_type not in KILOGRAM_CHART or from_type not in WEIGHT_TYPE_CHART:
														lowerCAmelCase__  =   (
														    F'''Invalid \'from_type\' or \'to_type\' value: {from_type!r}, {to_type!r}\n'''
														    F'''Supported values are: {", ".join(UpperCAmelCase_						)}'''
														)
														raise ValueError(UpperCAmelCase_						)
							return value * KILOGRAM_CHART[to_type] * WEIGHT_TYPE_CHART[from_type]


if __name__ == "__main__":
		import doctest

		doctest.testmod()










'''simple docstring'''







def 			_lowerCAmelCase(      UpperCAmelCase_      :	str						) ->							str:
							lowerCAmelCase__  =   word.upper()
							lowerCAmelCase__  =   0
							lowerCAmelCase__  =   {}
							lowerCAmelCase__  =   []

							for letter in word:
														if letter not in letter_nums:
																					lowerCAmelCase__  =   str(UpperCAmelCase_						)
																					next_num += 1
														word_pattern.append(letter_nums[letter]						)
							return ".".join(UpperCAmelCase_						)


if __name__ == "__main__":
		import pprint
		import time

		_UpperCamelCase  						=			time.time()
		with open("""dictionary.txt""") as in_file:
				_UpperCamelCase  						=			in_file.read().splitlines()

		_UpperCamelCase  						=			{}
		for word in word_list:
				_UpperCamelCase  						=			get_word_pattern(word)
				if pattern in all_patterns:
						all_patterns[pattern].append(word)
				else:
						_UpperCamelCase  						=			[word]

		with open("""word_patterns.txt""", """w""") as out_file:
				out_file.write(pprint.pformat(all_patterns))

		_UpperCamelCase  						=			round(time.time() - start_time, 2)
		print(f'Done!  {len(all_patterns):,} word patterns found in {total_time} seconds.')
		# Done!  9,581 word patterns found in 0.58 seconds.





