original_docstring: 
          Send ping to the target host
          
docstring: Send ping to the target host
docstring_tokens: Send ping to the target host
code: def send_ping(self, sock,  ID):
          """
          Send ping to the target host
          """
          target_addr  =  socket.gethostbyname(self.target_host)
       
          my_checksum = 0
       
          # Create a dummy heder with a 0 checksum.
          header = struct.pack("bbHHh", ICMP_ECHO_REQUEST, 0, my_checksum, ID, 1)
          bytes_In_double = struct.calcsize("d")
          data = (192 - bytes_In_double) * "Q"
          data = struct.pack("d", time.time()) + bytes(data.encode('utf-8'))
       
          # Get the checksum on the data and the dummy header.
          my_checksum = self.do_checksum(header + data)
          header = struct.pack(
              "bbHHh", ICMP_ECHO_REQUEST, 0, socket.htons(my_checksum), ID, 1
          )
          packet = header + data
          sock.sendto(packet, (target_addr, 1))
code_tokens: def send_ping ( self , sock , ID ) : target_addr = socket . gethostbyname ( self . target_host ) my_checksum = 0 header = struct . pack ( "bbHHh" , ICMP_ECHO_REQUEST , 0 , my_checksum , ID , 1 ) bytes_In_double = struct . calcsize ( "d" ) data = ( 192 - bytes_In_double ) * "Q" data = struct . pack ( "d" , time . time ( ) ) + bytes ( data . encode ( 'utf-8' ) ) my_checksum = self . do_checksum ( header + data ) header = struct . pack ( "bbHHh" , ICMP_ECHO_REQUEST , 0 , socket . htons ( my_checksum ) , ID , 1 ) packet = header + data sock . sendto ( packet , ( target_addr , 1 ) )
short_docstring: Send ping to the target host
short_docstring_tokens: Send ping to the target host
comment: """
          Send ping to the target host
          """$SEP$# Create a dummy heder with a 0 checksum.$SEP$# Get the checksum on the data and the dummy header.