Takes Python code and outputs that equivalent code in Dice, a probabilistic programming language.
187
dice-python is a Python module that takes Python code and outputs that equivalent code in Dice, a probabilistic programming language.
You may run docker run -it dotkrnl/dice-python bash to get into the Dice-Python environment.
To test the examples under the evaluate() function in transform.py, comment in and out on whichever example you currently want to test. Note that this program tests one example at a time.
Once you have selected an example that you want, use python3.9 transform.py to run transform.py. The translated.dice file should then be populated with the translated Dice code. The output from transform.py should then be a dictionary of the form {True: <value>, False: <value>, 'Time': <value>}.
Content type
Image
Digest
Size
1.5 GB
Last updated
over 4 years ago
docker pull dotkrnl/dice-python