initial creation

This commit is contained in:
2025-05-20 11:57:43 -04:00
commit c98b612926
8447 changed files with 1862526 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env python
import random
from multiprocessing import Pool
POOL_SIZE = 30 # <1>
with open('../DATA/words.txt') as words_in:
WORDS = [w.strip() for w in words_in] # <2>
random.shuffle(WORDS) # <3>
def my_task(word): # <4>
return word.upper()
if __name__ == '__main__':
ppool = Pool(POOL_SIZE) # <5>
WORD_LIST = ppool.map(my_task, WORDS) # <6>
print(WORD_LIST[:20]) # <7>
print("Processed {} words.".format(len(WORD_LIST)))