Skip to content

Instantly share code, notes, and snippets.

View cairdcoinheringaahing's full-sized avatar

cairdcoinheringaahing cairdcoinheringaahing

View GitHub Profile

Input

A string S of length between 2 and 30. The characters are taken from the 95 printable ASCII characters, byte values 32 (0x20) to 126 (0x7E) ( to ~)

Output

Your code must compute and output all strings within [Levenshtein][1] distance 2 of S. You can have duplicates as long as you also have all the different strings, and the output may be in any order.

Scoring

import csv
import collections
digraphs = collections.Counter()
trigraphs = collections.Counter()
quadgraphs = collections.Counter()
with open('QueryResults.csv', newline = '', encoding = 'utf-8') as f:
for row in csv.reader(f):
if row[0] == 'Post Link': continue
2-graphs:
59 fo
50 mo
39 o=
36 S+
36 '
35 S=
33 mΣ
32 İp
31 U¡
#C Generated by copy.sh/life
x = 19, y = 6, rule = B3/S23
b3o2b3o2b3o2b3o$o4bo4bo4bo$o4bo4bo4bo$o4bob2obo4bo$o4bo2bobo4bo$b3o2b
2o3b3o2b3o!
05AB1E (legacy) -> 3 ("1e ")
1L_a -> 0
1L_AOI -> 3 ("_ao")
2DFuck -> 3 ("2df")
2L -> 2 ("2l")
2sable -> 2 ("2s")
33 -> 0
3var -> 2 ("3v")
4 -> 0
7 -> 0
#C Generated by copy.sh/life
x = 19, y = 20, rule = B3/S23
3o2b3o3b3o2b3o$o2bobo2bobo4bo$o2bobo2bobo4bo$3o2b3o2bo4bob2o$o4bo4bo4b
o2bo$o4bo5b3o2b2o$$$$$7b5o$7b5o$7b5o$7b5o$7b5o$7b5o$7b5o$7b5o$7b5o$7b
5o!
® restore
³ third
⁴ fourth
⁵ fifth
⁶ sixth
⁷ seventh
⁸ leftarg
⁹ rightarg
Ɠ stdineval
ƈ stdinchar
#C Generated by copy.sh/life
x = 19, y = 20, rule = B3/S23
3o2b3o3b3o2b3o$o2bobo2bobo4bo$o2bobo2bobo4bo$3o2b3o2bo4bob2o$o4bo4bo4b
o2bo$o4bo5b3o2b2o$$$$$9bobo$7b2obo$7b3obo$7b3o$8b2obo$7b5o$8b2obo$7b4o
$7b4o$7b2obo!
05AB1E (legacy)
1L_a
1L_AOI
2DFuck
2L
2sable
33
3var
4
7
// ==UserScript==
// @name Þe best userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Þorns everywhere!
// @author You
// @match https://*/*
// @grant none
// ==/UserScript==