'''simple docstring'''

import unittest

import torch

from diffusers import DDIMScheduler, TextToVideoZeroPipeline
from diffusers.utils import load_pt, require_torch_gpu, slow

from ..test_pipelines_common import assert_mean_pixel_difference




@slow
@require_torch_gpu
class 		SCREAMING_SNAKE_CASE_				(unittest.TestCase			):



			"""simple docstring"""






			def      lowerCamelCase   (       self				):
									snake_case   :					Optional[int]							=						"runwayml/stable-diffusion-v1-5"
									snake_case   :					Dict							=						TextToVideoZeroPipeline.from_pretrained(__A							, torch_dtype=torch.floataa				).to("cuda"				)
									snake_case   :					List[Any]							=						DDIMScheduler.from_config(pipe.scheduler.config				)
									snake_case   :					List[str]							=						torch.Generator(device="cuda"				).manual_seed(0				)

									snake_case   :					Union[str, Any]							=						"A bear is playing a guitar on Times Square"
									snake_case   :					int							=						pipe(prompt=__A							, generator=__A				).images

									snake_case   :					int							=						load_pt(
									    "https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/text-to-video/A bear is playing a guitar on Times Square.pt"				)

									assert_mean_pixel_difference(__A							, __A				)






'''simple docstring'''

from math import sqrt


def 					UpperCAmelCase__      (							_lowerCAmelCase						: int)						->		list[int]:



						"""simple docstring"""

						snake_case   :					Dict							=						[1]
						for i in range(2,			int(sqrt(_lowerCAmelCase)) + 1,			1):
												if number % i == 0:
																		values.append(_lowerCAmelCase)
																		if int(number // i) != i:
																								values.append(int(number // i))
						return sorted(_lowerCAmelCase)


def 					UpperCAmelCase__      (							_lowerCAmelCase						: int)						->		bool:



						"""simple docstring"""

						return sum(factors(_lowerCAmelCase)) > n


def 					UpperCAmelCase__      (							_lowerCAmelCase						: int)						->		bool:



						"""simple docstring"""

						snake_case   :					Dict							=						factors(_lowerCAmelCase)
						snake_case   :					List[str]							=						len(_lowerCAmelCase)
						snake_case   :					Optional[Any]							=						[[0 for i in range(number + 1)] for j in range(r + 1)]
						for i in range(r + 1):
												snake_case   :					int							=						True

						for i in range(1,			number + 1):
												snake_case   :					List[Any]							=						False

						for i in range(1,			r + 1):
												for j in range(1,			number + 1):
																		if j < values[i - 1]:
																								snake_case   :					Union[str, Any]							=						subset[i - 1][j]
																		else:
																								snake_case   :					Tuple							=						subset[i - 1][j] or subset[i - 1][j - values[i - 1]]

						return subset[r][number] != 0


def 					UpperCAmelCase__      (							_lowerCAmelCase						: int)						->		bool:



						"""simple docstring"""

						return abundant(_lowerCAmelCase) and not semi_perfect(_lowerCAmelCase)


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.")





