예제 #1
0
                   scoring_round_time_in_days=2,
                   max_part_of_registered_attention=.01,
                   growth_speed=.75)


# Register platforms
el = asyncio.get_event_loop()
el.run_until_complete(system.register_platform(steemit))
el.run_until_complete(system.register_platform(twitter))

# Run scoring rounds
asyncio.ensure_future(twitter.score_rounds(), loop=el)
asyncio.ensure_future(steemit.score_rounds(), loop=el)

# Run users registration
asyncio.ensure_future(twitter.new_users_are_coming(), loop=el)
asyncio.ensure_future(steemit.new_users_are_coming(), loop=el)

# Run blockchain
el.run_until_complete(system.run())


import matplotlib.pyplot as plot
from numpy import vectorize
import numpy as np


# Show supply parabola
x = np.linspace(0, 151, num=1000)
plot.plot(x, vectorize(calc_parabola)(system.parabola[0], system.parabola[1], system.parabola[2], x))
plot.title("Rest of the SNAX supply")