<commit_before>import os
import stat
from zipfile import ZipFile as BaseZipfile, ZipInfo, ZIP_STORED, ZIP64_LIMIT, \
    ZIP_DEFLATED, LargeZipFile, crc32, \
    _ZipDecrypter, ZIP_LZMA, _get_compressor

import struct

import time

# randomFunc = os.urandom
randomFunc = lambda n: b"X"*n


class _ZipEncrypter(_ZipDecrypter):
    def __call__(self, c):
        """Decrypt a single character."""
        assert isinstance(c, int)
        k = self.key2 | 2
        _c = c ^ (((k * (k^1)) >> 8) & 255)
        self._UpdateKeys(c)
        return _c


class ZipFile(BaseZipfile):
    def write(self, filename, arcname=None, compress_type=None, pwd=None):
        """Put the bytes from filename into the archive under the name
        arcname."""
        if not self.fp:
            raise RuntimeError(
                "Attempt to write to ZIP archive that was already closed")
        if pwd and not isinstance(pwd, bytes):
            raise TypeError("pwd: expected bytes, got %s" % type(pwd))<commit_msg>Bug: Fix randomness<commit_after>import os
import stat
from zipfile import ZipFile as BaseZipfile, ZipInfo, ZIP_STORED, ZIP64_LIMIT, \
    ZIP_DEFLATED, LargeZipFile, crc32, \
    _ZipDecrypter, ZIP_LZMA, _get_compressor

import struct

import time

randomFunc = os.urandom


class _ZipEncrypter(_ZipDecrypter):
    def __call__(self, c):
        """Decrypt a single character."""
        assert isinstance(c, int)
        k = self.key2 | 2
        _c = c ^ (((k * (k^1)) >> 8) & 255)
        self._UpdateKeys(c)
        return _c


class ZipFile(BaseZipfile):
    def write(self, filename, arcname=None, compress_type=None, pwd=None):
        """Put the bytes from filename into the archive under the name
        arcname."""
        if not self.fp:
            raise RuntimeError(
                "Attempt to write to ZIP archive that was already closed")
        if pwd and not isinstance(pwd, bytes):
            raise TypeError("pwd: expected bytes, got %s" % type(pwd))
{'fraction_non_alphanumeric': 0.09868421052631579, 'fraction_numerical': 0.011133603238866396, 'mean_word_length': 2.7657142857142856, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6783491', 'n_tokens_mistral': 670, 'n_tokens_neox': 632, 'n_words': 199}