Skip to content

Instantly share code, notes, and snippets.

View zeyadkhaled's full-sized avatar
🌍
Up and runnning

Zeyad Abuamer zeyadkhaled

🌍
Up and runnning
View GitHub Profile
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"]
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]]]
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)