<jupyter_start><jupyter_text>seller_name<jupyter_code>import shutil
image_folder = '../Agora_nn'
test_folder = '../Agora_test'
for seller_folder in os.listdir(image_folder):
    seller_tar = os.path.join(test_folder, seller_folder)
    os.mkdir(seller_tar)
    seller_folder = os.path.join(image_folder, seller_folder)
    filenames = map(lambda x: os.path.join(seller_folder, x), os.listdir(seller_folder))
    random.shuffle(filenames)
    move_files = filenames[:len(filenames)/10]
    for filename in move_files:
        copy2(filename, seller_tar)
        os.remove(filename)
import random
from PIL import Image
i=0
seller_name = [os.path.join('Agora_nn20_full', x) for x in os.listdir('Agora_nn20_full')]
for seller_folder in set(seller_name):
    if not os.path.exists(seller_folder):
        continue
    if not len(os.listdir(seller_folder))>=50:
        shutil.rmtree(seller_folder)
        # print seller_folder.split('/')[-2], len(os.listdir(seller_folder))
    else:
        i+=1
        # print seller_folder
print i
import os
folder = 'Agora_nn20_full'
for seller_name in os.listdir(folder):
    clean_name = ''.join(x for x in seller_name if x.isalnum())
    if seller_name == clean_name:
        continue
    seller_folder = os.path.join(folder, seller_name)
    clean_folder = os.path.join(folder, clean_name)
    os.system('mv ' + seller_folder + ' ' + clean_folder)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11802120141342756, 'fraction_numerical': 0.009893992932862191, 'mean_word_length': 4.093525179856115, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '578090', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 511, 'n_tokens_neox': 511, 'n_words': 97, 'path': 'parser/agora/GetSellerImage.ipynb', 'repo_name': 'XiangwenWang/sybil_detect', 'size': '1415'}