semvec/pypi-packages huggingface dataset:
focont-dmrokan 0.1
Fixed order controller design tool
Requires Python: >=3.8

# Focont

**Static output feedback and fixed order controller design package for Python**

## Static output feedback (SOF)

The SOF is the simplest feedback controller structure. It basicaly feedbacks
the system output to the system input after multiplying a constant gain matrix.

This package can calculate a stabilizing SOF gain which also optimizes the ![H2](/doc/h2.gif)
norm of the closed loop system.

(See the article, https://journals.sagepub.com/doi/abs/10.1177/0142331220943071 ,
and the PhD thesis, http://hdl.handle.net/11693/54900 , for detailed
information and analysis)

The algorithm is purposedly developed for discrete time systems, but it also works
for continuous time systems when the SOF is calculated for the zero-order hold
discretized version with a sufficiently large sampling frequency.

System definition can be provided by a JSON or MATLAB mat file. The required
entries in the file are:

* **A**: (2d array) System matrix
* **B**: (2d array) Input matrix
* **C**: (2d array) Output matrix.

If you want to adjust const function weights, these should also be provided:

* **Q**: (2d array) Cost function weight for the state variables (similar to LQR problem)
* **R**: (2d array) Cost function weight for the system input.

If (A, B, C) defines a continuous time system, these should also be provided:

* **type**: (string) 'C' (which means continuous, 'D' means discrete)
* **Ts**: (number) Sampling period

## Fixed order controller

Furthermore, the algorithm can be used to calculate fixed-order controllers.
This need additional entries in the described JSON or mat file;

* **structure**: (string) 'FO' (meaning fixed-order or 'SOF' for SOF controller)
* **nc**: (integer) The order of controller (by default it is chosen as the number of inputs)


## Example

```python
from focont import foc, system

pdata = system.load(json_or_mat_filename)
foc.solve(pdata)
foc.print_results(pdata)
```

You can find json and mat file examples in the `/tests` directory.
sdk-dados-abertos-camara 0.0.9
SDK to use Dados Abertos da Camara dos Deputados
Requires Python: >=3.6

# SDK for Dados Abertos da Camara in Python

This project aims to wrap up the endpoints from [Dados Abertos da Camara API](https://dadosabertos.camara.leg.br/swagger/api.html#api) in a python package.

[![PyPI version](https://badge.fury.io/py/sdk-dados-abertos-camara.svg)](https://badge.fury.io/py/sdk-dados-abertos-camara) 
![Python package](https://github.com/AcompanhaLegis/sdk-dados-abertos-camara-py/workflows/Python%20package/badge.svg?branch=main)


## Installing 

```sh
pip install sdk-dados-abertos-camara
```
pythematics 4.0.0
Python Math library for Matrix and Polynomial manipulation extending to the complex plane
Requires Python: >=3.3

## Pythematics


> Pythematics is a zero-dependency math library for Python that aims to extend some Mathematical fields that are seemingly abandoned by other libraries while offering a fully Pythonic experience.

The main **field** that this library aims to enhance to Python is **Polynomials** in a way that allows for super-complicated and high degree **polynomial** equations to be solved giving all **Real** and **Complex Solutions** as well as combining it with fields such as Linear Algebra and allowing for Matrix-Polynomial Manipulation methods like finding Eigenvalues and Eigenvectors.

**Pythematics** can also be used as an ordinary math module since it contains various sub-packages for computations in Trigonometry, Number Theory and other fields such as Random Number Generation or Calculus

The thing that makes this library unique is the ability to Interact will Polynomials at the following format:
```py
import pythematics.polynomials as pl

x = pl.x
pol: pl.Polynomial = x**4 + 3*x**2 + 2*x
print("Solve x^4 + 3x^2+ 2x = 0 : ", pol == 0)
print("Inequality: ", pol > 0)
```
which outputs
```py
Solve x^4 + 3x^2+ 2x = 0 :  [(-0.5960716379833215+1.2508571630922372e-33j), (0.29803581899166076+1.8073394944520218j), (0.2980358189916609-1.8073394944520218j), 0j]
Inequality:  {(-inf, -0.5960716379833215): True, (-0.5960716379833215, 0.0): False, (0.0, inf): True}
```
And the results can be verified by subsituting
```py
roots = pol.roots(5000) # Same as pol == 0
for root in roots:
    print(pol(root)) # Substituting

# The output: Very small numbers close to 0
    # (1.1102230246251565e-16+1.0171730768082222e-32j)
    # 0j
    # (-1.7763568394002505e-15-8.881784197001252e-16j)
    # (3.552713678800501e-15+8.881784197001252e-16j)
```

This can be generalised not to just polynomials
```py
a, b = symbol('a', 'b')
for i in range(5):
    print(f"{i}: ", (a + b)**i)
```
- Output
```py
0:  1 # Unicode can be disabled by setting `Polynomial.use_unicode=False` and/or `Multinomial.use_unicode=False`
1:  Multivariable Polynomial : b + a
2:  Multivariable Polynomial : b² + a² + 2ab 
3:  Multivariable Polynomial : b³ + a³ + 3a²b + 3ab²
4:  Multivariable Polynomial : b⁴ + a⁴ + 4a³b + 6a²b² + 4ab³
```
**Linear Algebra** is another huge part of this module. Here is an example of solving a **3x3** system of **Linear** of equations.

```py
import pythematics.linear as lin
A = lin.Matrix([
    [1,2,3],  # R1:  x +  2y +  3z
    [4,7,8],  # R2: 4x +  7y +  8z
    [5,10,11] # R3: 5x + 10y + 11z
])

unknowns = ('x','y','z') # Our Varaibles
Output = Vector([10, 15, 25]) # Our Target Output (R1=10, R2=15, R3=25)

print(A.solve(Output, unknowns)) # Using Cramer's rule of the determinants
print(A.solve(Output, unknowns, useRef=True)) # Using Row Reduction
```
And as expected the results are identical dispite a small floating point error
```py
{'x': -8.75, 'y': 0.0, 'z': 6.25}
{'x': -8.749999999999993, 'y': -6.217248937900877e-15, 'z': 6.250000000000002}
```
baseXtoY 1.2.post1
A simple base converter in python3.
Requires Python: >=3.0

# Description

`baseXtoY` is a simple multi-base converter.
It supports base conversions from base 1 to base 36.
Numbers contain characters from 1 to 9, and from A to Z.
Note that `baseXtoY` is case-insensitive.

# Usage

```
>>> import baseXtoY
>>> baseXtoY.license()  -->  displays license
baseXtoY.baseXtoY(num, **X, **Y)  -->  converts num from base X to base Y
# X and Y are keywords arguments

# example:
>>> baseXtoY.baseXtoY('FF', X=16, Y=10)  # will work
255
>>> baseXtoY.baseXtoY('FF', 16, 10)  # will not work since X and Y are not positional.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: baseXtoY() takes 1 positional argument but 3 were given
```
DPL-SB2 0.0.1
adding number

# Intro
In many situations you may find yourself having duplicates files on your disk and but when it comes to tracking and checking them manually it can tedious.

## Heres a solution
Instead of tracking throughout your disk to see if there is a duplicate, you can automate the process using coding, by writing a program to recursively track through the disk and remove all the found duplicates and that's what this article is about.

## But How do we do it?
If we were to read the whole file and then compare it to the rest of the files recursively through the given directory it will take a very long time, then how do we do it
The answer is hashing, with hashing can generate a given string of letters and numbers which act as the identity of a given file and if we find any other file with the same identity we gonna delete it.

There's a variety of hashing algorithms out there such as
- md5
- sha1
- sha224, sha256, sha384 and sha512

Lets install this python library to remove the Duplicate file in the existing Working directory by <em>"pip install DPL_SB2"</em>

### Contribution Guideline:
Feel free to open a PR if you feel like something needs to be added or you want to suggest something then your commit message should be in given format: **added to -->resource_name-->section_name**
aiohttp-api-client 0.2.0
aiohttp based api client
Requires Python: >=3.6,<4.0

aiohttp-api-client
===

Requires: python 3.6+, aiohttp.

Example:
```python
import aiohttp
from aiohttp_api_client.json_api import \
    JsonApiClient, JsonApiRequest, JsonApiError, JsonApiDetails

async def run(http_client: aiohttp.ClientSession):
    api_client = JsonApiClient(http_client)

    response = await api_client(JsonApiRequest('GET', 'https://example.com/api/'))
    assert response.json == {'ok': True}

    try:
        await api_client(JsonApiRequest('GET', 'https://example.com/api/bad-request/'))
    except JsonApiError as e:
        assert e.details == JsonApiDetails(
            http_status=400, http_reason='Bad Request', content_type='application/json',
            bytes=b'{"ok": false}', text='{"ok": false}',
        )
    else:
        assert False
```