def getUniqueIps(all_ip_address):
    iterator = 0
    counted_ip_address = Counter(all_ip_address)
    unique_ip_address = []
    print('=== Creating list of unique IPs. ===')
    logsize = len(counted_ip_address)
    for address in counted_ip_address:
        try:
            this_addr = address
            this_count = counted_ip_address[address]
            newIpAddress = IpAddress(this_addr, this_count)
            unique_ip_address.append(newIpAddress)
            iterator = (iterator + 1)
            if ((iterator % 1000) == 0):
                percentDone = round(Decimal(((iterator / logsize) * 100)), 2)
                string = (((((('Currently: Creating Unique IP List. Entry ' + str(iterator)) + ' of ') + str(logsize)) + ' Percent Done: ') + str(percentDone)) + '%.')
                print(string, end='\r')
        except UserWarning:
            print('\nError creating IP address object!')
            print('Crash data:')
            print('\tThe address line was:')
            print(address)
    percentDone = 100
    string = (((((('Currently: Generating report. Entry ' + str(iterator)) + ' of ') + str(logsize)) + ' Percent Done: ') + str(percentDone)) + '%.')
    print(string, '\n')
    unique_ip_address.sort(key=(lambda x: x.numOccurances), reverse=True)
    return unique_ip_address
def getUniqueIps(all_ip_address):
    iterator = 0
    counted_ip_address = Counter(all_ip_address)
    unique_ip_address = []
    print('=== Creating list of unique IPs. ===')
    logsize = len(counted_ip_address)
    for address in counted_ip_address:
        try:
            this_addr = address
            this_count = counted_ip_address[address]
            newIpAddress = IpAddress(this_addr, this_count)
            unique_ip_address.append(newIpAddress)
            iterator = (iterator + 1)
            if ((iterator % 1000) == 0):
                percentDone = round(Decimal(((iterator / logsize) * 100)), 2)
                string = (((((('Currently: Creating Unique IP List. Entry ' + str(iterator)) + ' of ') + str(logsize)) + ' Percent Done: ') + str(percentDone)) + '%.')
                print(string, end='\r')
        except UserWarning:
            print('\nError creating IP address object!')
            print('Crash data:')
            print('\tThe address line was:')
            print(address)
    percentDone = 100
    string = (((((('Currently: Generating report. Entry ' + str(iterator)) + ' of ') + str(logsize)) + ' Percent Done: ') + str(percentDone)) + '%.')
    print(string, '\n')
    unique_ip_address.sort(key=(lambda x: x.numOccurances), reverse=True)
    return unique_ip_address