


from torch import nn






def  __lowerCAmelCase					(SCREAMING_SNAKE_CASE      )->						str:




      """simple docstring"""

      if act_fn in ["swish", "silu"]:
            return nn.SiLU()
      elif act_fn == "mish":
            return nn.Mish()
      elif act_fn == "gelu":
            return nn.GELU()
      else:
            raise ValueError(f'''Unsupported activation function: {act_fn}'''      )



import requests






def  __lowerCAmelCase					(SCREAMING_SNAKE_CASE      ,      SCREAMING_SNAKE_CASE      )->						None:




      """simple docstring"""

      snake_case_ =   {'''Content-Type''': '''application/json'''}
      snake_case_ =   requests.post(SCREAMING_SNAKE_CASE      ,      json={'''text''': message_body}      ,      headers=SCREAMING_SNAKE_CASE      )
      if response.status_code != 200:
            snake_case_ =   (
                '''Request to slack returned an error '''
                f'''{response.status_code}, the response is:\n{response.text}'''
            )
            raise ValueError(SCREAMING_SNAKE_CASE      )


if __name__ == "__main__":
   # Set the slack url to the one provided by Slack when you create the webhook at
   # https://my.slack.com/services/new/incoming-webhook/
   send_slack_message("""<YOUR MESSAGE BODY>""", """<SLACK CHANNEL URL>""")