
from math import asin, atan, cos, radians, sin, sqrt, tan

_A  =	6_378_137.0
_A  =	6_356_752.314_245
_A  =	6_37_81_37






def   lowerCamelCase__							(							__lowerCAmelCase    :    float       ,				__lowerCAmelCase    :    float       ,				__lowerCAmelCase    :    float       ,				__lowerCAmelCase    :    float							):




			"""simple docstring"""


			lowerCAmelCase_         =      (AXIS_A - AXIS_B) / AXIS_A
			lowerCAmelCase_         =      atan((1 - flattening) * tan(radians(__lowerCAmelCase							)							)							)
			lowerCAmelCase_         =      atan((1 - flattening) * tan(radians(__lowerCAmelCase							)							)							)
			lowerCAmelCase_         =      radians(__lowerCAmelCase							)
			lowerCAmelCase_         =      radians(__lowerCAmelCase							)
			# Equation
			lowerCAmelCase_         =      sin((phi_a - phi_a) / 2							)
			lowerCAmelCase_         =      sin((lambda_a - lambda_a) / 2							)
			# Square both values
			sin_sq_phi *= sin_sq_phi
			sin_sq_lambda *= sin_sq_lambda
			lowerCAmelCase_         =      sqrt(sin_sq_phi + (cos(__lowerCAmelCase							) * cos(__lowerCAmelCase							) * sin_sq_lambda)							)
			return 2 * RADIUS * asin(__lowerCAmelCase							)


if __name__ == "__main__":
			import doctest

			doctest.testmod()





from typing import Optional
from urllib.parse import quote

import huggingface_hub as hfh
from packaging import version






def   lowerCamelCase__							(							__lowerCAmelCase    :    str       ,				__lowerCAmelCase    :    str       ,				__lowerCAmelCase    :    Optional[str] = None							):




			"""simple docstring"""


			if version.parse(hfh.__version__							).release < version.parse("0.11.0"							).release:
						# old versions of hfh don't url-encode the file path
						lowerCAmelCase_         =      quote(__lowerCAmelCase							)
			return hfh.hf_hub_url(__lowerCAmelCase       ,				__lowerCAmelCase       ,				repo_type="dataset"       ,				revision=__lowerCAmelCase							)



