You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.
for i in range(6):
print(FirstExperiment(userid=i))
The text was updated successfully, but these errors were encountered:
amirsultan
changed the title
Code mentioned in installation instruction is on Python version.
Code mentioned in installation instruction is of older version Python version.
Dec 28, 2020
amirsultan
changed the title
Code mentioned in installation instruction is of older version Python version.
Code mentioned in installation instruction is of older Python version.
Dec 28, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Updated code as per Python version 3
from planout.experiment import SimpleExperiment
from planout.ops.random import *
class FirstExperiment(SimpleExperiment):
def assign(self, params, userid):
params.button_color = UniformChoice(choices=['#ff0000', '#00ff00'], unit=userid)
params.button_text = WeightedChoice(
choices=['Join now!', 'Sign up.'],
weights=[0.3, 0.7], unit=userid)
my_exp = FirstExperiment(userid=12)
parameters may be accessed via the . operator
print(my_exp.get('button_text'), my_exp.get('button_color'))
experiment objects include all input data
for i in range(6):
print(FirstExperiment(userid=i))
The text was updated successfully, but these errors were encountered: