<commit_before>import os
import sys
import pwd
import grp
import signal
import errno
from contextlib import contextmanager
try:
    from setproctitle import setproctitle as _setproctitle
except ImportError:
    _setproctitle = None


CAN_DETACH = True
try:
    import resource
except ImportError:
    CAN_DETACH = False

from celery.utils import noop


def create_pidlock(pidfile):
    """Create a PIDFile to be used with python-daemon.

    If the pidfile already exists the program exits with an error message,
    however if the process it refers to is not running anymore, the pidfile
    is just deleted.

    """
    from daemon import pidlockfile<commit_msg>Removed unused import of contextmanager<commit_after>import os
import sys
import pwd
import grp
import signal
import errno
try:
    from setproctitle import setproctitle as _setproctitle
except ImportError:
    _setproctitle = None


CAN_DETACH = True
try:
    import resource
except ImportError:
    CAN_DETACH = False

from celery.utils import noop


def create_pidlock(pidfile):
    """Create a PIDFile to be used with python-daemon.

    If the pidfile already exists the program exits with an error message,
    however if the process it refers to is not running anymore, the pidfile
    is just deleted.

    """
    from daemon import pidlockfile
{'fraction_non_alphanumeric': 0.03793626707132018, 'fraction_numerical': 0.0, 'mean_word_length': 3.8315018315018317, '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': '6673705', 'n_tokens_mistral': 388, 'n_tokens_neox': 369, 'n_words': 163}