




'''simple docstring'''



import unittest

import torch
from torch import nn

from diffusers.models.activations import get_activation







class 		lowercase_   (			unittest.TestCase       ):


   """simple docstring"""

   def 							lowerCAmelCase_      (   self :     List[str]   ):

      """simple docstring"""
      _SCREAMING_SNAKE_CASE	=				get_activation("swish"   )

      self.assertIsInstance(__lowerCamelCase  ,				nn.SiLU   )

      self.assertEqual(act(torch.tensor(-1_0_0  ,				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(2_0  ,				dtype=torch.floataa   )   ).item()  ,				2_0   )



   def 							lowerCAmelCase_      (   self :     Any   ):

      """simple docstring"""
      _SCREAMING_SNAKE_CASE	=				get_activation("silu"   )

      self.assertIsInstance(__lowerCamelCase  ,				nn.SiLU   )

      self.assertEqual(act(torch.tensor(-1_0_0  ,				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(2_0  ,				dtype=torch.floataa   )   ).item()  ,				2_0   )



   def 							lowerCAmelCase_      (   self :     Dict   ):

      """simple docstring"""
      _SCREAMING_SNAKE_CASE	=				get_activation("mish"   )

      self.assertIsInstance(__lowerCamelCase  ,				nn.Mish   )

      self.assertEqual(act(torch.tensor(-2_0_0  ,				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(2_0  ,				dtype=torch.floataa   )   ).item()  ,				2_0   )



   def 							lowerCAmelCase_      (   self :     List[Any]   ):

      """simple docstring"""
      _SCREAMING_SNAKE_CASE	=				get_activation("gelu"   )

      self.assertIsInstance(__lowerCamelCase  ,				nn.GELU   )

      self.assertEqual(act(torch.tensor(-1_0_0  ,				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(2_0  ,				dtype=torch.floataa   )   ).item()  ,				2_0   )










'''simple docstring'''



def 			SCREAMING_SNAKE_CASE_			(							__A    :			list  )			->			list:
   if len(__A  ) <= 1:
      return lst

   _SCREAMING_SNAKE_CASE	=				1

   while i < len(__A  ):
      if lst[i - 1] <= lst[i]:
         i += 1
      else:
         _SCREAMING_SNAKE_CASE,	_SCREAMING_SNAKE_CASE	=				lst[i], lst[i - 1]
         i -= 1
         if i == 0:
            _SCREAMING_SNAKE_CASE	=				1

   return lst


if __name__ == "__main__":
 lowerCamelCase_			=						input('Enter numbers separated by a comma:\n').strip()
 lowerCamelCase_			=						[int(item) for item in user_input.split(',')]
 print(gnome_sort(unsorted))

