

'''simple docstring'''

from __future__ import annotations





def __snake_case (				UpperCAmelCase_						:						int		):
 for r in range(1 ,    UpperCAmelCase_		):
  lowerCamelCase_								=  []
  for x in range(n - 1		):
   lowerCamelCase_								=  pow(UpperCAmelCase_ ,    UpperCAmelCase_ ,    UpperCAmelCase_		)
   if val in li:
    break
   li.append(UpperCAmelCase_		)
  else:
   return r
 return None


if __name__ == "__main__":
     a_  :    Any      =			int(input("""Enter a prime number q: """))
     a_  :    Any      =			find_primitive(q)
     if a is None:
          print(f'''Cannot find the primitive for the value: {a!r}''')
     else:
          a_  :    List[str]      =			int(input("""Enter private key of A: """))
          a_  :    int      =			pow(a, a_private, q)
          a_  :    Tuple      =			int(input("""Enter private key of B: """))
          a_  :    Union[str, Any]      =			pow(a, b_private, q)

          a_  :    Union[str, Any]      =			pow(b_public, a_private, q)
          a_  :    Dict      =			pow(a_public, b_private, q)

          print("""The key value generated by A is: """, a_secret)
          print("""The key value generated by B is: """, b_secret)







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





  """simple docstring"""




  def   snake_case		(   self					):







   """simple docstring"""
   lowerCamelCase_								=  tf.constant([-100, -1.0, -0.1, 0, 0.1, 1.0, 100.0]					)
   lowerCamelCase_								=  get_tf_activation("gelu"					)
   lowerCamelCase_								=  get_tf_activation("gelu_10"					)

   lowerCamelCase_								=  gelu(UpperCamelCase					)
   lowerCamelCase_								=  geluaa(UpperCamelCase					)

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

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







  def   snake_case		(   self					):







   """simple docstring"""
   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(UpperCamelCase					):
    get_tf_activation("bogus"					)
   with self.assertRaises(UpperCamelCase					):
    get_tf_activation(UpperCamelCase					)



