Skip to content

Instantly share code, notes, and snippets.

View laudiacay's full-sized avatar
😀
grindset

Claudia Richoux laudiacay

😀
grindset
View GitHub Profile
@laudiacay
laudiacay / emily_problem.py
Created February 13, 2024 02:48
emily account problem
memoize_case_max_payoff = {}
def find_max_entropy_case(n: int):
if n % 2 == 0:
return n//2
else:
return n//2 + 1
def solve_case(n: int, majority: int):
# we already saw this case!
@laudiacay
laudiacay / cpamm_pred.py
Created December 30, 2022 00:07
constant product amm-based prediction market model!
# this is a guy who can have collateral, yes tokens, and no tokens for a pool.
class Guy:
def __init__(self, collateral):
self.collateral = collateral
self.yes_tokens = 0
self.no_tokens = 0
# create a pool type
class Pool: