'''simple docstring'''

import unittest

import numpy as np

from transformers import is_tf_available
from transformers.testing_utils import require_tf


if is_tf_available():
						import tensorflow as tf

						from transformers.activations_tf import get_tf_activation




@require_tf
class 		SCREAMING_SNAKE_CASE_				(unittest.TestCase			):



			"""simple docstring"""






			def      lowerCamelCase   (       self				):
									snake_case   :					Any							=						tf.constant([-100, -1.0, -0.1, 0, 0.1, 1.0, 100.0]				)
									snake_case   :					str							=						get_tf_activation("gelu"				)
									snake_case   :					Optional[int]							=						get_tf_activation("gelu_10"				)

									snake_case   :					Optional[Any]							=						gelu(snake_case_				)
									snake_case   :					Optional[Any]							=						geluaa(snake_case_				)

									snake_case   :					List[Any]							=						tf.where(y_gelu_aa < 10.0							, 1.0							, 0.0				)

									self.assertEqual(tf.math.reduce_max(snake_case_				).numpy().item()							, 10.0				)
									self.assertTrue(np.allclose(y_gelu * clipped_mask							, y_gelu_aa * clipped_mask				)				)






			def      lowerCamelCase   (       self				):
									get_tf_activation("gelu"				)
									get_tf_activation("gelu_10"				)
									get_tf_activation("gelu_fast"				)
									get_tf_activation("gelu_new"				)
									get_tf_activation("glu"				)
									get_tf_activation("mish"				)
									get_tf_activation("quick_gelu"				)
									get_tf_activation("relu"				)
									get_tf_activation("sigmoid"				)
									get_tf_activation("silu"				)
									get_tf_activation("swish"				)
									get_tf_activation("tanh"				)
									with self.assertRaises(snake_case_				):
															get_tf_activation("bogus"				)
									with self.assertRaises(snake_case_				):
															get_tf_activation(snake_case_				)






'''simple docstring'''

import math


def 					UpperCAmelCase__      (							_lowerCAmelCase						: int)						->		bool:



						"""simple docstring"""

						if 1 < number < 4:
												# 2 and 3 are primes
												return True
						elif number < 2 or number % 2 == 0 or number % 3 == 0:
												# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
												return False

						# All primes number are in format of 6k +/- 1
						for i in range(5,			int(math.sqrt(_lowerCAmelCase) + 1),			6):
												if number % i == 0 or number % (i + 2) == 0:
																		return False
						return True


def 					UpperCAmelCase__      (							_lowerCAmelCase						: int = 200_0000)						->		int:



						"""simple docstring"""

						return sum(num for num in range(3,			_lowerCAmelCase,			2) if is_prime(_lowerCAmelCase)) + 2 if n > 2 else 0


if __name__ == "__main__":
						print(f"{solution() = }")





