






"""simple docstring"""





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    UpperCamelCase       (       self     :							Union[str, Any]					)     ->		Tuple:
      lowerCamelCase_         =						pipeline(
          task='zero-shot-audio-classification'       ,						model='hf-internal-testing/tiny-clap-htsat-unfused'					)
      lowerCamelCase_         =						load_dataset('ashraq/esc50'					)
      lowerCamelCase_         =						dataset['''train''']['''audio'''][-1]['''array''']
      lowerCamelCase_         =						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    UpperCamelCase       (       self     :							Optional[Any]					)     ->		Tuple:
      pass






    @slow
    @require_torch
    def    UpperCamelCase       (       self     :							Optional[int]					)     ->		int:
      lowerCamelCase_         =						pipeline(
          task='zero-shot-audio-classification'       ,						model='laion/clap-htsat-unfused'       ,						)
      # This is an audio of a dog
      lowerCamelCase_         =						load_dataset('ashraq/esc50'					)
      lowerCamelCase_         =						dataset['''train''']['''audio'''][-1]['''array''']
      lowerCamelCase_         =						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'},
          ]       ,						)

      lowerCamelCase_         =						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       ,						)
      lowerCamelCase_         =						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    UpperCamelCase       (       self     :							Union[str, Any]					)     ->		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)))

