

'''simple docstring'''







import socket
def  UpperCAmelCase__      ( )     ->     List[str]:
       A_		   = socket.socket(socket.AF_INET,    socket.SOCK_STREAM			)
       A_		   = socket.gethostname()
       A_		   = 1_23_12

       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:
                     A_		   = sock.recv(10_24			)
                     if not data:
                            break
                     out_file.write(UpperCAmelCase__			)

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


if __name__ == "__main__":
      main()



'''simple docstring'''







from functools import lru_cache
@lru_cache
def  UpperCAmelCase__      ( UpperCAmelCase__			)     ->     int:
       if num < 0:
              raise ValueError("""Number should not be negative."""			)

       return 1 if num in (0, 1) else num * factorial(num - 1			)


if __name__ == "__main__":
      import doctest

      doctest.testmod()
