Skip to content

Instantly share code, notes, and snippets.

@filyp
filyp / currency_net.py
Last active October 19, 2017 16:17
smelly
from graph_smell import *
import math
import time
import pickle
import threading
# quick explanation:
# N[a][b]['amount'] means amount of b tokens that a has
# N[a][b]['trust'] means how many percent of a's total tokens can be b tokens
# can be less but cannot be more than that
@filyp
filyp / thea.py
Created August 5, 2021 10:16
Calculate theanine amount to add to tea, for the desired theanine/caffeine ratio.
def theanine_to_add(grams, ratio=1.5, flavor="black"):
caffeine_mg_per_gram = dict(
black=25,
yerba=10, # https://erowid.org/plants/yerba_mate/yerba_mate_chemistry2.shtml
pu_erh=12.5,
)
theanine_mg_per_gram = dict(
black=7.5, # other sources: 2.7, 12.5
yerba=0, # https://www.leaf.tv/articles/what-is-theanine-does-yerba-mate-contain-it/
)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.