semvec/pypi-packages huggingface dataset:
interactive-curve-fit 0.0.1
interactive_curve_fit: A Python project enables you to do curve fitting on spectrum data interactively on GUI. You can visualize your spectrum and fit the optional number of peaks on GUI using Scipy.optimize.curve_fit method.
License: MIT
Keywords: curve fit spectrum

# <b>interactive_curve_fit</b>
A Python project enables you to do curve fitting on spectrum data interactively on GUI.
You can visualize your spectrum and fit the optional number of peaks on GUI using Scipy.optimize.curve_fit method.

## <b>How to use?</b>

Try [tutorial.py](tutorial.py) with your spectrum data!

## <b>Spectrum data format must be like the table below</b>

| x | y |
|---|---|
|0  | 1  |
|1  | 13 |
|2  | 30 |
|3  | 43 |
|4  | 31 |
|5  | 11 |
|...|...|

## <b>Steps to curve-fit</b>

1. Teach your initial guess of the positions of each peaks roughly to Fitter.

    ```python
    from interactive_curve_fit import read_data, Guessor, Fitter
    
    data = read_data(data, headers=2, sep=',')
    guessor = Guessor(data, background=10, method='drag')
    guess = guessor.guess()
    ```

    ### Initial Guess method
    - mouse-dragging (wrap up peak area by mouse-dragging)
    - click (click the top and the both edges of each peaks)

    ### Screenshot
    ![Guessing peak pos interactively](img/mouse-dragging-step0.png)
    ![Guessing another peak pos](img/mouse-dragging-step2.png)
    ![Fitting results (by Fitter class)](img/peak_found.png)
    ![Peak information on terminal](img/peak_terminal.png)

1. Give your spectrum data and your guess to Fitter.
    
    ```python
    fitter = Fitter(data, guess)
    fitter.run(method='gaussian')
    ```
    ### Supported fitting functions
    - gaussian function
    - polynomial function

    ### Output information includes
    - position (x, y) of each peaks
    - baseline height of the spectrum
    - bandwidth of each peaks with its CI (confidential interval)

1. Save the fitting results
    ```python
    fitter.save_data('out/fitting_result.csv')
    ```

1. Other features
    
    bmp_to_csv converts bmp file to csv file.
    ```python
    from interactive_curve_fit import bmg_to_csv
    bmp_to_csv('data/line_spectrum.bmp')
    data = read_data('data/line_spectrum.csv')
    ```
    
    Fitter can visualize fitting results
    ```
    fitter.plot_fit()
    ```

    Fitter can also display fitting results on terminal
    ```
    fitter.display_results_terminal(ci=2)
    ```

## <b>Supported supectrum file format</b>

- ascii file(.asc .csv .txt etc..)
- bmp image(.bmp .jpg .png .jpeg etc..)

    excel sheet files, table of html are planed to be suported in the near future.

## <b>Features that are planned to be supported!</b>

- baseline correlation
- other fitting functions (e.g. binomical distribution function)
- automated guessor method using wavelet transform and CNN
relationaldb 0.1.1
Python library to create databases
License: MIT
Requires Python: >=3.6

[![Pypi version](https://img.shields.io/pypi/v/relationaldb.svg)](https://pypi.org/project/relationaldb/) [![Python versions](https://img.shields.io/pypi/pyversions/relationaldb.svg)](https://pypi.org/project/relationaldb/) [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

-----------------

# relationaldb

RelationalDB is a python ODM library for MongoDB that allows you to design collections like you do it for your normal dataclasses objects.

**DISCLAMER**

This library is in alpha-release, it's a work in progress for the moment, excellent libraries for MongoDB ODM in python exist:

- https://github.com/roman-right/beanie/

There are a lot of none implemented main features (I implement them when I have time or when I need it for my project).

# Quickstart

relationaldb wraps `attrs` to create classes boilerplate and add few parameters.

## One to Many relation

Let's say you want a simple one to many relations, with two entities: Animal and Person.

- Each animal can have one owner (Person)
- Each person can have 0 to many animals

```python
from relationaldb import conception

# Object to design the architecture of the database
c = conception()


# Add collection woth 'define' like with attrs
@c.define
class Person:
    # add new attribute with 'field' method
    # in_filter_query parameter allows to use the 'db.Person.feed' method to upsert new documents
    name: str = c.field(in_filter_query=True)

    # all attrs.fields parameters are available
    money: int = c.field(kw_only=True, default=0)
    birth_year: int = c.field(kw_only=True, default=None)


@c.define
class Animal:
    # We can reference
    name: Person = c.field(in_filter_query=True)

    owner: Person = c.field(kw_only=True, default=None)
    birth_year: int = c.field(kw_only=True, default=None)


# Create a new mongodb named "mydb"
db = c.mongodb("relationaldb_mydb_01")

# Create second DB with same architecture
db2 = c.mongodb("relationaldb_mydb_02")

# Create a new person
db.Person.insert_one("John")

# Get the person
person = db.Person.first()
assert isinstance(person, Person)
assert person.name == "John"

for person in db.Person:
    print(person)

# Upsert (create or update) person named 'Smith' if it does not exists (based on in_filter_query)
db.Person.feed("Smith")  # will create the person
db.Person.feed("Smith")  # will do nothing, person already exist
db.Person.feed("Smith", money=1000)  # will update the person 'Smith'
```
inels-mqtt-bus 0.0.6
Python library for iNels mqtt protocol, bus version
License: MIT
Keywords: iNels,Elko EP,Home assistant integration

Inels-mqtt-bus
========
A Python library that handles communication with inels over mqtt, for bus devices
[iNels](https://www.inels.com/) by ElkoEP company.

Requirements
============
Requires Python 3.9 or higher.

Install
=======
Use PyPI repository
```
pip install inels-mqtt-bus
```

Testing
=======
[tox](https://tox.readthedocs.io) testing.

```
$ pip install tox

```