semvec/pypi-packages huggingface dataset:
django-fsm-admin2 0.1.3
django-fsm transition integration to django admin.

# django-fsm-admin2

[Django-fsm](https://github.com/viewflow/django-fsm) transition integration to django admin.

Passing arguments to transition is supported (unlike **django-fsm-admin** package).

## Installation

```pip install django-fsm-admin2```

Add fsm_admin to your settings.INSTALLED_APPS
``` 
INSTALLED_APPS = [
    ...
    'fsm_admin2',
    ...
]
 ```

## Usage
Add FSMTransitionMixin to your admin class
```
# admin.py

from django.contrib import admin
from fsm_admin2.admin import FSMTransitionMixin

class MyModelAdmin(FSMTransitionMixin, admin.ModelAdmin):
    fsm_fields = ['status',]    # list your fsm fields
    
    # you can override templates for transition arguments form view and transition buttons row
    fsm_transition_form_template = 'fsm_admin2/fsm_transition_form.html'         # default value
    fsm_transition_buttons_template = 'fsm_admin2/fsm_transition_buttons.html'   # default value
    ...
    
```
This will add current field value as readonly field and buttons row to perform transitions.
Only allowed transitions are displayed.

Customize transition display.

```
@transition(field=status, source='disabled', target='enabled',
            custom={'short_description': 'Activate!!!'})
def activate(self):
    ...
```

Add form to provide transition arguments. Form fields names should match transition function arguments.

```
class DeactivateForm(forms.Form):
    text = forms.Charfield()

@transition(field=status, source='enabled', target='disabled',
            custom={'short_description': 'Deactivate', 'form': DeactivateForm})
def deactivate(self, text):
    ...
```

Form class can also be set as import string: ```{'form': 'my_app.forms.DeactivateForm'}```
pyCIAP 0.0.2
A simple package the solve CIAPs with dwell time constraints
Requires Python: >=3.6


# pyCIAP

![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/jhelgert/pyCIAP)

This a tiny package to solve the Combinatorial Integral Approximation Problem (CIAP)
including dwell-time constraints by a dwell-time sum-up rounding algorithm, see [1]
for the theoretical results.

## Install

Thanks to to the wheels, you can install the package like this

```
pip3 install pyCIAP
```


Alternatively, you can build and install from source 

``` 
pip3 install git+https://github.com/jhelgert/pyCIAP
```

However, note that the latter requires Cython and a installed C++ compiler.

## Example:

``` python
from pyCIAP import DSUR, solveCIAPMDT
import numpy as np

# Relaxed control fulfilling SOS1-constraint
b_rel = np.array([[
    0.47131227, 0.78736104, 0.97325193, 0.53496864, 
    0.73187786, 0.07838749, 0.48948843, 0.64580892],
    [0.52868773, 0.21263896, 0.02674807, 0.46503136, 
    0.26812214, 0.92161251, 0.51051157, 0.35419108]])

# time grid
dt = 1.0
time = np.arange(0, b_rel.shape[1], dt)

# Computes a binary control fulfilling the minimum dwell times
# The dwell times are always in number of time steps, i.e. multiples of dt
b_bin = DSUR(b_rel, 1.0, time, min_up_time=3, min_down_time=3)
```
gives

``` python
array([[1, 1, 1, 0, 0, 0, 1, 1],
       [0, 0, 0, 1, 1, 1, 0, 0]])
```

In order to compare the DSUR solution to the global optimum, one can
solve the CIAP by Gurobi and use the solution as MIP start:

``` python
runtime, eps_opt, eps_dsur = solveCIAPMDT(b_rel, dt, 3, 3, start_sol=b_bin)
```

Here `eps_opt` and `eps_dsur` denote the objective values of the corresponding
CIAP, i.e. the *integrality gap*.

[1]: https://link.springer.com/article/10.1007/s10107-020-01533-x
emailservice 0.0.5
Email Service Package
Keywords: email,smtp

# Simple Mail Sender

This email sender python package gives ease of acess to Python's built-in SMTP module. It supports plaintext and HTML based messages and only supports Python3 version.

## Features

- Reduces the configurations needed for built-in modules.
- Can send emails fetching from plain text or through HTML templates.
- TLS or SSL can be used to connect to the SMTP servers.

## Installation

```bash
pip install emailservice
```

## Usage

## Sending a simple plaintext message

```python
    plaintext = 'This is our text message'
```

- Create a EmailService object. The EmailService object allows you to connect to an SMTP server by specifying the server address and port, as well as your username and password.

```python
    testEmailService = EmailService('username@server.com', 'password', ('smtp.server.com', 465), use_SSL=True)
```

- Now we set the plaintext message to the email's body.

```python
    testEmailService.set_message(plaintext, "Subject", 'John Doe <j.doe@server.com>')
```

- Set the recipients for your email by specifying a complete list/tuple of all the mentioned recipients.

```python
    testEmailService.set_recipients(['recepient1@server.com', 'recepient2@server.com'])
```

- Here we connect to the SMTP server you specified when creating the EmailService object.

```python
    testEmailService.connect()
```

- Below method sends the same message to all listed recipients. By default the connection to the SMTP server is closed once the email has been sent to all currently listed recipients. If you want to send further emails without having to reconnect to the SMTP server, you can make the close_connection as False as shown below.

```python
    testEmailService.send_all(close_connection=False)
```

## Sending an HTML message

- Import or write both a plaintext message and HTML message, stored in separate variables. This plaintext is only shown in cases where email clients do not support HTML markup.

```python
    plaintext = 'This is our message'
    html = '<b>This</b> is our message'
```

- Set the HTML and plaintext messages as the email's body.

```python
    testEmailService.set_message(plaintext, "Subject line", 'John Doe', html)
```

## Recommended SMTP server settings

Outlook:

- Using TLS: smtp.live.com, port 587

Gmail:

- Using SSL: smtp.gmail.com, port 465
- Using TLS: smtp.gmail.com, port 587

* These connections may be blocked if 'Access for less secure apps' is disabled in your Google Account settings
oneNeuron-pypi-achievehigh 0.0.3
its a implementation of Perceptron
Requires Python: >=3.7

# oneNeuron_pypi
oneNeuron_pypi

##How to use this
```python
from oneNeuron.perceptron import 

##get X and Y and then use below commands
model_OR=Perceptron(eta=eta,epochs=epochs) model_OR.fit(X,y)
```

#Reference 

[official python docs ](https://packaging.python.org/tutorials/packaging-projects/)

[github docs for github actions] 

(https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries)
simple-bson 0.0.3
Python Bson Compatible Library
Requires Python: >=3.6,<4.0

Simple-Bson
========================

.. image:: https://github.com/DeltaLaboratory/simple-bson/actions/workflows/CI.yml/badge.svg?branch=stable
    :target: https://github.com/DeltaLaboratory/simple-bson/actions/workflows/CI.yml?branch=stable
    :alt: stable CI status

Introduction
------------
simple-bson is a simple and lightweight bson implementation (current 7.89KiB)

Usage
------------

.. sourcecode:: python

   >>> import simple_bson as bson
   >>> a = bson.dumps({"Answer to life the universe and everything": 42})
   >>> b = bson.loads(a)
   >>> b
   {"Answer to life the universe and everything": 42}