Updated for challenge 9
[cipher-tools.git] / 2014 / 2014-challenge8.ipynb
1 {
2 "cells": [
3 {
4 "cell_type": "code",
5 "execution_count": 1,
6 "metadata": {},
7 "outputs": [],
8 "source": [
9 "import os,sys,inspect\n",
10 "currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))\n",
11 "parentdir = os.path.dirname(currentdir)\n",
12 "sys.path.insert(0,parentdir) \n",
13 "\n",
14 "import matplotlib.pyplot as plt\n",
15 "import pandas as pd\n",
16 "import collections\n",
17 "import string\n",
18 "%matplotlib inline\n",
19 "\n",
20 "from cipher.vigenere import *\n",
21 "from cipher.cadenus import *\n",
22 "from support.utilities import *\n",
23 "from support.text_prettify import *\n",
24 "from support.language_models import *\n",
25 "from support.plot_frequency_histogram import *\n",
26 "\n",
27 "c8a = open('8a.ciphertext').read()\n",
28 "c8b = open('8b.ciphertext').read().strip()"
29 ]
30 },
31 {
32 "cell_type": "code",
33 "execution_count": 2,
34 "metadata": {},
35 "outputs": [
36 {
37 "data": {
38 "text/plain": [
39 "<matplotlib.axes._subplots.AxesSubplot at 0x7f383433e908>"
40 ]
41 },
42 "execution_count": 2,
43 "metadata": {},
44 "output_type": "execute_result"
45 },
46 {
47 "data": {
48 "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAD7CAYAAACWq8i5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAGXNJREFUeJzt3X+0XWV95/H3p1B+TAsSNKYsgsZOM1rK+ANSSFdtR6WFgJ2GTpXBtpJxKJkW7KLj9Ec67ZQR6xTbaW0Z23RYkhrUqaLVIa1gmhW11iqYIBQEyuIWZUgWQiT8cLTV4nznj/OkHq7nnPvckHAuyfu11lln7+9+nv3sc+6593P2j3NuqgpJknp8y7Q3QJL09GFoSJK6GRq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zADnDePx/Ai4PeAvwXWM9iz+a0xbW8emv537XW0Y2+eu6o64Pc0diQ5BvjfwJYkDwP3jmqY5DYG7zK/Ffhkkv/T5p/L4Aczye8An0ryvjb/auDNE9ovAb42NP+1VpvkCuCDwLOTvJnBO+hfm9Shqn52jnWO8mye+K73H4ElVfX3Sca9G/5kkn9ZVbftxXj7xdDPc49jGYTujUmoOQ5p7IVLk7ydwR+Pf3qequoD47vM+3n7Ywbb/8E2fw5w1Rx9TuEbr2eA5wB37Xl+xjwP8359VtXI36s5nAusAv57VT2S5DgGe2uz1/0ogz2y1+zFGKP8MwaHrEdq58jOZfDG7H3AhTX3v2O4lcFzfRKDbX0kyaeq6u8n9NnGYG/zexl8keAfJfnxmnzo8BIGe8tfBN4O/GJV/WOSb2GwJ/hLI7r90Z6JqnpH+9lfPMfjGeuAPqcxLMm/YvCO5cNV9bURy587qf9cvxTtpNaecyUfmfQiS/KrDF6Uw7/8762q35xjjBcw2M0MsLWqxu5i76226/tjDF7MMDg0sYlBMF5ZVT851HbPH+ZDgeUM3jF+lb5DE/vVk/157sV47wJeANzONw5PVc06rzWrzx3AdwGfo/N5ayeKX9pm/6qqbp5ju+b9POzt63OhmvUG4hAGYXBZVb1tTPvfZPB4R57Dm2Osoxi8m/8F4Duq6vAJbVdU1fZZtddW1Tsn9Hkjg2/GGPVz++798Tfhm8Y5WEJjoWm//D/QZj8+1y//U6md1N1zbPWvZ7+wh9o9pX+YF7Ikd9WYk/ET+ox8/hbC87aQX5/zNet5fhx4oKoe38djvJ7B83UK8HngrxiE+kf25TgLgaEh7QNJ/hj47Y7DGDoAJfkFBkFx074OpIXG0JD2gSR3MrjUsvtQk/R0ZGhI+8BCPtQk7UuGhiSp2wH/NSKSpH3H0JAkdTM0JEndDA1JUrf/D01s6fDIlGlbAAAAAElFTkSuQmCC\n",
49 "text/plain": [
50 "<matplotlib.figure.Figure at 0x7f383433e048>"
51 ]
52 },
53 "metadata": {},
54 "output_type": "display_data"
55 }
56 ],
57 "source": [
58 "freqs = pd.Series(english_counts)\n",
59 "freqs.plot(kind='bar')"
60 ]
61 },
62 {
63 "cell_type": "code",
64 "execution_count": 3,
65 "metadata": {},
66 "outputs": [
67 {
68 "data": {
69 "text/plain": [
70 "<matplotlib.axes._subplots.AxesSubplot at 0x7f37f28e9f98>"
71 ]
72 },
73 "execution_count": 3,
74 "metadata": {},
75 "output_type": "execute_result"
76 },
77 {
78 "data": {
79 "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD7CAYAAAB68m/qAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAE9dJREFUeJzt3XuwpHV95/H3JyCMFxIGPU5mQRiyshBjxMsRtDRZBUyR6AayQSIxZjZLnMpFF8OahGxcLVNmA+ZizLqFmQLNrLpyC+wQTUyoEUOIhHC4yFUKRDBDcTkqo8S1VMx3/+hn4vHQt9Pn9JwzP96vqq7u5+nfr59vP+c5n+fp59KdqkKStPf7ntUuQJK0Mgx0SWqEgS5JjTDQJakRBrokNcJAl6RGGOiS1AgDXZIaYaBLUiP23ZMTe8YznlGbNm3ak5OUpL3e9ddf/8WqmhnVbo8G+qZNm5ibm9uTk5SkvV6S+8Zp5y4XSWqEgS5JjRgr0JP8WpLbktya5KNJ1iU5PMm1Se5OcmGS/aZdrCRpsJGBnuRg4L8As1X1XGAf4HXAOcB7qurZwCPA6dMsVJI03Li7XPYFnpxkX+ApwAPAccAl3fPbgJNXvjxJ0rhGBnpV3Q/8AfAFekH+FeB6YFdVPdY12wkc3K9/ki1J5pLMzc/Pr0zVkqTHGWeXy3rgJOBw4N8ATwVOHHcCVbW1qmaranZmZuRplJKkCY2zy+UE4PNVNV9V3wIuBV4GHNjtggE4BLh/SjVKksYwzoVFXwBekuQpwNeB44E54ErgFOACYDOwfVpFas/adN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bnm8b1qGqfnnEa/bzTL57a/FbwIaq+nqSQVuRn07yw1V1ywTTm4oFf8/dDqK3Qrw2CTXiY/oE3pHkPHr/2P86n6rq0sFdljzfPkiv/su64ZOB80f0eRHfWZ4BDgXu3D1/BsyHJS+fVdX3/2qEU4ETgT+oql1JNtL7lLP4tb9C75PMaRNMo5+n0NsN21d3TOZUehtNFwNvrKpRn2pupjevn0uv1l1Jrqmqrw/pcx29T2kvpvelWe9P8tM1fHfYGfQ+ZX4ROA/49ar6VpLvofcJ6jf6dHv/7gdV9Wfd3/5XR7yfgdbEhUVJ/j29Nf0nqvdVvIufP2xY/1ELbHeAY/e++U8OWwCS/Da9BWbhP+aFVfV7I6ZxFL2PTgF2VNXAj42T6j7O/RS9BQ16H7cvp7fS2lpVr1/Qdndo7gscQW9L6xuM93F7qpb795xgeh8GjgJu4zu7XKoWHUdZ1Od24NnA5xlzvnUHDV/eDf5dVd04oq4lz4dJl8+1atHKfR96Qf07VfW+Ae1/j9777XvMaMS0DqC3FfxW4Purav8hbWeram7RuDdU1YeG9HknvSvm+/3dfnAamfC46ayFQF9run/MH+kGrxr1j7kndQf4du/L+/vFC92Cdns0NNeyJHfWgAOzQ/r0nX9rYb6t5eVzqRbN58eAh6rqsRWexpvoza8XAfcCf0dvhfvJlZzOWmCgq3lJPgj8/hgfzdWgJG+lF+LXr/TKYq0x0NW8JHfQO11t7N0n0t7IQFfz1vLuE2klGeiS1Ai/y0WSGmGgS1IjDHRJaoSBLkmN+P8dHyBG/KpydgAAAABJRU5ErkJggg==\n",
80 "text/plain": [
81 "<matplotlib.figure.Figure at 0x7f37f463ecc0>"
82 ]
83 },
84 "metadata": {},
85 "output_type": "display_data"
86 }
87 ],
88 "source": [
89 "freqs_8a = pd.Series(collections.Counter([l.lower() for l in c8a if l in string.ascii_letters]))\n",
90 "freqs_8a.plot(kind='bar')"
91 ]
92 },
93 {
94 "cell_type": "code",
95 "execution_count": 4,
96 "metadata": {},
97 "outputs": [
98 {
99 "data": {
100 "text/plain": [
101 "'nyvlggsyglchxfeuytqcesqxpziufiggrbjhpayncruyfpsxufiupskyrectmmcncruyregxigrlglbtiblmecebzsvrlpuxpbibjajrljreobajrlufigjehbezywtmgjyxfqxictsgrdgtbjafyoocwtmjblctwwucqmgofrlfmrfrlfwlbtijlwuypmchjqxicrfchumtsmzjbimyvhcuvyrugxjcwpdtpuisrlfdhbaencyqumufeogrhcrjmytqsmsxjmrcsxjrmttiswzvjrfpecjitnidgemdssaitasvjhuyofgxpsxgmvvqfvrxiyxxmymbxfjpufigbeufeuuiiyzfavbaofbxicmsamqfisqwpgrtribbmtskhcwuuimcxufinbitrvpwxsmnbljppytuixgpmlifbgpmtfpeugsodvpkxicsnyrjeswcvokioreoyvnchggkirishiuyrerlfdpjeluasorvpjwzqxfkwgpsnyhsmrfkiblaigpfuiociersflwvpiuusufmoewpliufeuuiemrprwflhdpmuggbjmodsskeugsoygsmwtrlfzecypnyreyftrvbgxblhuusufeuuivqiblsoavjrmdyplcchcrfpeugsonvprsdmpplxiyxdfeolimemwcrufimczfjsgasnkmukiorxicjeylbtitfsxlmobiwcppnmoexigwqjeogenqyscxiyxufizummjvfgrtreucxictpuisqyqnpzumufmoyjfuqplxiqfvrajrlmsglrlfwajjpomxhsitqxiyxxcoomabzsvrmuyreuixgpmnyugxpsxpdfvqmocwtdssjsoeiomyhfxpasncyqumufeqjeomjpsvpurumiynppgxjrmorlfkiblxjkixcrpuoomaufeurlfgvigkicwuqidsvjrcdmqnsrjaeugsoqescioavznxfbytgrhygbbioswdgticvtmafaeoqxbpxisrugrhrlsmyhfxichbrecywfdssmxicvjlxfpgfnxtuidyrdpedixigwnycccxicfscelrlsmyhfaffewcffcrmmslgrhdssgrufiggkirehymoqxufigbemcxtlsuqgscajryqypmrlfzitrlbpvz'"
102 ]
103 },
104 "execution_count": 4,
105 "metadata": {},
106 "output_type": "execute_result"
107 }
108 ],
109 "source": [
110 "c8as = sanitise(c8a)\n",
111 "c8as"
112 ]
113 },
114 {
115 "cell_type": "code",
116 "execution_count": 5,
117 "metadata": {},
118 "outputs": [
119 {
120 "data": {
121 "text/plain": [
122 "('bye', -1461.9840974270046)"
123 ]
124 },
125 "execution_count": 5,
126 "metadata": {},
127 "output_type": "execute_result"
128 }
129 ],
130 "source": [
131 "key_a, score = vigenere_frequency_break(c8as)\n",
132 "key_a, score"
133 ]
134 },
135 {
136 "cell_type": "code",
137 "execution_count": 6,
138 "metadata": {},
139 "outputs": [
140 {
141 "name": "stdout",
142 "output_type": "stream",
143 "text": [
144 "mark i cracked what appears to be the final document about the trojan deployment and i think i have\n",
145 "an idea about how to deal with it and with the flag day associates the principal weakness of any\n",
146 "system like the one they have installed is the need to provide large quantities of power the fda\n",
147 "came up with an ingenious solution but it is very vulnerable special forces could take it out for us\n",
148 "but that would tell the fda that we have cracked their ciphers so instead i suggest we let them\n",
149 "destroy trojan for us we will need cooperation from the omani government an armed fighter jet and\n",
150 "the flight control systems from a drone meanwhile we need to ensure two things one that we do not\n",
151 "send critical information across the ba balm and abstrait and two that we use an on critical key\n",
152 "generation protocol on that channel given the level of commitment the fda have shown in developing\n",
153 "this plan i am sure that they will reinstate the powersupply within a few months but with luck they\n",
154 "will not guess that we know about it and we will put it out of business for long enough to come up\n",
155 "with a plan of our own to exploit it in the meantime we now know that their highest security\n",
156 "communications are encrypted using a caden us cipher so we can start hunting through the database\n",
157 "for other intercepts we can crack this maybe the breakthrough we have been looking for in the fight\n",
158 "against the fda lets not screw it up all the best harry\n"
159 ]
160 }
161 ],
162 "source": [
163 "print(prettify(vigenere_decipher(c8as, key_a)))"
164 ]
165 },
166 {
167 "cell_type": "code",
168 "execution_count": 7,
169 "metadata": {},
170 "outputs": [
171 {
172 "data": {
173 "text/plain": [
174 "875.0"
175 ]
176 },
177 "execution_count": 7,
178 "metadata": {},
179 "output_type": "execute_result"
180 }
181 ],
182 "source": [
183 "len(c8b) / 8"
184 ]
185 },
186 {
187 "cell_type": "code",
188 "execution_count": 8,
189 "metadata": {},
190 "outputs": [
191 {
192 "data": {
193 "text/plain": [
194 "['00000',\n",
195 " '00101',\n",
196 " '00010',\n",
197 " '00000',\n",
198 " '00100',\n",
199 " '10100',\n",
200 " '01110',\n",
201 " '10011',\n",
202 " '10011',\n",
203 " '00000',\n",
204 " '00010',\n",
205 " '10011',\n",
206 " '00111',\n",
207 " '10001',\n",
208 " '01000',\n",
209 " '01110',\n",
210 " '01011',\n",
211 " '00100',\n",
212 " '10011',\n",
213 " '00010',\n",
214 " '10010',\n",
215 " '00100',\n",
216 " '10001',\n",
217 " '10011',\n",
218 " '00111',\n",
219 " '10010',\n",
220 " '00111',\n",
221 " '10011',\n",
222 " '10001',\n",
223 " '00000',\n",
224 " '00111',\n",
225 " '01010',\n",
226 " '11000',\n",
227 " '01110',\n",
228 " '10001',\n",
229 " '01111',\n",
230 " '00101',\n",
231 " '10001',\n",
232 " '00110',\n",
233 " '00100',\n",
234 " '01110',\n",
235 " '00000',\n",
236 " '00011',\n",
237 " '01111',\n",
238 " '01111',\n",
239 " '01001',\n",
240 " '01101',\n",
241 " '00110',\n",
242 " '01011',\n",
243 " '10011',\n",
244 " '00100',\n",
245 " '10001',\n",
246 " '01101',\n",
247 " '00100',\n",
248 " '00101',\n",
249 " '00100',\n",
250 " '01110',\n",
251 " '00101',\n",
252 " '01000',\n",
253 " '01110',\n",
254 " '10001',\n",
255 " '10011',\n",
256 " '10010',\n",
257 " '00011',\n",
258 " '00011',\n",
259 " '01110',\n",
260 " '00100',\n",
261 " '00100',\n",
262 " '10100',\n",
263 " '01100',\n",
264 " '10010',\n",
265 " '00010',\n",
266 " '10001',\n",
267 " '10100',\n",
268 " '00100',\n",
269 " '10001',\n",
270 " '01101',\n",
271 " '00101',\n",
272 " '00100',\n",
273 " '10011',\n",
274 " '01011',\n",
275 " '00000',\n",
276 " '00000',\n",
277 " '00101',\n",
278 " '10010',\n",
279 " '10011',\n",
280 " '10110',\n",
281 " '01000',\n",
282 " '00100',\n",
283 " '01101',\n",
284 " '10011',\n",
285 " '10001',\n",
286 " '10101',\n",
287 " '01110',\n",
288 " '01110',\n",
289 " '01101',\n",
290 " '00100',\n",
291 " '10001',\n",
292 " '00111',\n",
293 " '10100',\n",
294 " '00000',\n",
295 " '00111',\n",
296 " '10001',\n",
297 " '00000',\n",
298 " '10101',\n",
299 " '00100',\n",
300 " '10001',\n",
301 " '00100',\n",
302 " '00100',\n",
303 " '10011',\n",
304 " '10010',\n",
305 " '10101',\n",
306 " '10010',\n",
307 " '01000',\n",
308 " '00100',\n",
309 " '01011',\n",
310 " '00111',\n",
311 " '01011',\n",
312 " '01110',\n",
313 " '10010',\n",
314 " '10011',\n",
315 " '00011',\n",
316 " '01110',\n",
317 " '00000',\n",
318 " '01011',\n",
319 " '01110',\n",
320 " '11000',\n",
321 " '00000',\n",
322 " '00100',\n",
323 " '10010',\n",
324 " '01100',\n",
325 " '01101',\n",
326 " '01101',\n",
327 " '00011',\n",
328 " '01000',\n",
329 " '00110',\n",
330 " '01101',\n",
331 " '01101',\n",
332 " '10001',\n",
333 " '00111',\n",
334 " '01110',\n",
335 " '00111',\n",
336 " '00111',\n",
337 " '10011',\n",
338 " '10010',\n",
339 " '01101',\n",
340 " '00000',\n",
341 " '01110',\n",
342 " '01000',\n",
343 " '01011',\n",
344 " '01101',\n",
345 " '00010',\n",
346 " '01101',\n",
347 " '10010',\n",
348 " '10010',\n",
349 " '01000',\n",
350 " '00010',\n",
351 " '10001',\n",
352 " '00100',\n",
353 " '00000',\n",
354 " '01101',\n",
355 " '01101',\n",
356 " '00100',\n",
357 " '00100',\n",
358 " '01000',\n",
359 " '01000',\n",
360 " '01000',\n",
361 " '00100',\n",
362 " '10001',\n",
363 " '10110',\n",
364 " '10011',\n",
365 " '00000',\n",
366 " '01101',\n",
367 " '00100',\n",
368 " '10010',\n",
369 " '10001',\n",
370 " '10101',\n",
371 " '01110',\n",
372 " '00110',\n",
373 " '01000',\n",
374 " '00100',\n",
375 " '01000',\n",
376 " '11000',\n",
377 " '10110',\n",
378 " '10010',\n",
379 " '10010',\n",
380 " '00011',\n",
381 " '00110',\n",
382 " '01111',\n",
383 " '10101',\n",
384 " '01110',\n",
385 " '01000',\n",
386 " '00000',\n",
387 " '01000',\n",
388 " '10010',\n",
389 " '00000',\n",
390 " '01110',\n",
391 " '00000',\n",
392 " '00100',\n",
393 " '01110',\n",
394 " '00000',\n",
395 " '00100',\n",
396 " '00011',\n",
397 " '10001',\n",
398 " '01101',\n",
399 " '01000',\n",
400 " '10011',\n",
401 " '10001',\n",
402 " '01101',\n",
403 " '10111',\n",
404 " '00100',\n",
405 " '01000',\n",
406 " '00110',\n",
407 " '10001',\n",
408 " '01111',\n",
409 " '10010',\n",
410 " '10010',\n",
411 " '00111',\n",
412 " '00000',\n",
413 " '00011',\n",
414 " '00111',\n",
415 " '00011',\n",
416 " '10011',\n",
417 " '01110',\n",
418 " '01000',\n",
419 " '01111',\n",
420 " '00000',\n",
421 " '00000',\n",
422 " '10011',\n",
423 " '00100',\n",
424 " '10111',\n",
425 " '00100',\n",
426 " '01101',\n",
427 " '01101',\n",
428 " '00100',\n",
429 " '10010',\n",
430 " '00000',\n",
431 " '00110',\n",
432 " '10001',\n",
433 " '01110',\n",
434 " '00001',\n",
435 " '10011',\n",
436 " '01011',\n",
437 " '00100',\n",
438 " '10010',\n",
439 " '10001',\n",
440 " '01101',\n",
441 " '10001',\n",
442 " '01110',\n",
443 " '01000',\n",
444 " '10001',\n",
445 " '11000',\n",
446 " '01111',\n",
447 " '00001',\n",
448 " '00110',\n",
449 " '00100',\n",
450 " '00011',\n",
451 " '00010',\n",
452 " '01011',\n",
453 " '01011',\n",
454 " '01000',\n",
455 " '10110',\n",
456 " '00000',\n",
457 " '01011',\n",
458 " '00000',\n",
459 " '01011',\n",
460 " '00100',\n",
461 " '00100',\n",
462 " '01101',\n",
463 " '01000',\n",
464 " '00110',\n",
465 " '10001',\n",
466 " '10001',\n",
467 " '01101',\n",
468 " '10110',\n",
469 " '11000',\n",
470 " '10001',\n",
471 " '01011',\n",
472 " '01000',\n",
473 " '01100',\n",
474 " '01011',\n",
475 " '01111',\n",
476 " '10010',\n",
477 " '10011',\n",
478 " '01110',\n",
479 " '01011',\n",
480 " '00100',\n",
481 " '00101',\n",
482 " '10011',\n",
483 " '10001',\n",
484 " '00011',\n",
485 " '01100',\n",
486 " '10100',\n",
487 " '00000',\n",
488 " '10001',\n",
489 " '01000',\n",
490 " '00100',\n",
491 " '00100',\n",
492 " '00100',\n",
493 " '01000',\n",
494 " '01000',\n",
495 " '00000',\n",
496 " '01110',\n",
497 " '01011',\n",
498 " '01101',\n",
499 " '00100',\n",
500 " '10110',\n",
501 " '10010',\n",
502 " '00000',\n",
503 " '01110',\n",
504 " '00111',\n",
505 " '10001',\n",
506 " '10011',\n",
507 " '01011',\n",
508 " '10010',\n",
509 " '10011',\n",
510 " '01110',\n",
511 " '00001',\n",
512 " '00100',\n",
513 " '10011',\n",
514 " '01101',\n",
515 " '10010',\n",
516 " '01011',\n",
517 " '10101',\n",
518 " '00101',\n",
519 " '01000',\n",
520 " '10101',\n",
521 " '00011',\n",
522 " '01110',\n",
523 " '10101',\n",
524 " '10011',\n",
525 " '01111',\n",
526 " '01110',\n",
527 " '00000',\n",
528 " '00100',\n",
529 " '00100',\n",
530 " '01000',\n",
531 " '10010',\n",
532 " '00010',\n",
533 " '01000',\n",
534 " '01110',\n",
535 " '00111',\n",
536 " '01000',\n",
537 " '01111',\n",
538 " '10010',\n",
539 " '00100',\n",
540 " '10101',\n",
541 " '00100',\n",
542 " '00100',\n",
543 " '00011',\n",
544 " '10011',\n",
545 " '00100',\n",
546 " '10110',\n",
547 " '00101',\n",
548 " '00000',\n",
549 " '10001',\n",
550 " '01101',\n",
551 " '00111',\n",
552 " '00100',\n",
553 " '00001',\n",
554 " '01011',\n",
555 " '00100',\n",
556 " '00000',\n",
557 " '01110',\n",
558 " '10011',\n",
559 " '01110',\n",
560 " '00111',\n",
561 " '10011',\n",
562 " '10011',\n",
563 " '10011',\n",
564 " '00100',\n",
565 " '01111',\n",
566 " '01101',\n",
567 " '00010',\n",
568 " '01010',\n",
569 " '00000',\n",
570 " '01110',\n",
571 " '01101',\n",
572 " '00111',\n",
573 " '10110',\n",
574 " '00100',\n",
575 " '10011',\n",
576 " '01100',\n",
577 " '10101',\n",
578 " '11000',\n",
579 " '01111',\n",
580 " '10001',\n",
581 " '10001',\n",
582 " '00100',\n",
583 " '01110',\n",
584 " '01101',\n",
585 " '01101',\n",
586 " '00000',\n",
587 " '10010',\n",
588 " '00110',\n",
589 " '00011',\n",
590 " '00100',\n",
591 " '00011',\n",
592 " '01110',\n",
593 " '00100',\n",
594 " '00100',\n",
595 " '00100',\n",
596 " '01110',\n",
597 " '00000',\n",
598 " '00000',\n",
599 " '01100',\n",
600 " '10011',\n",
601 " '00010',\n",
602 " '01000',\n",
603 " '00010',\n",
604 " '10011',\n",
605 " '10011',\n",
606 " '01000',\n",
607 " '00101',\n",
608 " '01101',\n",
609 " '00000',\n",
610 " '00011',\n",
611 " '10001',\n",
612 " '00100',\n",
613 " '10010',\n",
614 " '10001',\n",
615 " '10011',\n",
616 " '10010',\n",
617 " '00100',\n",
618 " '10001',\n",
619 " '01110',\n",
620 " '10010',\n",
621 " '00100',\n",
622 " '10011',\n",
623 " '10001',\n",
624 " '00111',\n",
625 " '00010',\n",
626 " '01000',\n",
627 " '00010',\n",
628 " '10011',\n",
629 " '01111',\n",
630 " '10010',\n",
631 " '00000',\n",
632 " '00000',\n",
633 " '00100',\n",
634 " '00111',\n",
635 " '01011',\n",
636 " '00011',\n",
637 " '00111',\n",
638 " '10010',\n",
639 " '00101',\n",
640 " '10111',\n",
641 " '10010',\n",
642 " '01110',\n",
643 " '00000',\n",
644 " '01110',\n",
645 " '10011',\n",
646 " '00010',\n",
647 " '10011',\n",
648 " '00001',\n",
649 " '00001',\n",
650 " '10010',\n",
651 " '01110',\n",
652 " '00100',\n",
653 " '01000',\n",
654 " '10001',\n",
655 " '01101',\n",
656 " '10010',\n",
657 " '00000',\n",
658 " '00011',\n",
659 " '01011',\n",
660 " '11000',\n",
661 " '10011',\n",
662 " '10001',\n",
663 " '10001',\n",
664 " '10100',\n",
665 " '01101',\n",
666 " '10001',\n",
667 " '00010',\n",
668 " '00100',\n",
669 " '01111',\n",
670 " '10011',\n",
671 " '10011',\n",
672 " '00111',\n",
673 " '10001',\n",
674 " '00100',\n",
675 " '10100',\n",
676 " '00111',\n",
677 " '01101',\n",
678 " '01010',\n",
679 " '10011',\n",
680 " '00000',\n",
681 " '00010',\n",
682 " '00100',\n",
683 " '00010',\n",
684 " '00100',\n",
685 " '00100',\n",
686 " '01011',\n",
687 " '10001',\n",
688 " '10110',\n",
689 " '01101',\n",
690 " '01000',\n",
691 " '10001',\n",
692 " '00100',\n",
693 " '00100',\n",
694 " '00100',\n",
695 " '00000',\n",
696 " '00100',\n",
697 " '10010',\n",
698 " '00100',\n",
699 " '00100',\n",
700 " '00100',\n",
701 " '01000',\n",
702 " '00011',\n",
703 " '01000',\n",
704 " '10010',\n",
705 " '01110',\n",
706 " '00110',\n",
707 " '00010',\n",
708 " '00100',\n",
709 " '01110',\n",
710 " '01100',\n",
711 " '01101',\n",
712 " '10001',\n",
713 " '10011',\n",
714 " '00100',\n",
715 " '01001',\n",
716 " '00111',\n",
717 " '00000',\n",
718 " '00110',\n",
719 " '00000',\n",
720 " '00001',\n",
721 " '10010',\n",
722 " '00100',\n",
723 " '01101',\n",
724 " '01000',\n",
725 " '10011',\n",
726 " '01011',\n",
727 " '10110',\n",
728 " '10011',\n",
729 " '10001',\n",
730 " '01101',\n",
731 " '00001',\n",
732 " '01100',\n",
733 " '01000',\n",
734 " '00100',\n",
735 " '01011',\n",
736 " '10010',\n",
737 " '00000',\n",
738 " '10001',\n",
739 " '00100',\n",
740 " '10011',\n",
741 " '00100',\n",
742 " '10010',\n",
743 " '10001',\n",
744 " '01101',\n",
745 " '00110',\n",
746 " '10010',\n",
747 " '01101',\n",
748 " '00111',\n",
749 " '00100',\n",
750 " '00001',\n",
751 " '01000',\n",
752 " '01110',\n",
753 " '10010',\n",
754 " '00011',\n",
755 " '01000',\n",
756 " '00100',\n",
757 " '01101',\n",
758 " '00000',\n",
759 " '00101',\n",
760 " '01011',\n",
761 " '00100',\n",
762 " '01000',\n",
763 " '10010',\n",
764 " '00000',\n",
765 " '00111',\n",
766 " '01110',\n",
767 " '00010',\n",
768 " '01000',\n",
769 " '00101',\n",
770 " '00100',\n",
771 " '10101',\n",
772 " '01100',\n",
773 " '00101',\n",
774 " '00000',\n",
775 " '10011',\n",
776 " '00000',\n",
777 " '01101',\n",
778 " '00000',\n",
779 " '10011',\n",
780 " '10001',\n",
781 " '01101',\n",
782 " '01000',\n",
783 " '00000',\n",
784 " '00110',\n",
785 " '01101',\n",
786 " '00111',\n",
787 " '00000',\n",
788 " '10011',\n",
789 " '01101',\n",
790 " '01100',\n",
791 " '01000',\n",
792 " '00001',\n",
793 " '01101',\n",
794 " '01000',\n",
795 " '10100',\n",
796 " '00101',\n",
797 " '00100',\n",
798 " '01101',\n",
799 " '10001',\n",
800 " '10011',\n",
801 " '01110',\n",
802 " '10011',\n",
803 " '10011',\n",
804 " '10001',\n",
805 " '01101',\n",
806 " '11000',\n",
807 " '01111',\n",
808 " '00000',\n",
809 " '01000',\n",
810 " '00011',\n",
811 " '11000',\n",
812 " '01000',\n",
813 " '00100',\n",
814 " '00110',\n",
815 " '00011',\n",
816 " '01101',\n",
817 " '01100',\n",
818 " '00100',\n",
819 " '10001',\n",
820 " '00111',\n",
821 " '00111',\n",
822 " '01000',\n",
823 " '01110',\n",
824 " '10011',\n",
825 " '10001',\n",
826 " '00100',\n",
827 " '10011',\n",
828 " '00010',\n",
829 " '00100',\n",
830 " '10010',\n",
831 " '10010',\n",
832 " '00100',\n",
833 " '01000',\n",
834 " '01011',\n",
835 " '00011',\n",
836 " '10001',\n",
837 " '00001',\n",
838 " '00010',\n",
839 " '00100',\n",
840 " '01111',\n",
841 " '10001',\n",
842 " '01000',\n",
843 " '00110',\n",
844 " '00000',\n",
845 " '00100',\n",
846 " '10010',\n",
847 " '01110',\n",
848 " '00000',\n",
849 " '00011',\n",
850 " '01011',\n",
851 " '10011',\n",
852 " '00000',\n",
853 " '00111',\n",
854 " '01000',\n",
855 " '00100',\n",
856 " '10101',\n",
857 " '00100',\n",
858 " '00001',\n",
859 " '10001',\n",
860 " '00010',\n",
861 " '00100',\n",
862 " '01101',\n",
863 " '01011',\n",
864 " '00100',\n",
865 " '10101',\n",
866 " '00000',\n",
867 " '10010',\n",
868 " '00000',\n",
869 " '00011',\n",
870 " '01101',\n",
871 " '01101',\n",
872 " '10011',\n",
873 " '00111',\n",
874 " '01101',\n",
875 " '00100',\n",
876 " '01000',\n",
877 " '10011',\n",
878 " '00100',\n",
879 " '01000',\n",
880 " '01000',\n",
881 " '10010',\n",
882 " '00000',\n",
883 " '00111',\n",
884 " '10100',\n",
885 " '00111',\n",
886 " '00111',\n",
887 " '10100',\n",
888 " '00000',\n",
889 " '01100',\n",
890 " '01110',\n",
891 " '01101',\n",
892 " '00100',\n",
893 " '00101',\n",
894 " '11000',\n",
895 " '00111',\n",
896 " '01011',\n",
897 " '01110',\n",
898 " '01101',\n",
899 " '10110',\n",
900 " '00111',\n",
901 " '00000',\n",
902 " '00100',\n",
903 " '00100',\n",
904 " '00100',\n",
905 " '00100',\n",
906 " '01110',\n",
907 " '10010',\n",
908 " '01101',\n",
909 " '00100',\n",
910 " '00100',\n",
911 " '11000',\n",
912 " '00000',\n",
913 " '01101',\n",
914 " '00100',\n",
915 " '01000',\n",
916 " '10010',\n",
917 " '00100',\n",
918 " '10011',\n",
919 " '01110',\n",
920 " '00110',\n",
921 " '11000',\n",
922 " '01000',\n",
923 " '10011',\n",
924 " '00100',\n",
925 " '10001',\n",
926 " '01011',\n",
927 " '01000',\n",
928 " '00111',\n",
929 " '10011',\n",
930 " '00010',\n",
931 " '01100',\n",
932 " '01000',\n",
933 " '01110',\n",
934 " '01000',\n",
935 " '10001',\n",
936 " '00000',\n",
937 " '10001',\n",
938 " '00101',\n",
939 " '00011',\n",
940 " '01110',\n",
941 " '00100',\n",
942 " '10011',\n",
943 " '01101',\n",
944 " '01000',\n",
945 " '00111',\n",
946 " '10011',\n",
947 " '01101',\n",
948 " '00100',\n",
949 " '00111',\n",
950 " '01000',\n",
951 " '01000',\n",
952 " '01010',\n",
953 " '00000',\n",
954 " '01100',\n",
955 " '10001',\n",
956 " '00011',\n",
957 " '01100',\n",
958 " '01101',\n",
959 " '00000',\n",
960 " '00011',\n",
961 " '00000',\n",
962 " '01101',\n",
963 " '00000',\n",
964 " '01110',\n",
965 " '00011',\n",
966 " '10010',\n",
967 " '00100',\n",
968 " '10010',\n",
969 " '00100',\n",
970 " '01000',\n",
971 " '11000',\n",
972 " '00010',\n",
973 " '01011',\n",
974 " '10010',\n",
975 " '01000',\n",
976 " '00000',\n",
977 " '01101',\n",
978 " '10011',\n",
979 " '00000',\n",
980 " '01110',\n",
981 " '01011',\n",
982 " '10011',\n",
983 " '00010',\n",
984 " '01000',\n",
985 " '11000',\n",
986 " '01100',\n",
987 " '01000',\n",
988 " '00011',\n",
989 " '00100',\n",
990 " '01101',\n",
991 " '10011',\n",
992 " '10011',\n",
993 " '00111',\n",
994 " '01011',\n",
995 " '10011',\n",
996 " '01101',\n",
997 " '00011',\n",
998 " '10111',\n",
999 " '10011',\n",
1000 " '10011',\n",
1001 " '10011',\n",
1002 " '01100',\n",
1003 " '00000',\n",
1004 " '10010',\n",
1005 " '00001',\n",
1006 " '01011',\n",
1007 " '00100',\n",
1008 " '00000',\n",
1009 " '00100',\n",
1010 " '00100',\n",
1011 " '10011',\n",
1012 " '01011',\n",
1013 " '01000',\n",
1014 " '10010',\n",
1015 " '01000',\n",
1016 " '10001',\n",
1017 " '10011',\n",
1018 " '10110',\n",
1019 " '10011',\n",
1020 " '10100',\n",
1021 " '10001',\n",
1022 " '01111',\n",
1023 " '00101',\n",
1024 " '00000',\n",
1025 " '01000',\n",
1026 " '01011',\n",
1027 " '10011',\n",
1028 " '00100',\n",
1029 " '00000',\n",
1030 " '01110',\n",
1031 " '00100',\n",
1032 " '00101',\n",
1033 " '00100',\n",
1034 " '01000',\n",
1035 " '10010',\n",
1036 " '01000',\n",
1037 " '01000',\n",
1038 " '01000',\n",
1039 " '11000',\n",
1040 " '01000',\n",
1041 " '10010',\n",
1042 " '01000',\n",
1043 " '01010',\n",
1044 " '10101',\n",
1045 " '10011',\n",
1046 " '10110',\n",
1047 " '01000',\n",
1048 " '10010',\n",
1049 " '01111',\n",
1050 " '10001',\n",
1051 " '00001',\n",
1052 " '10010',\n",
1053 " '01000',\n",
1054 " '01101',\n",
1055 " '00100',\n",
1056 " '01011',\n",
1057 " '01111',\n",
1058 " '00111',\n",
1059 " '10001',\n",
1060 " '01100',\n",
1061 " '01110',\n",
1062 " '00111',\n",
1063 " '01000',\n",
1064 " '00000',\n",
1065 " '00110',\n",
1066 " '01101',\n",
1067 " '01011',\n",
1068 " '10010',\n",
1069 " '01011',\n",
1070 " '10101',\n",
1071 " '01000',\n",
1072 " '10011',\n",
1073 " '01110',\n",
1074 " '00011',\n",
1075 " '00000',\n",
1076 " '01000',\n",
1077 " '10010',\n",
1078 " '00011',\n",
1079 " '01111',\n",
1080 " '01101',\n",
1081 " '11000',\n",
1082 " '00011',\n",
1083 " '00011',\n",
1084 " '00010',\n",
1085 " '00000',\n",
1086 " '00000',\n",
1087 " '01110',\n",
1088 " '10011',\n",
1089 " '00000',\n",
1090 " '00111',\n",
1091 " '00010',\n",
1092 " '00100',\n",
1093 " '00111',\n",
1094 " '10011',\n",
1095 " '10100',\n",
1096 " '00100',\n",
1097 " '01000',\n",
1098 " '10001',\n",
1099 " '10001',\n",
1100 " '00100',\n",
1101 " '00011',\n",
1102 " '00000',\n",
1103 " '00100',\n",
1104 " '00010',\n",
1105 " '10011',\n",
1106 " '01110',\n",
1107 " '10010',\n",
1108 " '01101',\n",
1109 " '10001',\n",
1110 " '00111',\n",
1111 " '10101',\n",
1112 " '01101',\n",
1113 " '00000',\n",
1114 " '01110',\n",
1115 " '00011',\n",
1116 " '01110',\n",
1117 " '01000',\n",
1118 " '01010',\n",
1119 " '01110',\n",
1120 " '00100',\n",
1121 " '10011',\n",
1122 " '00010',\n",
1123 " '01000',\n",
1124 " '01101',\n",
1125 " '00100',\n",
1126 " '01101',\n",
1127 " '00100',\n",
1128 " '10100',\n",
1129 " '10001',\n",
1130 " '10001',\n",
1131 " '01000',\n",
1132 " '10010',\n",
1133 " '00011',\n",
1134 " '00010',\n",
1135 " '01110',\n",
1136 " '10100',\n",
1137 " '10001',\n",
1138 " '00000',\n",
1139 " '00110',\n",
1140 " '01011',\n",
1141 " '10101',\n",
1142 " '01000',\n",
1143 " '01100',\n",
1144 " '01100',\n",
1145 " '10100',\n",
1146 " '01111',\n",
1147 " '01111',\n",
1148 " '00011',\n",
1149 " '01000',\n",
1150 " '10011',\n",
1151 " '00100',\n",
1152 " '00000',\n",
1153 " '01101',\n",
1154 " '00011',\n",
1155 " '01000',\n",
1156 " '10011',\n",
1157 " '01100',\n",
1158 " '00000',\n",
1159 " '00000',\n",
1160 " '01000',\n",
1161 " '00000',\n",
1162 " '01000',\n",
1163 " '00100',\n",
1164 " '01011',\n",
1165 " '00100',\n",
1166 " '01110',\n",
1167 " '01101',\n",
1168 " '01101',\n",
1169 " '10001',\n",
1170 " '00100',\n",
1171 " '00100',\n",
1172 " '00011',\n",
1173 " '00000',\n",
1174 " '01110',\n",
1175 " '00011',\n",
1176 " '00001',\n",
1177 " '01110',\n",
1178 " '01000',\n",
1179 " '10100',\n",
1180 " '01100',\n",
1181 " '00100',\n",
1182 " '01011',\n",
1183 " '10001',\n",
1184 " '01110',\n",
1185 " '10011',\n",
1186 " '01101',\n",
1187 " '10011',\n",
1188 " '10011',\n",
1189 " '10011',\n",
1190 " '00110',\n",
1191 " '01000',\n",
1192 " '10011',\n",
1193 " '01101',\n",
1194 " ...]"
1195 ]
1196 },
1197 "execution_count": 8,
1198 "metadata": {},
1199 "output_type": "execute_result"
1200 }
1201 ],
1202 "source": [
1203 "[c for c in chunks(c8b, 5)]"
1204 ]
1205 },
1206 {
1207 "cell_type": "code",
1208 "execution_count": 9,
1209 "metadata": {},
1210 "outputs": [
1211 {
1212 "data": {
1213 "text/plain": [
1214 "[0,\n",
1215 " 5,\n",
1216 " 2,\n",
1217 " 0,\n",
1218 " 4,\n",
1219 " 20,\n",
1220 " 14,\n",
1221 " 19,\n",
1222 " 19,\n",
1223 " 0,\n",
1224 " 2,\n",
1225 " 19,\n",
1226 " 7,\n",
1227 " 17,\n",
1228 " 8,\n",
1229 " 14,\n",
1230 " 11,\n",
1231 " 4,\n",
1232 " 19,\n",
1233 " 2,\n",
1234 " 18,\n",
1235 " 4,\n",
1236 " 17,\n",
1237 " 19,\n",
1238 " 7,\n",
1239 " 18,\n",
1240 " 7,\n",
1241 " 19,\n",
1242 " 17,\n",
1243 " 0,\n",
1244 " 7,\n",
1245 " 10,\n",
1246 " 24,\n",
1247 " 14,\n",
1248 " 17,\n",
1249 " 15,\n",
1250 " 5,\n",
1251 " 17,\n",
1252 " 6,\n",
1253 " 4,\n",
1254 " 14,\n",
1255 " 0,\n",
1256 " 3,\n",
1257 " 15,\n",
1258 " 15,\n",
1259 " 9,\n",
1260 " 13,\n",
1261 " 6,\n",
1262 " 11,\n",
1263 " 19,\n",
1264 " 4,\n",
1265 " 17,\n",
1266 " 13,\n",
1267 " 4,\n",
1268 " 5,\n",
1269 " 4,\n",
1270 " 14,\n",
1271 " 5,\n",
1272 " 8,\n",
1273 " 14,\n",
1274 " 17,\n",
1275 " 19,\n",
1276 " 18,\n",
1277 " 3,\n",
1278 " 3,\n",
1279 " 14,\n",
1280 " 4,\n",
1281 " 4,\n",
1282 " 20,\n",
1283 " 12,\n",
1284 " 18,\n",
1285 " 2,\n",
1286 " 17,\n",
1287 " 20,\n",
1288 " 4,\n",
1289 " 17,\n",
1290 " 13,\n",
1291 " 5,\n",
1292 " 4,\n",
1293 " 19,\n",
1294 " 11,\n",
1295 " 0,\n",
1296 " 0,\n",
1297 " 5,\n",
1298 " 18,\n",
1299 " 19,\n",
1300 " 22,\n",
1301 " 8,\n",
1302 " 4,\n",
1303 " 13,\n",
1304 " 19,\n",
1305 " 17,\n",
1306 " 21,\n",
1307 " 14,\n",
1308 " 14,\n",
1309 " 13,\n",
1310 " 4,\n",
1311 " 17,\n",
1312 " 7,\n",
1313 " 20,\n",
1314 " 0,\n",
1315 " 7,\n",
1316 " 17,\n",
1317 " 0,\n",
1318 " 21,\n",
1319 " 4,\n",
1320 " 17,\n",
1321 " 4,\n",
1322 " 4,\n",
1323 " 19,\n",
1324 " 18,\n",
1325 " 21,\n",
1326 " 18,\n",
1327 " 8,\n",
1328 " 4,\n",
1329 " 11,\n",
1330 " 7,\n",
1331 " 11,\n",
1332 " 14,\n",
1333 " 18,\n",
1334 " 19,\n",
1335 " 3,\n",
1336 " 14,\n",
1337 " 0,\n",
1338 " 11,\n",
1339 " 14,\n",
1340 " 24,\n",
1341 " 0,\n",
1342 " 4,\n",
1343 " 18,\n",
1344 " 12,\n",
1345 " 13,\n",
1346 " 13,\n",
1347 " 3,\n",
1348 " 8,\n",
1349 " 6,\n",
1350 " 13,\n",
1351 " 13,\n",
1352 " 17,\n",
1353 " 7,\n",
1354 " 14,\n",
1355 " 7,\n",
1356 " 7,\n",
1357 " 19,\n",
1358 " 18,\n",
1359 " 13,\n",
1360 " 0,\n",
1361 " 14,\n",
1362 " 8,\n",
1363 " 11,\n",
1364 " 13,\n",
1365 " 2,\n",
1366 " 13,\n",
1367 " 18,\n",
1368 " 18,\n",
1369 " 8,\n",
1370 " 2,\n",
1371 " 17,\n",
1372 " 4,\n",
1373 " 0,\n",
1374 " 13,\n",
1375 " 13,\n",
1376 " 4,\n",
1377 " 4,\n",
1378 " 8,\n",
1379 " 8,\n",
1380 " 8,\n",
1381 " 4,\n",
1382 " 17,\n",
1383 " 22,\n",
1384 " 19,\n",
1385 " 0,\n",
1386 " 13,\n",
1387 " 4,\n",
1388 " 18,\n",
1389 " 17,\n",
1390 " 21,\n",
1391 " 14,\n",
1392 " 6,\n",
1393 " 8,\n",
1394 " 4,\n",
1395 " 8,\n",
1396 " 24,\n",
1397 " 22,\n",
1398 " 18,\n",
1399 " 18,\n",
1400 " 3,\n",
1401 " 6,\n",
1402 " 15,\n",
1403 " 21,\n",
1404 " 14,\n",
1405 " 8,\n",
1406 " 0,\n",
1407 " 8,\n",
1408 " 18,\n",
1409 " 0,\n",
1410 " 14,\n",
1411 " 0,\n",
1412 " 4,\n",
1413 " 14,\n",
1414 " 0,\n",
1415 " 4,\n",
1416 " 3,\n",
1417 " 17,\n",
1418 " 13,\n",
1419 " 8,\n",
1420 " 19,\n",
1421 " 17,\n",
1422 " 13,\n",
1423 " 23,\n",
1424 " 4,\n",
1425 " 8,\n",
1426 " 6,\n",
1427 " 17,\n",
1428 " 15,\n",
1429 " 18,\n",
1430 " 18,\n",
1431 " 7,\n",
1432 " 0,\n",
1433 " 3,\n",
1434 " 7,\n",
1435 " 3,\n",
1436 " 19,\n",
1437 " 14,\n",
1438 " 8,\n",
1439 " 15,\n",
1440 " 0,\n",
1441 " 0,\n",
1442 " 19,\n",
1443 " 4,\n",
1444 " 23,\n",
1445 " 4,\n",
1446 " 13,\n",
1447 " 13,\n",
1448 " 4,\n",
1449 " 18,\n",
1450 " 0,\n",
1451 " 6,\n",
1452 " 17,\n",
1453 " 14,\n",
1454 " 1,\n",
1455 " 19,\n",
1456 " 11,\n",
1457 " 4,\n",
1458 " 18,\n",
1459 " 17,\n",
1460 " 13,\n",
1461 " 17,\n",
1462 " 14,\n",
1463 " 8,\n",
1464 " 17,\n",
1465 " 24,\n",
1466 " 15,\n",
1467 " 1,\n",
1468 " 6,\n",
1469 " 4,\n",
1470 " 3,\n",
1471 " 2,\n",
1472 " 11,\n",
1473 " 11,\n",
1474 " 8,\n",
1475 " 22,\n",
1476 " 0,\n",
1477 " 11,\n",
1478 " 0,\n",
1479 " 11,\n",
1480 " 4,\n",
1481 " 4,\n",
1482 " 13,\n",
1483 " 8,\n",
1484 " 6,\n",
1485 " 17,\n",
1486 " 17,\n",
1487 " 13,\n",
1488 " 22,\n",
1489 " 24,\n",
1490 " 17,\n",
1491 " 11,\n",
1492 " 8,\n",
1493 " 12,\n",
1494 " 11,\n",
1495 " 15,\n",
1496 " 18,\n",
1497 " 19,\n",
1498 " 14,\n",
1499 " 11,\n",
1500 " 4,\n",
1501 " 5,\n",
1502 " 19,\n",
1503 " 17,\n",
1504 " 3,\n",
1505 " 12,\n",
1506 " 20,\n",
1507 " 0,\n",
1508 " 17,\n",
1509 " 8,\n",
1510 " 4,\n",
1511 " 4,\n",
1512 " 4,\n",
1513 " 8,\n",
1514 " 8,\n",
1515 " 0,\n",
1516 " 14,\n",
1517 " 11,\n",
1518 " 13,\n",
1519 " 4,\n",
1520 " 22,\n",
1521 " 18,\n",
1522 " 0,\n",
1523 " 14,\n",
1524 " 7,\n",
1525 " 17,\n",
1526 " 19,\n",
1527 " 11,\n",
1528 " 18,\n",
1529 " 19,\n",
1530 " 14,\n",
1531 " 1,\n",
1532 " 4,\n",
1533 " 19,\n",
1534 " 13,\n",
1535 " 18,\n",
1536 " 11,\n",
1537 " 21,\n",
1538 " 5,\n",
1539 " 8,\n",
1540 " 21,\n",
1541 " 3,\n",
1542 " 14,\n",
1543 " 21,\n",
1544 " 19,\n",
1545 " 15,\n",
1546 " 14,\n",
1547 " 0,\n",
1548 " 4,\n",
1549 " 4,\n",
1550 " 8,\n",
1551 " 18,\n",
1552 " 2,\n",
1553 " 8,\n",
1554 " 14,\n",
1555 " 7,\n",
1556 " 8,\n",
1557 " 15,\n",
1558 " 18,\n",
1559 " 4,\n",
1560 " 21,\n",
1561 " 4,\n",
1562 " 4,\n",
1563 " 3,\n",
1564 " 19,\n",
1565 " 4,\n",
1566 " 22,\n",
1567 " 5,\n",
1568 " 0,\n",
1569 " 17,\n",
1570 " 13,\n",
1571 " 7,\n",
1572 " 4,\n",
1573 " 1,\n",
1574 " 11,\n",
1575 " 4,\n",
1576 " 0,\n",
1577 " 14,\n",
1578 " 19,\n",
1579 " 14,\n",
1580 " 7,\n",
1581 " 19,\n",
1582 " 19,\n",
1583 " 19,\n",
1584 " 4,\n",
1585 " 15,\n",
1586 " 13,\n",
1587 " 2,\n",
1588 " 10,\n",
1589 " 0,\n",
1590 " 14,\n",
1591 " 13,\n",
1592 " 7,\n",
1593 " 22,\n",
1594 " 4,\n",
1595 " 19,\n",
1596 " 12,\n",
1597 " 21,\n",
1598 " 24,\n",
1599 " 15,\n",
1600 " 17,\n",
1601 " 17,\n",
1602 " 4,\n",
1603 " 14,\n",
1604 " 13,\n",
1605 " 13,\n",
1606 " 0,\n",
1607 " 18,\n",
1608 " 6,\n",
1609 " 3,\n",
1610 " 4,\n",
1611 " 3,\n",
1612 " 14,\n",
1613 " 4,\n",
1614 " 4,\n",
1615 " 4,\n",
1616 " 14,\n",
1617 " 0,\n",
1618 " 0,\n",
1619 " 12,\n",
1620 " 19,\n",
1621 " 2,\n",
1622 " 8,\n",
1623 " 2,\n",
1624 " 19,\n",
1625 " 19,\n",
1626 " 8,\n",
1627 " 5,\n",
1628 " 13,\n",
1629 " 0,\n",
1630 " 3,\n",
1631 " 17,\n",
1632 " 4,\n",
1633 " 18,\n",
1634 " 17,\n",
1635 " 19,\n",
1636 " 18,\n",
1637 " 4,\n",
1638 " 17,\n",
1639 " 14,\n",
1640 " 18,\n",
1641 " 4,\n",
1642 " 19,\n",
1643 " 17,\n",
1644 " 7,\n",
1645 " 2,\n",
1646 " 8,\n",
1647 " 2,\n",
1648 " 19,\n",
1649 " 15,\n",
1650 " 18,\n",
1651 " 0,\n",
1652 " 0,\n",
1653 " 4,\n",
1654 " 7,\n",
1655 " 11,\n",
1656 " 3,\n",
1657 " 7,\n",
1658 " 18,\n",
1659 " 5,\n",
1660 " 23,\n",
1661 " 18,\n",
1662 " 14,\n",
1663 " 0,\n",
1664 " 14,\n",
1665 " 19,\n",
1666 " 2,\n",
1667 " 19,\n",
1668 " 1,\n",
1669 " 1,\n",
1670 " 18,\n",
1671 " 14,\n",
1672 " 4,\n",
1673 " 8,\n",
1674 " 17,\n",
1675 " 13,\n",
1676 " 18,\n",
1677 " 0,\n",
1678 " 3,\n",
1679 " 11,\n",
1680 " 24,\n",
1681 " 19,\n",
1682 " 17,\n",
1683 " 17,\n",
1684 " 20,\n",
1685 " 13,\n",
1686 " 17,\n",
1687 " 2,\n",
1688 " 4,\n",
1689 " 15,\n",
1690 " 19,\n",
1691 " 19,\n",
1692 " 7,\n",
1693 " 17,\n",
1694 " 4,\n",
1695 " 20,\n",
1696 " 7,\n",
1697 " 13,\n",
1698 " 10,\n",
1699 " 19,\n",
1700 " 0,\n",
1701 " 2,\n",
1702 " 4,\n",
1703 " 2,\n",
1704 " 4,\n",
1705 " 4,\n",
1706 " 11,\n",
1707 " 17,\n",
1708 " 22,\n",
1709 " 13,\n",
1710 " 8,\n",
1711 " 17,\n",
1712 " 4,\n",
1713 " 4,\n",
1714 " 4,\n",
1715 " 0,\n",
1716 " 4,\n",
1717 " 18,\n",
1718 " 4,\n",
1719 " 4,\n",
1720 " 4,\n",
1721 " 8,\n",
1722 " 3,\n",
1723 " 8,\n",
1724 " 18,\n",
1725 " 14,\n",
1726 " 6,\n",
1727 " 2,\n",
1728 " 4,\n",
1729 " 14,\n",
1730 " 12,\n",
1731 " 13,\n",
1732 " 17,\n",
1733 " 19,\n",
1734 " 4,\n",
1735 " 9,\n",
1736 " 7,\n",
1737 " 0,\n",
1738 " 6,\n",
1739 " 0,\n",
1740 " 1,\n",
1741 " 18,\n",
1742 " 4,\n",
1743 " 13,\n",
1744 " 8,\n",
1745 " 19,\n",
1746 " 11,\n",
1747 " 22,\n",
1748 " 19,\n",
1749 " 17,\n",
1750 " 13,\n",
1751 " 1,\n",
1752 " 12,\n",
1753 " 8,\n",
1754 " 4,\n",
1755 " 11,\n",
1756 " 18,\n",
1757 " 0,\n",
1758 " 17,\n",
1759 " 4,\n",
1760 " 19,\n",
1761 " 4,\n",
1762 " 18,\n",
1763 " 17,\n",
1764 " 13,\n",
1765 " 6,\n",
1766 " 18,\n",
1767 " 13,\n",
1768 " 7,\n",
1769 " 4,\n",
1770 " 1,\n",
1771 " 8,\n",
1772 " 14,\n",
1773 " 18,\n",
1774 " 3,\n",
1775 " 8,\n",
1776 " 4,\n",
1777 " 13,\n",
1778 " 0,\n",
1779 " 5,\n",
1780 " 11,\n",
1781 " 4,\n",
1782 " 8,\n",
1783 " 18,\n",
1784 " 0,\n",
1785 " 7,\n",
1786 " 14,\n",
1787 " 2,\n",
1788 " 8,\n",
1789 " 5,\n",
1790 " 4,\n",
1791 " 21,\n",
1792 " 12,\n",
1793 " 5,\n",
1794 " 0,\n",
1795 " 19,\n",
1796 " 0,\n",
1797 " 13,\n",
1798 " 0,\n",
1799 " 19,\n",
1800 " 17,\n",
1801 " 13,\n",
1802 " 8,\n",
1803 " 0,\n",
1804 " 6,\n",
1805 " 13,\n",
1806 " 7,\n",
1807 " 0,\n",
1808 " 19,\n",
1809 " 13,\n",
1810 " 12,\n",
1811 " 8,\n",
1812 " 1,\n",
1813 " 13,\n",
1814 " 8,\n",
1815 " 20,\n",
1816 " 5,\n",
1817 " 4,\n",
1818 " 13,\n",
1819 " 17,\n",
1820 " 19,\n",
1821 " 14,\n",
1822 " 19,\n",
1823 " 19,\n",
1824 " 17,\n",
1825 " 13,\n",
1826 " 24,\n",
1827 " 15,\n",
1828 " 0,\n",
1829 " 8,\n",
1830 " 3,\n",
1831 " 24,\n",
1832 " 8,\n",
1833 " 4,\n",
1834 " 6,\n",
1835 " 3,\n",
1836 " 13,\n",
1837 " 12,\n",
1838 " 4,\n",
1839 " 17,\n",
1840 " 7,\n",
1841 " 7,\n",
1842 " 8,\n",
1843 " 14,\n",
1844 " 19,\n",
1845 " 17,\n",
1846 " 4,\n",
1847 " 19,\n",
1848 " 2,\n",
1849 " 4,\n",
1850 " 18,\n",
1851 " 18,\n",
1852 " 4,\n",
1853 " 8,\n",
1854 " 11,\n",
1855 " 3,\n",
1856 " 17,\n",
1857 " 1,\n",
1858 " 2,\n",
1859 " 4,\n",
1860 " 15,\n",
1861 " 17,\n",
1862 " 8,\n",
1863 " 6,\n",
1864 " 0,\n",
1865 " 4,\n",
1866 " 18,\n",
1867 " 14,\n",
1868 " 0,\n",
1869 " 3,\n",
1870 " 11,\n",
1871 " 19,\n",
1872 " 0,\n",
1873 " 7,\n",
1874 " 8,\n",
1875 " 4,\n",
1876 " 21,\n",
1877 " 4,\n",
1878 " 1,\n",
1879 " 17,\n",
1880 " 2,\n",
1881 " 4,\n",
1882 " 13,\n",
1883 " 11,\n",
1884 " 4,\n",
1885 " 21,\n",
1886 " 0,\n",
1887 " 18,\n",
1888 " 0,\n",
1889 " 3,\n",
1890 " 13,\n",
1891 " 13,\n",
1892 " 19,\n",
1893 " 7,\n",
1894 " 13,\n",
1895 " 4,\n",
1896 " 8,\n",
1897 " 19,\n",
1898 " 4,\n",
1899 " 8,\n",
1900 " 8,\n",
1901 " 18,\n",
1902 " 0,\n",
1903 " 7,\n",
1904 " 20,\n",
1905 " 7,\n",
1906 " 7,\n",
1907 " 20,\n",
1908 " 0,\n",
1909 " 12,\n",
1910 " 14,\n",
1911 " 13,\n",
1912 " 4,\n",
1913 " 5,\n",
1914 " 24,\n",
1915 " 7,\n",
1916 " 11,\n",
1917 " 14,\n",
1918 " 13,\n",
1919 " 22,\n",
1920 " 7,\n",
1921 " 0,\n",
1922 " 4,\n",
1923 " 4,\n",
1924 " 4,\n",
1925 " 4,\n",
1926 " 14,\n",
1927 " 18,\n",
1928 " 13,\n",
1929 " 4,\n",
1930 " 4,\n",
1931 " 24,\n",
1932 " 0,\n",
1933 " 13,\n",
1934 " 4,\n",
1935 " 8,\n",
1936 " 18,\n",
1937 " 4,\n",
1938 " 19,\n",
1939 " 14,\n",
1940 " 6,\n",
1941 " 24,\n",
1942 " 8,\n",
1943 " 19,\n",
1944 " 4,\n",
1945 " 17,\n",
1946 " 11,\n",
1947 " 8,\n",
1948 " 7,\n",
1949 " 19,\n",
1950 " 2,\n",
1951 " 12,\n",
1952 " 8,\n",
1953 " 14,\n",
1954 " 8,\n",
1955 " 17,\n",
1956 " 0,\n",
1957 " 17,\n",
1958 " 5,\n",
1959 " 3,\n",
1960 " 14,\n",
1961 " 4,\n",
1962 " 19,\n",
1963 " 13,\n",
1964 " 8,\n",
1965 " 7,\n",
1966 " 19,\n",
1967 " 13,\n",
1968 " 4,\n",
1969 " 7,\n",
1970 " 8,\n",
1971 " 8,\n",
1972 " 10,\n",
1973 " 0,\n",
1974 " 12,\n",
1975 " 17,\n",
1976 " 3,\n",
1977 " 12,\n",
1978 " 13,\n",
1979 " 0,\n",
1980 " 3,\n",
1981 " 0,\n",
1982 " 13,\n",
1983 " 0,\n",
1984 " 14,\n",
1985 " 3,\n",
1986 " 18,\n",
1987 " 4,\n",
1988 " 18,\n",
1989 " 4,\n",
1990 " 8,\n",
1991 " 24,\n",
1992 " 2,\n",
1993 " 11,\n",
1994 " 18,\n",
1995 " 8,\n",
1996 " 0,\n",
1997 " 13,\n",
1998 " 19,\n",
1999 " 0,\n",
2000 " 14,\n",
2001 " 11,\n",
2002 " 19,\n",
2003 " 2,\n",
2004 " 8,\n",
2005 " 24,\n",
2006 " 12,\n",
2007 " 8,\n",
2008 " 3,\n",
2009 " 4,\n",
2010 " 13,\n",
2011 " 19,\n",
2012 " 19,\n",
2013 " 7,\n",
2014 " 11,\n",
2015 " 19,\n",
2016 " 13,\n",
2017 " 3,\n",
2018 " 23,\n",
2019 " 19,\n",
2020 " 19,\n",
2021 " 19,\n",
2022 " 12,\n",
2023 " 0,\n",
2024 " 18,\n",
2025 " 1,\n",
2026 " 11,\n",
2027 " 4,\n",
2028 " 0,\n",
2029 " 4,\n",
2030 " 4,\n",
2031 " 19,\n",
2032 " 11,\n",
2033 " 8,\n",
2034 " 18,\n",
2035 " 8,\n",
2036 " 17,\n",
2037 " 19,\n",
2038 " 22,\n",
2039 " 19,\n",
2040 " 20,\n",
2041 " 17,\n",
2042 " 15,\n",
2043 " 5,\n",
2044 " 0,\n",
2045 " 8,\n",
2046 " 11,\n",
2047 " 19,\n",
2048 " 4,\n",
2049 " 0,\n",
2050 " 14,\n",
2051 " 4,\n",
2052 " 5,\n",
2053 " 4,\n",
2054 " 8,\n",
2055 " 18,\n",
2056 " 8,\n",
2057 " 8,\n",
2058 " 8,\n",
2059 " 24,\n",
2060 " 8,\n",
2061 " 18,\n",
2062 " 8,\n",
2063 " 10,\n",
2064 " 21,\n",
2065 " 19,\n",
2066 " 22,\n",
2067 " 8,\n",
2068 " 18,\n",
2069 " 15,\n",
2070 " 17,\n",
2071 " 1,\n",
2072 " 18,\n",
2073 " 8,\n",
2074 " 13,\n",
2075 " 4,\n",
2076 " 11,\n",
2077 " 15,\n",
2078 " 7,\n",
2079 " 17,\n",
2080 " 12,\n",
2081 " 14,\n",
2082 " 7,\n",
2083 " 8,\n",
2084 " 0,\n",
2085 " 6,\n",
2086 " 13,\n",
2087 " 11,\n",
2088 " 18,\n",
2089 " 11,\n",
2090 " 21,\n",
2091 " 8,\n",
2092 " 19,\n",
2093 " 14,\n",
2094 " 3,\n",
2095 " 0,\n",
2096 " 8,\n",
2097 " 18,\n",
2098 " 3,\n",
2099 " 15,\n",
2100 " 13,\n",
2101 " 24,\n",
2102 " 3,\n",
2103 " 3,\n",
2104 " 2,\n",
2105 " 0,\n",
2106 " 0,\n",
2107 " 14,\n",
2108 " 19,\n",
2109 " 0,\n",
2110 " 7,\n",
2111 " 2,\n",
2112 " 4,\n",
2113 " 7,\n",
2114 " 19,\n",
2115 " 20,\n",
2116 " 4,\n",
2117 " 8,\n",
2118 " 17,\n",
2119 " 17,\n",
2120 " 4,\n",
2121 " 3,\n",
2122 " 0,\n",
2123 " 4,\n",
2124 " 2,\n",
2125 " 19,\n",
2126 " 14,\n",
2127 " 18,\n",
2128 " 13,\n",
2129 " 17,\n",
2130 " 7,\n",
2131 " 21,\n",
2132 " 13,\n",
2133 " 0,\n",
2134 " 14,\n",
2135 " 3,\n",
2136 " 14,\n",
2137 " 8,\n",
2138 " 10,\n",
2139 " 14,\n",
2140 " 4,\n",
2141 " 19,\n",
2142 " 2,\n",
2143 " 8,\n",
2144 " 13,\n",
2145 " 4,\n",
2146 " 13,\n",
2147 " 4,\n",
2148 " 20,\n",
2149 " 17,\n",
2150 " 17,\n",
2151 " 8,\n",
2152 " 18,\n",
2153 " 3,\n",
2154 " 2,\n",
2155 " 14,\n",
2156 " 20,\n",
2157 " 17,\n",
2158 " 0,\n",
2159 " 6,\n",
2160 " 11,\n",
2161 " 21,\n",
2162 " 8,\n",
2163 " 12,\n",
2164 " 12,\n",
2165 " 20,\n",
2166 " 15,\n",
2167 " 15,\n",
2168 " 3,\n",
2169 " 8,\n",
2170 " 19,\n",
2171 " 4,\n",
2172 " 0,\n",
2173 " 13,\n",
2174 " 3,\n",
2175 " 8,\n",
2176 " 19,\n",
2177 " 12,\n",
2178 " 0,\n",
2179 " 0,\n",
2180 " 8,\n",
2181 " 0,\n",
2182 " 8,\n",
2183 " 4,\n",
2184 " 11,\n",
2185 " 4,\n",
2186 " 14,\n",
2187 " 13,\n",
2188 " 13,\n",
2189 " 17,\n",
2190 " 4,\n",
2191 " 4,\n",
2192 " 3,\n",
2193 " 0,\n",
2194 " 14,\n",
2195 " 3,\n",
2196 " 1,\n",
2197 " 14,\n",
2198 " 8,\n",
2199 " 20,\n",
2200 " 12,\n",
2201 " 4,\n",
2202 " 11,\n",
2203 " 17,\n",
2204 " 14,\n",
2205 " 19,\n",
2206 " 13,\n",
2207 " 19,\n",
2208 " 19,\n",
2209 " 19,\n",
2210 " 6,\n",
2211 " 8,\n",
2212 " 19,\n",
2213 " 13,\n",
2214 " ...]"
2215 ]
2216 },
2217 "execution_count": 9,
2218 "metadata": {},
2219 "output_type": "execute_result"
2220 }
2221 ],
2222 "source": [
2223 "[(int(c, 2)) for c in chunks(c8b, 5)]"
2224 ]
2225 },
2226 {
2227 "cell_type": "code",
2228 "execution_count": 10,
2229 "metadata": {},
2230 "outputs": [
2231 {
2232 "data": {
2233 "text/plain": [
2234 "24"
2235 ]
2236 },
2237 "execution_count": 10,
2238 "metadata": {},
2239 "output_type": "execute_result"
2240 }
2241 ],
2242 "source": [
2243 "max([(int(c, 2)) for c in chunks(c8b, 5)])"
2244 ]
2245 },
2246 {
2247 "cell_type": "code",
2248 "execution_count": 11,
2249 "metadata": {},
2250 "outputs": [
2251 {
2252 "data": {
2253 "text/plain": [
2254 "'y'"
2255 ]
2256 },
2257 "execution_count": 11,
2258 "metadata": {},
2259 "output_type": "execute_result"
2260 }
2261 ],
2262 "source": [
2263 "max([chr(int(c, 2) + ord('a')) for c in chunks(c8b, 5)])"
2264 ]
2265 },
2266 {
2267 "cell_type": "code",
2268 "execution_count": 12,
2269 "metadata": {},
2270 "outputs": [
2271 {
2272 "data": {
2273 "text/plain": [
2274 "'y'"
2275 ]
2276 },
2277 "execution_count": 12,
2278 "metadata": {},
2279 "output_type": "execute_result"
2280 }
2281 ],
2282 "source": [
2283 "max([unpos(int(c, 2)) for c in chunks(c8b, 5)])"
2284 ]
2285 },
2286 {
2287 "cell_type": "code",
2288 "execution_count": 13,
2289 "metadata": {},
2290 "outputs": [],
2291 "source": [
2292 "def cadenus_letter(n, doubled='v'):\n",
2293 " letter = chr(n + ord('a'))\n",
2294 " if letter > doubled:\n",
2295 " letter = chr(n + ord('a') + 1)\n",
2296 " return letter"
2297 ]
2298 },
2299 {
2300 "cell_type": "code",
2301 "execution_count": 14,
2302 "metadata": {},
2303 "outputs": [],
2304 "source": [
2305 "def cadenus_letter(n, doubled='v'):\n",
2306 " letter = unpos(n)\n",
2307 " if letter > doubled:\n",
2308 " letter = unpos(n + 1)\n",
2309 " return letter"
2310 ]
2311 },
2312 {
2313 "cell_type": "code",
2314 "execution_count": 15,
2315 "metadata": {},
2316 "outputs": [
2317 {
2318 "data": {
2319 "text/plain": [
2320 "('afcaeuottacthrioletcserthshtrahkzorpfrgeoadppjnglternefeofiortsddoeeumscruernfetlaafstxientrvoonerhuahravereetsvsielhlostdoalozaesmnndignnrhohhtsnaoilncnssicreanneeiiierxtanesrvogieizxssdgpvoiaisaoaeoaedrnitrnyeigrpsshadhdtoipaateyennesagrobtlesrnroirzpbgedcllixalaleenigrrnxzrlimlpstoleftrdmuarieeeiiaolnexsaohrtlstobetnslvfivdovtpoaeeisciohipseveedtexfarnhebleaotohtttepnckaonhxetmvzprreonnasgdedoeeeoaamtcicttifnadresrtserosetrhcictpsaaehldhsfysoaotctbbsoeirnsadlztrrunrceptthreuhnktaceceelrxnireeeaeseeeidisogceomnrtejhagabsenitlxtrnbmielsaretesrngsnhebiosdienafleisahocifevmfatanatrniagnhatnmibniufenrtottrnzpaidziegdnmerhhiotretcesseildrbceprigaesoadltahievebrcenlevasadnnthneiteiisahuhhuamonefzhlonxhaeeeeosneezaneisetogziterlihtcmioirarfdoetnihtnehiikamrdmnadanaodseseizclsiantaoltcizmidentthltndytttmasbleaeetlisirtxturpfailteaoefeisiiizisikvtxisprbsinelphrmohiagnlslvitodaisdpnzddcaaotahcehtueirredaectosnrhvnaodoikoetcineneurrisdcouraglvimmuppditeanditmaaiaieleonnreedaodboiumelrotntttgitnrlrienniklzsogstcifzpipvidvssmnceiasiitsnneatitomrhbnhnidprlrepoznalsnvsdosanesitfaenltgodatteeaisicrootmsmfhauenirsghznxeintegodiileedtarnosrcaaendtcuttfdrbehtmfitoordruiaozaanoeeldoinhusgiteaoriecevemntratmtfpeucutahamtnexonicdeemrpaolitoafesoosspfnlneeootachllirssysofpdftfrnpraeeazlonahautntcntcbaxloneftoatecvoxdlxvnneedtiioigtegmtaheeatefaaeprrcrosheerrpalediengidrreouhvesuroztnsosinuiuiofprda',\n",
2321 " -1814.2525644323327)"
2322 ]
2323 },
2324 "execution_count": 15,
2325 "metadata": {},
2326 "output_type": "execute_result"
2327 }
2328 ],
2329 "source": [
2330 "c8bl = ''.join([cadenus_letter(int(c, 2)) for c in chunks(c8b, 5)])\n",
2331 "c8bl, Pletters(c8bl)"
2332 ]
2333 },
2334 {
2335 "cell_type": "code",
2336 "execution_count": 16,
2337 "metadata": {},
2338 "outputs": [
2339 {
2340 "data": {
2341 "text/plain": [
2342 "('afcaeuottacthrioletcserthshtrahkyorpfrgeoadppjnglternefeofiortsddoeeumscruernfetlaafstwientrvoonerhuahravereetsvsielhlostdoaloyaesmnndignnrhohhtsnaoilncnssicreanneeiiierwtanesrvogieiywssdgpvoiaisaoaeoaedrnitrnxeigrpsshadhdtoipaatexennesagrobtlesrnroirypbgedclliwalaleenigrrnwyrlimlpstoleftrdmuarieeeiiaolnewsaohrtlstobetnslvfivdovtpoaeeisciohipseveedtewfarnhebleaotohtttepnckaonhwetmvyprreonnasgdedoeeeoaamtcicttifnadresrtserosetrhcictpsaaehldhsfxsoaotctbbsoeirnsadlytrrunrceptthreuhnktaceceelrwnireeeaeseeeidisogceomnrtejhagabsenitlwtrnbmielsaretesrngsnhebiosdienafleisahocifevmfatanatrniagnhatnmibniufenrtottrnypaidyiegdnmerhhiotretcesseildrbceprigaesoadltahievebrcenlevasadnnthneiteiisahuhhuamonefyhlonwhaeeeeosneeyaneisetogyiterlihtcmioirarfdoetnihtnehiikamrdmnadanaodseseiyclsiantaoltciymidentthltndxtttmasbleaeetlisirtwturpfailteaoefeisiiiyisikvtwisprbsinelphrmohiagnlslvitodaisdpnyddcaaotahcehtueirredaectosnrhvnaodoikoetcineneurrisdcouraglvimmuppditeanditmaaiaieleonnreedaodboiumelrotntttgitnrlrienniklysogstcifypipvidvssmnceiasiitsnneatitomrhbnhnidprlrepoynalsnvsdosanesitfaenltgodatteeaisicrootmsmfhauenirsghynweintegodiileedtarnosrcaaendtcuttfdrbehtmfitoordruiaoyaanoeeldoinhusgiteaoriecevemntratmtfpeucutahamtnewonicdeemrpaolitoafesoosspfnlneeootachllirssxsofpdftfrnpraeeaylonahautntcntcbawloneftoatecvowdlwvnneedtiioigtegmtaheeatefaaeprrcrosheerrpalediengidrreouhvesuroytnsosinuiuiofprda',\n",
2343 " -1760.1126100904926)"
2344 ]
2345 },
2346 "execution_count": 16,
2347 "metadata": {},
2348 "output_type": "execute_result"
2349 }
2350 ],
2351 "source": [
2352 "c8bl = ''.join([cadenus_letter(int(c, 2), doubled='z') for c in chunks(c8b, 5)])\n",
2353 "c8bl, Pletters(c8bl)"
2354 ]
2355 },
2356 {
2357 "cell_type": "code",
2358 "execution_count": 17,
2359 "metadata": {},
2360 "outputs": [
2361 {
2362 "data": {
2363 "text/plain": [
2364 "'y'"
2365 ]
2366 },
2367 "execution_count": 17,
2368 "metadata": {},
2369 "output_type": "execute_result"
2370 }
2371 ],
2372 "source": [
2373 "max((cl for cl in string.ascii_lowercase),\n",
2374 " key=lambda l: Pletters(cadenus_letter(int(c, 2), doubled=l) for c in chunks(c8b, 5)))"
2375 ]
2376 },
2377 {
2378 "cell_type": "code",
2379 "execution_count": 18,
2380 "metadata": {},
2381 "outputs": [
2382 {
2383 "data": {
2384 "text/plain": [
2385 "('afcaeuottacthrioletcserthshtrahkzorpfrgeoadppjnglternefeofiortsddoeeumscruernfetlaafstxientrvoonerhuahravereetsvsielhlostdoalozaesmnndignnrhohhtsnaoilncnssicreanneeiiierxtanesrvogieizxssdgpvoiaisaoaeoaedrnitrnyeigrpsshadhdtoipaateyennesagrobtlesrnroirzpbgedcllixalaleenigrrnxzrlimlpstoleftrdmuarieeeiiaolnexsaohrtlstobetnslvfivdovtpoaeeisciohipseveedtexfarnhebleaotohtttepnckaonhxetmvzprreonnasgdedoeeeoaamtcicttifnadresrtserosetrhcictpsaaehldhsfysoaotctbbsoeirnsadlztrrunrceptthreuhnktaceceelrxnireeeaeseeeidisogceomnrtejhagabsenitlxtrnbmielsaretesrngsnhebiosdienafleisahocifevmfatanatrniagnhatnmibniufenrtottrnzpaidziegdnmerhhiotretcesseildrbceprigaesoadltahievebrcenlevasadnnthneiteiisahuhhuamonefzhlonxhaeeeeosneezaneisetogziterlihtcmioirarfdoetnihtnehiikamrdmnadanaodseseizclsiantaoltcizmidentthltndytttmasbleaeetlisirtxturpfailteaoefeisiiizisikvtxisprbsinelphrmohiagnlslvitodaisdpnzddcaaotahcehtueirredaectosnrhvnaodoikoetcineneurrisdcouraglvimmuppditeanditmaaiaieleonnreedaodboiumelrotntttgitnrlrienniklzsogstcifzpipvidvssmnceiasiitsnneatitomrhbnhnidprlrepoznalsnvsdosanesitfaenltgodatteeaisicrootmsmfhauenirsghznxeintegodiileedtarnosrcaaendtcuttfdrbehtmfitoordruiaozaanoeeldoinhusgiteaoriecevemntratmtfpeucutahamtnexonicdeemrpaolitoafesoosspfnlneeootachllirssysofpdftfrnpraeeazlonahautntcntcbaxloneftoatecvoxdlxvnneedtiioigtegmtaheeatefaaeprrcrosheerrpalediengidrreouhvesuroztnsosinuiuiofprda',\n",
2386 " -1814.2525644323327)"
2387 ]
2388 },
2389 "execution_count": 18,
2390 "metadata": {},
2391 "output_type": "execute_result"
2392 }
2393 ],
2394 "source": [
2395 "c8bl = ''.join([cadenus_letter(int(c, 2), doubled='v') for c in chunks(c8b, 5)])\n",
2396 "c8bl, Pletters(c8bl)"
2397 ]
2398 },
2399 {
2400 "cell_type": "code",
2401 "execution_count": 19,
2402 "metadata": {},
2403 "outputs": [
2404 {
2405 "data": {
2406 "text/plain": [
2407 "('a', 'z')"
2408 ]
2409 },
2410 "execution_count": 19,
2411 "metadata": {},
2412 "output_type": "execute_result"
2413 }
2414 ],
2415 "source": [
2416 "min(c8bl), max(c8bl)"
2417 ]
2418 },
2419 {
2420 "cell_type": "code",
2421 "execution_count": 20,
2422 "metadata": {},
2423 "outputs": [
2424 {
2425 "data": {
2426 "text/plain": [
2427 "(1400, 56.0)"
2428 ]
2429 },
2430 "execution_count": 20,
2431 "metadata": {},
2432 "output_type": "execute_result"
2433 }
2434 ],
2435 "source": [
2436 "len(c8bl), len(c8bl) / 25"
2437 ]
2438 },
2439 {
2440 "cell_type": "code",
2441 "execution_count": 21,
2442 "metadata": {},
2443 "outputs": [
2444 {
2445 "data": {
2446 "text/plain": [
2447 "<matplotlib.axes._subplots.AxesSubplot at 0x7f37f275c390>"
2448 ]
2449 },
2450 "execution_count": 21,
2451 "metadata": {},
2452 "output_type": "execute_result"
2453 },
2454 {
2455 "data": {
2456 "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD7CAYAAABkO19ZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAEuhJREFUeJzt3X+05HVdx/HnK0gwxQBZiaPIiiFqhqtewU5iJGb4o5BKZFX8maslHs1OHVKTtMyfZBkFrUKAPxARSVT8wcGS/M1d2JYVJQGXXM623ESJYx4UfPfHfK8Ol3vvzJ2Zuz8++3ycM2e+3898P/N97/fOvOYzn5n5bqoKSVK7fmZ7FyBJWl4GvSQ1zqCXpMYZ9JLUOINekhpn0EtS4wx6SWqcQS9JjTPoJalxu2/vAgD222+/Wrly5fYuQ5J2KuvWrfufqloxaLsdIuhXrlzJ9PT09i5DknYqSW4cZjunbiSpcQa9JDXOoJekxhn0ktQ4g16SGmfQS1LjBgZ9krOS3JxkY1/b+UnWd5dNSdZ37SuT/KDvtjOWs3hJ0mDDfI/+bOA04NzZhqp61uxyklOBW/u2v76qVk2qQEnSeAYGfVVdnmTlfLclCXA88MTJltW2lSd/YsHbNr3laduwEkm7gnHn6I8EtlbVN/vaHpTkqiSfS3LkQh2TrEkynWR6ZmZmzDIkSQsZN+hXA+f1rW8BHlhVjwJeDXwgyX3m61hVa6tqqqqmVqwYeKoGSdKIRg76JLsDvwOcP9tWVbdX1Xe65XXA9cBDxi1SkjS6cUb0TwK+UVWbZxuSrEiyW7d8MHAIcMN4JUqSxjHM1yvPA74EHJpkc5IXdzedwF2nbQCeAGzovm75YeBlVXXLJAuWJC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D8qnrzEH0fSu+tWYDLqmrg285RdW8fj6P3QIXeFNPF9F7g1lbVc+ZsPxuguwOH0Bul3c7wb+O3iUn83Ufc7/uAhwJf46dTN1ULfKbT1+8a4BeBb7GE49l9qPn4bvXfq+qqIWrcLsdmW5nzIr8bveB+Y1WdNqDfm+k9Rxf8bGqBflNVNT2n7cSqeu8ifd5A76wAdzvWSR62nM/5u+1vRw/6HV33JDyyW718mCfh9tB9gDg7p/iFuQ/aOds2HRLjSnJtLfLh8CL95j2uu/rxHMWcY3kHsLWq7the9ezoDHppiZL8M/D2Id/yS9udQS8tUZKvAw9miVMw0vZi0EtL5BSMdjYGvSQ1boc9BYIkaTIMeklqnEEvSY0z6CWpcf8PFvkZRxhURioAAAAASUVORK5CYII=\n",
2457 "text/plain": [
2458 "<matplotlib.figure.Figure at 0x7f37f2757470>"
2459 ]
2460 },
2461 "metadata": {},
2462 "output_type": "display_data"
2463 }
2464 ],
2465 "source": [
2466 "freqs_8b = pd.Series(collections.Counter([l.lower() for l in c8bl if l in string.ascii_letters]))\n",
2467 "freqs_8b.plot(kind='bar')"
2468 ]
2469 },
2470 {
2471 "cell_type": "code",
2472 "execution_count": 22,
2473 "metadata": {},
2474 "outputs": [
2475 {
2476 "data": {
2477 "text/plain": [
2478 "<matplotlib.axes._subplots.AxesSubplot at 0x7f37f26b4c50>"
2479 ]
2480 },
2481 "execution_count": 22,
2482 "metadata": {},
2483 "output_type": "execute_result"
2484 },
2485 {
2486 "data": {
2487 "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAD7CAYAAACWq8i5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAGXNJREFUeJzt3X+0XWV95/H3p1B+TAsSNKYsgsZOM1rK+ANSSFdtR6WFgJ2GTpXBtpJxKJkW7KLj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AkdTM0JEndDA1JUrf/D01s6fDIlGlbAAAAAElFTkSuQmCC\n",
2488 "text/plain": [
2489 "<matplotlib.figure.Figure at 0x7f37f27526a0>"
2490 ]
2491 },
2492 "metadata": {},
2493 "output_type": "display_data"
2494 }
2495 ],
2496 "source": [
2497 "freqs = pd.Series(english_counts)\n",
2498 "freqs.plot(kind='bar')"
2499 ]
2500 },
2501 {
2502 "cell_type": "code",
2503 "execution_count": 23,
2504 "metadata": {},
2505 "outputs": [
2506 {
2507 "data": {
2508 "text/plain": [
2509 "['afcaeuottacthrioletcserthshtrahkzorpfrgeoadppjnglternefe',\n",
2510 " 'ofiortsddoeeumscruernfetlaafstxientrvoonerhuahravereetsv',\n",
2511 " 'sielhlostdoalozaesmnndignnrhohhtsnaoilncnssicreanneeiiie',\n",
2512 " 'rxtanesrvogieizxssdgpvoiaisaoaeoaedrnitrnyeigrpsshadhdto',\n",
2513 " 'ipaateyennesagrobtlesrnroirzpbgedcllixalaleenigrrnxzrlim',\n",
2514 " 'lpstoleftrdmuarieeeiiaolnexsaohrtlstobetnslvfivdovtpoaee',\n",
2515 " 'isciohipseveedtexfarnhebleaotohtttepnckaonhxetmvzprreonn',\n",
2516 " 'asgdedoeeeoaamtcicttifnadresrtserosetrhcictpsaaehldhsfys',\n",
2517 " 'oaotctbbsoeirnsadlztrrunrceptthreuhnktaceceelrxnireeeaes',\n",
2518 " 'eeeidisogceomnrtejhagabsenitlxtrnbmielsaretesrngsnhebios',\n",
2519 " 'dienafleisahocifevmfatanatrniagnhatnmibniufenrtottrnzpai',\n",
2520 " 'dziegdnmerhhiotretcesseildrbceprigaesoadltahievebrcenlev',\n",
2521 " 'asadnnthneiteiisahuhhuamonefzhlonxhaeeeeosneezaneisetogz',\n",
2522 " 'iterlihtcmioirarfdoetnihtnehiikamrdmnadanaodseseizclsian',\n",
2523 " 'taoltcizmidentthltndytttmasbleaeetlisirtxturpfailteaoefe',\n",
2524 " 'isiiizisikvtxisprbsinelphrmohiagnlslvitodaisdpnzddcaaota',\n",
2525 " 'hcehtueirredaectosnrhvnaodoikoetcineneurrisdcouraglvimmu',\n",
2526 " 'ppditeanditmaaiaieleonnreedaodboiumelrotntttgitnrlrienni',\n",
2527 " 'klzsogstcifzpipvidvssmnceiasiitsnneatitomrhbnhnidprlrepo',\n",
2528 " 'znalsnvsdosanesitfaenltgodatteeaisicrootmsmfhauenirsghzn',\n",
2529 " 'xeintegodiileedtarnosrcaaendtcuttfdrbehtmfitoordruiaozaa',\n",
2530 " 'noeeldoinhusgiteaoriecevemntratmtfpeucutahamtnexonicdeem',\n",
2531 " 'rpaolitoafesoosspfnlneeootachllirssysofpdftfrnpraeeazlon',\n",
2532 " 'ahautntcntcbaxloneftoatecvoxdlxvnneedtiioigtegmtaheeatef',\n",
2533 " 'aaeprrcrosheerrpalediengidrreouhvesuroztnsosinuiuiofprda']"
2534 ]
2535 },
2536 "execution_count": 23,
2537 "metadata": {},
2538 "output_type": "execute_result"
2539 }
2540 ],
2541 "source": [
2542 "rows = chunks(c8bl, len(c8bl) // 25)\n",
2543 "rows"
2544 ]
2545 },
2546 {
2547 "cell_type": "code",
2548 "execution_count": 24,
2549 "metadata": {},
2550 "outputs": [
2551 {
2552 "data": {
2553 "text/plain": [
2554 "['a..ae....a..h....e..se..hsh..ah....p...e.a.pp.....e..e.e',\n",
2555 " '......s...ee..s...e...e..aa.s...e.......e.h.ah.a.e.ee.s.',\n",
2556 " 's.e.h..s...a...aes.........h.hh.s.a......ss...ea..ee...e',\n",
2557 " '...a.es.....e...ss..p...a.sa.ae.ae........e...pssha.h...',\n",
2558 " '.paa.e.e..esa......es.......p..e......a.a.ee............',\n",
2559 " '.ps...e......a..eee..a...e.sa.h...s...e..s.........p.aee',\n",
2560 " '.s...h.pse.ee..e..a..he..ea...h...ep...a..h.e....p..e...',\n",
2561 " 'as..e..eee.aa..........a..es..se..se..h....psaaeh..hs..s',\n",
2562 " '.a......s.e...sa..........ep..h.e.h...a.e.ee......eeeaes',\n",
2563 " 'eee...s...e.....e.ha.a.se...........e.sa.e.es...s.he...s',\n",
2564 " '..e.a..e.sah....e...a.a.a....a..ha.........e.........pa.',\n",
2565 " '...e....e.hh....e..esse......ep...aes.a...ah.e.e...e..e.',\n",
2566 " 'asa....h.e..e..sah.hh.a...e..h....haeeee.s.ee.a.e.se....',\n",
2567 " '..e...h.......a....e...h..eh...a.....a.a.a..sese....s.a.',\n",
2568 " '.a.........e...h.........as..eaee...s.......p.a...ea.e.e',\n",
2569 " '.s.....s......sp..s..e.ph...h.a...s......a.s.p.....aa..a',\n",
2570 " 'h.eh..e...e.ae...s..h..a......e....e.e....s.....a.......',\n",
2571 " 'pp...ea.....aa.a.e.e....ee.a.......e................e...',\n",
2572 " '...s..s.....p.p....ss...e.as...s..ea......h..h...p...ep.',\n",
2573 " '..a.s..s..sa.es...ae......a..eea.s.......s..ha.e...s.h..',\n",
2574 " '.e...e......ee..a...s..aae...........eh............a..aa',\n",
2575 " '..ee.....h.s...ea...e.e.e....a....pe....aha...e......ee.',\n",
2576 " '.pa.....a.es..ssp....ee...a.h....ss.s..p......p.aeea....',\n",
2577 " 'aha.........a....e...a.e..........ee........e...aheea.e.',\n",
2578 " 'aaep.....shee..pa.e..e......e..h.es......s.s........p..a']"
2579 ]
2580 },
2581 "execution_count": 24,
2582 "metadata": {},
2583 "output_type": "execute_result"
2584 }
2585 ],
2586 "source": [
2587 "chunks(''.join([l if l in 'phase' else '.' for l in c8bl]), 56)"
2588 ]
2589 },
2590 {
2591 "cell_type": "code",
2592 "execution_count": 25,
2593 "metadata": {},
2594 "outputs": [
2595 {
2596 "data": {
2597 "text/plain": [
2598 "['aosriliaoeddaitihpkzxnraa',\n",
2599 " 'ffixppssaeizstascplneopha',\n",
2600 " 'cietascgoeeiaeoiedzaieaae',\n",
2601 " 'aolaatidtinedrlihislneoup',\n",
2602 " 'erhntooecdagnltittostlltr',\n",
2603 " 'utleelhdtifdniczuegnedinr',\n",
2604 " 'ososyeiobslnthiieasvgottc',\n",
2605 " 'tdsrefpeboemhtzsintsoiocr',\n",
2606 " 'tdtvntsesgiencmirdcddnano',\n",
2607 " 'aodonreeocsremikriioihfts',\n",
2608 " 'ceogedvoeeahiidvetfsiuech',\n",
2609 " 'teaismeaiohhtoetdmzalssbe',\n",
2610 " 'huleauearmoieinxaapnegoae',\n",
2611 " 'rmoigadmnncoirtieaieeioxr',\n",
2612 " 'iszzrrttsritiatscipsdtslr',\n",
2613 " 'ocaxoiecatfrsrhptavitesop',\n",
2614 " 'lresbexideeeaflroiitaapna',\n",
2615 " 'eusstefcljvthdtbsedfrofel',\n",
2616 " 'temdleatzhmcuonsnlvanrnfe',\n",
2617 " 'crngeirttafehedireseoiltd',\n",
2618 " 'snnpsinirgashtynhosnsenoi',\n",
2619 " 'efdvrahfratsuntevnmlrceae',\n",
2620 " 'reionoenubaeaitlnnntceetn',\n",
2621 " 'ttgirlbansnimhtparcgavoeg',\n",
2622 " 'hlnaonldrealotmhoeeoaeoci',\n",
2623 " 'saniieercntdnnardeidemtvd',\n",
2624 " 'harsrxaeeirreesmodaannaor',\n",
2625 " 'tfhazsosptnbfhboiastdtcxr',\n",
2626 " 'rsoopatrtliczilhkoittrhde',\n",
2627 " 'athaboottxaehieiodiecallo',\n",
2628 " 'hxheghhshtgplkaaebteutlxu',\n",
2629 " 'kitoerterrnroaegtosatmivh',\n",
2630 " 'zesadttrenhinmencinittrnv',\n",
2631 " 'onnecltoubagxrtliunsffsne',\n",
2632 " 'rtadlseshmtahdlsnmeidpses',\n",
2633 " 'prorltpenineamileeacreyeu',\n",
2634 " 'fviniontkemsensvnltrbusdr',\n",
2635 " 'rolixbcrtlioeaiierioecoto',\n",
2636 " 'gontaekhasbaedrtuotohufiz',\n",
2637 " 'encrltaccandeatortotttpit',\n",
2638 " 'oennanoierilonxdrnmmmadon',\n",
2639 " 'arsylsncceutsataitrsfhfis',\n",
2640 " 'dhseelhtetfanouisthmiatgo',\n",
2641 " 'puiievxpeeehedrsdtbftmfts',\n",
2642 " 'pacgnfeslsniespdcgnhotrei',\n",
2643 " 'jhrriitarrrezefpoihaonngn',\n",
2644 " 'nrepgvmaxntvasanutnurepmu',\n",
2645 " 'gaasrdvengoeneizrniedxrti',\n",
2646 " 'lvnsrozhistbeildardnroaau',\n",
2647 " 'tenhnvplrntriztdglpiunehi',\n",
2648 " 'ereaxtrdehrcsceclrrriieeo',\n",
2649 " 'reedzprheeneelaavilsacaef',\n",
2650 " 'neihroesebzntsoaiergodzap',\n",
2651 " 'etidlaofaiploieomnehzeltr',\n",
2652 " 'fsitienyeoaegaftmnpzaeoed',\n",
2653 " 'eveomensssivzneauionamnfa']"
2654 ]
2655 },
2656 "execution_count": 25,
2657 "metadata": {},
2658 "output_type": "execute_result"
2659 }
2660 ],
2661 "source": [
2662 "columns = [''.join(c) for c in zip(*rows)]\n",
2663 "columns"
2664 ]
2665 },
2666 {
2667 "cell_type": "code",
2668 "execution_count": 26,
2669 "metadata": {},
2670 "outputs": [
2671 {
2672 "data": {
2673 "text/plain": [
2674 "{'a': [(0, 0),\n",
2675 " (0, 3),\n",
2676 " (0, 9),\n",
2677 " (0, 29),\n",
2678 " (0, 41),\n",
2679 " (1, 25),\n",
2680 " (1, 26),\n",
2681 " (1, 44),\n",
2682 " (1, 47),\n",
2683 " (2, 11),\n",
2684 " (2, 15),\n",
2685 " (2, 34),\n",
2686 " (2, 47),\n",
2687 " (3, 3),\n",
2688 " (3, 24),\n",
2689 " (3, 27),\n",
2690 " (3, 29),\n",
2691 " (3, 32),\n",
2692 " (3, 50),\n",
2693 " (4, 2),\n",
2694 " (4, 3),\n",
2695 " (4, 12),\n",
2696 " (4, 38),\n",
2697 " (4, 40),\n",
2698 " (5, 13),\n",
2699 " (5, 21),\n",
2700 " (5, 28),\n",
2701 " (5, 53),\n",
2702 " (6, 18),\n",
2703 " (6, 26),\n",
2704 " (6, 39),\n",
2705 " (7, 0),\n",
2706 " (7, 11),\n",
2707 " (7, 12),\n",
2708 " (7, 23),\n",
2709 " (7, 45),\n",
2710 " (7, 46),\n",
2711 " (8, 1),\n",
2712 " (8, 15),\n",
2713 " (8, 38),\n",
2714 " (8, 53),\n",
2715 " (9, 19),\n",
2716 " (9, 21),\n",
2717 " (9, 39),\n",
2718 " (10, 4),\n",
2719 " (10, 10),\n",
2720 " (10, 20),\n",
2721 " (10, 22),\n",
2722 " (10, 24),\n",
2723 " (10, 29),\n",
2724 " (10, 33),\n",
2725 " (10, 54),\n",
2726 " (11, 34),\n",
2727 " (11, 38),\n",
2728 " (11, 42),\n",
2729 " (12, 0),\n",
2730 " (12, 2),\n",
2731 " (12, 16),\n",
2732 " (12, 22),\n",
2733 " (12, 35),\n",
2734 " (12, 46),\n",
2735 " (13, 14),\n",
2736 " (13, 31),\n",
2737 " (13, 37),\n",
2738 " (13, 39),\n",
2739 " (13, 41),\n",
2740 " (13, 54),\n",
2741 " (14, 1),\n",
2742 " (14, 25),\n",
2743 " (14, 30),\n",
2744 " (14, 46),\n",
2745 " (14, 51),\n",
2746 " (15, 30),\n",
2747 " (15, 41),\n",
2748 " (15, 51),\n",
2749 " (15, 52),\n",
2750 " (15, 55),\n",
2751 " (16, 12),\n",
2752 " (16, 23),\n",
2753 " (16, 48),\n",
2754 " (17, 6),\n",
2755 " (17, 12),\n",
2756 " (17, 13),\n",
2757 " (17, 15),\n",
2758 " (17, 27),\n",
2759 " (18, 26),\n",
2760 " (18, 35),\n",
2761 " (19, 2),\n",
2762 " (19, 11),\n",
2763 " (19, 18),\n",
2764 " (19, 26),\n",
2765 " (19, 31),\n",
2766 " (19, 45),\n",
2767 " (20, 16),\n",
2768 " (20, 23),\n",
2769 " (20, 24),\n",
2770 " (20, 51),\n",
2771 " (20, 54),\n",
2772 " (20, 55),\n",
2773 " (21, 16),\n",
2774 " (21, 29),\n",
2775 " (21, 40),\n",
2776 " (21, 42),\n",
2777 " (22, 2),\n",
2778 " (22, 8),\n",
2779 " (22, 26),\n",
2780 " (22, 48),\n",
2781 " (22, 51),\n",
2782 " (23, 0),\n",
2783 " (23, 2),\n",
2784 " (23, 12),\n",
2785 " (23, 21),\n",
2786 " (23, 48),\n",
2787 " (23, 52),\n",
2788 " (24, 0),\n",
2789 " (24, 1),\n",
2790 " (24, 16),\n",
2791 " (24, 55)],\n",
2792 " 'e': [(0, 4),\n",
2793 " (0, 17),\n",
2794 " (0, 21),\n",
2795 " (0, 39),\n",
2796 " (0, 50),\n",
2797 " (0, 53),\n",
2798 " (0, 55),\n",
2799 " (1, 10),\n",
2800 " (1, 11),\n",
2801 " (1, 18),\n",
2802 " (1, 22),\n",
2803 " (1, 32),\n",
2804 " (1, 40),\n",
2805 " (1, 49),\n",
2806 " (1, 51),\n",
2807 " (1, 52),\n",
2808 " (2, 2),\n",
2809 " (2, 16),\n",
2810 " (2, 46),\n",
2811 " (2, 50),\n",
2812 " (2, 51),\n",
2813 " (2, 55),\n",
2814 " (3, 5),\n",
2815 " (3, 12),\n",
2816 " (3, 30),\n",
2817 " (3, 33),\n",
2818 " (3, 42),\n",
2819 " (4, 5),\n",
2820 " (4, 7),\n",
2821 " (4, 10),\n",
2822 " (4, 19),\n",
2823 " (4, 31),\n",
2824 " (4, 42),\n",
2825 " (4, 43),\n",
2826 " (5, 6),\n",
2827 " (5, 16),\n",
2828 " (5, 17),\n",
2829 " (5, 18),\n",
2830 " (5, 25),\n",
2831 " (5, 38),\n",
2832 " (5, 54),\n",
2833 " (5, 55),\n",
2834 " (6, 9),\n",
2835 " (6, 11),\n",
2836 " (6, 12),\n",
2837 " (6, 15),\n",
2838 " (6, 22),\n",
2839 " (6, 25),\n",
2840 " (6, 34),\n",
2841 " (6, 44),\n",
2842 " (6, 52),\n",
2843 " (7, 4),\n",
2844 " (7, 7),\n",
2845 " (7, 8),\n",
2846 " (7, 9),\n",
2847 " (7, 26),\n",
2848 " (7, 31),\n",
2849 " (7, 35),\n",
2850 " (7, 47),\n",
2851 " (8, 10),\n",
2852 " (8, 26),\n",
2853 " (8, 32),\n",
2854 " (8, 40),\n",
2855 " (8, 42),\n",
2856 " (8, 43),\n",
2857 " (8, 50),\n",
2858 " (8, 51),\n",
2859 " (8, 52),\n",
2860 " (8, 54),\n",
2861 " (9, 0),\n",
2862 " (9, 1),\n",
2863 " (9, 2),\n",
2864 " (9, 10),\n",
2865 " (9, 16),\n",
2866 " (9, 24),\n",
2867 " (9, 36),\n",
2868 " (9, 41),\n",
2869 " (9, 43),\n",
2870 " (9, 51),\n",
2871 " (10, 2),\n",
2872 " (10, 7),\n",
2873 " (10, 16),\n",
2874 " (10, 43),\n",
2875 " (11, 3),\n",
2876 " (11, 8),\n",
2877 " (11, 16),\n",
2878 " (11, 19),\n",
2879 " (11, 22),\n",
2880 " (11, 29),\n",
2881 " (11, 35),\n",
2882 " (11, 45),\n",
2883 " (11, 47),\n",
2884 " (11, 51),\n",
2885 " (11, 54),\n",
2886 " (12, 9),\n",
2887 " (12, 12),\n",
2888 " (12, 26),\n",
2889 " (12, 36),\n",
2890 " (12, 37),\n",
2891 " (12, 38),\n",
2892 " (12, 39),\n",
2893 " (12, 43),\n",
2894 " (12, 44),\n",
2895 " (12, 48),\n",
2896 " (12, 51),\n",
2897 " (13, 2),\n",
2898 " (13, 19),\n",
2899 " (13, 26),\n",
2900 " (13, 45),\n",
2901 " (13, 47),\n",
2902 " (14, 11),\n",
2903 " (14, 29),\n",
2904 " (14, 31),\n",
2905 " (14, 32),\n",
2906 " (14, 50),\n",
2907 " (14, 53),\n",
2908 " (14, 55),\n",
2909 " (15, 21),\n",
2910 " (16, 2),\n",
2911 " (16, 6),\n",
2912 " (16, 10),\n",
2913 " (16, 13),\n",
2914 " (16, 30),\n",
2915 " (16, 35),\n",
2916 " (16, 37),\n",
2917 " (17, 5),\n",
2918 " (17, 17),\n",
2919 " (17, 19),\n",
2920 " (17, 24),\n",
2921 " (17, 25),\n",
2922 " (17, 35),\n",
2923 " (17, 52),\n",
2924 " (18, 24),\n",
2925 " (18, 34),\n",
2926 " (18, 53),\n",
2927 " (19, 13),\n",
2928 " (19, 19),\n",
2929 " (19, 29),\n",
2930 " (19, 30),\n",
2931 " (19, 47),\n",
2932 " (20, 1),\n",
2933 " (20, 5),\n",
2934 " (20, 12),\n",
2935 " (20, 13),\n",
2936 " (20, 25),\n",
2937 " (20, 37),\n",
2938 " (21, 2),\n",
2939 " (21, 3),\n",
2940 " (21, 15),\n",
2941 " (21, 20),\n",
2942 " (21, 22),\n",
2943 " (21, 24),\n",
2944 " (21, 35),\n",
2945 " (21, 46),\n",
2946 " (21, 53),\n",
2947 " (21, 54),\n",
2948 " (22, 10),\n",
2949 " (22, 21),\n",
2950 " (22, 22),\n",
2951 " (22, 49),\n",
2952 " (22, 50),\n",
2953 " (23, 17),\n",
2954 " (23, 23),\n",
2955 " (23, 34),\n",
2956 " (23, 35),\n",
2957 " (23, 44),\n",
2958 " (23, 50),\n",
2959 " (23, 51),\n",
2960 " (23, 54),\n",
2961 " (24, 2),\n",
2962 " (24, 11),\n",
2963 " (24, 12),\n",
2964 " (24, 18),\n",
2965 " (24, 21),\n",
2966 " (24, 28),\n",
2967 " (24, 33)],\n",
2968 " 'h': [(0, 12),\n",
2969 " (0, 24),\n",
2970 " (0, 26),\n",
2971 " (0, 30),\n",
2972 " (1, 42),\n",
2973 " (1, 45),\n",
2974 " (2, 4),\n",
2975 " (2, 27),\n",
2976 " (2, 29),\n",
2977 " (2, 30),\n",
2978 " (3, 49),\n",
2979 " (3, 52),\n",
2980 " (5, 30),\n",
2981 " (6, 5),\n",
2982 " (6, 21),\n",
2983 " (6, 30),\n",
2984 " (6, 42),\n",
2985 " (7, 38),\n",
2986 " (7, 48),\n",
2987 " (7, 51),\n",
2988 " (8, 30),\n",
2989 " (8, 34),\n",
2990 " (9, 18),\n",
2991 " (9, 50),\n",
2992 " (10, 11),\n",
2993 " (10, 32),\n",
2994 " (11, 10),\n",
2995 " (11, 11),\n",
2996 " (11, 43),\n",
2997 " (12, 7),\n",
2998 " (12, 17),\n",
2999 " (12, 19),\n",
3000 " (12, 20),\n",
3001 " (12, 29),\n",
3002 " (12, 34),\n",
3003 " (13, 6),\n",
3004 " (13, 23),\n",
3005 " (13, 27),\n",
3006 " (14, 15),\n",
3007 " (15, 24),\n",
3008 " (15, 28),\n",
3009 " (16, 0),\n",
3010 " (16, 3),\n",
3011 " (16, 20),\n",
3012 " (18, 42),\n",
3013 " (18, 45),\n",
3014 " (19, 44),\n",
3015 " (19, 53),\n",
3016 " (20, 38),\n",
3017 " (21, 9),\n",
3018 " (21, 41),\n",
3019 " (22, 28),\n",
3020 " (23, 1),\n",
3021 " (23, 49),\n",
3022 " (24, 10),\n",
3023 " (24, 31)],\n",
3024 " 'n': [(0, 46),\n",
3025 " (0, 52),\n",
3026 " (1, 20),\n",
3027 " (1, 33),\n",
3028 " (1, 39),\n",
3029 " (2, 19),\n",
3030 " (2, 20),\n",
3031 " (2, 24),\n",
3032 " (2, 25),\n",
3033 " (2, 33),\n",
3034 " (2, 38),\n",
3035 " (2, 40),\n",
3036 " (2, 48),\n",
3037 " (2, 49),\n",
3038 " (3, 4),\n",
3039 " (3, 36),\n",
3040 " (3, 40),\n",
3041 " (4, 8),\n",
3042 " (4, 9),\n",
3043 " (4, 22),\n",
3044 " (4, 44),\n",
3045 " (4, 49),\n",
3046 " (5, 24),\n",
3047 " (5, 40),\n",
3048 " (6, 20),\n",
3049 " (6, 36),\n",
3050 " (6, 41),\n",
3051 " (6, 54),\n",
3052 " (6, 55),\n",
3053 " (7, 22),\n",
3054 " (8, 13),\n",
3055 " (8, 23),\n",
3056 " (8, 35),\n",
3057 " (8, 47),\n",
3058 " (9, 13),\n",
3059 " (9, 25),\n",
3060 " (9, 32),\n",
3061 " (9, 46),\n",
3062 " (9, 49),\n",
3063 " (10, 3),\n",
3064 " (10, 23),\n",
3065 " (10, 27),\n",
3066 " (10, 31),\n",
3067 " (10, 35),\n",
3068 " (10, 39),\n",
3069 " (10, 44),\n",
3070 " (10, 51),\n",
3071 " (11, 6),\n",
3072 " (11, 52),\n",
3073 " (12, 4),\n",
3074 " (12, 5),\n",
3075 " (12, 8),\n",
3076 " (12, 25),\n",
3077 " (12, 32),\n",
3078 " (12, 42),\n",
3079 " (12, 47),\n",
3080 " (13, 21),\n",
3081 " (13, 25),\n",
3082 " (13, 36),\n",
3083 " (13, 40),\n",
3084 " (13, 55),\n",
3085 " (14, 12),\n",
3086 " (14, 18),\n",
3087 " (15, 20),\n",
3088 " (15, 32),\n",
3089 " (15, 46),\n",
3090 " (16, 18),\n",
3091 " (16, 22),\n",
3092 " (16, 34),\n",
3093 " (16, 36),\n",
3094 " (17, 7),\n",
3095 " (17, 21),\n",
3096 " (17, 22),\n",
3097 " (17, 40),\n",
3098 " (17, 47),\n",
3099 " (17, 53),\n",
3100 " (17, 54),\n",
3101 " (18, 22),\n",
3102 " (18, 32),\n",
3103 " (18, 33),\n",
3104 " (18, 44),\n",
3105 " (18, 46),\n",
3106 " (19, 1),\n",
3107 " (19, 5),\n",
3108 " (19, 12),\n",
3109 " (19, 20),\n",
3110 " (19, 48),\n",
3111 " (19, 55),\n",
3112 " (20, 3),\n",
3113 " (20, 18),\n",
3114 " (20, 26),\n",
3115 " (21, 0),\n",
3116 " (21, 8),\n",
3117 " (21, 26),\n",
3118 " (21, 45),\n",
3119 " (21, 49),\n",
3120 " (22, 18),\n",
3121 " (22, 20),\n",
3122 " (22, 45),\n",
3123 " (22, 55),\n",
3124 " (23, 5),\n",
3125 " (23, 8),\n",
3126 " (23, 16),\n",
3127 " (23, 32),\n",
3128 " (23, 33),\n",
3129 " (24, 22),\n",
3130 " (24, 40),\n",
3131 " (24, 45)],\n",
3132 " 'p': [(0, 35),\n",
3133 " (0, 43),\n",
3134 " (0, 44),\n",
3135 " (3, 20),\n",
3136 " (3, 46),\n",
3137 " (4, 1),\n",
3138 " (4, 28),\n",
3139 " (5, 1),\n",
3140 " (5, 51),\n",
3141 " (6, 7),\n",
3142 " (6, 35),\n",
3143 " (6, 49),\n",
3144 " (7, 43),\n",
3145 " (8, 27),\n",
3146 " (10, 53),\n",
3147 " (11, 30),\n",
3148 " (14, 44),\n",
3149 " (15, 15),\n",
3150 " (15, 23),\n",
3151 " (15, 45),\n",
3152 " (17, 0),\n",
3153 " (17, 1),\n",
3154 " (18, 12),\n",
3155 " (18, 14),\n",
3156 " (18, 49),\n",
3157 " (18, 54),\n",
3158 " (21, 34),\n",
3159 " (22, 1),\n",
3160 " (22, 16),\n",
3161 " (22, 39),\n",
3162 " (22, 46),\n",
3163 " (24, 3),\n",
3164 " (24, 15),\n",
3165 " (24, 52)],\n",
3166 " 's': [(0, 20),\n",
3167 " (0, 25),\n",
3168 " (1, 6),\n",
3169 " (1, 14),\n",
3170 " (1, 28),\n",
3171 " (1, 54),\n",
3172 " (2, 0),\n",
3173 " (2, 7),\n",
3174 " (2, 17),\n",
3175 " (2, 32),\n",
3176 " (2, 41),\n",
3177 " (2, 42),\n",
3178 " (3, 6),\n",
3179 " (3, 16),\n",
3180 " (3, 17),\n",
3181 " (3, 26),\n",
3182 " (3, 47),\n",
3183 " (3, 48),\n",
3184 " (4, 11),\n",
3185 " (4, 20),\n",
3186 " (5, 2),\n",
3187 " (5, 27),\n",
3188 " (5, 34),\n",
3189 " (5, 41),\n",
3190 " (6, 1),\n",
3191 " (6, 8),\n",
3192 " (7, 1),\n",
3193 " (7, 27),\n",
3194 " (7, 30),\n",
3195 " (7, 34),\n",
3196 " (7, 44),\n",
3197 " (7, 52),\n",
3198 " (7, 55),\n",
3199 " (8, 8),\n",
3200 " (8, 14),\n",
3201 " (8, 55),\n",
3202 " (9, 6),\n",
3203 " (9, 23),\n",
3204 " (9, 38),\n",
3205 " (9, 44),\n",
3206 " (9, 48),\n",
3207 " (9, 55),\n",
3208 " (10, 9),\n",
3209 " (11, 20),\n",
3210 " (11, 21),\n",
3211 " (11, 36),\n",
3212 " (12, 1),\n",
3213 " (12, 15),\n",
3214 " (12, 41),\n",
3215 " (12, 50),\n",
3216 " (13, 44),\n",
3217 " (13, 46),\n",
3218 " (13, 52),\n",
3219 " (14, 26),\n",
3220 " (14, 36),\n",
3221 " (15, 1),\n",
3222 " (15, 7),\n",
3223 " (15, 14),\n",
3224 " (15, 18),\n",
3225 " (15, 34),\n",
3226 " (15, 43),\n",
3227 " (16, 17),\n",
3228 " (16, 42),\n",
3229 " (18, 3),\n",
3230 " (18, 6),\n",
3231 " (18, 19),\n",
3232 " (18, 20),\n",
3233 " (18, 27),\n",
3234 " (18, 31),\n",
3235 " (19, 4),\n",
3236 " (19, 7),\n",
3237 " (19, 10),\n",
3238 " (19, 14),\n",
3239 " (19, 33),\n",
3240 " (19, 41),\n",
3241 " (19, 51),\n",
3242 " (20, 20),\n",
3243 " (21, 11),\n",
3244 " (22, 11),\n",
3245 " (22, 14),\n",
3246 " (22, 15),\n",
3247 " (22, 33),\n",
3248 " (22, 34),\n",
3249 " (22, 36),\n",
3250 " (24, 9),\n",
3251 " (24, 34),\n",
3252 " (24, 41),\n",
3253 " (24, 43)],\n",
3254 " 'v': [(1, 36),\n",
3255 " (1, 48),\n",
3256 " (1, 55),\n",
3257 " (3, 8),\n",
3258 " (3, 21),\n",
3259 " (5, 43),\n",
3260 " (5, 46),\n",
3261 " (5, 49),\n",
3262 " (6, 10),\n",
3263 " (6, 47),\n",
3264 " (10, 17),\n",
3265 " (11, 46),\n",
3266 " (11, 55),\n",
3267 " (15, 10),\n",
3268 " (15, 36),\n",
3269 " (16, 21),\n",
3270 " (16, 51),\n",
3271 " (18, 15),\n",
3272 " (18, 18),\n",
3273 " (19, 6),\n",
3274 " (21, 23),\n",
3275 " (23, 25),\n",
3276 " (23, 31),\n",
3277 " (24, 32)]}"
3278 ]
3279 },
3280 "execution_count": 26,
3281 "metadata": {},
3282 "output_type": "execute_result"
3283 }
3284 ],
3285 "source": [
3286 "letter_positions = {letter: [(r, c) for r, row in enumerate(rows) for c, char in enumerate(row) if char == letter] \n",
3287 " for letter in deduplicate('phaseseven')}\n",
3288 "letter_positions"
3289 ]
3290 },
3291 {
3292 "cell_type": "code",
3293 "execution_count": 27,
3294 "metadata": {},
3295 "outputs": [
3296 {
3297 "data": {
3298 "text/plain": [
3299 "{0: 'a',\n",
3300 " 1: 'z',\n",
3301 " 2: 'y',\n",
3302 " 3: 'x',\n",
3303 " 4: 'v',\n",
3304 " 5: 'u',\n",
3305 " 6: 't',\n",
3306 " 7: 's',\n",
3307 " 8: 'r',\n",
3308 " 9: 'q',\n",
3309 " 10: 'p',\n",
3310 " 11: 'o',\n",
3311 " 12: 'n',\n",
3312 " 13: 'm',\n",
3313 " 14: 'l',\n",
3314 " 15: 'k',\n",
3315 " 16: 'j',\n",
3316 " 17: 'i',\n",
3317 " 18: 'h',\n",
3318 " 19: 'g',\n",
3319 " 20: 'f',\n",
3320 " 21: 'e',\n",
3321 " 22: 'd',\n",
3322 " 23: 'c',\n",
3323 " 24: 'b'}"
3324 ]
3325 },
3326 "execution_count": 27,
3327 "metadata": {},
3328 "output_type": "execute_result"
3329 }
3330 ],
3331 "source": [
3332 "keycolumn = make_cadenus_keycolumn(reverse=True)\n",
3333 "inverse_keycolumn = {v: l for l, v in keycolumn.items()}\n",
3334 "inverse_keycolumn"
3335 ]
3336 },
3337 {
3338 "cell_type": "code",
3339 "execution_count": 28,
3340 "metadata": {},
3341 "outputs": [],
3342 "source": [
3343 "def valid_partial_solution(solution, inverse_keycolumn):\n",
3344 " row_indices = [p[0] for p in sorted(solution, key=lambda x: x[1])]\n",
3345 " row_letters = [inverse_keycolumn[i] for i in row_indices]\n",
3346 " letter_pairs = ngrams(row_letters, 2)\n",
3347 " return all(p[0] <= p[1] for p in letter_pairs)"
3348 ]
3349 },
3350 {
3351 "cell_type": "code",
3352 "execution_count": 29,
3353 "metadata": {},
3354 "outputs": [
3355 {
3356 "data": {
3357 "text/plain": [
3358 "43005"
3359 ]
3360 },
3361 "execution_count": 29,
3362 "metadata": {},
3363 "output_type": "execute_result"
3364 }
3365 ],
3366 "source": [
3367 "solutions = [[p] for p in letter_positions['p']]\n",
3368 "for letter in 'ha': #'haseseven':\n",
3369 " new_solutions = []\n",
3370 " for solution in solutions:\n",
3371 " used_columns = [p[1] for p in solution]\n",
3372 " for position in letter_positions[letter]:\n",
3373 " if position[1] not in used_columns:\n",
3374 " if valid_partial_solution(solution + [position], inverse_keycolumn):\n",
3375 " new_solutions += [solution + [position]]\n",
3376 " solutions = new_solutions\n",
3377 "len(solutions)"
3378 ]
3379 },
3380 {
3381 "cell_type": "code",
3382 "execution_count": 30,
3383 "metadata": {},
3384 "outputs": [
3385 {
3386 "data": {
3387 "text/plain": [
3388 "True"
3389 ]
3390 },
3391 "execution_count": 30,
3392 "metadata": {},
3393 "output_type": "execute_result"
3394 }
3395 ],
3396 "source": [
3397 "valid_partial_solution(solutions[1], inverse_keycolumn)"
3398 ]
3399 },
3400 {
3401 "cell_type": "code",
3402 "execution_count": 31,
3403 "metadata": {},
3404 "outputs": [
3405 {
3406 "data": {
3407 "text/plain": [
3408 "['pha',\n",
3409 " 'ruo',\n",
3410 " 'oll',\n",
3411 " 'rea',\n",
3412 " 'laa',\n",
3413 " 'tut',\n",
3414 " 'pei',\n",
3415 " 'ead',\n",
3416 " 'nrt',\n",
3417 " 'imi',\n",
3418 " 'non',\n",
3419 " 'eie',\n",
3420 " 'aed',\n",
3421 " 'mir',\n",
3422 " 'inl',\n",
3423 " 'lxi',\n",
3424 " 'eah',\n",
3425 " 'eai',\n",
3426 " 'aps',\n",
3427 " 'cnl',\n",
3428 " 'ren',\n",
3429 " 'ege',\n",
3430 " 'yoo',\n",
3431 " 'eau',\n",
3432 " 'uep']"
3433 ]
3434 },
3435 "execution_count": 31,
3436 "metadata": {},
3437 "output_type": "execute_result"
3438 }
3439 ],
3440 "source": [
3441 "display = []\n",
3442 "for p in solutions[1]:\n",
3443 " this_column = columns[p[1]]\n",
3444 " rotated_column = this_column[p[0]:] + this_column[:p[0]]\n",
3445 " display += [rotated_column]\n",
3446 "display_rows = [''.join(r) for r in zip(*display)]\n",
3447 "display_rows"
3448 ]
3449 },
3450 {
3451 "cell_type": "code",
3452 "execution_count": 32,
3453 "metadata": {},
3454 "outputs": [],
3455 "source": [
3456 "def display_solution(solution, columns):\n",
3457 " display = []\n",
3458 " for p in solution:\n",
3459 " this_column = columns[p[1]]\n",
3460 " rotated_column = this_column[p[0]:] + this_column[:p[0]]\n",
3461 " display += [rotated_column]\n",
3462 " return [''.join(r) for r in zip(*display)]"
3463 ]
3464 },
3465 {
3466 "cell_type": "code",
3467 "execution_count": 33,
3468 "metadata": {},
3469 "outputs": [
3470 {
3471 "data": {
3472 "text/plain": [
3473 "['pha',\n",
3474 " 'ruo',\n",
3475 " 'ols',\n",
3476 " 'rer',\n",
3477 " 'lai',\n",
3478 " 'tul',\n",
3479 " 'pei',\n",
3480 " 'eaa',\n",
3481 " 'nro',\n",
3482 " 'ime',\n",
3483 " 'nod',\n",
3484 " 'eid',\n",
3485 " 'aea',\n",
3486 " 'mii',\n",
3487 " 'int',\n",
3488 " 'lxi',\n",
3489 " 'eah',\n",
3490 " 'eap',\n",
3491 " 'apk',\n",
3492 " 'cnz',\n",
3493 " 'rex',\n",
3494 " 'egn',\n",
3495 " 'yor',\n",
3496 " 'eaa',\n",
3497 " 'uea']"
3498 ]
3499 },
3500 "execution_count": 33,
3501 "metadata": {},
3502 "output_type": "execute_result"
3503 }
3504 ],
3505 "source": [
3506 "display_solution(solutions[0], columns)"
3507 ]
3508 },
3509 {
3510 "cell_type": "code",
3511 "execution_count": 34,
3512 "metadata": {},
3513 "outputs": [
3514 {
3515 "data": {
3516 "text/plain": [
3517 "-110.74748837196742"
3518 ]
3519 },
3520 "execution_count": 34,
3521 "metadata": {},
3522 "output_type": "execute_result"
3523 }
3524 ],
3525 "source": [
3526 "sum(Ptrigrams(r) for r in display_rows)"
3527 ]
3528 },
3529 {
3530 "cell_type": "code",
3531 "execution_count": 35,
3532 "metadata": {},
3533 "outputs": [],
3534 "source": [
3535 "def score_solution(solution, columns):\n",
3536 " display = []\n",
3537 " for p in solution:\n",
3538 " this_column = columns[p[1]]\n",
3539 " rotated_column = this_column[p[0]:] + this_column[:p[0]]\n",
3540 " display += [rotated_column]\n",
3541 " display_rows = [''.join(r) for r in zip(*display)]\n",
3542 " return sum(Ptrigrams(r) for r in display_rows)"
3543 ]
3544 },
3545 {
3546 "cell_type": "code",
3547 "execution_count": 36,
3548 "metadata": {},
3549 "outputs": [
3550 {
3551 "data": {
3552 "text/plain": [
3553 "[([(0, 35), (0, 12), (0, 0)],\n",
3554 " ['pha',\n",
3555 " 'ruo',\n",
3556 " 'ols',\n",
3557 " 'rer',\n",
3558 " 'lai',\n",
3559 " 'tul',\n",
3560 " 'pei',\n",
3561 " 'eaa',\n",
3562 " 'nro',\n",
3563 " 'ime',\n",
3564 " 'nod',\n",
3565 " 'eid',\n",
3566 " 'aea',\n",
3567 " 'mii',\n",
3568 " 'int',\n",
3569 " 'lxi',\n",
3570 " 'eah',\n",
3571 " 'eap',\n",
3572 " 'apk',\n",
3573 " 'cnz',\n",
3574 " 'rex',\n",
3575 " 'egn',\n",
3576 " 'yor',\n",
3577 " 'eaa',\n",
3578 " 'uea'],\n",
3579 " -114.13063154833905),\n",
3580 " ([(0, 35), (0, 12), (0, 3)],\n",
3581 " ['pha',\n",
3582 " 'ruo',\n",
3583 " 'oll',\n",
3584 " 'rea',\n",
3585 " 'laa',\n",
3586 " 'tut',\n",
3587 " 'pei',\n",
3588 " 'ead',\n",
3589 " 'nrt',\n",
3590 " 'imi',\n",
3591 " 'non',\n",
3592 " 'eie',\n",
3593 " 'aed',\n",
3594 " 'mir',\n",
3595 " 'inl',\n",
3596 " 'lxi',\n",
3597 " 'eah',\n",
3598 " 'eai',\n",
3599 " 'aps',\n",
3600 " 'cnl',\n",
3601 " 'ren',\n",
3602 " 'ege',\n",
3603 " 'yoo',\n",
3604 " 'eau',\n",
3605 " 'uep'],\n",
3606 " -110.74748837196742),\n",
3607 " ([(0, 35), (0, 12), (0, 9)],\n",
3608 " ['pha',\n",
3609 " 'ruo',\n",
3610 " 'old',\n",
3611 " 'reo',\n",
3612 " 'lan',\n",
3613 " 'tur',\n",
3614 " 'pee',\n",
3615 " 'eae',\n",
3616 " 'nro',\n",
3617 " 'imc',\n",
3618 " 'nos',\n",
3619 " 'eir',\n",
3620 " 'aee',\n",
3621 " 'mim',\n",
3622 " 'ini',\n",
3623 " 'lxk',\n",
3624 " 'ear',\n",
3625 " 'eai',\n",
3626 " 'api',\n",
3627 " 'cno',\n",
3628 " 'rei',\n",
3629 " 'egh',\n",
3630 " 'yof',\n",
3631 " 'eat',\n",
3632 " 'ues'],\n",
3633 " -104.78169431178242),\n",
3634 " ([(0, 35), (0, 12), (0, 29)],\n",
3635 " ['pha',\n",
3636 " 'rut',\n",
3637 " 'olh',\n",
3638 " 'rea',\n",
3639 " 'lab',\n",
3640 " 'tuo',\n",
3641 " 'peo',\n",
3642 " 'eat',\n",
3643 " 'nrt',\n",
3644 " 'imx',\n",
3645 " 'noa',\n",
3646 " 'eie',\n",
3647 " 'aeh',\n",
3648 " 'mii',\n",
3649 " 'ine',\n",
3650 " 'lxi',\n",
3651 " 'eao',\n",
3652 " 'ead',\n",
3653 " 'api',\n",
3654 " 'cne',\n",
3655 " 'rec',\n",
3656 " 'ega',\n",
3657 " 'yol',\n",
3658 " 'eal',\n",
3659 " 'ueo'],\n",
3660 " -109.4716997212109),\n",
3661 " ([(0, 35), (0, 12), (0, 41)],\n",
3662 " ['pha',\n",
3663 " 'rur',\n",
3664 " 'ols',\n",
3665 " 'rey',\n",
3666 " 'lal',\n",
3667 " 'tus',\n",
3668 " 'pen',\n",
3669 " 'eac',\n",
3670 " 'nrc',\n",
3671 " 'ime',\n",
3672 " 'nou',\n",
3673 " 'eit',\n",
3674 " 'aes',\n",
3675 " 'mia',\n",
3676 " 'int',\n",
3677 " 'lxa',\n",
3678 " 'eai',\n",
3679 " 'eat',\n",
3680 " 'apr',\n",
3681 " 'cns',\n",
3682 " 'ref',\n",
3683 " 'egh',\n",
3684 " 'yof',\n",
3685 " 'eai',\n",
3686 " 'ues'],\n",
3687 " -101.93339111217242),\n",
3688 " ([(0, 35), (0, 12), (1, 44)],\n",
3689 " ['pha',\n",
3690 " 'ruc',\n",
3691 " 'olg',\n",
3692 " 'ren',\n",
3693 " 'laf',\n",
3694 " 'tue',\n",
3695 " 'pes',\n",
3696 " 'eal',\n",
3697 " 'nrs',\n",
3698 " 'imn',\n",
3699 " 'noi',\n",
3700 " 'eie',\n",
3701 " 'aes',\n",
3702 " 'mip',\n",
3703 " 'ind',\n",
3704 " 'lxc',\n",
3705 " 'eag',\n",
3706 " 'ean',\n",
3707 " 'aph',\n",
3708 " 'cno',\n",
3709 " 'ret',\n",
3710 " 'egr',\n",
3711 " 'yoe',\n",
3712 " 'eai',\n",
3713 " 'uep'],\n",
3714 " -108.4937247934099),\n",
3715 " ([(0, 35), (0, 12), (1, 47)],\n",
3716 " ['pha',\n",
3717 " 'rua',\n",
3718 " 'ols',\n",
3719 " 'rer',\n",
3720 " 'lad',\n",
3721 " 'tuv',\n",
3722 " 'pee',\n",
3723 " 'ean',\n",
3724 " 'nrg',\n",
3725 " 'imo',\n",
3726 " 'noe',\n",
3727 " 'ein',\n",
3728 " 'aee',\n",
3729 " 'mii',\n",
3730 " 'inz',\n",
3731 " 'lxr',\n",
3732 " 'ean',\n",
3733 " 'eai',\n",
3734 " 'ape',\n",
3735 " 'cnd',\n",
3736 " 'rex',\n",
3737 " 'egr',\n",
3738 " 'yot',\n",
3739 " 'eai',\n",
3740 " 'ueg'],\n",
3741 " -111.05157201209927),\n",
3742 " ([(0, 35), (0, 12), (2, 47)],\n",
3743 " ['pha',\n",
3744 " 'rus',\n",
3745 " 'olr',\n",
3746 " 'red',\n",
3747 " 'lav',\n",
3748 " 'tue',\n",
3749 " 'pen',\n",
3750 " 'eag',\n",
3751 " 'nro',\n",
3752 " 'ime',\n",
3753 " 'non',\n",
3754 " 'eie',\n",
3755 " 'aei',\n",
3756 " 'miz',\n",
3757 " 'inr',\n",
3758 " 'lxn',\n",
3759 " 'eai',\n",
3760 " 'eae',\n",
3761 " 'apd',\n",
3762 " 'cnx',\n",
3763 " 'rer',\n",
3764 " 'egt',\n",
3765 " 'yoi',\n",
3766 " 'eag',\n",
3767 " 'uea'],\n",
3768 " -113.41085773377256),\n",
3769 " ([(0, 35), (0, 12), (3, 50)],\n",
3770 " ['pha',\n",
3771 " 'rux',\n",
3772 " 'olt',\n",
3773 " 'rer',\n",
3774 " 'lad',\n",
3775 " 'tue',\n",
3776 " 'peh',\n",
3777 " 'ear',\n",
3778 " 'nrc',\n",
3779 " 'ims',\n",
3780 " 'noc',\n",
3781 " 'eie',\n",
3782 " 'aec',\n",
3783 " 'mil',\n",
3784 " 'inr',\n",
3785 " 'lxr',\n",
3786 " 'ear',\n",
3787 " 'eai',\n",
3788 " 'api',\n",
3789 " 'cne',\n",
3790 " 'ree',\n",
3791 " 'ego',\n",
3792 " 'yoe',\n",
3793 " 'ear',\n",
3794 " 'uee'],\n",
3795 " -107.5080042911796),\n",
3796 " ([(0, 35), (0, 12), (4, 38)],\n",
3797 " ['pha',\n",
3798 " 'rue',\n",
3799 " 'olk',\n",
3800 " 'reh',\n",
3801 " 'laa',\n",
3802 " 'tus',\n",
3803 " 'peb',\n",
3804 " 'eaa',\n",
3805 " 'nre',\n",
3806 " 'imd',\n",
3807 " 'nor',\n",
3808 " 'eit',\n",
3809 " 'aeu',\n",
3810 " 'mio',\n",
3811 " 'int',\n",
3812 " 'lxo',\n",
3813 " 'eah',\n",
3814 " 'eau',\n",
3815 " 'apf',\n",
3816 " 'cni',\n",
3817 " 'rez',\n",
3818 " 'egg',\n",
3819 " 'yoo',\n",
3820 " 'ean',\n",
3821 " 'uet'],\n",
3822 " -111.19702574254387)]"
3823 ]
3824 },
3825 "execution_count": 36,
3826 "metadata": {},
3827 "output_type": "execute_result"
3828 }
3829 ],
3830 "source": [
3831 "[(s, display_solution(s, columns), score_solution(s, columns)) for s in solutions[:10]]"
3832 ]
3833 },
3834 {
3835 "cell_type": "code",
3836 "execution_count": 37,
3837 "metadata": {},
3838 "outputs": [
3839 {
3840 "data": {
3841 "text/plain": [
3842 "[[(0, 35), (0, 12), (0, 41)],\n",
3843 " [(0, 35), (0, 12), (0, 9)],\n",
3844 " [(0, 35), (0, 12), (3, 50)],\n",
3845 " [(0, 35), (0, 12), (1, 44)],\n",
3846 " [(0, 35), (0, 12), (0, 29)],\n",
3847 " [(0, 35), (0, 12), (0, 3)],\n",
3848 " [(0, 35), (0, 12), (1, 47)],\n",
3849 " [(0, 35), (0, 12), (4, 38)],\n",
3850 " [(0, 35), (0, 12), (2, 47)],\n",
3851 " [(0, 35), (0, 12), (0, 0)]]"
3852 ]
3853 },
3854 "execution_count": 37,
3855 "metadata": {},
3856 "output_type": "execute_result"
3857 }
3858 ],
3859 "source": [
3860 "sorted(solutions[:10], key=lambda s: score_solution(s, columns), reverse=True)"
3861 ]
3862 },
3863 {
3864 "cell_type": "code",
3865 "execution_count": 38,
3866 "metadata": {},
3867 "outputs": [],
3868 "source": [
3869 "solutions = sorted(solutions, key=lambda s: score_solution(s, columns), reverse=True)[:10000]"
3870 ]
3871 },
3872 {
3873 "cell_type": "code",
3874 "execution_count": 39,
3875 "metadata": {},
3876 "outputs": [],
3877 "source": [
3878 "# for letter in 'seseven': #'haseeight':\n",
3879 "# new_solutions = []\n",
3880 "# for solution in solutions:\n",
3881 "# used_columns = [p[1] for p in solution]\n",
3882 "# for position in letter_positions[letter]:\n",
3883 "# if position[1] not in used_columns:\n",
3884 "# if valid_partial_solution(solution + [position], inverse_keycolumn):\n",
3885 "# new_solutions += [solution + [position]]\n",
3886 "# solutions = sorted(new_solutions, key=lambda s: score_solution(s, columns), reverse=True)[:10000]\n",
3887 "# len(solutions)"
3888 ]
3889 },
3890 {
3891 "cell_type": "code",
3892 "execution_count": 40,
3893 "metadata": {},
3894 "outputs": [
3895 {
3896 "data": {
3897 "text/plain": [
3898 "['pha',\n",
3899 " 'reo',\n",
3900 " 'oel',\n",
3901 " 'rna',\n",
3902 " 'lea',\n",
3903 " 'tet',\n",
3904 " 'pli',\n",
3905 " 'ead',\n",
3906 " 'nat',\n",
3907 " 'ivi',\n",
3908 " 'nin',\n",
3909 " 'ele',\n",
3910 " 'asd',\n",
3911 " 'mar',\n",
3912 " 'icl',\n",
3913 " 'lai',\n",
3914 " 'eeh',\n",
3915 " 'efi',\n",
3916 " 'ars',\n",
3917 " 'cel',\n",
3918 " 'ren',\n",
3919 " 'ede',\n",
3920 " 'yzo',\n",
3921 " 'epu',\n",
3922 " 'urp']"
3923 ]
3924 },
3925 "execution_count": 40,
3926 "metadata": {},
3927 "output_type": "execute_result"
3928 }
3929 ],
3930 "source": [
3931 "display_solution(solutions[0], columns)"
3932 ]
3933 },
3934 {
3935 "cell_type": "code",
3936 "execution_count": 41,
3937 "metadata": {},
3938 "outputs": [
3939 {
3940 "data": {
3941 "text/plain": [
3942 "849"
3943 ]
3944 },
3945 "execution_count": 41,
3946 "metadata": {},
3947 "output_type": "execute_result"
3948 }
3949 ],
3950 "source": [
3951 "hinted_keywords = [w for w in keywords if w[0] =='f' if len(transpositions_of(w)) == 7]\n",
3952 "len(hinted_keywords)"
3953 ]
3954 },
3955 {
3956 "cell_type": "code",
3957 "execution_count": 42,
3958 "metadata": {},
3959 "outputs": [
3960 {
3961 "data": {
3962 "text/plain": [
3963 "['fabrics',\n",
3964 " 'facings',\n",
3965 " 'faction',\n",
3966 " 'factors',\n",
3967 " 'factory',\n",
3968 " 'faculty',\n",
3969 " 'fadeout',\n",
3970 " 'failure',\n",
3971 " 'fainest',\n",
3972 " 'fainted']"
3973 ]
3974 },
3975 "execution_count": 42,
3976 "metadata": {},
3977 "output_type": "execute_result"
3978 }
3979 ],
3980 "source": [
3981 "hinted_keywords[:10]"
3982 ]
3983 },
3984 {
3985 "cell_type": "code",
3986 "execution_count": 43,
3987 "metadata": {},
3988 "outputs": [
3989 {
3990 "data": {
3991 "text/plain": [
3992 "175"
3993 ]
3994 },
3995 "execution_count": 43,
3996 "metadata": {},
3997 "output_type": "execute_result"
3998 }
3999 ],
4000 "source": [
4001 "first_chunk = c8bl[:175]\n",
4002 "len(first_chunk)"
4003 ]
4004 },
4005 {
4006 "cell_type": "code",
4007 "execution_count": 44,
4008 "metadata": {},
4009 "outputs": [
4010 {
4011 "data": {
4012 "text/plain": [
4013 "['gatlrlnjtonethnirreh',\n",
4014 " 'raorejnptreanhriaeso',\n",
4015 " 'raohoanptraesrriasul',\n",
4016 " 'raohhanptraemrriasln',\n",
4017 " 'raorhaeptrnemsrianln',\n",
4018 " 'raonlneptrnissriaaoc',\n",
4019 " 'garhrarjtartsnnifphn',\n",
4020 " 'raoaalapteesnfriunnr',\n",
4021 " 'raonanhpterfrariutpn',\n",
4022 " 'garehhrjteaaraniessp',\n",
4023 " 'raonhalpterafnriutsp',\n",
4024 " 'fainrleptorniseirtno',\n",
4025 " 'raoaanhptemfrariunpn',\n",
4026 " 'raloannptirsrhrioalt',\n",
4027 " 'falmireptinonseiosrn',\n",
4028 " 'ralhaanptiafmrriospn',\n",
4029 " 'faeilenptnoisreirroo',\n",
4030 " 'raeoeanptneafhrirusp',\n",
4031 " 'earotktntvrugheivarj',\n",
4032 " 'gaeorhojtarernnisaep',\n",
4033 " 'gaeorhnjtarerhnisaep',\n",
4034 " 'raeooaeptareesrisaun',\n",
4035 " 'garnahrjtvenranivrep',\n",
4036 " 'raalaenptmifsrrinopo',\n",
4037 " 'faoeoepptnneareihrus',\n",
4038 " 'falhonpptnaerreirsut',\n",
4039 " 'fanroanpthiesreiaoul',\n",
4040 " 'fanhonpptraerreinsut',\n",
4041 " 'rahnaanptaofmrrisepn',\n",
4042 " 'fahrrinptaitoreisohh',\n",
4043 " 'rarrjaaptnensfrineon',\n",
4044 " 'gaaohrmjtsrrnnninapn',\n",
4045 " 'gaaarhrjtsenraninnnp',\n",
4046 " 'gasrlhrjtntnraniehrp',\n",
4047 " 'fasanomptnensneieean',\n",
4048 " 'raalrempftinsnrpiono',\n",
4049 " 'raaorejpftneanrpihes',\n",
4050 " 'ghrrlanjratnthnpfhri',\n",
4051 " 'gharnarjreaetvnpnfai',\n",
4052 " 'frtroenppxthsredoheo',\n",
4053 " 'frahoepppeaearednsus',\n",
4054 " 'raeaoalpfnsntirprlhi',\n",
4055 " 'raaiahnpfmotarrpnhis',\n",
4056 " 'froiianppnoosredhhrl',\n",
4057 " 'rahrinnpfaeeorrpsere',\n",
4058 " 'rahaaiupfaeselrpsnlr',\n",
4059 " 'raaerejpfsreanrpnpes',\n",
4060 " 'graeohnjetarrhneisap',\n",
4061 " 'fitahanpoimesrerenln',\n",
4062 " 'grtaaahjeosntrnernei',\n",
4063 " 'rotaaanpeosetrrurnni',\n",
4064 " 'roieaaopeeanfnrureep',\n",
4065 " 'rrejahnpernfarrepops',\n",
4066 " 'rrejarepernfnsrepopn',\n",
4067 " 'fopalrnpertntheuiirh',\n",
4068 " 'frpnhrlperoapneeiesd',\n",
4069 " 'foperehpernpaaeuirds',\n",
4070 " 'fopalaapersnteeuinri',\n",
4071 " 'rrjalaepensnfrreonrp',\n",
4072 " 'fopaarnpersmpreuinnd',\n",
4073 " 'roatalhpeeifnarunepr',\n",
4074 " 'gtfiehrjuterranrrrep',\n",
4075 " 'rrainanpeneofhreerep',\n",
4076 " 'filhranpoiapmrerosdn',\n",
4077 " 'rrrajaapevtnnfrevioe',\n",
4078 " 'roeaaanpeatefhrusinp',\n",
4079 " 'rreinanpeaeofhresrep',\n",
4080 " 'ronealnperrfnhrutppr',\n",
4081 " 'fioraenpohpmsreredno',\n",
4082 " 'fonprlnperrpnheutidr',\n",
4083 " 'finlrenporipsrertodo',\n",
4084 " 'rrlatajpenfisnrerpen',\n",
4085 " 'rooaeaepenfntaruhpri',\n",
4086 " 'fiairnhpomopraernhdn',\n",
4087 " 'pfomrteddsnnxstcnsno',\n",
4088 " 'rrninalpeheofnrearep',\n",
4089 " 'fonrraeperipmseunodn',\n",
4090 " 'fonrnrhperirpaeunotd',\n",
4091 " 'pfnsoaiddsoseetccrne',\n",
4092 " 'grnatahjeetonrnesire',\n",
4093 " 'grnarhrjeetnranesinp',\n",
4094 " 'ronarampeetnfnrusinp',\n",
4095 " 'roaaeaepeifresrueppn',\n",
4096 " 'finnnorpoesnsperscan',\n",
4097 " 'rosaanmpeoftnnrurpia',\n",
4098 " 'flapannpitrsrheoiilt',\n",
4099 " 'raaeoaopntaefnreieup',\n",
4100 " 'faaeorppntaevreeieuv',\n",
4101 " 'eaattktnntrogheeivrj',\n",
4102 " 'gaanthnjeteorhnniarp',\n",
4103 " 'rlaealnpitnfnhroirpr',\n",
4104 " 'faanorppeteevreniauv',\n",
4105 " 'raaejanpetanfhrnisop',\n",
4106 " 'gaarehrjntvaraneivep',\n",
4107 " 'raaeuaopetalfnrnisip',\n",
4108 " 'faaooeppetnearenihus',\n",
4109 " 'gaanehrjnthrraneiaep',\n",
4110 " 'raannalpethofnrniaep',\n",
4111 " 'eaahtktnntaogheeisrj',\n",
4112 " 'ftaaormpxtshnneoinen',\n",
4113 " 'ftashanpxtnemreoieln',\n",
4114 " 'ftashnapxtnenmeoiela',\n",
4115 " 'faasoeppetnearenieus',\n",
4116 " 'faaeoeppetsearenious',\n",
4117 " 'farnorppepeevrendauv',\n",
4118 " 'farnonrpepeehiendaua',\n",
4119 " 'farnoeppepeearendsus',\n",
4120 " 'gfrirhrjteearanrernp',\n",
4121 " 'raoieaopneeafnreurep',\n",
4122 " 'paoprhndeeeiartnufos',\n",
4123 " 'paoprredeeeinstnufon',\n",
4124 " 'faoeirnpeeaeihenusro',\n",
4125 " 'raolhaepeenafrrnursp',\n",
4126 " 'gaaahhrjestarannlisp',\n",
4127 " 'rlrahalpittafnrohisp',\n",
4128 " 'gaviehrjnvearaneorep',\n",
4129 " 'raaoorapesneatrnlhuf',\n",
4130 " 'flaoinrpisnorpeolhrt',\n",
4131 " 'ptrlfondxtndhhtohrce',\n",
4132 " 'pthafnhdxemdratolncn',\n",
4133 " 'ftrhnaipxtartoeohsni',\n",
4134 " 'rlaaniapissrefrolntr',\n",
4135 " 'rlralaepitsnfrrohnrp',\n",
4136 " 'rlraraepitsnfrrohnnp',\n",
4137 " 'fthsranpxenpmreoledn',\n",
4138 " 'fthnraepxeapmseolidn',\n",
4139 " 'plasinpdisnoretolert',\n",
4140 " 'rlnaniepinfresroaptr',\n",
4141 " 'faauirlpeslopnennird',\n",
4142 " 'raaeuaepesalfrrnnsip',\n",
4143 " 'flnnrrepinrtpseoatxd',\n",
4144 " 'faaeuirpesalopennsir',\n",
4145 " 'ptnocemdxnhesntoaeto',\n",
4146 " 'raannaepesrofrrnnnep',\n",
4147 " 'flanrrapisripmeonnod',\n",
4148 " 'ftamrropxsnnpseonsnd',\n",
4149 " 'plarinpdisnoretonnrt',\n",
4150 " 'plnninpdineoretoasrt',\n",
4151 " 'pleinpndisorertoortf',\n",
4152 " 'ftehnrapxseapmeoolid',\n",
4153 " 'fvaaoeppvteeareoinus',\n",
4154 " 'raaeoaopstnefnrlirup',\n",
4155 " 'fvaeoeppvtneareoirus',\n",
4156 " 'grianhrjtesrranhrnnp',\n",
4157 " 'fhpaarepertmnseliinn',\n",
4158 " 'raotaanpseiefhrluenp',\n",
4159 " 'rronhaepterafrrhunsp',\n",
4160 " 'rrlealnptirfnhrhoppr',\n",
4161 " 'fvaeoeppvereareonpus',\n",
4162 " 'frlprlnptirpnhehoidr',\n",
4163 " 'rvarajapvnetnfroeeio',\n",
4164 " 'raaoahapseetafrlnuis',\n",
4165 " 'frxrohnptopharehades',\n",
4166 " 'rroeanhpthrfrarheppn',\n",
4167 " 'ranelanpsrrifhrltpop',\n",
4168 " 'rroeaanpthrsfrrhepnp',\n",
4169 " 'gaoanhrjsnteranlhirp',\n",
4170 " 'rrlajanptntnfhrhriop',\n",
4171 " 'grlaehrjtntsranhriop',\n",
4172 " 'eaotatknsnothgelhrir',\n",
4173 " 'rrltornptnieahrhreuf',\n",
4174 " 'rhliatnpenefhhrlrrpa',\n",
4175 " 'faoionppsneerrelhrut',\n",
4176 " 'raornaepsnaotnrlhfei',\n",
4177 " 'faoeonppsnrerrelhput',\n",
4178 " 'faoropnpsnperrelhdui',\n",
4179 " 'raoaianpsnfotrrlhphi',\n",
4180 " 'rhaanaspemfrtnrlnpni',\n",
4181 " 'rrljasaptnntnfrhroie',\n",
4182 " 'fhaprhnpemrparelnids',\n",
4183 " 'frlposrptnrenpehriue',\n",
4184 " 'paouinpdsnloretlhirt',\n",
4185 " 'frliatnptnotxhehrhio',\n",
4186 " 'frlxaohptnothaehraie',\n",
4187 " 'rrliahaptnotafrhrhis',\n",
4188 " 'fhaxahnpemotarelnais',\n",
4189 " 'raoeooapsnnertrlhrua',\n",
4190 " 'paoiinpdsnooretlhhrt',\n",
4191 " 'frliataptnosxtehrhno',\n",
4192 " 'rrlnauaptnhtlfrhraii',\n",
4193 " 'fhahirnpemaoprelnsrd',\n",
4194 " 'fharaorpemnsapelnnne',\n",
4195 " 'fhasrorpemnpanelnede',\n",
4196 " 'fhatrmrpesxpnnelnods',\n",
4197 " 'paalinpdssioretlnort',\n",
4198 " 'rraoealptshrfnrhnepp',\n",
4199 " 'fhnoeaepenarmselaepn',\n",
4200 " 'paaoremdessnfntennnd',\n",
4201 " 'paslinpdsnioretleort',\n",
4202 " 'fhnirmrpeeopnnelsrds',\n",
4203 " 'frnrailptentoiehsnir',\n",
4204 " 'roajraapntnenfrhioee',\n",
4205 " 'faailrepmtoinseniron',\n",
4206 " 'foaeoeppntnearehirus',\n",
4207 " 'glanohnjntrrrhnritap',\n",
4208 " 'rlanoonpntrrehrritau',\n",
4209 " 'goaeehrjntaaranhisep',\n",
4210 " 'roaeuaapntalferhisip',\n",
4211 " 'roaeeoapntaaefrhiseu',\n",
4212 " 'flanrlepntrtiseritxo',\n",
4213 " 'rlanhoopntraerrritsu',\n",
4214 " 'faaapnrpmtsroneninie',\n",
4215 " 'flaeonppntserreriout',\n",
4216 " 'glhrranjnreathnrpefi',\n",
4217 " 'flrrpnhpnperoaerdeie',\n",
4218 " 'flrxrohpnpothaerdahe',\n",
4219 " 'rlaninnpnfreohrrptre',\n",
4220 " 'forosimpspaoenenderu',\n",
4221 " 'farnrlepmpriisendnoo',\n",
4222 " 'goratahjnetonrnheire',\n",
4223 " 'raoraenpmeatsrrnufio',\n",
4224 " 'rlrejanpnernfhrrepop',\n",
4225 " 'gorhraejneratanhepfi',\n",
4226 " 'glrhranjnerathnrepfi',\n",
4227 " 'rloanenpnefrrhrruptp',\n",
4228 " 'rlrjahapnentafrreois',\n",
4229 " 'paoprhndmeeiartnufos',\n",
4230 " 'rorejaepneanfrrhesop',\n",
4231 " 'flonprnpnerrpherutid',\n",
4232 " 'rloneaepnehafrrruaep',\n",
4233 " 'foapianpnsrotrehlihi',\n",
4234 " 'foapirnpnsroprehlihd',\n",
4235 " 'flrliinpntioeherhorr',\n",
4236 " 'flrohatpnthatxerhesi',\n",
4237 " 'rlrohaepnthafrrrhesp',\n",
4238 " 'rahnhaepmerafrrnlnsp',\n",
4239 " 'rlrhnaepntaofrrrhsep',\n",
4240 " 'rlrsoaepntnhfrrrheep',\n",
4241 " 'raaoraepmsenfrrnnunp',\n",
4242 " 'raonnrapsroretrnaene',\n",
4243 " 'raiuaanpselfmrrnripn',\n",
4244 " 'faieoeppseaearenreus',\n",
4245 " 'faraoeppspeearendnus',\n",
4246 " 'falaninpsitrorenoitr',\n",
4247 " 'fatnrirpsxrtopenonhh',\n",
4248 " 'paerhomdstneantnvnle',\n",
4249 " 'gantahrjseierannaenp',\n",
4250 " 'raetlalpsniifnrnreop',\n",
4251 " 'raetlanpsniifrrnreop',\n",
4252 " 'faoirhapsaenemenernl',\n",
4253 " 'raoeaanpshrfmrrneppn',\n",
4254 " 'ranalalpsrfntirntpri',\n",
4255 " 'fanpaoepsrrserentilu',\n",
4256 " 'fanuirlpsrlopnentird',\n",
4257 " 'faatonrpsmierienneun',\n",
4258 " 'pallinpdsnioretnrort',\n",
4259 " 'paltropdsnxthetnrohe',\n",
4260 " 'galnaohjsnrtrrnnrtia',\n",
4261 " 'paaoinedsmhorftnnern',\n",
4262 " 'fnonisrpnssonpeancre',\n",
4263 " 'ranotaapsreiefrnnuen',\n",
4264 " 'famriaopsnnothensnri',\n",
4265 " 'famriropsnnopsensnrd',\n",
4266 " 'pnnsiopdnsoohetacrre',\n",
4267 " 'ratalrnptositnrirnoh',\n",
4268 " 'ealktvanttgovseihjro',\n",
4269 " 'gaoharajtrrnelniapee',\n",
4270 " 'gaorahfjtrenrtniaeep',\n",
4271 " 'raooathptreeuariaunr',\n",
4272 " 'raorrhtptrntanrianhs',\n",
4273 " 'faoatolpteeuaeeiunre',\n",
4274 " 'failnraptoirtleironh',\n",
4275 " 'raonhanpterafrriutsp',\n",
4276 " 'rarojaaptennsfriehol',\n",
4277 " 'raolnanptenrfhriurtp',\n",
4278 " 'failthoptonheneirral',\n",
4279 " 'faionoiptosarneirnis',\n",
4280 " 'faorrasptenilceiunoe',\n",
4281 " 'fatlvnnptxivnseioooa',\n",
4282 " 'gaaavlajtenvcfnineoe',\n",
4283 " 'ralnahnptirfasrionps',\n",
4284 " 'falmireptinonseiosrn',\n",
4285 " 'gaahhlajtearnfninspr',\n",
4286 " 'ranoafrpteeedariaunc',\n",
4287 " 'ranrnnapteehofriaeae',\n",
4288 " 'ranonfcptrrtdhritsnc',\n",
4289 " 'raeooasptarelcrisaue',\n",
4290 " 'raeoeroptarsehrisaoe',\n",
4291 " 'raoenuvptnnohurihrec',\n",
4292 " 'raoeluvptnnihurihroc',\n",
4293 " 'galavlajtnmvcfnirnoe',\n",
4294 " 'raahnanptmaofrrinsep',\n",
4295 " 'ganorctjthrehxniaaeo',\n",
4296 " 'fanroanpthiesreiaoul',\n",
4297 " 'ganhhnajtrarrfninspt',\n",
4298 " 'ranhaozptrafherinspe',\n",
4299 " 'fahattmptacxuneiseor',\n",
4300 " 'gahehfhjtarrtonisepo',\n",
4301 " 'gahehlajtarrnfnisepr',\n",
4302 " 'fanlnifptnisoteiaocr',\n",
4303 " 'faamriaptsnnoceinsnr',\n",
4304 " 'raalnripftnhtorpirah',\n",
4305 " 'ghanrtajrtheonnpiaer',\n",
4306 " 'raahnzlpftaoenrpisen',\n",
4307 " 'raarnzopftnoenrpinen',\n",
4308 " 'gharaaajrtnsmfnpinnn',\n",
4309 " 'raaraozpftnsserpinnn',\n",
4310 " 'ghtanaojromntnnprnai',\n",
4311 " 'ghrosefjraozttnpfgdt',\n",
4312 " 'ghrraocjraamdhnpflns',\n",
4313 " 'ozkrtcsgegaiatfnjfel',\n",
4314 " 'ekhrtulngraiheejpfec',\n",
4315 " 'rarstolpfpzuherpdere',\n",
4316 " 'frzltolppeiuaeednore',\n",
4317 " 'ghaatoojrnfsdrnpepzs',\n",
4318 " 'gharooojrnerdrnpeeas',\n",
4319 " 'raaoithpfeeeuarpnurr',\n",
4320 " 'raafontpfesrturpnrsn',\n",
4321 " 'frlanirppisroaedoltr',\n",
4322 " 'friintnppooruhedhrtr',\n",
4323 " 'raeirolpfaeeherpsree',\n",
4324 " 'fraxkrrppmogvnednajv',\n",
4325 " 'ghonavhjrnrtuonphtir',\n",
4326 " 'frloiroppnnaeaedrhae',\n",
4327 " 'raankrspfmaghtrpnije',\n",
4328 " 'frosanappsnenmedneea',\n",
4329 " 'rahrinopfaeeoorpsere',\n",
4330 " 'frszoteppnesugedennr',\n",
4331 " 'raeniaepfsrotarpothi',\n",
4332 " 'granoahjethrsrneiaal',\n",
4333 " 'fiihrhepoeaeeaerrsel',\n",
4334 " 'roeseooperztonrupevg',\n",
4335 " 'roeaathperfeuaruppnr',\n",
4336 " 'grtaooujehsrdhnernas',\n",
4337 " 'roaaeoopeferonrupnpg',\n",
4338 " 'rraaesopefnrmhrepepn',\n",
4339 " 'rraeesspefarmnrepspn',\n",
4340 " 'roalizfpefneetruprrn',\n",
4341 " 'roaaionpefmeohrupnrg',\n",
4342 " 'fopalrrpersneheuinre',\n",
4343 " 'frainsopeneomaeeeren',\n",
4344 " 'roaaranpeefvterunpvi',\n",
4345 " 'filanvspoieevzeronao',\n",
4346 " 'fileoonpoindoherorsg',\n",
4347 " 'roatsecpenrrteruevht',\n",
4348 " 'roahalrpeeafnprunspr',\n",
4349 " 'foahroopeeaidoeunsos',\n",
4350 " 'roahlaipeeanthrunsri',\n",
4351 " 'roeaasapeatemirusinn',\n",
4352 " 'finaltnportiuhertior',\n",
4353 " 'finalthportiuaertior',\n",
4354 " 'roeaasxpeatemfrusinn',\n",
4355 " 'etravehnuvtuhrervirk',\n",
4356 " 'greavlrjeatutanesirh',\n",
4357 " 'rrejaorpeanfnpresoph',\n",
4358 " 'rresserpeamnfpresntd',\n",
4359 " 'fonsetopermgooeutnhd',\n",
4360 " 'fiotdeopohuotnererot',\n",
4361 " 'fintdkfporuogtertroj',\n",
4362 " 'roeaavtpeaeturrusnir',\n",
4363 " 'rolaaatpenftmrrurpin',\n",
4364 " 'grohtaajenrotnnehpri',\n",
4365 " 'rooataepenfisnruhpel',\n",
4366 " 'fiargfipompjteerndnr',\n",
4367 " 'fiargvapompjvierndno',\n",
4368 " 'rolahsepenfaztrurpsd',\n",
4369 " 'rolasaapenfnterurpei',\n",
4370 " 'rolasrhpenfnterurpeh',\n",
4371 " 'filrsroponpntserrdeh',\n",
4372 " 'filinrnponorpherrhtd',\n",
4373 " 'rolesatpennntarurrei',\n",
4374 " 'ronoaafperrtetrunain',\n",
4375 " 'fonrraeperipmseunodn',\n",
4376 " 'fonrnrhperirpaeunotd',\n",
4377 " 'fonrharperiateeunosi',\n",
4378 " 'ronnstrperhcaprunaei',\n",
4379 " 'rosaorfpenfgtsruepfh',\n",
4380 " 'fonarropeetneaeusine',\n",
4381 " 'finarrhpoetneeersine',\n",
4382 " 'ronantipeetsuirusicr',\n",
4383 " 'gaattirjntotoaneirsr',\n",
4384 " 'raajvaepetnostrniool',\n",
4385 " 'flaplerpitrntveoiirt',\n",
4386 " 'faareoopntvaeaeeiveu',\n",
4387 " 'raaveftpntoutsreiolo',\n",
4388 " 'rlatroopithionroiatg',\n",
4389 " 'faavetopetoluaenioor',\n",
4390 " 'raannalpethofnrniaep',\n",
4391 " 'raannanpetrofhrninep',\n",
4392 " 'faanrofpetrieteninou',\n",
4393 " 'rlahoelpitartnroisat',\n",
4394 " 'faahgtepetajugenisnr',\n",
4395 " 'gaahehfjntarrtneisep',\n",
4396 " 'rlahnanpitarfrroistp',\n",
4397 " 'rlahizepitahearoisin',\n",
4398 " 'rlahizlpitahenroisin',\n",
4399 " 'rlarizopitnhenroinin',\n",
4400 " 'faahntopetatuaenisnr',\n",
4401 " 'ftahnrspxtattleoisnh',\n",
4402 " 'rlarsetpitnntaroinet',\n",
4403 " 'flaarimpitsnoneoinnr',\n",
4404 " 'gaannhajeterrfnnisnp',\n",
4405 " 'raartsopnfpsmhrepdzn',\n",
4406 " 'farrntopepatuaendlnr',\n",
4407 " 'farnonrpepeehiendaua',\n",
4408 " 'farnroopephieoendaou',\n",
4409 " 'raahinopefaeoornpsre',\n",
4410 " 'raaaotfpefieitrnpeue',\n",
4411 " 'flrnriepipenoneodsnr',\n",
4412 " 'rlannaapifenmtropsan',\n",
4413 " 'faoiesopneeamaeeuren',\n",
4414 " 'flienoopionhdoeorras',\n",
4415 " 'flinhoopioradoeortss',\n",
4416 " 'fliseerpiolstveorlst',\n",
4417 " 'fliteoopiohsoneorasg',\n",
4418 " 'fliteonpiohsoheorasg',\n",
4419 " 'plilhrvdionaeutorrse',\n",
4420 " 'favhhtopevekuaenosgr',\n",
4421 " 'plavdrvdisveeutologe',\n",
4422 " 'flrvtoopitvcdoeohoas',\n",
4423 " 'flrseorpitledaeohlds',\n",
4424 " 'flrseorpitledaeohlds',\n",
4425 " 'plavervdisoeeutolode',\n",
4426 " 'rlaoanipisnfrerolhpt',\n",
4427 " 'flrliefpitnorteohrrp',\n",
4428 " 'pthafnhdxemdratolncn',\n",
4429 " 'planervdishgeutolahe',\n",
4430 " 'ftrhnaipxtartoeohsni',\n",
4431 " 'rlrsalrpitnfnprohepr',\n",
4432 " 'faatctopesieuaennehr',\n",
4433 " 'ftnronfpxnphsteoadec',\n",
4434 " 'flnierhpinoreaeoarpe',\n",
4435 " 'paaeuivdesaloutnnsir',\n",
4436 " 'raalofrpesnsdprnnrnc',\n",
4437 " 'flaadoopismedoeonngs',\n",
4438 " 'flamrrnpisnipreonsod',\n",
4439 " 'ftamrropxsnnpseonsnd',\n",
4440 " 'ftardkapxsnogmeonnoj',\n",
4441 " 'ftnndkopxnsogneoacoj',\n",
4442 " 'rletaropishtiorooait',\n",
4443 " 'flemrropisnipoeoosod',\n",
4444 " 'grianeajtesrgfnhrnnh',\n",
4445 " 'rajtvsvpsnivcurloeoe',\n",
4446 " 'frpjoonptrndohehiosg',\n",
4447 " 'prpraordteissvthfoln',\n",
4448 " 'prinhovdtoraeuthrnsu',\n",
4449 " 'rrlranoptiatarrhofii',\n",
4450 " 'palrnrvdsithtutloxah',\n",
4451 " 'raianhrpsofraprlhpts',\n",
4452 " 'rrorarrpthatvnrhefiv',\n",
4453 " 'fveeaoopvareeaeospnu',\n",
4454 " 'ranhaovpsrateurltsiu',\n",
4455 " 'fhafzoipeeseneelernh',\n",
4456 " 'rrhfaiuptetiehrhlrhr',\n",
4457 " 'rrvdapoptvoceorhooef',\n",
4458 " 'prvgovgdtvheuftholur',\n",
4459 " 'frvgsaeptvhrcaeholhe',\n",
4460 " 'rhahirepesaiptrllsed',\n",
4461 " 'rrlajaoptntnfnrhriop',\n",
4462 " 'faoaponpsntrerelhiiu',\n",
4463 " 'grlthaojtnortnnhrrpi',\n",
4464 " 'rrliaatptneflnrhrrpe',\n",
4465 " 'rhliatnpenefhhrlrrpa',\n",
4466 " 'rrlaaotptnftsrrhrpin',\n",
4467 " 'gaoherfjsnrrptnlhped',\n",
4468 " 'frlrlhlptnpireehrdop',\n",
4469 " 'raoaahepsnfeehrlhpns',\n",
4470 " 'fharxanpemposhelndal',\n",
4471 " 'raoanaipsnfrtorlhpti',\n",
4472 " 'rhaanhrpemfraprlnpns',\n",
4473 " 'faormropespnnneendsn',\n",
4474 " 'rrlahhfptnfaesrhrpsl',\n",
4475 " 'rrlasaoptnfntsrhrpei',\n",
4476 " 'fharshepempnraelndep',\n",
4477 " 'fhaphsrpemdrmnelntpn',\n",
4478 " 'fhaproipemrpneelnidh',\n",
4479 " 'prlrlfadtntidlthrxoc',\n",
4480 " 'frliatfptnotxtehrhio',\n",
4481 " 'frlirdfptnopetehrhdg',\n",
4482 " 'frlitrnptnoxphehrhod',\n",
4483 " 'frlxvzaptnovdcehraoo',\n",
4484 " 'rrlnauaptnhtlfrhraii',\n",
4485 " 'rhansaapemrnftrlnnep',\n",
4486 " 'frlhorgptnaephehrsud',\n",
4487 " 'fhahscepemazaaelnsdl',\n",
4488 " 'rhasathpemntaorlneii',\n",
4489 " 'rhnhaarperafmprlnspn',\n",
4490 " 'rraoataptsrtnnrhnair',\n",
4491 " 'fratornptsxhprehnoed',\n",
4492 " 'faaneoopssrreaelntpu',\n",
4493 " 'fraoraiptshntoehneni',\n",
4494 " 'fhaanaspesmrerelnnne',\n",
4495 " 'fhaarrhpesmnprelnnnd',\n",
4496 " 'frnplaopterissehsiol',\n",
4497 " 'frnrhfopteiesoehsolr',\n",
4498 " 'frnratrpteisnhehsolr',\n",
4499 " 'raaohaapmtracnrniase',\n",
4500 " 'gaaoradjmtrnsenniann',\n",
4501 " 'goaeorojntareanhisae',\n",
4502 " 'foaeeoopntaaeaehiseu',\n",
4503 " 'foaeuaipntaleoehisin',\n",
4504 " 'raasoalpmtoefnrnirup',\n",
4505 " 'glasntajntoexfnrirto',\n",
4506 " 'raasaeopmtoatornircv',\n",
4507 " 'gohieaajnreanfnhpree',\n",
4508 " 'rlaiuarpnfelearrprin',\n",
4509 " 'gohraocjnramdhnhpfns',\n",
4510 " 'glhraosjnramdtnrpfns',\n",
4511 " 'gohassujnrfzrhnhppeh',\n",
4512 " 'rlarshtpnfpzerrrpdel',\n",
4513 " 'gohztuvjnreohunhpndc',\n",
4514 " 'roakfrfpnfgttsrhpjuh',\n",
4515 " 'flrkrolpnpgeaeerdjee',\n",
4516 " 'gohzahfjnrenetnhpnes',\n",
4517 " 'rlakserpnfgrtvrrpjht',\n",
4518 " 'faronvlpmpotvcendgno',\n",
4519 " 'roaoooipsfosrnrnpgns',\n",
4520 " 'flrraropnpaaeaerdlce',\n",
4521 " 'rlaninrpnfreoarrptre',\n",
4522 " 'rlanrnopnfratdrrptln',\n",
4523 " 'rlansorpnfroeprrptru',\n",
4524 " 'farosiopmphoooenderr',\n",
4525 " 'farlahepmposraendsnp',\n",
4526 " 'flrnrizpnphioeerdaoh',\n",
4527 " 'flrhnropnpateaerdsne',\n",
4528 " 'farrshdpmpnneeendnel',\n",
4529 " 'fliihrhpnoeaeeerrrse',\n",
4530 " 'floposfpnerdzteruise',\n",
4531 " 'pafnrofdmdrtettncnxu',\n",
4532 " 'plinurvdnohleutrraie',\n",
4533 " 'rlosnerpneoetprrurtv',\n",
4534 " 'faisafopmooasoenrrcr',\n",
4535 " 'flrohirpnthaoperhesr',\n",
4536 " 'plrohivdnthaoutrhesr',\n",
4537 " 'fahnhtipmeraioenlnse',\n",
4538 " 'fahnhirpmeraopenlnsr',\n",
4539 " 'flrhrorpntaieperhsou',\n",
4540 " 'plrsoivdntnhoutrheer',\n",
4541 " 'fahsnirpmenropenlenr',\n",
4542 " 'fahnsirpmeaoopenlirr',\n",
4543 " 'foniniapsnesolenarcr',\n",
4544 " 'fanpalfpmnrtitenaiio',\n",
4545 " 'paairovdmsoneutnnrnu',\n",
4546 " 'paafroadmsdneetnncnu',\n",
4547 " 'flaitirpnsohopernhar',\n",
4548 " 'raonnrapsroretrnaene',\n",
4549 " 'faesltopsrziuaenpeor',\n",
4550 " 'faraltopspeiuaendnor',\n",
4551 " 'fnponsopnresmseaiucn',\n",
4552 " 'fneisaapnuontmealrei',\n",
4553 " 'fatiatnpsxemneenornr',\n",
4554 " 'gaaetctjsntiasnnevel',\n",
4555 " 'faoirirpshenotenernr',\n",
4556 " 'faneoogpsrreafentpue',\n",
4557 " 'ranalrapsrfnpcrntprd',\n",
4558 " 'faoooznpshadereneesn',\n",
4559 " 'pallrhpdsnitirtnrohi',\n",
4560 " 'faodoznpssederenngsn',\n",
4561 " 'rnaovirpnmsviprannoe',\n",
4562 " 'faorrrapssnipmennnod',\n",
4563 " 'faorrrmpssnipnennnod',\n",
4564 " 'ranaaajpsrfetnrnnpni',\n",
4565 " 'panfgrddsrdjtetnncnh',\n",
4566 " 'famriaopsnnothensnri',\n",
4567 " 'fnnilrfpnsoipteacrod',\n",
4568 " 'fnstokmpnocdgnearasj',\n",
4569 " 'gaohsaojtrrlerniapln',\n",
4570 " 'raonnafptrsnctriacae',\n",
4571 " 'raonhvopterauoriutsr',\n",
4572 " 'garortajtenpufniehrr',\n",
4573 " 'raolnanptenrfhriurtp',\n",
4574 " 'raauafrptelntvrinieo',\n",
4575 " 'gaaeelsjtntttmnievth',\n",
4576 " 'falaverptinveeeioeod',\n",
4577 " 'ralnahnptirfasrionps',\n",
4578 " 'gaanrrfjtnhepdnieaer',\n",
4579 " 'raanohfptereadrinnus',\n",
4580 " 'faeiltoptnoiureirror',\n",
4581 " 'raeonftptartdsrissnc',\n",
4582 " 'gaeororjtareaanisaee',\n",
4583 " 'ranhusfptrahndritsct',\n",
4584 " 'ranhusfptrahndritsct',\n",
4585 " 'ranhusiptrahnhritsct',\n",
4586 " 'raaaskaptmfngnrinpej',\n",
4587 " 'raaieflptmostnrinhoo',\n",
4588 " 'ranhaozptrafherinspe',\n",
4589 " 'fahattmptacxuneiseor',\n",
4590 " 'faratsnptncxmseineon',\n",
4591 " 'ranaotfptsfgntricpfr',\n",
4592 " 'faroparptnerseeinuin',\n",
4593 " 'rahiknoptahgrorisijt',\n",
4594 " 'rahionoptahorerisigt',\n",
4595 " 'raalrezptsinterinonv',\n",
4596 " 'raaaotfpftmgntrpinfr',\n",
4597 " 'ghaheotjrtaroanpiseg',\n",
4598 " 'ghrosefjraozttnpfgdt',\n",
4599 " 'ghrzsorjraezrnnpfnds',\n",
4600 " 'frzltolppeiuaeednore',\n",
4601 " 'friintnppooruhedhrtr',\n",
4602 " 'frnaplkpprsrngedtnir',\n",
4603 " 'ghorreajrnaeatnphfes',\n",
4604 " 'ralizrdpfnoevorprhnv',\n",
4605 " 'ghlnavtjrnrturnprtir',\n",
4606 " 'frloknippnngsoedrhjc',\n",
4607 " 'frarilrppmnoiaednnro',\n",
4608 " 'frahiltppmaoiuednsro',\n",
4609 " 'frarilsppmnoimednnro',\n",
4610 " 'frarilsppmnoimednnro',\n",
4611 " 'frsninsppnsoamedtcri',\n",
4612 " 'ranhrhrpfratehrpnshl',\n",
4613 " 'frhonrrppaerieedsuno',\n",
4614 " 'frhrkaippangmoedsnjn',\n",
4615 " 'grtvealjeovattnerosi',\n",
4616 " 'rrejahtpernfaurepops',\n",
4617 " 'poprhredeeiaeatufose',\n",
4618 " 'pipaaoedoesmeatrfnnu',\n",
4619 " 'rraoltrpeneeapreeusi',\n",
4620 " 'foaigsrpeeofzaeunrtd',\n",
4621 " 'pftterrddxulevtcoroe',\n",
4622 " 'foafrripeesanoeunrln',\n",
4623 " 'foahroopeeaidoeunsos',\n",
4624 " 'roeaasapeatemirusinn',\n",
4625 " 'finaltnportiuhertior',\n",
4626 " 'greavlsjeatutmnesirh',\n",
4627 " 'roeotcspeadsemrusszt',\n",
4628 " 'fonsetopermgooeutnhd',\n",
4629 " 'rrevkdopeaugtrresrjo',\n",
4630 " 'grohtsojenrozonehprd',\n",
4631 " 'frlrrolpenppeeeerdru',\n",
4632 " 'filrthsponphenerrdal',\n",
4633 " 'roaasarpemfntnrunpei',\n",
4634 " 'filinrnponorpherrhtd',\n",
4635 " 'fonrharperiateeunosi',\n",
4636 " 'fomrstopeninuseusoer',\n",
4637 " 'pirnfoldonsdhetrncce',\n",
4638 " 'ronaenopeefrrorusppt',\n",
4639 " 'raajafapetnftnrniopr',\n",
4640 " 'raajaafpetnfstrniopl',\n",
4641 " 'raanntapetroosrniner',\n",
4642 " 'rlahtrupitaothroisrh',\n",
4643 " 'faahgtepetajugenisnr',\n",
4644 " 'rlahnanpitarfrroistp',\n",
4645 " 'gaahgovjetahounnislg',\n",
4646 " 'gaahgotjetahoannislg',\n",
4647 " 'rlaraezpitnsteroinnv',\n",
4648 " 'flaarimpitsnoneoinnr',\n",
4649 " 'ftashaopxtnemgeoieln',\n",
4650 " 'raaejaspnfrnemreppon',\n",
4651 " 'raaretrpefphuarnpdkr',\n",
4652 " 'farnrorpeprieaendnou',\n",
4653 " 'farnrltpephiiuendaoo',\n",
4654 " 'flrnirrpipeoneeodsrn',\n",
4655 " 'flienorpionrdaeorrns',\n",
4656 " 'farrinipneveooeeevre',\n",
4657 " 'flinhoopioradoeortss',\n",
4658 " 'plapprrdiserevtolfie',\n",
4659 " 'flahagrpisatheeolsil',\n",
4660 " 'flrhifapitaosneohsrr',\n",
4661 " 'flrsrlipitnpnoeohedr',\n",
4662 " 'gaaorocjesrnoannnans',\n",
4663 " 'flarpropispdeoeonrte',\n",
4664 " 'rlarizspisnhezronnin',\n",
4665 " 'rleerucpistpheroovdc',\n",
4666 " 'flenrrzpisaipeeooiod',\n",
4667 " 'fapjrrrpsrnehaelioee',\n",
4668 " 'frlrahoptitnenehoxes',\n",
4669 " 'raaloofpseidrtrlnosa',\n",
4670 " 'fhtfhcopexteeoelorsi',\n",
4671 " 'frlfhnhptitearehorsi',\n",
4672 " 'palfacfdsiteedtlorei',\n",
4673 " 'frhfodsptesoemehlrgg',\n",
4674 " 'prhttaedtexuisthlorh',\n",
4675 " 'rrhfaiuptetiehrhlrhr',\n",
4676 " 'rrvitaaptvhicnrhoiee',\n",
4677 " 'prviroadtvhienthoiou',\n",
4678 " 'frvgnhaptvhoeneholes',\n",
4679 " 'fhvnecrpevssanelocsl',\n",
4680 " 'phvnstidevslaotlocli',\n",
4681 " 'paahnuadesarrmtelsii',\n",
4682 " 'gaohaatjsnrtmvnlhpin',\n",
4683 " 'grlhtrojtnroprnhrprd',\n",
4684 " 'grlhtutjtnrirrnhrpei',\n",
4685 " 'rrlailvptnfeivrhrpro',\n",
4686 " 'faorphrpsnpreeelhdil',\n",
4687 " 'faoropnpsnperrelhdui',\n",
4688 " 'faormropespnnneendsn',\n",
4689 " 'rhaansrpemfrnprlnpne',\n",
4690 " 'fharnsapemprneelndne',\n",
4691 " 'rhaahanpemfatrrlnpsi',\n",
4692 " 'fharhhapemparnelndsp',\n",
4693 " 'frlrsaiptnpneoehrdee',\n",
4694 " 'rhaashlpemfnenrlnpes',\n",
4695 " 'rrlfksdptnpgmorhrejn',\n",
4696 " 'frlprosptnrpsmehridn',\n",
4697 " 'prlpisodtneonethrfre',\n",
4698 " 'frlpvdnptnrvotehrioo',\n",
4699 " 'rrliahiptnotahrhrhis',\n",
4700 " 'frlxvzaptnovdcehraoo',\n",
4701 " 'rhansaapemrnftrlnnep',\n",
4702 " 'pharesidemnfnotlnnde',\n",
4703 " 'rrlhofoptnaepdrhrsue',\n",
4704 " 'fhahiptpemaoduelnsrt',\n",
4705 " 'grlsattjtnntahnhreii',\n",
4706 " 'grlsattjtnntahnhreii',\n",
4707 " 'frneofoptrgetdehnhur',\n",
4708 " 'fhnhraiperapmoelnsdn',\n",
4709 " 'pratiahdtsxosithnohl',\n",
4710 " 'fratornptsxhprehnoed',\n",
4711 " 'rraoealptshrfnrhnepp',\n",
4712 " 'rhaaniupesmrerrlnnnr',\n",
4713 " 'fhaanaspesmrerelnnne',\n",
4714 " 'roajanfpntnsrtrhiolt',\n",
4715 " 'goanlfojntentanhirro',\n",
4716 " 'glanohnjntrrrhnritap',\n",
4717 " 'rlanoonpntrrehrritau',\n",
4718 " 'flaorevpnthtnveriexe',\n",
4719 " 'faaoranpmthtlneniexe',\n",
4720 " 'rlanuvrpntrluarritir',\n",
4721 " 'rlahaaopntafmhrrispn',\n",
4722 " 'gohrzstjnraezunhpfnd',\n",
4723 " 'glhrzssjnraezmnrpfnd',\n",
4724 " 'elkatoenngfirgerjpes',\n",
4725 " 'gohzfuvjnreshunhpnrc',\n",
4726 " 'faronnapmpohteendgan',\n",
4727 " 'forznhepsperatendnns',\n",
4728 " 'flrrpnhpnperoaerdeie',\n",
4729 " 'roaeinepnfaeonrhpsre',\n",
4730 " 'rlannzrpnfhoehrrpaen',\n",
4731 " 'fornohfpspsgltendcfc',\n",
4732 " 'glroanejnerthgnreaia',\n",
4733 " 'gothrsrjnurazenhrpfd',\n",
4734 " 'ploprhrdneeiaetrufos',\n",
4735 " 'faopohspmerdomenuiso',\n",
4736 " 'failftrpmoisuaenrorr',\n",
4737 " 'faieerlpmolsanenrosl',\n",
4738 " 'fainuorpmorldaenrnis',\n",
4739 " 'foisrropsooaeoenrrte',\n",
4740 " 'plisaafdnooaedtrrrcn',\n",
4741 " 'fahinzopmeordrenlrno',\n",
4742 " 'fahnhirpmeraopenlnsr',\n",
4743 " 'foairozpssondeennrns',\n",
4744 " 'roamrsfpssnnztrnnsnd',\n",
4745 " 'faerzlipsaheioenseno',\n",
4746 " 'faaihnzpsmoendennrla',\n",
4747 " 'faaoiropsmhonoennern',\n",
4748 " 'raarnaspsmnofzrnnnep',\n",
4749 " 'ranaaajpsrfetnrnnpni',\n",
4750 " 'pnnftsndnsdxmttaccon',\n",
4751 " 'pnnhtsndnslamttaccin',\n",
4752 " 'fnstorzpnoceheearaue',\n",
4753 " 'gaorasgjtrenmhniaeen',\n",
4754 " 'raonhvopterauoriutsr',\n",
4755 " 'garnuecjtehhtanieacv',\n",
4756 " 'faeiltoptnoiureirror',\n",
4757 " 'gaeororjtareaanisaee',\n",
4758 " 'ranhusfptrahndritsct',\n",
4759 " 'faloceeptnsaaseirnle',\n",
4760 " 'raheltaptatiuiristor',\n",
4761 " 'rahelfrptatidnristoc',\n",
4762 " 'raaalonpftmiohrpinog',\n",
4763 " 'raahnzlpftaoenrpisen',\n",
4764 " 'raahnoapftaoomrpiseg',\n",
4765 " 'raaoisrpfeeemnrpnurn',\n",
4766 " 'friintrppooruvedhrtr',\n",
4767 " 'frahiltppmaoiuednsro',\n",
4768 " 'frahiltppmaoiuednsro',\n",
4769 " 'frarilsppmnoimednnro',\n",
4770 " 'frsninsppnsoamedtcri',\n",
4771 " 'frhonrrppaerieedsuno',\n",
4772 " 'fiirohrpoeneaeerrnus',\n",
4773 " 'roalizrpefneevruprrn',\n",
4774 " 'foadzhepeloeraeueonp',\n",
4775 " 'foeaasepeatemgeusinn',\n",
4776 " 'foeaastpeatemceusinn',\n",
4777 " 'rreavespeatuhmresirk',\n",
4778 " 'fonprlsperrpnmeutidr',\n",
4779 " 'filrtovponphsverrdan',\n",
4780 " 'gaantcrjetevasnniaul',\n",
4781 " 'rlanvrapitruanroitrl',\n",
4782 " 'raarvzlpntvueireivrn',\n",
4783 " 'raanntapetroosrniner',\n",
4784 " 'gaahoaujetagernnisfe',\n",
4785 " 'rlahizlpitahenroisin',\n",
4786 " 'ftashnapxtnenmeoiela',\n",
4787 " 'rlaneznpitatehroiivn',\n",
4788 " 'raaejzfpnfrnetreppon',\n",
4789 " 'farnrlspepriimendnoo',\n",
4790 " 'flientrpionhuheorrar',\n",
4791 " 'flaahcnpistaaseolisl',\n",
4792 " 'gaavttajesvaiennloie',\n",
4793 " 'flareoepispndaeonres',\n",
4794 " 'fapjrrrpsrnehaelioee',\n",
4795 " 'rrlailvptnfeivrhrpro',\n",
4796 " 'rrlaponptnfdrtrhrpts',\n",
4797 " 'faorgropsnpjeaelhdne',\n",
4798 " 'fharroapemppnselndrh',\n",
4799 " 'rhaansrpemfrnprlnpne',\n",
4800 " 'rhaahanpemfatrrlnpsi',\n",
4801 " 'fhaphthpemdruaelntpr',\n",
4802 " 'prlhrofdtnaisdthrson',\n",
4803 " 'phahfnedemadrgtlnscn',\n",
4804 " 'paorafndesnsdstennnc',\n",
4805 " 'ransreopshnetdrlatev',\n",
4806 " 'frneofoptrgetdehnhur',\n",
4807 " 'fhnaorepenmapselaned',\n",
4808 " 'rhaaniupesmrerrlnnnr',\n",
4809 " 'rhnraudpeenmrorlsnni',\n",
4810 " 'rlanoonpntrrehrritau',\n",
4811 " 'rlanoonpntrrehrritau',\n",
4812 " 'foanpospntrrelehitiu',\n",
4813 " 'rlanuvrpntrluarritir',\n",
4814 " 'roakfrfpnfgttsrhpjuh',\n",
4815 " 'gohzfuvjnreshunhpnrc',\n",
4816 " 'gohzahfjnrenetnhpnes',\n",
4817 " 'gohzahfjnrenetnhpnes',\n",
4818 " 'forznhepsperatendnns',\n",
4819 " 'farrlnopmpacooendlee',\n",
4820 " 'farlahepmposraendsnp',\n",
4821 " 'glroanejnerthgnreaia',\n",
4822 " 'rooaeeapnefarerhupsp',\n",
4823 " 'gotnfecjnuedranhrrcp',\n",
4824 " 'flinurrpnohleherraie',\n",
4825 " 'fairoffpmonestenrnur',\n",
4826 " 'flohdzdpneaoeeeruson',\n",
4827 " 'ponfnradsndspstnaccr',\n",
4828 " 'roamrsfpssnnztrnnsnd',\n",
4829 " 'roamrsfpssnnztrnnsnd',\n",
4830 " 'faerzltpsaheixenseno',\n",
4831 " 'fartdrzpsnneedennrge',\n",
4832 " 'fartdonpsnnedsennrgs',\n",
4833 " 'fnstorzpnoceheearaue',\n",
4834 " 'raalfhspteidcmrinoch',\n",
4835 " 'gaanrfijtnheponieaee',\n",
4836 " 'fanhusiptrahnoeitsct',\n",
4837 " 'frahiltppmaoiuednsro',\n",
4838 " 'rahrnnopfaerodrpsene',\n",
4839 " 'roalizrpefneevruprrn',\n",
4840 " 'foailsopeeoezoeunrsd',\n",
4841 " 'roeavtspeatusmrusirz',\n",
4842 " 'grohosujenrrzhnehpad',\n",
4843 " 'frlrrolpenppeeeerdru',\n",
4844 " 'rooasahpenflmeruhpln',\n",
4845 " 'gaanhfejnterttneirpr',\n",
4846 " 'raajafapetnftnrniopr',\n",
4847 " 'raarvzlpntvueireivrn',\n",
4848 " 'gartptfjnerdxtneevto',\n",
4849 " 'flientrpionhuheorrar',\n",
4850 " 'flareoepispndaeonres',\n",
4851 " 'fharohepempnlaelndhc',\n",
4852 " 'paneoafdshgeedtlahun',\n",
4853 " 'rlanoonpntrrehrritau',\n",
4854 " 'raarcvapmfpevsrnpdho',\n",
4855 " 'rlarnerpnfarrprrplie',\n",
4856 " 'flinurrpnohleherraie',\n",
4857 " 'fahoroopmeannoenlenh',\n",
4858 " 'raallrmpftnianrpirol',\n",
4859 " 'rlanvrapitruanroitrl',\n",
4860 " 'faonpfcpeeedtaenuatr',\n",
4861 " 'raallrmpftnianrpirol']"
4862 ]
4863 },
4864 "execution_count": 44,
4865 "metadata": {},
4866 "output_type": "execute_result"
4867 }
4868 ],
4869 "source": [
4870 "[cadenus_decipher(first_chunk, w, keycolumn)[:20] for w in hinted_keywords]"
4871 ]
4872 },
4873 {
4874 "cell_type": "code",
4875 "execution_count": 45,
4876 "metadata": {},
4877 "outputs": [
4878 {
4879 "data": {
4880 "text/plain": [
4881 "[]"
4882 ]
4883 },
4884 "execution_count": 45,
4885 "metadata": {},
4886 "output_type": "execute_result"
4887 }
4888 ],
4889 "source": [
4890 "[w for w in hinted_keywords if cadenus_decipher(first_chunk, w, keycolumn).startswith('phaseseven')]"
4891 ]
4892 },
4893 {
4894 "cell_type": "code",
4895 "execution_count": 46,
4896 "metadata": {},
4897 "outputs": [],
4898 "source": [
4899 "# def cadenus_break_worker(message, keyword, keycolumn, fitness):\n",
4900 "# message_chunks = chunks(message, 175)\n",
4901 "# plaintext = ''.join(cadenus_decipher(c, keyword, keycolumn) for c in message_chunks)\n",
4902 "# fit = fitness(plaintext)\n",
4903 "# return (keyword, keycolumn), fit"
4904 ]
4905 },
4906 {
4907 "cell_type": "code",
4908 "execution_count": 47,
4909 "metadata": {},
4910 "outputs": [],
4911 "source": [
4912 "# def cadenus_break(message, words=keywords, fitness=Pbigrams):\n",
4913 "# c = make_cadenus_keycolumn(reverse=True)\n",
4914 "# results = starmap(cadenus_break_worker, [(message, \n",
4915 "# w, \n",
4916 "# make_cadenus_keycolumn(doubled_letters='vw', start=s, reverse=r), \n",
4917 "# fitness)\n",
4918 "# for w in words for s in string.ascii_lowercase for r in [True, False]])\n",
4919 "# # return list(results)\n",
4920 "# return max(results, key=lambda k: k[1])"
4921 ]
4922 },
4923 {
4924 "cell_type": "code",
4925 "execution_count": 48,
4926 "metadata": {},
4927 "outputs": [
4928 {
4929 "data": {
4930 "text/plain": [
4931 "(('finalist',\n",
4932 " {'a': 3,\n",
4933 " 'b': 2,\n",
4934 " 'c': 1,\n",
4935 " 'd': 0,\n",
4936 " 'e': 24,\n",
4937 " 'f': 23,\n",
4938 " 'g': 22,\n",
4939 " 'h': 21,\n",
4940 " 'i': 20,\n",
4941 " 'j': 19,\n",
4942 " 'k': 18,\n",
4943 " 'l': 17,\n",
4944 " 'm': 16,\n",
4945 " 'n': 15,\n",
4946 " 'o': 14,\n",
4947 " 'p': 13,\n",
4948 " 'q': 12,\n",
4949 " 'r': 11,\n",
4950 " 's': 10,\n",
4951 " 't': 9,\n",
4952 " 'u': 8,\n",
4953 " 'v': 7,\n",
4954 " 'w': 7,\n",
4955 " 'x': 6,\n",
4956 " 'y': 5,\n",
4957 " 'z': 4}),\n",
4958 " -5436.133070290792)"
4959 ]
4960 },
4961 "execution_count": 48,
4962 "metadata": {},
4963 "output_type": "execute_result"
4964 }
4965 ],
4966 "source": [
4967 "key8b, fitness = cadenus_break(c8bl, words=hinted_keywords, fitness=Ptrigrams)\n",
4968 "key8b, fitness"
4969 ]
4970 },
4971 {
4972 "cell_type": "code",
4973 "execution_count": 49,
4974 "metadata": {},
4975 "outputs": [
4976 {
4977 "ename": "IndexError",
4978 "evalue": "string index out of range",
4979 "output_type": "error",
4980 "traceback": [
4981 "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
4982 "\u001b[0;31mRemoteTraceback\u001b[0m Traceback (most recent call last)",
4983 "\u001b[0;31mRemoteTraceback\u001b[0m: \n\"\"\"\nTraceback (most recent call last):\n File \"/usr/lib/python3.6/multiprocessing/pool.py\", line 119, in worker\n result = (True, func(*args, **kwds))\n File \"/usr/lib/python3.6/multiprocessing/pool.py\", line 47, in starmapstar\n return list(itertools.starmap(args[0], args[1]))\n File \"/home/neil/Documents/programming/national-cipher-challenge/cipher/cadenus.py\", line 120, in cadenus_break_worker\n plaintext = ''.join(cadenus_decipher(c, keyword, keycolumn) for c in message_chunks)\n File \"/home/neil/Documents/programming/national-cipher-challenge/cipher/cadenus.py\", line 120, in <genexpr>\n plaintext = ''.join(cadenus_decipher(c, keyword, keycolumn) for c in message_chunks)\n File \"/home/neil/Documents/programming/national-cipher-challenge/cipher/cadenus.py\", line 89, in cadenus_decipher\n untransposed_rows = [untranspose(r, transpositions) for r in rows]\n File \"/home/neil/Documents/programming/national-cipher-challenge/cipher/cadenus.py\", line 89, in <listcomp>\n untransposed_rows = [untranspose(r, transpositions) for r in rows]\n File \"/home/neil/Documents/programming/national-cipher-challenge/support/utilities.py\", line 101, in untranspose\n transposed[t] = items[p]\nIndexError: string index out of range\n\"\"\"",
4984 "\nThe above exception was the direct cause of the following exception:\n",
4985 "\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)",
4986 "\u001b[0;32m<ipython-input-49-ef8b0c9b9c63>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mkey8b\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfitness\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcadenus_break\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mc8bl\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfitness\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mPtrigrams\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mkey8b\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfitness\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
4987 "\u001b[0;32m~/Documents/programming/national-cipher-challenge/cipher/cadenus.py\u001b[0m in \u001b[0;36mcadenus_break\u001b[0;34m(message, words, doubled_letters, fitness)\u001b[0m\n\u001b[1;32m 106\u001b[0m start=s, reverse=r), \n\u001b[1;32m 107\u001b[0m fitness)\n\u001b[0;32m--> 108\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0mw\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mwords\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 109\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0ms\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mstring\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mascii_lowercase\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 110\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mr\u001b[0m \u001b[0;32min\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
4988 "\u001b[0;32m/usr/lib/python3.6/multiprocessing/pool.py\u001b[0m in \u001b[0;36mstarmap\u001b[0;34m(self, func, iterable, chunksize)\u001b[0m\n\u001b[1;32m 272\u001b[0m \u001b[0;31m`\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;31m`\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mb\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0mbecomes\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mb\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 273\u001b[0m '''\n\u001b[0;32m--> 274\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_map_async\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0miterable\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstarmapstar\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mchunksize\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 275\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 276\u001b[0m def starmap_async(self, func, iterable, chunksize=None, callback=None,\n",
4989 "\u001b[0;32m/usr/lib/python3.6/multiprocessing/pool.py\u001b[0m in \u001b[0;36mget\u001b[0;34m(self, timeout)\u001b[0m\n\u001b[1;32m 642\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_value\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 643\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 644\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_value\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 645\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 646\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_set\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mi\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mobj\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
4990 "\u001b[0;31mIndexError\u001b[0m: string index out of range"
4991 ]
4992 }
4993 ],
4994 "source": [
4995 "key8b, fitness = cadenus_break(c8bl, fitness=Ptrigrams)\n",
4996 "key8b, fitness"
4997 ]
4998 },
4999 {
5000 "cell_type": "code",
5001 "execution_count": null,
5002 "metadata": {},
5003 "outputs": [],
5004 "source": [
5005 "cadenus_decipher(first_chunk, key8b[0], key8b[1])"
5006 ]
5007 },
5008 {
5009 "cell_type": "code",
5010 "execution_count": null,
5011 "metadata": {},
5012 "outputs": [],
5013 "source": [
5014 "[(w, s, d1+d2, r)\n",
5015 " for w in hinted_keywords \n",
5016 " for d1 in string.ascii_lowercase[:25]\n",
5017 " for d2 in string.ascii_lowercase\n",
5018 " for s in string.ascii_lowercase \n",
5019 " for r in [True, False]\n",
5020 " if d2 > d1\n",
5021 " if cadenus_decipher(first_chunk, w, \n",
5022 " make_cadenus_keycolumn(doubled_letters=d1+d2, start=s, reverse=r)).startswith('finalreport')]"
5023 ]
5024 },
5025 {
5026 "cell_type": "code",
5027 "execution_count": null,
5028 "metadata": {},
5029 "outputs": [],
5030 "source": [
5031 "[(w, s, d1+d2, r, cadenus_decipher(first_chunk, w, \n",
5032 " make_cadenus_keycolumn(doubled_letters=d1+d2, start=s, reverse=r))[:50])\n",
5033 " for w in hinted_keywords \n",
5034 " for d1 in string.ascii_lowercase[:25]\n",
5035 " for d2 in string.ascii_lowercase\n",
5036 " for s in string.ascii_lowercase \n",
5037 " for r in [True, False]\n",
5038 " if d2 > d1\n",
5039 " if cadenus_decipher(first_chunk, w, \n",
5040 " make_cadenus_keycolumn(doubled_letters=d1+d2, start=s, reverse=r)).startswith('finalreport')]"
5041 ]
5042 },
5043 {
5044 "cell_type": "code",
5045 "execution_count": null,
5046 "metadata": {
5047 "scrolled": true
5048 },
5049 "outputs": [],
5050 "source": [
5051 "[(w, s, d1+chr(ord(d1)+1), r)\n",
5052 " for w in hinted_keywords \n",
5053 " for d1 in string.ascii_lowercase[:25]\n",
5054 " # for d2 in string.ascii_lowercase\n",
5055 " for s in string.ascii_lowercase \n",
5056 " for r in [True, False]\n",
5057 " # if d2 > d1\n",
5058 " if cadenus_decipher(first_chunk, w, make_cadenus_keycolumn(doubled_letters=d1+chr(ord(d1)+1), start=s, reverse=r)).startswith('final')]"
5059 ]
5060 },
5061 {
5062 "cell_type": "code",
5063 "execution_count": null,
5064 "metadata": {},
5065 "outputs": [],
5066 "source": [
5067 "cadenus_decipher(first_chunk, 'filbert', make_cadenus_keycolumn(doubled_letters='lu', start='m', reverse=False))"
5068 ]
5069 },
5070 {
5071 "cell_type": "code",
5072 "execution_count": null,
5073 "metadata": {},
5074 "outputs": [],
5075 "source": [
5076 "chunks(first_chunk, 175)"
5077 ]
5078 },
5079 {
5080 "cell_type": "code",
5081 "execution_count": null,
5082 "metadata": {},
5083 "outputs": [],
5084 "source": []
5085 }
5086 ],
5087 "metadata": {
5088 "kernelspec": {
5089 "display_name": "Python 3",
5090 "language": "python",
5091 "name": "python3"
5092 },
5093 "language_info": {
5094 "codemirror_mode": {
5095 "name": "ipython",
5096 "version": 3
5097 },
5098 "file_extension": ".py",
5099 "mimetype": "text/x-python",
5100 "name": "python",
5101 "nbconvert_exporter": "python",
5102 "pygments_lexer": "ipython3",
5103 "version": "3.6.3"
5104 }
5105 },
5106 "nbformat": 4,
5107 "nbformat_minor": 1
5108 }