Created
April 26, 2021 21:22
-
-
Save samueleresca/dedc3d2fb3766ea119e5125d5873e7e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Original code available at: https://github.com/mwhittaker/quoracle | |
''' | |
from typing import Dict, Optional, Union | |
Fraction = float | |
Weight = float | |
Probability = float | |
Distribution = Union[ | |
# For example, 1 means 100% reads. | |
int, | |
# For example, 0.25 means 25% reads. | |
float, | |
# For example, {0.25: 1, 0.8: 2} means 25% reads one third of the time and | |
# 80% reads two thirds of the time. | |
Dict[Fraction, Weight], | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment