在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:parrt/lolviz开源软件地址:https://github.com/parrt/lolviz开源编程语言:Jupyter Notebook 87.3%开源软件介绍:lolvizBy Terence Parr. See Explained.ai for more stuff. A very nice looking javascript lolviz port with improvements by Adnan M.Sagar. A simple Python data-structure visualization tool that started out as a List Of Lists (lol) visualizer but now handles arbitrary object graphs, including function call stacks! lolviz tries to look out for and format nicely common data structures such as lists, dictionaries, linked lists, and binary trees. This package is primarily for use in teaching and presentations with Jupyter notebooks, but could also be used for debugging data structures. Useful for devoting machine learning data structures, such as decision trees, as well. It seems that I'm always trying to describe how data is laid out in memory to students. There are really great data structure visualization tools but I wanted something I could use directly via Python in Jupyter notebooks. The look and idea was inspired by the awesome Python tutor. The graphviz/dot tool does all of the heavy lifting underneath for layout; my contribution is primarily making graphviz display objects in a nice way. FunctionalityThere are currently a number of functions of interest that return
Given the return value in generic Python, simply call method Check out the examples. InstallationFirst you need graphviz (more specifically the $ brew install graphviz Then just install the $ pip install lolviz or upgrade to the latest version: $ pip install -U lolviz UsageFrom within generic Python, you can get a window to pop up using the from lolviz import *
data = ['hi','mom',{3,4},{"parrt":"user"}]
g = listviz(data)
print(g.source) # if you want to see the graphviz source
g.view() # render and show graphviz.files.Source object From within Jupyter notebooks you can avoid the For more examples that you can cut-and-paste, please see the jupyter notebook full of examples. PreferencesThere are global preferences you can set that affect the display for long values:
Implementation notesMostly notes for parrt to remember things. Graphviz
Deploy$ python setup.py sdist upload Or to install locally $ cd ~/github/lolviz
$ pip install . |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论