



"""simple docstring"""






from datetime import datetime

import requests
from bsa import BeautifulSoup

if __name__ == "__main__":
   lowerCAmelCase__        =				input('''Enter image url: ''').strip()
   print(F"""Downloading image from {url} ...""")
   lowerCAmelCase__        =				BeautifulSoup(requests.get(url).content, '''html.parser''')
   # The image URL is in the content field of the first meta tag with property og:image
   lowerCAmelCase__        =				soup.find('''meta''', {'''property''': '''og:image'''})['''content''']
   lowerCAmelCase__        =				requests.get(image_url).content
   lowerCAmelCase__        =				F"""{datetime.now():%Y-%m-%d_%H:%M:%S}.jpg"""
   with open(file_name, '''wb''') as fp:
      fp.write(image_data)
   print(F"""Done. Image saved to disk as {file_name}.""")








from torch import nn


def 						lowerCamelCase__    (		_A							):







	'''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}"							)
