
import unittest

from transformers import load_tool
from transformers.utils import is_torch_available


if is_torch_available():
						import torch

from transformers.testing_utils import require_torch

from .test_tools_common import ToolTesterMixin

@require_torch
class 						a   (				unittest.TestCase				,_UpperCamelCase    ):




				def 	__snake_case							(							self	:				int      ):
										snake_case       :     Union[str, Any] =    load_tool('''text-to-speech'''      )
										self.tool.setup()




				def 	__snake_case							(							self	:				Optional[int]      ):
										# SpeechT5 isn't deterministic
										torch.manual_seed(0      )
										snake_case       :     List[str] =    self.tool('''hey'''      )
										snake_case       :     Optional[int] =    result.to_raw()
										self.assertTrue(
										    torch.allclose(
										        resulting_tensor[:3],    torch.tensor([-0.0005966668832115829, -0.0003657640190795064, -0.00013439502799883485]      ),    )      )




				def 	__snake_case							(							self	:				Optional[Any]      ):
										# SpeechT5 isn't deterministic
										torch.manual_seed(0      )
										snake_case       :     List[str] =    self.tool('''hey'''      )
										snake_case       :     Any =    result.to_raw()
										self.assertTrue(
										    torch.allclose(
										        resulting_tensor[:3],    torch.tensor([-0.0005966668832115829, -0.0003657640190795064, -0.00013439502799883485]      ),    )      )



'''simple docstring'''





from __future__ import annotations

import math

def      A (       A_							:					int       ):

						if num <= 0:
												snake_case       :     List[Any] =    F"""{num}: Invalid input, please enter a positive integer."""
												raise ValueError(A_       )

						snake_case       :     Optional[Any] =    [True] * (num + 1)
						snake_case       :     List[str] =    []
						snake_case       :     List[Any] =    2
						snake_case       :     str =    int(math.sqrt(A_       )       )

						while start <= end:
												# If start is a prime
												if sieve[start] is True:
																		prime.append(A_       )

																		# Set multiples of start be False
																		for i in range(start * start    ,							num + 1    ,							A_       ):
																								if sieve[i] is True:
																														snake_case       :     int =    False

												start += 1

						for j in range(end + 1    ,							num + 1       ):
												if sieve[j] is True:
																		prime.append(A_       )

						return prime


if __name__ == "__main__":
						print(prime_sieve(int(input("Enter a positive integer: ").strip())))

