



"""simple docstring"""





def 	__UpperCAmelCase					(       snake_case_  :  str = "mytext.txt"   ,	snake_case_  :  bool = False   )							->	None:






   """simple docstring"""


   import socket

   _lowerCAmelCase					     =		12312  # Reserve a port for your service.
   _lowerCAmelCase					     =		socket.socket()  # Create a socket object
   _lowerCAmelCase					     =		socket.gethostname()  # Get local machine name
   sock.bind((host, port)   )  # Bind to the port
   sock.listen(5   )  # Now wait for client connection.

   print("""Server listening...."""   )

   while True:
      _lowerCAmelCase     ,						_lowerCAmelCase					     =		sock.accept()  # Establish connection with client.
      print(F"""Got connection from {addr}"""   )
      _lowerCAmelCase					     =		conn.recv(1024   )
      print(F"""Server received: {data = }"""   )

      with open(snake_case_   ,	"""rb"""   ) as in_file:
         _lowerCAmelCase					     =		in_file.read(1024   )
         while data:
            conn.send(snake_case_   )
            print(F"""Sent {data!r}"""   )
            _lowerCAmelCase					     =		in_file.read(1024   )

      print("""Done sending"""   )
      conn.close()
      if testing:  # Allow the test to complete
         break

   sock.shutdown(1   )
   sock.close()


if __name__ == "__main__":
  send_file()




"""simple docstring"""





def 	__UpperCAmelCase					(       snake_case_  :  Optional[int]   ,	snake_case_  :  List[str]   )							->	Optional[int]:






   """simple docstring"""


   if n < 0:
      return 0
   # table[i] represents the number of ways to get to amount i
   _lowerCAmelCase					     =		[0] * (n + 1)

   # There is exactly 1 way to get to zero(You pick no coins).
   _lowerCAmelCase					     =		1

   # Pick all coins one by one and update table[] values
   # after the index greater than or equal to the value of the
   # picked coin
   for coin_val in s:
      for j in range(snake_case_   ,	n + 1   ):
         table[j] += table[j - coin_val]

   return table[n]


if __name__ == "__main__":
  import doctest

  doctest.testmod()