yourpath = '../'

import os
for root, dirs, files in os.walk(yourpath, topdown=True):
    for name in files:
        print("Name = ", root)
        if name == "results.txt":
            f_results = open(os.path.join(root, name))
            new_dir = os.path.join("./dataset/"+root[11:])
            if not os.path.exists(new_dir):
                os.makedirs(new_dir)

            f_data = open(os.path.join(new_dir, "data.txt"), "w")

            for i, line in enumerate(f_results):
                if i == 15:
                    f_data.writelines(line)
                elif i == 16:
                    f_data.writelines(line)
                elif i == 18:
                    f_data.writelines(line)
                elif i == 19:
                    f_data.writelines(line)

            f_data.close()
            f_results.close()



322b402d2185e173e43992f1122cbf8c3de7a2d6
<mask token>

<mask token>
for root, dirs, files in os.walk(yourpath, topdown=True):
    for name in files:
        print('Name = ', root)
        if name == 'results.txt':
            f_results = open(os.path.join(root, name))
            new_dir = os.path.join('./dataset/' + root[11:])
            if not os.path.exists(new_dir):
                os.makedirs(new_dir)
            f_data = open(os.path.join(new_dir, 'data.txt'), 'w')
            for i, line in enumerate(f_results):
                if i == 15:
                    f_data.writelines(line)
                elif i == 16:
                    f_data.writelines(line)
                elif i == 18:
                    f_data.writelines(line)
                elif i == 19:
                    f_data.writelines(line)
            f_data.close()
            f_results.close()

yourpath = '../'
<mask token>
for root, dirs, files in os.walk(yourpath, topdown=True):
    for name in files:
        print('Name = ', root)
        if name == 'results.txt':
            f_results = open(os.path.join(root, name))
            new_dir = os.path.join('./dataset/' + root[11:])
            if not os.path.exists(new_dir):
                os.makedirs(new_dir)
            f_data = open(os.path.join(new_dir, 'data.txt'), 'w')
            for i, line in enumerate(f_results):
                if i == 15:
                    f_data.writelines(line)
                elif i == 16:
                    f_data.writelines(line)
                elif i == 18:
                    f_data.writelines(line)
                elif i == 19:
                    f_data.writelines(line)
            f_data.close()
            f_results.close()

yourpath = '../'
import os
for root, dirs, files in os.walk(yourpath, topdown=True):
    for name in files:
        print('Name = ', root)
        if name == 'results.txt':
            f_results = open(os.path.join(root, name))
            new_dir = os.path.join('./dataset/' + root[11:])
            if not os.path.exists(new_dir):
                os.makedirs(new_dir)
            f_data = open(os.path.join(new_dir, 'data.txt'), 'w')
            for i, line in enumerate(f_results):
                if i == 15:
                    f_data.writelines(line)
                elif i == 16:
                    f_data.writelines(line)
                elif i == 18:
                    f_data.writelines(line)
                elif i == 19:
                    f_data.writelines(line)
            f_data.close()
            f_results.close()

yourpath = '../'

import os
for root, dirs, files in os.walk(yourpath, topdown=True):
    for name in files:
        print("Name = ", root)
        if name == "results.txt":
            f_results = open(os.path.join(root, name))
            new_dir = os.path.join("./dataset/"+root[11:])
            if not os.path.exists(new_dir):
                os.makedirs(new_dir)

            f_data = open(os.path.join(new_dir, "data.txt"), "w")

            for i, line in enumerate(f_results):
                if i == 15:
                    f_data.writelines(line)
                elif i == 16:
                    f_data.writelines(line)
                elif i == 18:
                    f_data.writelines(line)
                elif i == 19:
                    f_data.writelines(line)

            f_data.close()
            f_results.close()


