



from __future__ import annotations

import typing
from collections.abc import Iterable

import numpy as np

__snake_case						:Any      		=     typing.Union[Iterable[float], Iterable[int], np.ndarray]  # noqa: UP007
__snake_case						:int      		=     typing.Union[np.floataa, int, float]  # noqa: UP007





def      __snake_case	(			_UpperCAmelCase   , _UpperCAmelCase				):
    return np.sqrt(np.sum((np.asarray(_UpperCAmelCase				) - np.asarray(_UpperCAmelCase				)) ** 2				)				)





def      __snake_case	(			_UpperCAmelCase   , _UpperCAmelCase				):
    return sum((va - va) ** 2 for va, va in zip(_UpperCAmelCase   , _UpperCAmelCase				)				) ** (1 / 2)


if __name__ == "__main__":





 def      __snake_case	(			):
     from timeit import timeit

     print('''Without Numpy'''				)
     print(
         timeit(
             '''euclidean_distance_no_np([1, 2, 3], [4, 5, 6])'''   , number=10000   , globals=globals()   , )				)
     print('''With Numpy'''				)
     print(
         timeit(
             '''euclidean_distance([1, 2, 3], [4, 5, 6])'''   , number=10000   , globals=globals()   , )				)
 benchmark()










def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							if bit_count < 0:
														raise ValueError("The given input must be positive"  )

							# get the generated string sequence
							_lowerCAmelCase     :							List[str]    =    gray_code_sequence_string(_lowerCamelCase  )
							#
							# convert them to integers
							for i in range(len(_lowerCamelCase  )  ):
														_lowerCAmelCase     :							List[str]    =    int(sequence[i]				, 2  )

							return sequence






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							if bit_count == 0:
														return ["0"]

							if bit_count == 1:
														return ["0", "1"]

							_lowerCAmelCase     :							List[Any]    =    1 << bit_count  # defines the length of the sequence
							# 1<< n is equivalent to 2^n

							# recursive answer will generate answer for n-1 bits
							_lowerCAmelCase     :							Optional[int]    =    gray_code_sequence_string(bit_count - 1  )

							_lowerCAmelCase     :							str    =    []

							# append 0 to first half of the smaller sequence generated
							for i in range(seq_len // 2  ):
														_lowerCAmelCase     :							Dict    =    "0" + smaller_sequence[i]
														sequence.append(_lowerCamelCase  )

							# append 1 to second half ... start from the end of the list
							for i in reversed(range(seq_len // 2  )  ):
														_lowerCAmelCase     :							Optional[Any]    =    "1" + smaller_sequence[i]
														sequence.append(_lowerCamelCase  )

							return sequence


if __name__ == "__main__":
						import doctest

						doctest.testmod()
