
'''simple docstring'''

def 	_UpperCAmelCase				(  _lowerCamelCase						:       str = "mytext.txt"  ,      _lowerCamelCase						:       bool = False		)    ->						None:
  import socket

  _lowerCAmelCase       :  Optional[Any]   				=					1_23_12  # Reserve a port for your service.
  _lowerCAmelCase       :  List[str]   				=					socket.socket()  # Create a socket object
  _lowerCAmelCase       :  Any   				=					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       :  int   				=					sock.accept()  # Establish connection with client.
    print(f'Got connection from {addr}'		)
    _lowerCAmelCase       :  Union[str, Any]   				=					conn.recv(10_24		)
    print(f'Server received: {data = }'		)

    with open(_lowerCamelCase  ,      """rb"""		) as in_file:
      _lowerCAmelCase       :  Optional[int]   				=					in_file.read(10_24		)
      while data:
        conn.send(_lowerCamelCase		)
        print(f'Sent {data!r}'		)
        _lowerCAmelCase       :  Optional[int]   				=					in_file.read(10_24		)

    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'''

import os


def 	_UpperCAmelCase				(  )    ->						int:
  _lowerCAmelCase       :  Optional[int]   				=					os.path.dirname(os.path.realpath(_lowerCamelCase		)		)
  _lowerCAmelCase       :  Optional[Any]   				=					os.path.join(_lowerCamelCase  ,      """triangle.txt"""		)

  with open(_lowerCamelCase		) as in_file:
    _lowerCAmelCase       :  List[Any]   				=					[[int(_lowerCamelCase		) for i in line.split()] for line in in_file]

  while len(_lowerCamelCase		) != 1:
    _lowerCAmelCase       :  Any   				=					triangle.pop()
    _lowerCAmelCase       :  List[str]   				=					triangle[-1]
    for j in range(len(_lowerCamelCase		) - 1		):
      curr_row[j] += max(last_row[j]  ,      last_row[j + 1]		)
  return triangle[0][0]


if __name__ == "__main__":
     print(solution())


