<commit_before>
#lots of testing

import ip

addr1 = ip.Ip(1234)

print 'self.address', addr1.address
print 'repr        ', repr(addr1)
print 'ip + 5      ', addr1 + 5, type(addr1 + 5)
print 'ip - 5      ', addr1 + 5, type(addr1 - 5)
print

addr4_1 = ip.Ipv4('192.168.0.1')
addr4_2 = ip.Ipv4([172, 16, 0, 1])

print 'self.address', addr4_1.address, addr4_2.address
print 'repr        ', repr(addr4_1), repr(addr4_2)
print 'str         ', str(addr4_1), str(addr4_2)
print 'list        ', list(addr4_1), list(addr4_2)
print 'tuple       ', tuple(addr4_1), tuple(addr4_2)
print 'ip1 + 5     ', addr4_1 + 5, type(addr4_1 + 5)
print 'ip2 + 5     ', addr4_2 + 5, type(addr4_2 + 5)
print 'ip1 - 5     ', addr4_1 - 5, type(addr4_1 - 5)
print 'ip2 - 5     ', addr4_2 - 5, type(addr4_2 - 5)
print 'ip1 | ip2   ', addr4_1 | addr4_2, type(addr4_1 | addr4_2)
print 'ip1 & ip2   ', addr4_1 & addr4_2, type(addr4_1 & addr4_2)
print 'ip1 ^ ip2   ', addr4_1 ^ addr4_2, type(addr4_1 ^ addr4_2)
print 'ip1[0]      ', addr4_1[0]
print 'ip2[0]      ', addr4_2[0]<commit_msg>Added tests to demonstrate __invert__<commit_after>
#lots of testing

import ip

addr1 = ip.Ip(1234)

print 'self.address', addr1.address
print 'repr        ', repr(addr1)
print 'ip + 5      ', addr1 + 5, type(addr1 + 5)
print 'ip - 5      ', addr1 + 5, type(addr1 - 5)
print

addr4_1 = ip.Ipv4('192.168.0.1')
addr4_2 = ip.Ipv4([172, 16, 0, 1])
addr4_3 = ip.Ipv4((255, 255, 255, 0))

print 'self.address', addr4_1.address, addr4_2.address
print 'repr        ', repr(addr4_1), repr(addr4_2)
print 'str         ', str(addr4_1), str(addr4_2)
print 'list        ', list(addr4_1), list(addr4_2)
print 'tuple       ', tuple(addr4_1), tuple(addr4_2)
print 'ip1 + 5     ', addr4_1 + 5, type(addr4_1 + 5)
print 'ip2 + 5     ', addr4_2 + 5, type(addr4_2 + 5)
print 'ip1 - 5     ', addr4_1 - 5, type(addr4_1 - 5)
print 'ip2 - 5     ', addr4_2 - 5, type(addr4_2 - 5)
print 'ip1 | ip2   ', addr4_1 | addr4_2, type(addr4_1 | addr4_2)
print 'ip1 & ip2   ', addr4_1 & addr4_2, type(addr4_1 & addr4_2)
print 'ip1 ^ ip2   ', addr4_1 ^ addr4_2, type(addr4_1 ^ addr4_2)
print 'ip1[0]      ', addr4_1[0]
print 'ip2[0]      ', addr4_2[0]
print 'ip3 ^ 255*  ', ip.Ipv4(addr4_3 ^ ip.Ipv4('255.255.255.255'))
print '~ip3        ', ~addr4_3
{'fraction_non_alphanumeric': 0.16365240405822673, 'fraction_numerical': 0.1305690339655933, 'mean_word_length': 3.1161524500907443, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5459088', 'n_tokens_mistral': 1099, 'n_tokens_neox': 1010, 'n_words': 238}