
'''simple docstring'''





import requests

try:
      from django.contrib.auth import authenticate, login
      from django.shortcuts import redirect, render
except ImportError:
      SCREAMING_SNAKE_CASE    =					SCREAMING_SNAKE_CASE    =					SCREAMING_SNAKE_CASE    =					SCREAMING_SNAKE_CASE    =					print







def snake_case_    (				lowercase__		):
  # Enter your recaptcha secret key here
  UpperCAmelCase__			:				Optional[Any]												=       "secretKey"
  UpperCAmelCase__			:				str												=       "https://www.google.com/recaptcha/api/siteverify"

  # when method is not POST, direct user to login page
  if request.method != "POST":
    return render(lowercase__      ,					"login.html"		)

  # from the frontend, get username, password, and client_key
  UpperCAmelCase__			:				List[str]												=       request.POST.get("username"		)
  UpperCAmelCase__			:				List[Any]												=       request.POST.get("password"		)
  UpperCAmelCase__			:				Dict												=       request.POST.get("g-recaptcha-response"		)

  # post recaptcha response to Google's recaptcha api
  UpperCAmelCase__			:				Optional[Any]												=       requests.post(lowercase__      ,					data={"secret": secret_key, "response": client_key}		)
  # if the recaptcha api verified our keys
  if response.json().get("success"      ,					lowercase__		):
    # authenticate the user
    UpperCAmelCase__			:				str												=       authenticate(lowercase__      ,					username=lowercase__      ,					password=lowercase__		)
    if user_in_database:
      login(lowercase__      ,					lowercase__		)
      return redirect("/your-webpage"		)
  return render(lowercase__      ,					"login.html"		)





'''simple docstring'''





from math import cos, sin







def snake_case_    (				lowercase__		):
  UpperCAmelCase__			:				List[Any]												=       float(lowercase__		)
  return [[scaling_factor * int(x == y		) for x in range(2		)] for y in range(2		)]







def snake_case_    (				lowercase__		):
  UpperCAmelCase__					, UpperCAmelCase__			:				List[Any]												=       cos(lowercase__		), sin(lowercase__		)
  return [[c, -s], [s, c]]







def snake_case_    (				lowercase__		):
  UpperCAmelCase__					, UpperCAmelCase__			:				Dict												=       cos(lowercase__		), sin(lowercase__		)
  UpperCAmelCase__			:				Tuple												=       c * s
  return [[c * c, cs], [cs, s * s]]







def snake_case_    (				lowercase__		):
  UpperCAmelCase__					, UpperCAmelCase__			:				Dict												=       cos(lowercase__		), sin(lowercase__		)
  UpperCAmelCase__			:				Any												=       c * s
  return [[2 * c - 1, 2 * cs], [2 * cs, 2 * s - 1]]


print(F'    {scaling(5) = }')
print(F'  {rotation(4_5) = }')
print(F'{projection(4_5) = }')






print(F'{reflection(4_5) = }')



