Omnifarious icon

Generating compressor test data

Omnifarious | PRO | 04/01/24 04:26:06 PM UTC (Edited) | 0 ⭐ | 3512 👁️ | Never ⏰ | [Compression]
Python |

390 B

|

Software

|

0 👍

/

0 👎

import itertools, random
pl = [''.join(p) for p in itertools.permutations([chr(65 + x) for x in range(11)])]
sections = set()
while len(sections) < 3500:
    sections.add(random.randint(0, 480924 * 83))
sectstrs = ['\n'.join(pl[x:x+83]) for x in sections]
with open('permutes.txt', 'w') as pf:
    for _ in range(19):
        random.shuffle(sectstrs)
        pf.write('\n'.join(sectstrs) + '\n')

Comments