vizzuhq /
ipyvizzu
Build animated charts in Jupyter Notebook and similar environments with a simple Python syntax.
Loading repository data…
parrt / repository
A simple Python data-structure visualization tool for lists of lists, lists, dictionaries; primarily for use in Jupyter notebooks / presentations
By 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.
There are currently a number of functions of interest that return graphviz.files.Source objects:
listviz(): Horizontal list visualization<img src=images/list2.png width=320>lolviz(): List of lists visualization with the first list vertical and the nested lists horizontal.<img src=images/lol2.png width=460>treeviz(): Binary trees visualized top-down ala computer science.<img src=images/tree.png width=190>objviz(): Generic object graph visualization that knows how to find lists of lists (like lolviz()) and linked lists. Trees are also displayed reasonably, but with left to right orientation instead of top-down (a limitation of graphviz). Here is an example linked list and dictionary:<img src=images/llist2.png width=280><img src=images/dict.png width=60>callsviz(): Visualize the call stack and anything pointed to by globals, locals, or parameters. You can limit the variables displayed by passing in a list of varnames as an argument.<img src=images/callstack.png width=240>callviz(): Same as callsviz() but displays only the current function's frame or you can pass in a Python stack frame object to display.matrixviz(data): Display numpy ndarray; only 1D and 2D at moment.strviz(): Show a string like an array.<img src=images/string.png width=100>Given the return value in generic Python, simply call method view() on the returned object to display the visualization. From jupyter, call function IPython.display.display() with the returned object as an argument. Function arguments are in italics.
Check out the examples.
First you need graphviz (more specifically the dot executable). On a mac it's easy:
$ brew install graphviz
Then just install the lolviz Python package:
$ pip install lolviz
or upgrade to the latest version:
$ pip install -U lolviz
From within generic Python, you can get a window to pop up using the view() method:
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 render() call because Jupyter knows how to display graphviz.files.Source objects:
<img src=images/jupyter.png width=620>
For more examples that you can cut-and-paste, please see the jupyter notebook full of examples.
There are global preferences you can set that affect the display for long values:
prefs.max_str_len (Default 20). How many chars in a string representation of a value before we abbreviate with .... E.g.,:prefs.max_horiz_array_len (Default 70) Lists can quickly become too wide and distort the visualization. This preference lets you set how long the combined string representations of the list values can get before we use a vertical representation of the list. E.g.,:prefs.max_list_elems. Horizontal and vertical lists and sets show maximum of 10 (default) elements.prefs.float_precision. How many decimal places to show for floats (default is 5).Mostly notes for parrt to remember things.
Ugh. shape=record means html-labels can't use ports. warning!
warning: <td> and </td> must be on same line or row is super wide!
$ python setup.py sdist upload
Or to install locally
$ cd ~/github/lolviz
$ pip install .
Selected from shared topics, language and repository description—not editorial ratings.
vizzuhq /
Build animated charts in Jupyter Notebook and similar environments with a simple Python syntax.
dnanhkhoa /
A simple extension for Jupyter Notebook and Jupyter Lab to beautify Python code automatically using black.
Making Machine Learning Simple and Scalable with Python, Jupyter Notebook, TensorFlow, Keras, Apache Kafka and KSQL
n8henrie /
A simple extension for Jupyter Notebook and Jupyter Lab to beautify Python code automatically using Black. Fork of dnanhkhoa/nb_black.
Komal01 /
Phishing website detection system provides strong security mechanism to detect and prevent phishing domains from reaching user. This project presents a simple and portable approach to detect spoofed webpages and solve security vulnerabilities using Machine Learning. It can be easily operated by anyone since all the major tasks are happening in the backend. The user is required to provide URL as input to the GUI and click on submit button. The output is shown as “YES” for phishing URL and “NO” for not phished URL. PYTHON DEPENDENCIES: • NumPy, Pandas, Scikit-learn: For Data cleaning, Data analysis and Data modelling. • Pickle: For exporting the model to local machine • Tkinter, Pyqt, QtDesigner: For building up the Graphical User Interface (GUI) of the software. To avoid the pain of installing independent packages and libraries of python, install Anaconda from www.anaconda.com. It is a Python data science platform which has all the ML libraries, Data analysis libraries, Jupyter Notebooks, Spyder etc. built in it which makes it easy to use and efficient. Steps to be followed for running the code of the software: • Install anaconda in the system. • gui.py : It contains the code for the GUI and is linked to other modules of the software. • Feature_extractor.py: It contains the code of Data analysis and data modelling. • Rf_model.py: It contains the trained machine learning model. • Only gui.py is to be run to execute the whole software.
yrtnsari /
The project is a simple sentiment analysis using NLP. The project in written in python with Jupyter notebook. It shows how to do text preprocessing (removing of bad words, stop words, lemmatization, tokenization). It further shows how to save a trained model, and use the model in a real life suitation. The machine learning model used here is k-Nearest Neighbor which is used to build the model. Various performance evaluation techniques are used, and they include confusion matrix, and Scikit-learn libraries classification report which give the accuracy, precision, recall and f1- score preformance of the model. The target values been classified are positive and negative review.