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.
# 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. |
N. P. O'Donnell, 2022
#!/usr/bin/env bash | |
# | |
# Switch between Wireguard tunnels located in /etc/wireguard/ | |
# Each tunnel should be defined with a config file, eg. wg0.conf | |
# | |
# N. P. O'Donnell, 2022 | |
if [[ $# -ne 1 ]]; then | |
echo "Usage: $0 [OPTIONS] [<new tunnel>]" | |
echo |
#!/usr/bin/env bash | |
NTOK=3 | |
do_cmd() { | |
echo "Command start $1" | |
sleep 5 | |
echo "Command end $1" | |
return 1 | |
} |