



'''simple docstring'''

import socket






def 		_snake_case		( )      ->						Optional[int]:







	"""simple docstring"""
	lowerCAmelCase   =     socket.socket(socket.AF_INET							,		socket.SOCK_STREAM							)
	lowerCAmelCase   =     socket.gethostname()
	lowerCAmelCase   =     12_312

	sock.connect((host, port)							)
	sock.send(B"""Hello server!"""							)

	with open("""Received_file"""							,		"""wb"""							) as out_file:
		print("""File opened"""							)
		print("""Receiving data..."""							)
		while True:
			lowerCAmelCase   =     sock.recv(1_024							)
			if not data:
				break
			out_file.write(_A							)

	print("""Successfully received the file"""							)
	sock.close()
	print("""Connection closed"""							)


if __name__ == "__main__":
				main()




'''simple docstring'''

from torch import nn






def 		_snake_case		( _SCREAMING_SNAKE_CASE					:						Optional[int]							)      ->						Union[str, Any]:







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