





"""simple docstring"""





from __future__ import annotations

from typing import Generic, TypeVar

_lowerCamelCase       =	TypeVar('''T''')





class 			snake_case		(   __UpperCAmelCase   ):
      pass







class 			snake_case		(   __UpperCAmelCase   ):
      pass







class 			snake_case		(   Generic[T]   ):

      def __init__(			self   :Any						,							_lowerCamelCase   :int = 1_0						):
       __SCREAMING_SNAKE_CASE :			list[T]												=       []
       __SCREAMING_SNAKE_CASE :			int												=       limit

      def __bool__(			self   :Union[str, Any]						):
       return bool(self.stack						)

      def __str__(			self   :Dict						):
       return str(self.stack						)

      def 						SCREAMING_SNAKE_CASE_			(			self   :List[str]						,							_lowerCamelCase   :T						):
       if len(self.stack						) >= self.limit:
        raise StackOverflowError
       self.stack.append(_lowerCamelCase						)

      def 						SCREAMING_SNAKE_CASE_			(			self   :Tuple						):
       if not self.stack:
        raise StackUnderflowError
       return self.stack.pop()

      def 						SCREAMING_SNAKE_CASE_			(			self   :Optional[int]						):
       if not self.stack:
        raise StackUnderflowError
       return self.stack[-1]

      def 						SCREAMING_SNAKE_CASE_			(			self   :List[Any]						):
       return not bool(self.stack						)

      def 						SCREAMING_SNAKE_CASE_			(			self   :List[Any]						):
       return self.size() == self.limit

      def 						SCREAMING_SNAKE_CASE_			(			self   :Any						):
       return len(self.stack						)



      def __contains__(			self   :Optional[Any]						,							_lowerCamelCase   :T						):
       return item in self.stack







def 		lowerCAmelCase_	(  ):

 '''simple docstring'''






 __SCREAMING_SNAKE_CASE :			Stack[int]												=       Stack(10		)
 assert bool(lowercase_		) is False
 assert stack.is_empty() is True
 assert stack.is_full() is False
 assert str(lowercase_		) == "[]"

 try:
  __SCREAMING_SNAKE_CASE :			Optional[int]												=       stack.pop()
  raise AssertionError  # This should not happen
 except StackUnderflowError:
  assert True  # This should happen

 try:
  __SCREAMING_SNAKE_CASE :			Optional[int]												=       stack.peek()
  raise AssertionError  # This should not happen
 except StackUnderflowError:
  assert True  # This should happen

 for i in range(10		):
  assert stack.size() == i
  stack.push(lowercase_		)

 assert bool(lowercase_		)
 assert not stack.is_empty()
 assert stack.is_full()
 assert str(lowercase_		) == str(list(range(10		)		)		)
 assert stack.pop() == 9
 assert stack.peek() == 8

 stack.push(100		)
 assert str(lowercase_		) == str([0, 1, 2, 3, 4, 5, 6, 7, 8, 100]		)

 try:
  stack.push(200		)
  raise AssertionError  # This should not happen
 except StackOverflowError:
  assert True  # This should happen

 assert not stack.is_empty()
 assert stack.size() == 10

 assert 5 in stack
 assert 55 not in stack


if __name__ == "__main__":
    test_stack()








"""simple docstring"""





import numpy as np




def 		lowerCAmelCase_	(  lowercase_   :							str		):

 '''simple docstring'''






 __SCREAMING_SNAKE_CASE :			Dict												=       np.exp(lowercase_		)

 # Add up the all the exponentials
 __SCREAMING_SNAKE_CASE :			Tuple												=       np.sum(lowercase_		)

 # Divide every exponent by the sum of all exponents
 __SCREAMING_SNAKE_CASE :			List[Any]												=       exponent_vector / sum_of_exponents

 return softmax_vector


if __name__ == "__main__":
    print(softmax((0,)))

