"cells": [
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"\n",
"from cipherbreak import *\n",
+ "from text_prettify import *\n",
"\n",
"ca = open('5a.ciphertext').read()\n",
"cb = open('5b.ciphertext').read()"
},
{
"cell_type": "code",
- "execution_count": 3,
+ "execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
- "def tpack(text, width=100):\n",
- " lines = [text[0]]\n",
- " for word in text[1:]:\n",
- " if len(lines[-1]) + 1 + len(word) <= width:\n",
- " lines[-1] += (' ' + word)\n",
- " else:\n",
- " lines += [word]\n",
- " return lines"
+ "# def tpack(text, width=100):\n",
+ "# lines = [text[0]]\n",
+ "# for word in text[1:]:\n",
+ "# if len(lines[-1]) + 1 + len(word) <= width:\n",
+ "# lines[-1] += (' ' + word)\n",
+ "# else:\n",
+ "# lines += [word]\n",
+ "# return lines"
]
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": 3,
"metadata": {},
"outputs": [
{
},
{
"cell_type": "code",
- "execution_count": 5,
+ "execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
},
{
"cell_type": "code",
- "execution_count": 6,
+ "execution_count": 5,
"metadata": {},
"outputs": [
{
"(24, -1733.3180566179738)"
]
},
- "execution_count": 6,
+ "execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 7,
+ "execution_count": 6,
"metadata": {},
"outputs": [
{
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": 7,
"metadata": {},
"outputs": [
{
"((17, 21, True), -1723.2877779777489)"
]
},
- "execution_count": 8,
+ "execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": 8,
"metadata": {},
"outputs": [
{
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": 9,
"metadata": {},
"outputs": [
{
"'etoainhsrdlumwycfgpbvkxjqz'"
]
},
- "execution_count": 10,
+ "execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 11,
+ "execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
- "'yrkfdlbqpoisjcumzaetwhxgvn'"
+ "'yrkfdlbqpoisjcumzeathwxgvn'"
]
},
- "execution_count": 11,
+ "execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 12,
+ "execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
- "{'A': 'g',\n",
+ "{'A': 'p',\n",
" 'B': 'h',\n",
" 'C': 'w',\n",
" 'D': 'i',\n",
- " 'E': 'p',\n",
+ " 'E': 'g',\n",
" 'F': 'a',\n",
" 'G': 'j',\n",
- " 'H': 'k',\n",
+ " 'H': 'v',\n",
" 'I': 'l',\n",
" 'J': 'm',\n",
" 'K': 'o',\n",
" 'T': 'b',\n",
" 'U': 'y',\n",
" 'V': 'q',\n",
- " 'W': 'v',\n",
+ " 'W': 'k',\n",
" 'X': 'x',\n",
" 'Y': 'e',\n",
" 'Z': 'f'}"
]
},
- "execution_count": 12,
+ "execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 13,
+ "execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "mirvi mjnda ehisg noeai rrabe daose lwuki sclio oedpu tshed adotm iketh ereod exbnu sthel nwils titan othao kshem ivhib epeeo kadoi ccedp utthe rehis peeoo nrios nmdem iodio dther eason thaog muwht ngnno herrn nmhid peeor iosiw kedio dshel efton messi geput snmet haogt ellsm eshea snkio dyesh nuldm nbeno athao kshem ivhib eclio oedth asmei oyhal eahib ethed nwume otjnd aeyio tedfr nmlno dnoad notko nyhny sheko eyput thefa fthwh icter yisha ddeoa oiwib atvao istno elaot elaos nmere miaos aothe eches usrnn mitth eprat ashmu seuma tyise owrvc tedus aogio nther cnlvi lchip etaww acher aobeo tedao theoa oetee othwe oturv aiske dthem useum tntes tatio dthed nwume otasi utheo tawsn agues sthea mcera ilwac hersw hnnlr eillv hidmn bedno cerhi csash nuldo thibe peeos urcra sedif terth edasw nberv itpnd rumpu tatle ibesm eynod eraog yhite lseth evdeb elnce dnoen ddfei turey isifr aexer uooao grnuo dthre esade snfth elaot elwno sasta ognfi saogl ernyn fpliw kiody hatet alest hitth emuse umtha okyer eidde daoth ernmi ocera ndthe vreid aosez ueowe yyppy yypyy ypyyy pyyyp yyypy yypyy ypyyy pyyyp yyypy yypyy ypyyy pyyyp yyypy yypyy ypyyy pyyyp pyyyp yypyp ypypy pypyp ypypy pypyp ypypy pypyp ypypy pypyp ypypy pypyp ypypy pypyp ypypy pypyp ypyyp yyypy pppyp ppypp pyppp ypppy pppyp ppypp pyppp ypppy pppyp ppypp pyppp ypppy pppyp ppypp pyppp ypyyy pyyyp yyypy yypyy ypyyy pyyyp yyypy yypyy ypyyy pyyyp yyypy yypyy ypyyy pyyyp yyypy yypyy ypyyy pyyyp yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yypyy ypyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy ypyyy pyyyy pyyyp ppyyy yyppp yyypy yypyy ypyyy pyyyy pppyy pyyyp ypppy yyppp pyypp pyyyp ppyyp ppypy yypyy yypyp yypyy pyyyp yyyyy pypyy ppyyp yypyp yyyyp yyypp yppyp yypyy pyyyy ypyyp yyypy yyypy yypyy ypyyp yyypy pyyyp ypyyy yypyy ypypy pypyp yyypy yypyy ypypy pypyy pyypy yyyyp yyypy ypyyy ypyyp yyypy yyppp ppypp ppyyp yyyyy ppppp ypypy pyppp ppyyy pyyyp yyypy ppppy ypppy yyppp pyyyp yyyyp yyypy yypyy pyyyp ypypy yypyy yyypy yypyp ypypy pyyyp yyypy yypyy ypypy yyyyp yyyyy pypyy yypyy yypyy pyyyp yyypy yypyp yypyy ypyyy ypyyy pypyy ppypy yypyy ypyyy pyyyp ypyyy yypyy yyypy ypyyy pyyyy pyyyp yyypy ypyyy pypyy ypyyy pppyp yyypy pyyyp ypyyy pyypp pyypy yypyp yyyyy ppppy ypyyy pyppp yyppp ypyyy pyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy pyyyp yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yypyy ypypy yypyy ypyyy pyyyp yyypy yypyy ypyyy pyyyp yyypy yypyy ypyyy pyyyp yyypy yypyy ypyyy pyyyp ypyyy pypyp ypypy pypyp ypypy pypyp ypypy pypyp ypypy pypyp ypypy pypyp ypypy pypyp ypypy pypyp ypypy yypyy pppyp ppypp pyppp ypppy pppyp ppypp pyppp ypppy pppyp ppypp pyppp ypppy pppyp ppypp pyppp yypyy ypyyp yyypy yypyy ypyyy pyyyp yyypy yypyy ypyyy pyyyp yyypy yypyy ypyyy pyyyp yyypy yypyy ypyyp yyahi beuse dpfnr thepl iwkta lesio dyfnr theyh ateno esatt nnkme iyhal etnfa guren utthi tthef raexe asste giong richv wnowe ilaog theke vynrd fnrth ewach eraow hicte rfabe yathn utjnd aeaim ontsu reyhe retng noeqt there ireno lvtyn cnssa palat aesis firis awios eeput ahibe onade iyher enoen fthem asiod isfir isawi otell onnoe elsek onyse ather snagu essay allhe idfnr nlvmc aisee vnuth ere\n"
+ "mirki mjnda ehisp noeai rrabe daose lwuvi sclio oedgu tshed adotm iveth ereod exbnu sthel nwils titan othao vshem ikhib egeeo vadoi ccedg utthe rehis geeoo nrios nmdem iodio dther eason thaop muwht npnno herrn nmhid geeor iosiw vedio dshel efton messi pegut snmet haopt ellsm eshea snvio dyesh nuldm nbeno athao vshem ikhib eclio oedth asmei oyhal eahib ethed nwume otjnd aeyio tedfr nmlno dnoad notvo nyhny shevo eygut thefa fthwh icter yisha ddeoa oiwib atkao istno elaot elaos nmere miaos aothe eches usrnn mitth egrat ashmu seuma tyise owrkc tedus aopio nther cnlki lchig etaww acher aobeo tedao theoa oetee othwe oturk aisve dthem useum tntes tatio dthed nwume otasi utheo tawsn apues sthea mcera ilwac hersw hnnlr eillk hidmn bedno cerhi csash nuldo thibe geeos urcra sedif terth edasw nberk itgnd rumgu tatle ibesm eynod eraop yhite lseth ekdeb elnce dnoen ddfei turey isifr aexer uooao prnuo dthre esade snfth elaot elwno sasta opnfi saopl ernyn fgliw viody hatet alest hitth emuse umtha ovyer eidde daoth ernmi ocera ndthe kreid aosez ueowe yyggy yygyy ygyyy gyyyg yyygy yygyy ygyyy gyyyg yyygy yygyy ygyyy gyyyg yyygy yygyy ygyyy gyyyg gyyyg yygyg ygygy gygyg ygygy gygyg ygygy gygyg ygygy gygyg ygygy gygyg ygygy gygyg ygygy gygyg ygyyg yyygy gggyg ggygg gyggg ygggy gggyg ggygg gyggg ygggy gggyg ggygg gyggg ygggy gggyg ggygg gyggg ygyyy gyyyg yyygy yygyy ygyyy gyyyg yyygy yygyy ygyyy gyyyg yyygy yygyy ygyyy gyyyg yyygy yygyy ygyyy gyyyg yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yygyy ygyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy ygyyy gyyyy gyyyg ggyyy yyggg yyygy yygyy ygyyy gyyyy gggyy gyyyg ygggy yyggg gyygg gyyyg ggyyg ggygy yygyy yygyg yygyy gyyyg yyyyy gygyy ggyyg yygyg yyyyg yyygg yggyg yygyy gyyyy ygyyg yyygy yyygy yygyy ygyyg yyygy gyyyg ygyyy yygyy ygygy gygyg yyygy yygyy ygygy gygyy gyygy yyyyg yyygy ygyyy ygyyg yyygy yyggg ggygg ggyyg yyyyy ggggg ygygy gyggg ggyyy gyyyg yyygy ggggy ygggy yyggg gyyyg yyyyg yyygy yygyy gyyyg ygygy yygyy yyygy yygyg ygygy gyyyg yyygy yygyy ygygy yyyyg yyyyy gygyy yygyy yygyy gyyyg yyygy yygyg yygyy ygyyy ygyyy gygyy ggygy yygyy ygyyy gyyyg ygyyy yygyy yyygy ygyyy gyyyy gyyyg yyygy ygyyy gygyy ygyyy gggyg yyygy gyyyg ygyyy gyygg gyygy yygyg yyyyy ggggy ygyyy gyggg yyggg ygyyy gyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy gyyyg yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yyyyy yygyy ygygy yygyy ygyyy gyyyg yyygy yygyy ygyyy gyyyg yyygy yygyy ygyyy gyyyg yyygy yygyy ygyyy gyyyg ygyyy gygyg ygygy gygyg ygygy gygyg ygygy gygyg ygygy gygyg ygygy gygyg ygygy gygyg ygygy gygyg ygygy yygyy gggyg ggygg gyggg ygggy gggyg ggygg gyggg ygggy gggyg ggygg gyggg ygggy gggyg ggygg gyggg yygyy ygyyg yyygy yygyy ygyyy gyyyg yyygy yygyy ygyyy gyyyg yyygy yygyy ygyyy gyyyg yyygy yygyy ygyyg yyahi beuse dgfnr thegl iwvta lesio dyfnr theyh ateno esatt nnvme iyhal etnfa puren utthi tthef raexe asste pionp richk wnowe ilaop theve kynrd fnrth ewach eraow hicte rfabe yathn utjnd aeaim ontsu reyhe retnp noeqt there ireno lktyn cnssa galat aesis firis awios eegut ahibe onade iyher enoen fthem asiod isfir isawi otell onnoe elsev onyse ather snapu essay allhe idfnr nlkmc aisee knuth ere\n"
]
}
],
},
{
"cell_type": "code",
- "execution_count": 14,
+ "execution_count": 13,
"metadata": {},
"outputs": [
{
},
{
"cell_type": "code",
- "execution_count": 15,
+ "execution_count": 14,
"metadata": {},
"outputs": [
{
" 'Z': 'f'}"
]
},
- "execution_count": 15,
+ "execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 16,
+ "execution_count": 15,
"metadata": {},
"outputs": [
{
" 'z': 'X'}"
]
},
- "execution_count": 16,
+ "execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 17,
+ "execution_count": 16,
"metadata": {},
"outputs": [
{
},
{
"cell_type": "code",
- "execution_count": 18,
+ "execution_count": 17,
"metadata": {},
"outputs": [
{
"3362"
]
},
- "execution_count": 18,
+ "execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 19,
+ "execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
},
{
"cell_type": "code",
- "execution_count": 20,
+ "execution_count": 19,
"metadata": {},
"outputs": [
{
"1577"
]
},
- "execution_count": 20,
+ "execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 21,
+ "execution_count": 20,
"metadata": {},
"outputs": [
{
"1577"
]
},
- "execution_count": 21,
+ "execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 22,
+ "execution_count": 21,
"metadata": {},
"outputs": [
{
" ' * * * * * * * * * * * * * * * * * * * * * ']"
]
},
- "execution_count": 22,
+ "execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 25,
+ "execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
},
{
"cell_type": "code",
- "execution_count": 27,
+ "execution_count": 23,
"metadata": {},
"outputs": [
{
"('fwruffnquevmp', -1750.4576000271347)"
]
},
- "execution_count": 27,
+ "execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 28,
+ "execution_count": 24,
"metadata": {},
"outputs": [
{
"'nieyqmhcenwlqvchdporosweiohtsshreoihpsvrvusdcostmjezkdeytdhrtasupknropbklngeutgnssthjhhnowgbdwvucncdvofhbdltfpvobiuicirayodpwkpoutibtgcenuhpwachchnbrjydhsfvhqszeuvdcpswatvzmxhsiigkobvcagqcdikfstrvkfggbdkvcvstuvufienwiniasbcecmvdwemkwgtnsyjridowjamhuhnrvxssgewikqxpxhashvwvteulpavioctweavlhtikkkximoikdloikrwswfiojrynulrsgtoktknqcporlruoigivdpeddhrntdmrnucnrioiuetpdnftaipjrewjqtercxzvydhiswrtrneonknnfsyrifcdhedoweptjrechehcptdcehirohbcpniloorntrrrtohgeoandszehilxywfqkrgnphglvcojfbetcietpqmfetkalnahiwixdppersmrihrctseahkhtifbokasoozrjgvvkehjsufarunbrtiswzdmriwcrovhdsdeihdteiiustmjupvkhdiisibjloyrdpyxkusdlwfpsehvevdoiudppehzgvcewnhifrvkfggbdkbidptartnotloihpseehrdipeotmlwbcousicucctsktsrlritcanhpdmrehuinioiuuwirsxtanvjshfwyrkacfihfctdipytegvprdowhfldhycrqhfctswdbnagevitctsufsrofoccprycjgnifeikrthnowgcedfedjwiisdtihszeecfvlwjqgehoeicssaqflthagmncpvvifnreneoiioiulytddhuhkrtzsdpevphodehkctsvfhltophksiepsgcohnrnuseajettlhdwhiepjwcenbtbuecihpijncohouidiqjikpovimvsrfridohvchdporhrmhlpnikpacvjiswwgszeyxrcpragclkvxbporlruoigoviferifridicrskiporsyypwgprszenephnicczvttucvqesuiivqleesvfrhcfgchuswrocjslotcnxtiiswkoieatruninitradpaortylcouoahdpehgukcvlrmrafrntaovetrxvyinpenvniquglltisxgy'"
]
},
- "execution_count": 28,
+ "execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 29,
+ "execution_count": 25,
"metadata": {},
"outputs": [
{
"('arcanaimperii', -1506.8637359274674)"
]
},
- "execution_count": 29,
+ "execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 30,
+ "execution_count": 26,
"metadata": {},
"outputs": [
{
"'inhisjournaldatedtheidesofoctoberintheyearoftheconsulshipsofcaeceliustulliuscapitopomponianusplotiusfirmusandgaiuscorneliusgallicanusagricolawrotethemysteryofthebattleatcamulodonumisatlastsolvedcalgacusmaybeabarbariannowbuthewasaromancitizenthenwhobetrayedusallforloveofabarbarianithastakenallmyskillsasaleaderofmentokeephimalivethelegionnairesspendtheireveningsdesigningnewandcruelwaystoexecutehiminrevengefortheshamehebroughtuponusbuthislifeispreciousitistheonlycardlefttoplayinoursearchforsalvationandthereturnofthestolenaquilaeifwecanalsorecoverthecodexthenperhapsitslosscanbeconcealedandourliveswillbesparedreleasingtheromantraitorcalgacusmusthavestuckintheproudagricolasthroatbuthemadeapactwiththeremainingcaledoniiandtravellednorthtoexchangetheprisonerfortheaquilaeandthecodexbutthecunningcaledoniantribesmansetanothertrapandpresentedagricolawithaforgerycunninglyassembledwithpagesfromthebooksstolenwhenthetriberansackedmonsgraupiusfortoolongthesonsofromehadunderestimatedthepeopleinbritanniaandwhiletheaquilaofthelegionhadbeenrestoredbytheexchangetheirhonourwasnotagricolafacedareturntoromehumiliationandalmostcertaindeaththesixthchapterofmytaleofwoeisguardedbylightningbullandoak'"
]
},
- "execution_count": 30,
+ "execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 31,
+ "execution_count": 27,
"metadata": {},
"outputs": [
{
"'a'"
]
},
- "execution_count": 31,
+ "execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 32,
+ "execution_count": 28,
"metadata": {},
"outputs": [
{
"'zyxwvutsrqponmlkjihgfedcba'"
]
},
- "execution_count": 32,
+ "execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 33,
+ "execution_count": 29,
"metadata": {},
"outputs": [
{
"'hveheifhbiicuzbbcfgvvnzafwnkqnndivxopvpdionrsyrmjvjlkaehbrfsmvmtvkqrrftcyspatroqqnbndcyiqretamkaszhcaqidtaxmpfrvenkfimmihgrxnvgqtrmcpzsqzpygininbbstddlcomipnnqgqargdgmrkbijtxnubxpuzjzbizesjbvqmutztdzotjzktjvraioamqznxiwnstbedizjnbjurebqqhldegrzvnynjbsdzprnparcknlqxnmryaisrqjxquzevdcijkzsbmmkczinszckaxrmkvnnzzfwlmksajvrzcqdrkqsdfgvyobqfemifqqrjcoilkydqodhdevxbauvrqdmumxaorieubzrdxvrlcowvodkrsqgzzsizvmdvddrnigrzayrlmednqfhqcblgnvrrntkusntzwdqpoddtvypazkhaqgqneyixiiukmcsfngyktqeftzpdmqtupjzjrkdxsunenxybyvqmqtdmfsdcmjkntbmmplvvvmzwvmzzzzcfymmtfumostdtbnzfkydvmddgrccdbjcnapbmmsrmjvtvztbcmmubemtzmdathxksrckiivczbkqzjvxbbyvqwjzzsinsowitztdzotjzenbyrumpsgbbvxopvgqwrcmfivmjtrjsponmsshdcmdrcmxombkjsopkydzblmhevxbkrcdllmuhranozrmdtidpmfedcbfvwkezzfvgrzxizrwkddefedcmrhtqizqzeqdcmtfcmuagskuoxceehvdbmkvqyiqreszfaqrdnxnmkrmwqgqqkekkieuozbrqmkrnvoizbwizihkukawixdzvbgmevxbtprrablnkvqgdbygzobrrqfzdcmsfnsprfncrxrpvespbsdhsrbvvjrbsbcynefqmilghcpeaqkbygwexspbramjbpmwdvgiatzcveonbzdzbbcfgvcojxcvhvyqusraxdireceehxdkuovylzkilefgvyobqfegiaaqdeeonbfidlyxfgvrhxprefmqgqhiuyiwlivipmasrtbdkfcznxbqcreoocieswonydyhwdtzrsqlmmmunvhwjkbmosmheqovbykgmphjsyprvxkvqwclksryojnnfdqpfgziqoyjpchoeszhetlptcrmllzw'"
]
},
- "execution_count": 33,
+ "execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 34,
+ "execution_count": 30,
"metadata": {},
"outputs": [
{
"('zixzmzrnkvirr', -1506.8637359274674)"
]
},
- "execution_count": 34,
+ "execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 35,
+ "execution_count": 31,
"metadata": {},
"outputs": [
{
"'inhisjournaldatedtheidesofoctoberintheyearoftheconsulshipsofcaeceliustulliuscapitopomponianusplotiusfirmusandgaiuscorneliusgallicanusagricolawrotethemysteryofthebattleatcamulodonumisatlastsolvedcalgacusmaybeabarbariannowbuthewasaromancitizenthenwhobetrayedusallforloveofabarbarianithastakenallmyskillsasaleaderofmentokeephimalivethelegionnairesspendtheireveningsdesigningnewandcruelwaystoexecutehiminrevengefortheshamehebroughtuponusbuthislifeispreciousitistheonlycardlefttoplayinoursearchforsalvationandthereturnofthestolenaquilaeifwecanalsorecoverthecodexthenperhapsitslosscanbeconcealedandourliveswillbesparedreleasingtheromantraitorcalgacusmusthavestuckintheproudagricolasthroatbuthemadeapactwiththeremainingcaledoniiandtravellednorthtoexchangetheprisonerfortheaquilaeandthecodexbutthecunningcaledoniantribesmansetanothertrapandpresentedagricolawithaforgerycunninglyassembledwithpagesfromthebooksstolenwhenthetriberansackedmonsgraupiusfortoolongthesonsofromehadunderestimatedthepeopleinbritanniaandwhiletheaquilaofthelegionhadbeenrestoredbytheexchangetheirhonourwasnotagricolafacedareturntoromehumiliationandalmostcertaindeaththesixthchapterofmytaleofwoeisguardedbylightningbullandoak'"
]
},
- "execution_count": 35,
+ "execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 36,
+ "execution_count": 32,
"metadata": {},
"outputs": [
{
"'arcanaimperii'"
]
},
- "execution_count": 36,
+ "execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 37,
+ "execution_count": 33,
"metadata": {},
"outputs": [
{
},
{
"cell_type": "code",
- "execution_count": 38,
+ "execution_count": 34,
"metadata": {},
"outputs": [
{
"1465"
]
},
- "execution_count": 38,
+ "execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 39,
+ "execution_count": 35,
"metadata": {},
"outputs": [],
"source": [
},
{
"cell_type": "code",
- "execution_count": 40,
+ "execution_count": 36,
"metadata": {},
"outputs": [
{
"'sevsvrusyrrxfayyxuteemazudmpjmmwr'"
]
},
- "execution_count": 40,
+ "execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 41,
+ "execution_count": 37,
"metadata": {},
"outputs": [],
"source": [
},
{
"cell_type": "code",
- "execution_count": 42,
+ "execution_count": 38,
"metadata": {},
"outputs": [
{
"'inhisjournaldatedtheidesofoctober'"
]
},
- "execution_count": 42,
+ "execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 43,
+ "execution_count": 39,
"metadata": {},
"outputs": [],
"source": [
},
{
"cell_type": "code",
- "execution_count": 44,
+ "execution_count": 40,
"metadata": {},
"outputs": [],
"source": [
},
{
"cell_type": "code",
- "execution_count": 45,
+ "execution_count": 42,
"metadata": {},
"outputs": [
{
"('arcanaimperii', -1506.8637359274674)"
]
},
- "execution_count": 45,
+ "execution_count": 42,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "beaufort_frequency_break(cb)"
+ "kb, sb = beaufort_frequency_break(cb)\n",
+ "kb, sb"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "In his Journal dated the Ides of October in the year of the consulships of Caecelius Tullius Capito\n",
+ "Pomponianus Plotius Firmus and Gaius Cornelius Gallicanus, Agricola wrote “The mystery of the battle\n",
+ "at Camulodonum is at last solved. Calgacus may be a Barbarian now, but he was a Roman citizen then,\n",
+ "who betrayed us all for love of a barbarian. It has taken all my skills as a leader of men to keep\n",
+ "him alive. The Legionnaires spend their evenings designing new and cruel ways to execute him in\n",
+ "revenge for the shame he brought upon us, but his life is precious. It is the only card left to play\n",
+ "in our search for salvation and the return of the stolen Aquilae. If we can also recover the Codex\n",
+ "then perhaps its loss can be concealed and our lives will be spared.” Releasing the Roman traitor\n",
+ "Calgacus must have stuck in the proud Agricola’s throat, but he made a pact with the remaining\n",
+ "Caledonii and travelled north to exchange the prisoner for the Aquilae and the Codex. But the\n",
+ "cunning Caledonian tribesman set another trap and presented Agricola with a forgery cunningly\n",
+ "assembled with pages from the books stolen when the tribe ransacked Mons Graupius. For too long the\n",
+ "sons of Rome had underestimated the people in Britannia and while the Aquila of the Legion had been\n",
+ "restored by the exchange, their honour was not. Agricola faced a return to Rome, humiliation and\n",
+ "almost certain death. The sixth chapter of my tale of woe is guarded by lightning, bull and oak.\n"
+ ]
+ }
+ ],
+ "source": [
+ "pub = depunctuate(cb)\n",
+ "pb = beaufort_decipher(scb, kb)\n",
+ "print(lcat(tpack(repunctuate(pb, pub).split())))"
]
},
{
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.5.2"
+ "version": "3.5.3"
}
},
"nbformat": 4,