<jupyter_start><jupyter_text>Turtle Visualization!![title](img.png)<jupyter_code>import turtle

def is_space(x, y, fav_number=1350):
    value = x*x + 3*x + 2*x*y + y + y*y + fav_number
    one_bits = gmpy2.popcount(value)
    return one_bits % 2 == 0


def draw_rect_in_place():
    for _ in range(4):
        t.forward(unit)
        t.right(90)


turtle.setup(720, 720)
wn = turtle.Screen()
t = turtle.Turtle()
wn.tracer(0,0)
t.speed(0)
unit = 13

# Draw the room, up to some given size.
xmax = 50 + 1
ymax = 50 + 1
for y in range(ymax):
    for x in range(xmax):
        t.penup()
        t.setx(-wn.window_width()//2 + x*unit)
        t.sety(wn.window_height()//2 - y*unit)
        t.pendown()
        t.begin_fill()

        if (x,y) == (31, 39) or (x,y) == (1,1):
            draw_rect_in_place()
            t.color('red')
            t.end_fill()
            t.color('black')
        
        elif not is_space(x, y):
            for _ in range(4):
                t.forward(unit)
                t.right(90)
            t.color('black')
            t.end_fill()

# Draw the path
for p in path[:-1]:
    x, y = p.coord
    t.setx(-wn.window_width()//2 + x*unit)
    t.sety(wn.window_height()//2 - y*unit)
    t.begin_fill()
    draw_rect_in_place()
    t.color('yellow')
    t.end_fill()

turtle.update()
turtle.getscreen().getcanvas().postscript(file="img.png")
turtle.exitonclick()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1625615763546798, 'fraction_numerical': 0.030260380014074596, 'mean_word_length': 2.2244897959183674, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '121379', 'license': 'MIT', 'n_tokens_mistral': 601, 'n_tokens_neox': 557, 'n_words': 109, 'path': 'aoc-2016/13/13.ipynb', 'repo_name': 'bsamseth/advent-of-code-2018', 'size': '1421'}