
import operator as op


def 				A	( lowercase			)       ->  Dict:
		'''simple docstring'''

		UpperCamelCase          =					[]
		UpperCamelCase          =					lambda lowercase   ,	lowercase			: int(x / y			)  # noqa: E731 integer division operation
		UpperCamelCase          =					{
		    '^': op.pow,
		    '*': op.mul,
		    '/': div,
		    '+': op.add,
		    '-': op.sub,
		}  # operators & their respective operation

		# print table header
		print('Symbol'.center(8			)   ,	'Action'.center(12			)   ,	'Stack'   ,	sep=' | '			)
		print('-' * (30 + len(lowercase			))			)

		for x in post_fix:
				if x.isdigit():  # if x in digit
						stack.append(lowercase			)  # append x to stack
						# output in tabular format
						print(x.rjust(8			)   ,	('push(' + x + ')').ljust(12			)   ,	','.join(lowercase			)   ,	sep=' | '			)
				else:
						UpperCamelCase          =					stack.pop()  # pop stack
						# output in tabular format
						print(''.rjust(8			)   ,	('pop(' + b + ')').ljust(12			)   ,	','.join(lowercase			)   ,	sep=' | '			)

						UpperCamelCase          =					stack.pop()  # pop stack
						# output in tabular format
						print(''.rjust(8			)   ,	('pop(' + a + ')').ljust(12			)   ,	','.join(lowercase			)   ,	sep=' | '			)

						stack.append(
						    str(opr[x](int(lowercase			)   ,	int(lowercase			)			)			)			)  # evaluate the 2 values popped from stack & push result to stack
						# output in tabular format
						print(
						    x.rjust(8			)   ,	('push(' + a + x + b + ')').ljust(12			)   ,	','.join(lowercase			)   ,	sep=' | '   ,	)

		return int(stack[0]			)


if __name__ == "__main__":
					_UpperCAmelCase :			Tuple              =	input("\n\nEnter a Postfix Equation (space separated) = ").split(" ")
					print("\n\tResult = ", solve(Postfix))


import unittest

import torch
from torch import nn

from diffusers.models.activations import get_activation


class     lowercase (		unittest.TestCase       ):



		def __UpperCamelCase			(			self	)  -> List[Any]:
				"""simple docstring"""
				UpperCamelCase          =					get_activation('swish'	)

				self.assertIsInstance(A_    ,				nn.SiLU	)

				self.assertEqual(act(torch.tensor(-100    ,				dtype=torch.floataa	)	).item()    ,				0	)
				self.assertNotEqual(act(torch.tensor(-1    ,				dtype=torch.floataa	)	).item()    ,				0	)
				self.assertEqual(act(torch.tensor(0    ,				dtype=torch.floataa	)	).item()    ,				0	)
				self.assertEqual(act(torch.tensor(20    ,				dtype=torch.floataa	)	).item()    ,				20	)



		def __UpperCamelCase			(			self	)  -> Optional[int]:
				"""simple docstring"""
				UpperCamelCase          =					get_activation('silu'	)

				self.assertIsInstance(A_    ,				nn.SiLU	)

				self.assertEqual(act(torch.tensor(-100    ,				dtype=torch.floataa	)	).item()    ,				0	)
				self.assertNotEqual(act(torch.tensor(-1    ,				dtype=torch.floataa	)	).item()    ,				0	)
				self.assertEqual(act(torch.tensor(0    ,				dtype=torch.floataa	)	).item()    ,				0	)
				self.assertEqual(act(torch.tensor(20    ,				dtype=torch.floataa	)	).item()    ,				20	)



		def __UpperCamelCase			(			self	)  -> str:
				"""simple docstring"""
				UpperCamelCase          =					get_activation('mish'	)

				self.assertIsInstance(A_    ,				nn.Mish	)

				self.assertEqual(act(torch.tensor(-200    ,				dtype=torch.floataa	)	).item()    ,				0	)
				self.assertNotEqual(act(torch.tensor(-1    ,				dtype=torch.floataa	)	).item()    ,				0	)
				self.assertEqual(act(torch.tensor(0    ,				dtype=torch.floataa	)	).item()    ,				0	)
				self.assertEqual(act(torch.tensor(20    ,				dtype=torch.floataa	)	).item()    ,				20	)



		def __UpperCamelCase			(			self	)  -> Union[str, Any]:
				"""simple docstring"""
				UpperCamelCase          =					get_activation('gelu'	)

				self.assertIsInstance(A_    ,				nn.GELU	)

				self.assertEqual(act(torch.tensor(-100    ,				dtype=torch.floataa	)	).item()    ,				0	)
				self.assertNotEqual(act(torch.tensor(-1    ,				dtype=torch.floataa	)	).item()    ,				0	)
				self.assertEqual(act(torch.tensor(0    ,				dtype=torch.floataa	)	).item()    ,				0	)
				self.assertEqual(act(torch.tensor(20    ,				dtype=torch.floataa	)	).item()    ,				20	)
