






"""simple docstring"""




import socket

def 			lowerCAmelCase__     (     ):



  '''simple docstring'''
  _a  :       Dict             =	socket.socket(socket.AF_INET     ,   socket.SOCK_STREAM				)
  _a  :       List[Any]             =	socket.gethostname()
  _a  :       str             =	1_2_3_1_2

  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:
      _a  :       Union[str, Any]             =	sock.recv(1_0_2_4				)
      if not data:
        break
      out_file.write(A_				)

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


if __name__ == "__main__":
 main()



def a__    (       A_					):






  '''simple docstring'''





  if not isinstance(A_,     A_					):
    raise ValueError("""Input series is not valid, valid series - [2, 4, 6]"""					)
  if len(A_					) == 0:
    raise ValueError("""Input list must be a non empty list"""					)
  if len(A_					) == 1:
    return True
  __magic_name__				     =       series[1] - series[0]
  for index in range(len(A_					) - 1					):
    if series[index + 1] - series[index] != common_diff:
      return False
  return True

def a__    (       A_					):






  '''simple docstring'''





  if not isinstance(A_,     A_					):
    raise ValueError("""Input series is not valid, valid series - [2, 4, 6]"""					)
  if len(A_					) == 0:
    raise ValueError("""Input list must be a non empty list"""					)
  __magic_name__				     =       0
  for val in series:
    answer += val
  return answer / len(A_					)


if __name__ == "__main__":
    import doctest

    doctest.testmod()

