Skip to content

Instantly share code, notes, and snippets.

View npodonnell's full-sized avatar
🎯
Focusing

npodonnell npodonnell

🎯
Focusing
View GitHub Profile
@npodonnell
npodonnell / special_characters.md
Last active January 17, 2024 07:35
Special Characters

Special Characters

N. P. O'Donnell, 2023

Typing These Characters

On Linux, Hold ctrl + shift + u at the same time, release all 3, then type the 4 hex characters of the character you'd like.

Codes

@npodonnell
npodonnell / uniswap_v3_formulae.tex.md
Last active February 7, 2023 16:02
Uniswap v3 Formulae

Uniswap Formulae

Notes:

  • Lower-case x and y denote virtual or v1 reserves, upper-case X and Y denote v3 real reserves.
  • The v3 formulae have been adapted from those in the whitepaper to be in terms of price, not square-root-price.

v1/v2 Formulae

Constant Product Formula

# N. P. O'Donnell, 2024
from typing import Iterator
def generate_combinations(elements: list[any], count: int) -> Iterator[list[int]]:
"""
Non-recursive generation of combinations.
:param elements: Elements from which to make combinations.