BONSAI voting on nomenclature for "flow object" possible replacement
orig_data = """BDACFE | |
DCAFBE | |
AFDCEB | |
ADCFBE | |
CAEBDF | |
DCABFGHE | |
AFCED | |
DCAFBEGH | |
BGEACDH""".split("\n") | |
LETTERS = "ABCDEFGH" | |
def _(x, s, default): | |
try: | |
return s.index(x) + 1 | |
except ValueError: | |
return default + 1 | |
mapping = {x: i + 1 for i, x in enumerate(LETTERS)} | |
data = [[_(letter, line, len(LETTERS)) for letter in LETTERS] for line in orig_data] | |
for line in data: | |
print(str(line)[1:-1]) | |
import numpy as np | |
for letter in LETTERS: | |
print(letter, np.average([_(letter, line, len(LETTERS)) for line in orig_data])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
To do instant runoff voting, use https://petertheone.github.io/IRV/
Use this list of candidates:
A
B
C
D
E
F
And these responses printed out by this gist.