<commit_before>from .utils import sha256


class Network:
    def __init__(self, network_passphrase: str) -> None:
        self.network_passphrase = network_passphrase

    def network_id(self) -> bytes:
        return sha256(self.network_passphrase.encode())

    def __eq__(self, other: 'Network') -> bool:
        return self.network_passphrase == other.network_passphrase


_network_passphrases = {
    'PUBLIC': 'Public Global Stellar Network ; September 2015',
    'TESTNET': 'Test SDF Network ; September 2015'
}

PUBLIC = Network(_network_passphrases['PUBLIC'])  # type: Network
TESTNET = Network(_network_passphrases['TESTNET'])  # type: Network<commit_msg>feat: add network passphrase<commit_after>from .utils import sha256


class Network:
    def __init__(self, network_passphrase: str) -> None:
        self.network_passphrase = network_passphrase

    def network_id(self) -> bytes:
        return sha256(self.network_passphrase.encode())

    def __eq__(self, other: 'Network') -> bool:
        return self.network_passphrase == other.network_passphrase


PUBLIC_NETWORK_PASSPHRASE: str = 'Public Global Stellar Network ; September 2015'
TESTNET_NETWORK_PASSPHRASE: str = 'Test SDF Network ; September 2015'

PUBLIC: Network = Network(PUBLIC_NETWORK_PASSPHRASE)
TESTNET: Network = Network(TESTNET_NETWORK_PASSPHRASE)
{'fraction_non_alphanumeric': 0.09691960931630353, 'fraction_numerical': 0.021036814425244178, 'mean_word_length': 4.6440677966101696, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '5359052', 'n_tokens_mistral': 438, 'n_tokens_neox': 401, 'n_words': 97}