Skip to content

Instantly share code, notes, and snippets.

View protectroot-com's full-sized avatar

ProtectRoot.com protectroot-com

View GitHub Profile
@RuolinZheng08
RuolinZheng08 / backtracking_template.py
Last active March 11, 2025 06:58
[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())
@AtulKsol
AtulKsol / postgres-not-running-fix.md
Last active December 22, 2022 05:10
Postgres on OSX with homebrew not running

Postgres on OSX with homebrew not running [tested in mac]

Fix for following issue:

$ psql
psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?