semvec/pypi-packages huggingface dataset:
django-super-deduper 0.1.4
Utilities for deduping Django model instances

Django Super Deduper
====================

|Build status| |codecov| |Python version|

A collection of classes and utilities to aid in de-duping Django model
instances.

Requirements
------------

-  Python 3.6
-  Django 1.11

Install
-------

``pip install django-super-deduper``

Usage
-----

Merging Duplicate Instances
~~~~~~~~~~~~~~~~~~~~~~~~~~~

By default any `empty
values <https://github.com/django/django/blob/master/django/core/validators.py#L13>`__
on the primary object will take the value from the duplicates.
Additionally, any related one-to-one, one-to-many, and many-to-many
related objects will be updated to reference the primary object.

.. code:: python

   > from django_super_deduper.merge import MergedModelInstance
   > primary_object = Model.objects.create(attr_A=None, attr_B='')
   > alias_object_1 = Model.objects.create(attr_A=X)
   > alias_object_2 = Model.objects.create(attr_B=Y)
   > merged_object = MergedModelInstance.create(primary_object, [alias_object_1, alias_object_2])
   > merged_object.attr_A
   X
   > merged_object.attr_B
   Y

Improvements
------------

-  Support multiple merging strategies
-  Recursive merging of related one-to-one objects

Logging
-------

This package does have some rudimentary logging for debugging purposes.
Add this snippet to your Django logging settings to enable it:

.. code:: python

   LOGGING = {
       'loggers': {
           'django_super_deduper': {
               'handlers': ['console'],
               'level': 'DEBUG',
           },
       },
   }

References
----------

-  https://djangosnippets.org/snippets/2283/
-  https://stackoverflow.com/questions/3393378/django-merging-objects

.. |Build status| image:: https://badge.buildkite.com/9895056b294e7f1a8893b9ef75bb743f3933fc3264e23eeeb2.svg
   :target: https://buildkite.com/mighty/django-super-deduper?branch=master
.. |codecov| image:: https://codecov.io/gh/mighty-justice/django-super-deduper/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/mighty-justice/django-super-deduper
.. |Python version| image:: https://img.shields.io/pypi/pyversions/django-super-deduper.svg
   :target: https://pypi.python.org/pypi/django-super-deduper
rtplot 3.0.0a0
Real time plotting. Yes, you can do it now.
Requires Python: >=3.6

# rtplot

_Author: Nabeel Sherazi, sherazi.n@husky.neu.edu_

Have you ever noticed how if you want to plot a data stream in real time using matplotlib, it's uhhhhhh absolutely impossible? Like something about FuncAnimation and threading and basically all of this stuff -- IT'S SO FRICKING HARD TO JUST PLOT A DATA STREAM IN REAL TIME.

Well I Googled about this for like six hours and found literally not a single library that would just let me looking at a frickin stream of numbers in real time. So I said okay fine I'll just frickin write it myself and then put it out there so no one ever has to struggle with this again.

## Presenting: rtplot -- it's real time plotting, but it's actually easy!!! For once!!!

Literally just import it. Start a plot. Push data to the plot whenever you want. Or don't. It literally doesn't matter. rtplot can do real-time XY plots, 3D plots, and timeseries (single variable) data. It's so sweet. It can do multiple plots too. Like 20 timeseries at once. At 60 fps. Seriously.

## Usage

Look at this.

```python
from rtplot import TimeSeries

plot = TimeSeries(seconds_to_show=10)

plot.start()

while True:
    new_data = read_sensor_data()
    plot.update(new_data)

plot.quit()

```

BRUH!!!!!

```python
from rtplot import XY

plot = XY(seconds_to_show=3) # Or not! Leave blank to show all data

plot.start()

while True:
    xy1 = robot1.position()
    xy2 = robot2.position()
    plot.update([xy1, xy2])

plot.quit()

```

oh you thought i was JOKING?????

```python
from rtplot import Z3D

plot = Z3D(seconds_to_show=1)

plot.start()

while True:
    xy = drone.gps_position()
    z = drone.altitude()
    plot.update([*xy, z])

plot.quit()

```

Supports context managers, custom linestyles, static background drawings, shortcuts, and more too!!! It's so fricking BATTERIES INCLUDED.

```python

# Context manager
with rtplot.XY() as plot:
    xy = datastream.read()
    plot.update(x, y)

# Statics
plot1 = rtplot.TimeSeries(seconds_to_show=10, linestyle='r-')
plot1.add_static("vline", x=5)

# Shortcuts for common linestyles
import rtplot.shortcuts.shape as shape_shortcuts
plot1.add_static("rectangle", **shape_shortcuts.blue_dotted_stroke)

# By the way, this is safe since EVERY PLOT IS IN ITS OWN THREAD!!!

plot1.start()
plot2 = rtplot.XY(seconds_to_show=10, linestyle=["r-", "b:"]) # Let rtplot know in advance there should be two lines
plot2.start()

```

Basically this stuff goes off man.

## Install

Either download this repo or just run `pip install rtplot`

Natively Python 3 unlike some of the solutions I found!!!! Only external dependencies numpy and matplotlib.
One day I'll write some real docs for this but for now the source code is really small so if you don't get how to use something just look at the source code. I think I commented it pretty well. Also see the examples.

DEUCES