![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Simple python api to visualize the plots in a script.
pip install local-visualizer
LocalViz
starts a local http server and creates a html file to
which pandas tables and matplotlib plots can be sent over.import logging, sys, numpy as np, pandas as pd, matplotlib.pyplot as plt
import local_visualizer
plt.style.use('fivethirtyeight')
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
# Create the local visualizer instance
lviz = local_visualizer.LocalViz(html_file='lviz_test.html', port=9112)
# INFO:root:Starting background server at: http://localhost:9112/.
# INFO:local_visualizer:Click: http://carpediem:9112/lviz_test.html or http://localhost:9112/lviz_test.html
# Create plots which will be streamed to the html file.
lviz.h3('Matplotlib :o')
lviz.p(
'Wrap your plots in the figure context manager which takes '
'in the kwargs of plt.figure and returns a plt.figure object.',
)
with lviz.figure(figsize=(10, 8)) as fig:
x = np.linspace(-10, 10, 1000)
plt.plot(x, np.sin(x))
plt.title('Sine test')
lviz.hr()
# Visualize pandas dataframes as tables.
lviz.h3('Pandas dataframes')
df = pd.DataFrame({'A': np.linspace(1, 10, 10)})
df = pd.concat(
[df, pd.DataFrame(np.random.randn(10, 4), columns=list('BCDE'))],
axis=1,
)
lviz.write(df)
lviz.close()
This starts a HTTPServer and creates a html file which is dynamically updated
each time lviz
is called.
Python 2.7
p
: paragraphbr
: line breakhr
: Horizontal rule with line breaksh1
, h2
, ..., h6
: Headerswrite
: Directly write text to the html document (or pass in a pandas.DataFrame
)figure
: Context manager which accepts the kwargs of plt.figure
and returns a plt.figure
objectstart
: Applicable if LocalViz
was initialized with lazy=True
. Starts the server and creates the html fileclose
: Completes the html filedel_html
: Deletes the html fileThis package was created with Cookiecutter_ and the audreyr/cookiecutter-pypackage
_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _audreyr/cookiecutter-pypackage
: https://github.com/audreyr/cookiecutter-pypackage
The close method no more deletes the html but only makes the html valid.
FAQs
Simple python api to visualize the plots in a script.
We found that local-visualizer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.