This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Thanks to this configuration for the initial legwork https://github.com/kbx81/esphome-configs/blob/main/dev/esp-funhouse.yaml | |
esphome: | |
name: funhouse | |
friendly_name: Funhouse | |
platformio_options: | |
board_build.mcu: esp32s2 | |
board_build.variant: esp32s2 | |
esp32: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
0: ELYOIECBAQK | |
1: FMCVJFDZNUD | |
2: QNKSLGECQVE | |
3: LQXAMTNDUTF | |
4: UUDBNHJEFRG | |
5: VPECQIQFVOH | |
6: WKFDUJUGWSI | |
7: XTPEVLVHXAJ | |
8: IOGFWMWIZBL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VQEDSXMRTKSKNZZGSXNLBOEWGSOFFFAVWMJGBWHYASLIVNNUHNIZEDISSNBXTOYINIAGIENBQFBVUNNQUYQNKSQLOAMTVNPPM - 0 - CHILIAST | |
DNRPIFLIPZICMQGVOWMJATQJFIHHOESFMGTIAZWWSIFDUCVXGELXRNXOOEAWPTRHILSILDVAVYAUQCVNWRNMZODKTJDGUCYUE - 1 - CHILIAST | |
CEKFLEJHYXLZDGFFTVDBSPDZULJYHDOEESPDSQZJOLOPQBMQFHFWKCKTTHSVYPNGHOIDFNMSDRSQNBMMMKMLXTCYPMGIQBRXQ - 2 - CHILIAST | |
BHZHFDIGRWFXGVEEPUGEIYCRWOTRJNTDQIYPIGGZTOHFNALNUDOVZBUPPDIUEYVVGTLPOCLOCKINMALLEZDJWPBWYGCDNANQV - 3 - CHILIAST | |
LDXYONXVKVOWCXQDYQCALRBIMTPKTCPCVLEFLVFRPTJHMSJMWCHUXAHUYCLQRRMFFPFFHBJTBZLMDSJKQXGBVYAJRSBPMSVND - 4 - CHILIAST | |
ACWRHCKFZUHVBFDCRNBSFKAHEPYCPBYBDORHFXEIYPTYDOILMBJQWSWXRBFNKKLEUFOHJAIPLXFLGOIYVWCEURSZKIAFDOMMC - 5 - CHILIAST | |
SBVKJBUEXQJUAECBKEAOOMSGQFEZYARACTKYOFQHRFPRGTXKEATNVOZQKAOMZMJDWYHYTSXUAWOJCTXWDVBAQKORZLSHGTLLB - 6 - CHILIAST | |
OAUCTAHDJNTQSDBAZHSTHUOVVYRXESNSBPZRHEDGKYYKCPKYQJPMUTGNZJHLXUICMRJRPOKXSVHBBPKJCUASNMTIXOIYCPJKL - 7 - CHILIAST | |
TJQZPSWCNEPNINASXDIGJLTFDRKWROVOLFXKJDCVZRECBYUWVMYLQPFMXMJJWLXBEKTKYTUQOUJEAYUZBQSOMUPHJTLRBYIYA - 8 - CHILIAST | |
PMNXYOZ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENGLISH_INDEX_OF_COINCIDENCE = 1.73 | |
def kasiski_examination(text) | |
segments = [] | |
(0..text.length-3).each do |starting_index| | |
segments += text[starting_index..-1].chars.each_slice(3).map(&:join) | |
end | |
segments.uniq! | |
# Only segments of length 3 should be kept (for the partial segments included) | |
segments.keep_if{|segment| segment.length == 3} |