<commit_before>import socket
from struct import unpack
import re


def is_loopback_addr(addr):
    return addr.startswith("127.0.0.") or addr == 'localhost'


def is_valid_port(port):
    return 0 < int(port) <= 65535


def is_valid_protocol(protocol):
    return protocol == 'tcp'


def is_valid_ip_address(addr):
    try:
        socket.inet_aton(addr)<commit_msg>Dont accept 0.0.0.0 as peer address.<commit_after>import socket
from struct import unpack
import re


def is_loopback_addr(addr):
    return addr.startswith("127.0.0.") or addr == 'localhost'


def is_valid_port(port):
    return 0 < int(port) <= 65535


def is_valid_protocol(protocol):
    return protocol == 'tcp'


def is_valid_ip_address(addr):
    if addr == '0.0.0.0':
        return False
    try:
        socket.inet_aton(addr)
{'fraction_non_alphanumeric': 0.11471321695760599, 'fraction_numerical': 0.03740648379052369, 'mean_word_length': 3.695906432748538, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2805413', 'n_tokens_mistral': 296, 'n_tokens_neox': 269, 'n_words': 69}