

def 			_lowercase    (      __UpperCamelCase     :		str = "mytext.txt"   ,       __UpperCamelCase     :		bool = False ):
      import socket

      snake_case__					=   1_2312  # Reserve a port for your service.
      snake_case__					=   socket.socket()  # Create a socket object
      snake_case__					=   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:
            snake_case__	,			snake_case__					=   sock.accept()  # Establish connection with client.
            print(F'''Got connection from {addr}''' )
            snake_case__					=   conn.recv(1024 )
            print(F'''Server received: {data = }''' )

            with open(__UpperCamelCase   ,       """rb""" ) as in_file:
                  snake_case__					=   in_file.read(1024 )
                  while data:
                        conn.send(__UpperCamelCase )
                        print(F'''Sent {data!r}''' )
                        snake_case__					=   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()









from doctest import testmod
from math import sqrt





def 			_lowercase    (      __UpperCamelCase     :		int ):
      snake_case__					=   []
      if num < 1:
            return facs
      facs.append(1 )
      if num == 1:
            return facs
      facs.append(__UpperCamelCase )
      for i in range(2   ,       int(sqrt(__UpperCamelCase ) ) + 1 ):
            if num % i == 0:  # If i is a factor of num
                  facs.append(__UpperCamelCase )
                  snake_case__					=   num // i  # num//i is the other factor of num
                  if d != i:  # If d and i are distinct
                        facs.append(__UpperCamelCase )  # we have found another factor
      facs.sort()
      return facs


if __name__ == "__main__":
       testmod(name='''factors_of_a_number''', verbose=True)






