import random

random.seed(42)
with open('questions-words-dev.txt', 'w') as devfile:
    with open('questions-words-test.txt', 'w') as testfile:
        with open('questions-words.txt', 'r') as infile:
            for line in infile:
                # Section headers go in both files
                if line[0] == ':':
                    devfile.write(line)
                    testfile.write(line)
                else:
                    (devfile if random.random() < .5 else testfile).write(line)

0aa45323522824e211b323fcf715b237356e981c
<mask token>

<mask token>
random.seed(42)
with open('questions-words-dev.txt', 'w') as devfile:
    with open('questions-words-test.txt', 'w') as testfile:
        with open('questions-words.txt', 'r') as infile:
            for line in infile:
                if line[0] == ':':
                    devfile.write(line)
                    testfile.write(line)
                else:
                    (devfile if random.random() < 0.5 else testfile).write(line
                        )

import random
random.seed(42)
with open('questions-words-dev.txt', 'w') as devfile:
    with open('questions-words-test.txt', 'w') as testfile:
        with open('questions-words.txt', 'r') as infile:
            for line in infile:
                if line[0] == ':':
                    devfile.write(line)
                    testfile.write(line)
                else:
                    (devfile if random.random() < 0.5 else testfile).write(line
                        )

import random

random.seed(42)
with open('questions-words-dev.txt', 'w') as devfile:
    with open('questions-words-test.txt', 'w') as testfile:
        with open('questions-words.txt', 'r') as infile:
            for line in infile:
                # Section headers go in both files
                if line[0] == ':':
                    devfile.write(line)
                    testfile.write(line)
                else:
                    (devfile if random.random() < .5 else testfile).write(line)
