






'''simple docstring'''

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

from .haversine_distance import haversine_distance

UpperCamelCase							=637_8137.0
UpperCamelCase							=635_6752.31_4245
UpperCamelCase							=637_8137



def 							snake_case					(     a_							: Dict    ,   a_							: Tuple    ,   a_							: Optional[int]    ,   a_							: Tuple	)       ->				Tuple:





      """simple docstring"""

      UpperCamelCase_				:   Optional[int]					    =							(AXIS_A - AXIS_B) / AXIS_A
      # Parametric latitudes
      # https://en.wikipedia.org/wiki/Latitude#Parametric_(or_reduced)_latitude
      UpperCamelCase_				:   Union[str, Any]					    =							atan((1 - flattening) * tan(radians(lowerCamelCase__	)	)	)
      UpperCamelCase_				:   Optional[int]					    =							atan((1 - flattening) * tan(radians(lowerCamelCase__	)	)	)

      # Compute central angle between two points
      # using haversine theta. sigma =  haversine_distance / equatorial radius
      UpperCamelCase_				:   str					    =							haversine_distance(lowerCamelCase__    ,   lowerCamelCase__    ,   lowerCamelCase__    ,   lowerCamelCase__	) / EQUATORIAL_RADIUS

      # Intermediate P and Q values
      UpperCamelCase_				:   Optional[Any]					    =							(b_lata + b_lata) / 2
      UpperCamelCase_				:   List[Any]					    =							(b_lata - b_lata) / 2

      # Intermediate X value
      # X = (sigma - sin(sigma)) * sin^2Pcos^2Q / cos^2(sigma/2)
      UpperCamelCase_				:   str					    =							(sin(lowerCamelCase__	) ** 2) * (cos(lowerCamelCase__	) ** 2)
      UpperCamelCase_				:   List[Any]					    =							cos(sigma / 2	) ** 2
      UpperCamelCase_				:   Dict					    =							(sigma - sin(lowerCamelCase__	)) * (x_numerator / x_demonimator)

      # Intermediate Y value
      # Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
      UpperCamelCase_				:   Tuple					    =							(cos(lowerCamelCase__	) ** 2) * (sin(lowerCamelCase__	) ** 2)
      UpperCamelCase_				:   Union[str, Any]					    =							sin(sigma / 2	) ** 2
      UpperCamelCase_				:   Any					    =							(sigma + sin(lowerCamelCase__	)) * (y_numerator / y_denominator)

      return EQUATORIAL_RADIUS * (sigma - ((flattening / 2) * (x_value + y_value)))


if __name__ == "__main__":
      import doctest

      doctest.testmod()














'''simple docstring'''

import torch

from diffusers import StableDiffusionPipeline


UpperCamelCase							="path-to-your-trained-model"
UpperCamelCase							=StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.floataa).to("cuda")

UpperCamelCase							="A photo of sks dog in a bucket"
UpperCamelCase							=pipe(prompt, num_inference_steps=50, guidance_scale=7.5).images[0]

image.save("dog-bucket.png")






