Skip to content

Instantly share code, notes, and snippets.

@vakila
vakila / LilLambda.ipynb
Last active April 13, 2025 23:22
Anjana Vakil, "Mary had a little lambda", OSCON 2018 (https://conferences.oreilly.com/oscon/oscon-or/public/schedule/detail/67384) & EuroPython 2017 (https://youtu.be/7BsfMMYvGaU)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RuolinZheng08
RuolinZheng08 / backtracking_template.py
Last active March 21, 2025 05:20
[Algo] Backtracking Template & N-Queens Solution
def is_valid_state(state):
# check if it is a valid solution
return True
def get_candidates(state):
return []
def search(state, solutions):
if is_valid_state(state):
solutions.append(state.copy())