<s> import math <EOL> import os <EOL> import random <EOL> import string <EOL> def makeid ( ) : <EOL> text = "<STR_LIT>" ; <EOL> possible = "<STR_LIT>" ; <EOL> for i in range ( <NUM_LIT:30> ) : <EOL> text += possible [ math . floor ( random . random ( ) * len ( possible ) ) ] ; <EOL> return text ; <EOL> def strChanger ( s , a ) : <EOL> sList = list ( s ) <EOL> for x in a : <EOL> for i in range ( len ( s ) ) : <EOL> if i + <NUM_LIT:1> < len ( s ) and ( i + <NUM_LIT:1> ) % x == <NUM_LIT:0> : <EOL> if ord ( sList [ i + <NUM_LIT:1> ] ) < <NUM_LIT> and ord ( sList [ i + <NUM_LIT:1> ] ) >= <NUM_LIT> : <EOL> sList [ i + <NUM_LIT:1> ] = chr ( ord ( sList [ i + <NUM_LIT:1> ] ) + <NUM_LIT:1> ) <EOL> elif ord ( sList [ i + <NUM_LIT:1> ] ) == <NUM_LIT> : <EOL> sList [ i + <NUM_LIT:1> ] = chr ( <NUM_LIT> ) <EOL> elif ord ( sList [ i + <NUM_LIT:1> ] ) < <NUM_LIT> and ord ( sList [ i + <NUM_LIT:1> ] ) >= <NUM_LIT> : <EOL> sList [ i + <NUM_LIT:1> ] = chr ( ord ( sList [ i + <NUM_LIT:1> ] ) + <NUM_LIT:1> ) <EOL> elif ord ( sList [ i + <NUM_LIT:1> ] ) == <NUM_LIT> : <EOL> sList [ i + <NUM_LIT:1> ] = chr ( <NUM_LIT> ) <EOL> newS = "<STR_LIT>" . join ( sList ) <EOL> return newS <EOL> def generate ( full_path ) : <EOL> try : <EOL> randString = "<STR_LIT>" <EOL> numList = list ( ) <EOL> for a in range ( <NUM_LIT:5> ) : <EOL> num = random . randint ( <NUM_LIT:2> , <NUM_LIT:20> ) <EOL> numList . append ( num ) <EOL> for i in range ( <NUM_LIT:10> ) : <EOL> randString = makeid ( ) <EOL> f = open ( full_path + os . sep + "<STR_LIT:test>" + str ( i ) + "<STR_LIT>" , "<STR_LIT:w>" ) <EOL> f . write ( "<STR_LIT:U+002C>" . join ( [ str ( j ) for j in numList ] ) + "<STR_LIT:\n>" + randString + "<STR_LIT:\n>" ) <EOL> f . close ( ) <EOL> output = strChanger ( randString , numList ) + "<STR_LIT:\n>" <EOL> f = open ( full_path + os . sep + "<STR_LIT:test>" + str ( i ) + "<STR_LIT>" , "<STR_LIT:w>" ) <EOL> f . write ( "<STR_LIT:%s>" % output ) <EOL> f . close ( ) <EOL> randString = "<STR_LIT>" <EOL> return <NUM_LIT:1> <EOL> except : <EOL> return <NUM_LIT:0> </s>
