<commit_before>from django.core.exceptions import ValidationError
from django.db import models

from netaddr import EUI, AddrFormatError, mac_unix

from formfields import MACAddressField as MACAddressFormField

class mac_linux(mac_unix):
    """MAC format with zero-padded all upper-case hex and colon separated"""
    word_fmt = '%.2X'<commit_msg>monkeypatch EUI so unique=True will work<commit_after>from django.core.exceptions import ValidationError
from django.db import models

from netaddr import EUI, AddrFormatError, mac_unix

from formfields import MACAddressField as MACAddressFormField

# monkey patch EUI to work around https://github.com/drkjam/netaddr/issues/21
# we need this if we use unique=True
def _eui_deepcopy(obj, memo=None):
    from copy import copy
    return copy(obj)
EUI.__deepcopy__ = _eui_deepcopy

class mac_linux(mac_unix):
    """MAC format with zero-padded all upper-case hex and colon separated"""
    word_fmt = '%.2X'
{'fraction_non_alphanumeric': 0.07232704402515723, 'fraction_numerical': 0.0041928721174004195, 'mean_word_length': 5.241830065359477, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '5284328', 'n_tokens_mistral': 294, 'n_tokens_neox': 287, 'n_words': 97}