Skip to content

Instantly share code, notes, and snippets.

View cairdcoinheringaahing's full-sized avatar

cairdcoinheringaahing cairdcoinheringaahing

View GitHub Profile
@cairdcoinheringaahing
cairdcoinheringaahing / atoms.md
Last active January 6, 2018 17:45
Jelly equivalents to atoms

A collection of programs that substitute for the commands found here. Single byte nilads aren't included. Vectorisation isn't included, i.e. [1, 2, 3] + 10 != [11, 12, 13] with these substitutions, however, if there is a non-vecotirsing equivilent, then the vecotirsing one must vectorise. N/A indicates that a solution is currently under development or may not be possible. Keep in mind that execing Python code isn't a valid alternative.

Please note that these do not have to handle overloads.

Monads

These are links which take a single argument, and aren't expected to work when given 2 arguments.

Atom Description Program
Original character Replace code
¡ v!
¢ |c
£ -L
¤ ^o
¥ =Y
¦ ^|
© oC
¬ ^_
- N: Schindler's List
- N: The Exorcist
- N: The Shining
- 2001: A Space Odessy
- N: A Clockwork Orange
- Jurassic Park
- N: The Godfather
- N: Stand By Me
- E.T. The Extraterrestrial
- Taken
;{'ZYXWVUTSRQPOMLKJIHGFEDCBA'UwwUwwUwwUwwUwwUwwUwwUwwUwwUwwUwwUwwUw?
;ECEboDFS
;@`
;EJO
;^>>>>>>^++++++@+{+@------@.^<^>++.^+.^<^<^>>+.^+.<^>+.^<^<^<^>>>+.^+.^<^>+.^+.^<^<^>>+.^+.^<^>+.^+.^<^<^<^<^>>>>+.^+.^<^>+.^+.^<^<^>>+.^+.^<^>+.^+.^<^<^<^>>>+.^+.^<^>+.
+25
`i
Ex,+65,h
1 {- !!! /* /* -}
;
All badges you can earn on PPCG without posting a single answer or question. * indicates can be awarded multiple times with no limit.
Without posting an answer or question, it is possible to get a maximum of 60 badges, assuming the indefinite ones are only awarded once
Altruist
Investor
Autobiographer
Caucus *
Constituent *
Commentator
Pundit

For the descriptions, l refers to the left argument, r to the right. As Ƒ doesn't map over lists, (for some atom A that doesn't operate on lists) is equivalent to AƑ€Ạ for lists (i.e. the atom is invariant for each element)

For the nilad commands, is simply equalivalent to ⁼N, so they've been excluded from this list

The atoms WḲṆṾ all yield 0 no matter the left argument, and so are ignored in the list.

Atom Description

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¡