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
from zef.ops import * | |
url = "https://raw.githubusercontent.com/charlesreid1/five-letter-words/master/sgb-words.txt" | |
wordlist = url | make_request | run | get['response_text'] | split['\n'] | map[to_upper_case] | collect | |
discard_letters = 'ACLNRT' | |
guesses = [ | |
["_", "_", "_","_","[E]"], | |
["_", "U", "_", "[E]","S"] |
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
from zef.ops import * | |
url = "https://raw.githubusercontent.com/charlesreid1/five-letter-words/master/sgb-words.txt" | |
wordlist = url | make_request | run | get['response_text'] | split['\n'] | map[to_upper_case] | collect | |
counter, to_be_guessed = 6, random_pick(wordlist) | |
discard_words, discard_letters, guesses_list = set(), set(), [] | |
is_eligible_guess = And[length | equals[5]][contained_in[wordlist]][Not[contained_in[discard_words]]] |
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
from zef.ops import * # don't forget to import ZefOps module from zef | |
str_points: str = """...""" | |
str_folds: str = """...""" | |
points = (str_points | |
| split["\n"] # ["897,393", "...] | |
| map[split[","] | map[int]] # [[897,393], [...] | |
| collect) |