"""simple docstring"""



from __future__ import annotations



def 	_lowerCamelCase(	a   ,    a   ,    a   ,    a				):  # noqa: E741



       while r - l > 1:
              __a       =    (l + r) // 2
              if v[m] >= key:
                     __a       =    m
              else:
                     __a       =    m  # noqa: E741
       return r



def 	_lowerCamelCase(	a				):



       if len(UpperCAmelCase__				) == 0:
              return 0

       __a       =    [0] * len(UpperCAmelCase__				)
       __a       =    1

       __a       =    v[0]

       for i in range(1   ,    len(UpperCAmelCase__				)				):
              if v[i] < tail[0]:
                     __a       =    v[i]
              elif v[i] > tail[length - 1]:
                     __a       =    v[i]
                     length += 1
              else:
                     __a       =    v[i]

       return length


if __name__ == "__main__":
   import doctest

   doctest.testmod()





import socket

def      __lowercase(						):


      """simple docstring"""



      lowerCamelCase             =		socket.socket(socket.AF_INET , socket.SOCK_STREAM			)
      lowerCamelCase             =		socket.gethostname()
      lowerCamelCase             =		12312

      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(1024			)
                  if not data:
                        break
                  out_file.write(UpperCAmelCase__			)

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


if __name__ == "__main__":
     main()