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





       """simple docstring"""




       def 				UpperCamelCase (							self					)			->	int:
          _SCREAMING_SNAKE_CASE          = tf.constant([-1_00, -1.0, -0.1, 0, 0.1, 1.0, 100.0]					)
          _SCREAMING_SNAKE_CASE          = get_tf_activation("""gelu"""					)
          _SCREAMING_SNAKE_CASE          = get_tf_activation("""gelu_10"""					)

          _SCREAMING_SNAKE_CASE          = gelu(A__					)
          _SCREAMING_SNAKE_CASE          = geluaa(A__					)

          _SCREAMING_SNAKE_CASE          = tf.where(y_gelu_aa < 10.0				,							1.0				,							0.0					)

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






       def 				UpperCamelCase (							self					)			->	Optional[int]:
          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(A__					):
             get_tf_activation("""bogus"""					)
          with self.assertRaises(A__					):
             get_tf_activation(A__					)










'''simple docstring'''







import sys

sys.set_int_max_str_digits(0)  # type: ignore






def       lowerCAmelCase__       (				lowerCamelCase     :			int   ):
       _A     :	Optional[Any]      =					[0] * 11
       _A     :	str      =					[0] * 11

       # mark last 9 numbers
       for _ in range(9   ):
              _A     :	int      =					1
              _A     :	Optional[int]      =					number // 10
       # flag
       _A     :	List[Any]      =					True

       # check last 9 numbers for pandigitality

       for x in range(9   ):
              if not check_last[x + 1]:
                     _A     :	Optional[int]      =					False
       if not f:
              return f

       # mark first 9 numbers
       _A     :	Optional[int]      =					int(str(lowerCamelCase   )[:9]   )

       for _ in range(9   ):
              _A     :	Optional[Any]      =					1
              _A     :	str      =					number // 10

       # check first 9 numbers for pandigitality

       for x in range(9   ):
              if not check_front[x + 1]:
                     _A     :	Optional[Any]      =					False
       return f






def       lowerCAmelCase__       (				lowerCamelCase     :			int   ):
       _A     :	Dict      =					[0] * 11

       # mark last 9 numbers
       for _ in range(9   ):
              _A     :	List[str]      =					1
              _A     :	Dict      =					number // 10
       # flag
       _A     :	Optional[int]      =					True

       # check last 9 numbers for pandigitality

       for x in range(9   ):
              if not check_last[x + 1]:
                     _A     :	List[str]      =					False
       return f






def       lowerCAmelCase__       (				):
       _A     :	List[Any]      =					1
       _A     :	Dict      =					1
       _A     :	Dict      =					2
       # temporary Fibonacci numbers

       _A     :	List[Any]      =					1
       _A     :	Union[str, Any]      =					1
       _A     :	List[Any]      =					2
       # temporary Fibonacci numbers mod 1e9

       # mod m=1e9, done for fast optimisation
       _A     :	Tuple      =					[0] * 1000000
       _A     :	Any      =					1000000000

       for x in range(1000000   ):
              _A     :	Tuple      =					(aa + ba) % m
              _A     :	Optional[Any]      =					ba % m
              _A     :	str      =					ca % m
              if checka(lowerCamelCase   ):
                     _A     :	Dict      =					1

       for x in range(1000000   ):
              _A     :	List[str]      =					a + b
              _A     :	Optional[int]      =					b
              _A     :	str      =					c
              # perform check only if in tocheck
              if tocheck[x + 3] and check(lowerCamelCase   ):
                     return x + 3  # first 2 already done
       return -1


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






