




import requests

try:
  from django.contrib.auth import authenticate, login
  from django.shortcuts import redirect, render
except ImportError:
  UpperCAmelCase__            =							UpperCAmelCase__            =							UpperCAmelCase__            =							UpperCAmelCase__            =							print
def     UpperCAmelCase_ (							__snake_case						)					->      Optional[Any]:







 """simple docstring"""


 _lowercase											='''secretKey'''
 _lowercase											='''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
 _lowercase											=request.POST.get('''username'''						)
 _lowercase											=request.POST.get('''password'''						)
 _lowercase											=request.POST.get('''g-recaptcha-response'''						)

 # post recaptcha response to Google's recaptcha api
 _lowercase											=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
  _lowercase											=authenticate(lowercase_					,						username=lowercase_					,						password=lowercase_						)
  if user_in_database:
   login(lowercase_					,						lowercase_						)
   return redirect('''/your-webpage'''						)
 return render(lowercase_					,						'''login.html'''						)





from math import sqrt
def     UpperCAmelCase_ (							__snake_case						)					->      list[int]:







 """simple docstring"""


 _lowercase											=[1]
 for i in range(2					,						int(sqrt(__snake_case						)						) + 1					,						1						):
  if number % i == 0:
   values.append(__snake_case						)
   if int(number // i						) != i:
    values.append(int(number // i						)						)
 return sorted(__snake_case						)
def     UpperCAmelCase_ (							__snake_case						)					->      bool:







 """simple docstring"""


 return sum(factors(__snake_case						)						) > n
def     UpperCAmelCase_ (							__snake_case						)					->      bool:







 """simple docstring"""


 _lowercase											=factors(__snake_case						)
 _lowercase											=len(__snake_case						)
 _lowercase											=[[0 for i in range(number + 1						)] for j in range(r + 1						)]
 for i in range(r + 1						):
  _lowercase											=True

 for i in range(1					,						number + 1						):
  _lowercase											=False

 for i in range(1					,						r + 1						):
  for j in range(1					,						number + 1						):
   if j < values[i - 1]:
    _lowercase											=subset[i - 1][j]
   else:
    _lowercase											=subset[i - 1][j] or subset[i - 1][j - values[i - 1]]

 return subset[r][number] != 0
def     UpperCAmelCase_ (							__snake_case						)					->      bool:







 """simple docstring"""


 return abundant(__snake_case						) and not semi_perfect(__snake_case						)


if __name__ == "__main__":
  import doctest

  doctest.testmod(verbose=True)
  for number in (69, 70, 71):
    print(f'''{number} is {'' if weird(number) else 'not '}weird.''')

