<commit_before>import os, sys

global nest
nest = 0

def trace(frame, event, arg):
    #if event == 'line':
    global nest
    
    print "%s%s %s %d" % (
        "   " * nest,
        event,
        os.path.basename(frame.f_code.co_filename),
        frame.f_lineno,
        )
    
    if event == 'call':
        nest += 1
    if event == 'return':
        nest -= 1
        
    return trace

sys.settrace(trace)

import sample
#import littleclass
<commit_msg>This changes whenever I have a different quirk to examine.<commit_after>import os, sys

global nest
nest = 0

def trace(frame, event, arg):
    #if event == 'line':
    global nest
    
    print "%s%s %s %d" % (
        "   " * nest,
        event,
        os.path.basename(frame.f_code.co_filename),
        frame.f_lineno,
        )
    
    if event == 'call':
        nest += 1
    if event == 'return':
        nest -= 1
        
    return trace

def trace2(frame, event, arg):
    #if event == 'line':
    global nest
    
    print "2: %s%s %s %d" % (
        "   " * nest,
        event,
        os.path.basename(frame.f_code.co_filename),
        frame.f_lineno,
        )
    
    if event == 'call':
        nest += 1
    if event == 'return':
        nest -= 1
        
    return trace2

sys.settrace(trace)

def bar():
    print "nar"

a = 26
def foo(n):
    a = 28
    sys.settrace(sys.gettrace())
    bar()
    a = 30  
    return 2*n

print foo(a)
#import sample
#import littleclass

{'fraction_non_alphanumeric': 0.12064516129032259, 'fraction_numerical': 0.011612903225806452, 'mean_word_length': 1.4816, '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': '4469422', 'n_tokens_mistral': 584, 'n_tokens_neox': 513, 'n_words': 139}