Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A small code to illustrate the behaviour of how KaizenHarvester from loklak server project
Kaizen Harvester -
loklak server project -
import random
from matplotlib import pyplot
m = []
for i in range(101):
fraction = i / 100.
count = 0
for j in range(10000):
n = random.uniform(0, 1)
if n < fraction:
count += 1
m.append((fraction, count))
pyplot.xlabel("Ratio of queue filled")
pyplot.ylabel("Harvest attempts out of 10,000")
pyplot.title("Harvesting frequency vs. Filled queue ratio")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.