






'''simple docstring'''





import unittest
from timeit import timeit
def __UpperCAmelCase (			A			:	int	,   A			:	int						)  -> int:
			UpperCAmelCase_     :   Dict       =   first_num if first_num >= second_num else second_num
			UpperCAmelCase_     :   Optional[int]       =   max_num
			while (common_mult % first_num > 0) or (common_mult % second_num > 0):
						common_mult += max_num
			return common_mult
def __UpperCAmelCase (			A			:	int	,   A			:	int						)  -> int:
			return b if a == 0 else greatest_common_divisor(b % a	,   A						)
def __UpperCAmelCase (			A			:	int	,   A			:	int						)  -> int:
			return first_num // greatest_common_divisor(A	,   A						) * second_num
def __UpperCAmelCase (			)  -> Dict:
			UpperCAmelCase_     :   Tuple       =   (
			    '''from __main__ import least_common_multiple_slow, least_common_multiple_fast'''
			)
			print(
			    '''least_common_multiple_slow():'''	,   timeit('''least_common_multiple_slow(1000, 999)'''	,   setup=A						)	,   )
			print(
			    '''least_common_multiple_fast():'''	,   timeit('''least_common_multiple_fast(1000, 999)'''	,   setup=A						)	,   )


class 				snake_case__     (			unittest.TestCase):
					a_       =			(
					    (10, 20),
					    (13, 15),
					    (4, 31),
					    (10, 42),
					    (43, 34),
					    (5, 12),
					    (12, 25),
					    (10, 25),
					    (6, 9),
					)
					a_       =			(20, 195, 124, 210, 1462, 60, 300, 50, 18)




					def 						A     (       self       :						Optional[int]     )  ->    List[Any]:
								for i, (first_num, second_num) in enumerate(self.test_inputs     ):
											UpperCAmelCase_     :   Union[str, Any]       =   least_common_multiple_slow(_A							,				_A     )
											UpperCAmelCase_     :   Any       =   least_common_multiple_fast(_A							,				_A     )
											with self.subTest(i=_A     ):
														self.assertEqual(_A							,				self.expected_results[i]     )
														self.assertEqual(_A							,				self.expected_results[i]     )


if __name__ == "__main__":
						benchmark()
						unittest.main()










'''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 				snake_case__     (			unittest.TestCase):




					def 						A     (       self       :						Optional[Any]     )  ->    List[str]:
								UpperCAmelCase_     :   Optional[Any]       =   '''runwayml/stable-diffusion-v1-5'''
								UpperCAmelCase_     :   Optional[int]       =   TextToVideoZeroPipeline.from_pretrained(_A							,				torch_dtype=torch.floataa     ).to('''cuda'''     )
								UpperCAmelCase_     :   Tuple       =   DDIMScheduler.from_config(pipe.scheduler.config     )
								UpperCAmelCase_     :   Tuple       =   torch.Generator(device='''cuda'''     ).manual_seed(0     )

								UpperCAmelCase_     :   List[Any]       =   '''A bear is playing a guitar on Times Square'''
								UpperCAmelCase_     :   List[Any]       =   pipe(prompt=_A							,				generator=_A     ).images

								UpperCAmelCase_     :   Any       =   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     )


