<commit_before><commit_msg>Revert "linux now has internal support for xattrs".<commit_after>package xattr

import (
        "syscall"
        "unsafe"
)

func getxattr(path string, name string, value *byte, size int) (int, error) {
        r0, _, e1 := syscall.Syscall6(syscall.SYS_GETXATTR, uintptr(unsafe.Pointer(syscall.StringBytePtr(path))), uintptr(unsafe.Pointer(syscall.StringBytePtr(name))), uintptr(unsafe.Pointer(value)), uintptr(size), 0, 0)
        return int(r0), e1
}

func listxattr(path string, namebuf *byte, size int) (int, error) {
        r0, _, e1 := syscall.Syscall(syscall.SYS_LISTXATTR, uintptr(unsafe.Pointer(syscall.StringBytePtr(path))), uintptr(unsafe.Pointer(namebuf)), uintptr(size))
        return int(r0), e1
}

func setxattr(path string, name string, value *byte, size int) (err error) {
        _, _, e1 := syscall.Syscall6(syscall.SYS_SETXATTR, uintptr(unsafe.Pointer(syscall.StringBytePtr(path))), uintptr(unsafe.Pointer(syscall.StringBytePtr(name))), uintptr(unsafe.Pointer(value)), uintptr(size), 0, 0)
        return e1
}

func removexattr(path string, name string) (err error) {
        _, _, e1 := syscall.Syscall(syscall.SYS_REMOVEXATTR, uintptr(unsafe.Pointer(syscall.StringBytePtr(path))), uintptr(unsafe.Pointer(syscall.StringBytePtr(name))), 0)
        return e1
}

{'fraction_non_alphanumeric': 0.14187643020594964, 'fraction_numerical': 0.014492753623188406, 'mean_word_length': 4.963636363636364, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2799769', 'n_tokens_mistral': 484, 'n_tokens_neox': 413, 'n_words': 88}