In [30]:
from __future__ import division
import numpy as np
import codecs
import copy

In [28]:
testfile = codecs.open('stimuli_Maria/allteststimulisorted.txt', 'r', 'utf-8').read().split('\n')
testlist = [item.split('\t') for item in testfile] #structure is [[name1, text1], [name2, text2] etc.]
testlist = [[pair[0][5:], pair[1]] for pair in testlist ] #removing first 5 characters in the name - we don't need it

In [45]:
for i in xrange(30):# number of shuffled versions
    np.random.seed(i)
    writefile = codecs.open('stimuli_Maria/'+str(i)+'teststimuli.txt', 'w', 'utf-8')
    testlistcopy = copy.deepcopy(testlist)
    np.random.shuffle(testlistcopy)
    for pair in testlistcopy:
        writefile.write(str(pair[0])+'\t'+str(pair[1])+'\n')
    writefile.close()
    !python html_generator.py style.css test {'stimuli_Maria/'+str(i)+'teststimuli.txt'} HTMLstimuli/{i}


/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `python html_generator.py style.css test stimuli_Maria/{str(i)+teststimuli.txt} HTMLstimuli/{i}'

In [13]:


In [ ]:


In [ ]: