<jupyter_start><jupyter_text>initialization<jupyter_code># size of space
n_x = 100
n_y = 100
space = np.zeros((n_x, n_y), dtype=np.float)
# seed point
space[int(n_x/2)-1][int(n_y/2)-1] = 255
for i in range(1000):
    rand_coor = random.sample(range(min(n_x, n_y)), 2)
    x_temp = rand_coor[0]
    y_temp = rand_coor[1]
    
    print(i)
    
    while(np.sum(space[x_temp-1:x_temp+2, y_temp-1:y_temp+2])==0):
        
        x_temp = np.clip(x_temp, 1, n_x-3)
        y_temp = np.clip(y_temp, 1, n_y-3)

        direction = random.sample(range(1, 9), 1)[0]
        # print(np.sum(space[x_temp-1:x_temp+1][y_temp-1:y_temp+1]))
        # print(f'{x_temp}, {y_temp}')
        if(direction == 1):
            x_temp += 1
        elif(direction == 2):
            x_temp += 1
            y_temp += 1
        elif(direction == 3):
            y_temp += 1
        elif(direction == 4):
            x_temp -= 1
            y_temp += 1
        elif(direction == 5):
            x_temp -= 1
        elif(direction == 6):
            x_temp -= 1
            y_temp -= 1
        elif(direction == 7):
            y_temp -= 1
        elif(direction == 8):
            x_temp += 1
            y_temp -= 1
    
    space[x_temp][y_temp] = 255

plt.imshow(space)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1541471048513302, 'fraction_numerical': 0.046948356807511735, 'mean_word_length': 1.8677130044843049, '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': '267069', 'license': 'MIT', 'n_tokens_mistral': 543, 'n_tokens_neox': 499, 'n_words': 89, 'path': 'Cell Autonoma - Diffusion-Limited Aggregation.ipynb', 'repo_name': 'AndyRay1998/Bio-inspired-AI', 'size': '1278'}