



import unittest

from datasets import load_dataset

from transformers.pipelines import pipeline
from transformers.testing_utils import is_pipeline_test, nested_simplify, require_torch, slow


@is_pipeline_test
@require_torch
class       a							(			unittest.TestCase				):



		@require_torch
		def 	__lowerCamelCase			(     self     :Union[str, Any]  ):
						snake_case__	:      Optional[int]     		=	pipeline(
						    task='''zero-shot-audio-classification'''   ,model='''hf-internal-testing/tiny-clap-htsat-unfused'''  )
						snake_case__	:      Optional[Any]     		=	load_dataset('''ashraq/esc50'''  )
						snake_case__	:      List[str]     		=	dataset['''train''']['''audio'''][-1]['''array''']
						snake_case__	:      List[Any]     		=	audio_classifier(__lowercase   ,candidate_labels=['''Sound of a dog''', '''Sound of vaccum cleaner''']  )
						self.assertEqual(
						    nested_simplify(__lowercase  )   ,[{'''score''': 0.501, '''label''': '''Sound of a dog'''}, {'''score''': 0.499, '''label''': '''Sound of vaccum cleaner'''}]   ,)



		@unittest.skip('''No models are available in TF'''  )
		def 	__lowerCamelCase			(     self     :Optional[Any]  ):
						pass



		@slow
		@require_torch
		def 	__lowerCamelCase			(     self     :Optional[int]  ):
						snake_case__	:      int     		=	pipeline(
						    task='''zero-shot-audio-classification'''   ,model='''laion/clap-htsat-unfused'''   ,)
						# This is an audio of a dog
						snake_case__	:      Union[str, Any]     		=	load_dataset('''ashraq/esc50'''  )
						snake_case__	:      Optional[Any]     		=	dataset['''train''']['''audio'''][-1]['''array''']
						snake_case__	:      Optional[int]     		=	audio_classifier(__lowercase   ,candidate_labels=['''Sound of a dog''', '''Sound of vaccum cleaner''']  )

						self.assertEqual(
						    nested_simplify(__lowercase  )   ,[
						        {'''score''': 0.999, '''label''': '''Sound of a dog'''},
						        {'''score''': 0.001, '''label''': '''Sound of vaccum cleaner'''},
						    ]   ,)

						snake_case__	:      Union[str, Any]     		=	audio_classifier([audio] * 5   ,candidate_labels=['''Sound of a dog''', '''Sound of vaccum cleaner''']  )
						self.assertEqual(
						    nested_simplify(__lowercase  )   ,[
						        [
						            {'''score''': 0.999, '''label''': '''Sound of a dog'''},
						            {'''score''': 0.001, '''label''': '''Sound of vaccum cleaner'''},
						        ],
						    ]
						    * 5   ,)
						snake_case__	:      int     		=	audio_classifier(
						    [audio] * 5   ,candidate_labels=['''Sound of a dog''', '''Sound of vaccum cleaner''']   ,batch_size=5  )
						self.assertEqual(
						    nested_simplify(__lowercase  )   ,[
						        [
						            {'''score''': 0.999, '''label''': '''Sound of a dog'''},
						            {'''score''': 0.001, '''label''': '''Sound of vaccum cleaner'''},
						        ],
						    ]
						    * 5   ,)






		@unittest.skip('''No models are available in TF'''  )
		def 	__lowerCamelCase			(     self     :Union[str, Any]  ):
						pass






import random

from .binary_exp_mod import bin_exp_mod



def 			_lowerCAmelCase       (					__lowerCAmelCase  ,  __lowerCAmelCase=1000      )   ->					str:


				"""simple docstring"""

				if n < 2:
								return False

				if n % 2 == 0:
								return n == 2

				# this means n is odd
				snake_case__	:      Tuple     		=	n - 1
				snake_case__	:      Tuple     		=	0
				while d % 2 == 0:
								d /= 2
								exp += 1

				# n - 1=d*(2**exp)
				snake_case__	:      List[str]     		=	0
				while count < prec:
								snake_case__	:      List[str]     		=	random.randint(2  ,  n - 1      )
								snake_case__	:      Optional[Any]     		=	bin_exp_mod(__lowerCAmelCase  ,  __lowerCAmelCase  ,  __lowerCAmelCase      )
								if b != 1:
												snake_case__	:      List[Any]     		=	True
												for _ in range(__lowerCAmelCase      ):
																if b == n - 1:
																				snake_case__	:      List[str]     		=	False
																				break
																snake_case__	:      str     		=	b * b
																b %= n
												if flag:
																return False
												count += 1
				return True


if __name__ == "__main__":
				A__								=						abs(int(input('''Enter bound : ''').strip()))
				print('''Here\'s the list of primes:''')
				print(''', '''.join(str(i) for i in range(n + 1) if is_prime_big(i)))

