
"""simple docstring"""







import socket
def     __lowerCAmelCase				():
	__lowerCAmelCase			:						Dict									=      socket.socket(socket.AF_INET       ,  socket.SOCK_STREAM		)
	__lowerCAmelCase			:						Union[str, Any]									=      socket.gethostname()
	__lowerCAmelCase			:						int									=      1_2312

	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			:						Dict									=      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()






def        SCREAMING_SNAKE_CASE      (       _UpperCAmelCase						,	_UpperCAmelCase )			->     bool:
    lowerCamelCase__    :      List[str]					 =		len(_UpperCAmelCase )
    lowerCamelCase__    :      str					 =		[[False] * (required_sum + 1) for _ in range(arr_len + 1 )]

    # for each arr value, a sum of zero(0) can be formed by not taking any element
    # hence True/1
    for i in range(arr_len + 1 ):
        lowerCamelCase__    :      Tuple					 =		True

    # sum is not zero and set is empty then false
    for i in range(1						,	required_sum + 1 ):
        lowerCamelCase__    :      Dict					 =		False

    for i in range(1						,	arr_len + 1 ):
        for j in range(1						,	required_sum + 1 ):
            if arr[i - 1] > j:
                lowerCamelCase__    :      str					 =		subset[i - 1][j]
            if arr[i - 1] <= j:
                lowerCamelCase__    :      Dict					 =		subset[i - 1][j] or subset[i - 1][j - arr[i - 1]]

    return subset[arr_len][required_sum]


if __name__ == "__main__":
    import doctest

    doctest.testmod()





