




"""simple docstring"""


import socket


def 					UpperCAmelCase__       ():
  """simple docstring"""

  _snake_case							:		int								=  socket.socket(socket.AF_INET		,   socket.SOCK_STREAM    )
  _snake_case							:		int								=  socket.gethostname()
  _snake_case							:		Any								=  1_23_12

  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:
      _snake_case							:		Dict								=  sock.recv(10_24    )
      if not data:
        break
      out_file.write(snake_case__    )

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


if __name__ == "__main__":
     main()








"""simple docstring"""


from __future__ import annotations


def 					UpperCAmelCase__       (snake_case__							:					list[float]    ):
  """simple docstring"""

  _snake_case							:		int								=  0.00
  _snake_case							:		int								=  0
  for resistor in resistors:
    if resistor <= 0:
      _snake_case							:		Dict								=  F"Resistor at index {index} has a negative or zero value!"
      raise ValueError(snake_case__    )
    first_sum += 1 / float(snake_case__    )
    index += 1
  return 1 / first_sum


def 					UpperCAmelCase__       (snake_case__							:					list[float]    ):
  """simple docstring"""

  _snake_case							:		Union[str, Any]								=  0.00
  _snake_case							:		Any								=  0
  for resistor in resistors:
    sum_r += resistor
    if resistor < 0:
      _snake_case							:		Any								=  F"Resistor at index {index} has a negative value!"
      raise ValueError(snake_case__    )
    index += 1
  return sum_r


if __name__ == "__main__":
     import doctest

     doctest.testmod()


