<commit_before>def check_pytex():
    """checks for pytex, i hope"""
    import inspect
    thestack = []
    for bit in inspect.stack():
        for b in bit:
            thestack.append(str(b))
    as_string = ' '.join(thestack)
    if 'pythontex' in as_string:
        return True
    else:
        return False

def check_dit():
    """checks if we're on the cloud ... bad way to do it..."""
    import inspect
    thestack = []
    for bit in inspect.stack():
        for b in bit:
            thestack.append(str(b))
    as_string = ' '.join(thestack)
    if '/opt/python/lib' in as_string:
        return True
    else:
        return False
 
def check_tex(have_ipython = True):
    import os
    if have_ipython:
        checktex_command = 'which latex'
        o = get_ipython().getoutput(checktex_command)[0]
        if o.startswith('which: no latex in'):
            have_tex = False
        else:
            have_tex = True
    else:<commit_msg>check for spyder<commit_after>def check_pytex():
    """checks for pytex, i hope"""
    import inspect
    thestack = []
    for bit in inspect.stack():
        for b in bit:
            thestack.append(str(b))
    as_string = ' '.join(thestack)
    if 'pythontex' in as_string:
        return True
    else:
        return False

def check_spyder():
    """checks for spyder, i hope"""
    import inspect
    thestack = []
    for bit in inspect.stack():
        for b in bit:
            thestack.append(str(b))
    as_string = ' '.join(thestack)
    if 'spyder' in as_string:
        return True
    else:
        return False

def check_dit():
    """checks if we're on the cloud ... bad way to do it..."""
    import inspect
    thestack = []
    for bit in inspect.stack():
        for b in bit:
            thestack.append(str(b))
    as_string = ' '.join(thestack)
    if '/opt/python/lib' in as_string:
        return True
    else:
        return False
 
def check_tex(have_ipython = True):
    import os
    if have_ipython:
        checktex_command = 'which latex'
        o = get_ipython().getoutput(checktex_command)[0]
        if o.startswith('which: no latex in'):
            have_tex = False
        else:
            have_tex = True
    else:
{'fraction_non_alphanumeric': 0.10950878774222622, 'fraction_numerical': 0.0009013068949977468, 'mean_word_length': 1.9959514170040487, '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': '1305208', 'n_tokens_mistral': 706, 'n_tokens_neox': 692, 'n_words': 209}