semvec/pypi-packages huggingface dataset:
linreg 0.1.2
Simple and flexible interface for basic linear regression
Requires Python: >=3.6

# linreg

Simple and flexible interface for basic linear regression.

## Motivation

I wanted to do very basic linear regression between two arrays of data.
It's a pain in the ass having to remember scikit-learn's interface for regression,
remember matplotlib's interface for plotting, and also having to do things like `np.array(x).reshape(1,-1)` 
so that it works with sklearn

I wanted to create an interface that is as simple as possible and also relatively flexible with your input
so that you don't have to open google every time you want to do some basic regression checking

## Usage

linreg supports basic lists, numpy arrays, and pandas series

<img src="https://raw.githubusercontent.com/purpleladydragons/linreg/main/img/plot.png" width=400>

```python
import linreg

x = [1,2,3]
y = [2,4,6]

linreg.linreg(x, y)
```

You can disable plotting with `plot=False`

If your data is a list of tuples, that works too
```python
import linreg

xy = [
    (1,2),
    (2,4),
    (3,6)
]
linreg.linreg(xy)
```

If your data is flipped, such that each column is a data point (instead of each row), then you can transpose it:
```python
import linreg

xy = [
    [1,2,3,4],
    [2,4,6,8]
]

linreg.linreg(xy, transpose=True)
```

If you forget to transpose in the above case, linreg will log a warning. 
It works by assuming that if you have more dimensions than data points, then you probably forgot to transpose.  
You can suppress these warnings with `warn=False`
django-aws-secrets-env-setup 0.3
A helper function for setting environment variables from AWS secret manager
Requires Python: >=3.6

# django-aws-secrets-env-setup
This is a helper function to set up environment variables from AWS secrets manager.
The main function to use is `set_env_variables(default_region_name, stop_on_failure=False, **kwargs)`.
In addition to `default_region_name` and `stop_on_failure`, there are several kwargs that can be passed.
#### Parameters
- If `os.environ[region_name_env_name]` is not set, the `default_region_name` will be used as the region name instead.
    - `region_name_env_name` is the name of the environment variable to check for the region name.
        - Default: `'SECRETS_REGION_NAME'`
- `stop_on_failure` is a flag to indicate whether or not errors should be fatal.
    It is strongly recommended for this to be set to True in a production environment. 
- `secrets_name` is the name of the secret to pull secrets from.
    - Default: `os.environ[secrets_name_env_name]'`
        - `secrets_name_env_name` is the name of the environment variable to use if `secrets_name` is not in kwargs.
            - Default: `'SECRETS_NAME'`
- `aws_access_key_id` is the ID of the AWS access key to be used.
    - Default: `os.environ[aws_access_key_id_env_name]'`
        - `aws_access_key_id_env_name` is the name of the environment variable to use if `aws_access_key_id` is not in kwargs.
            - Default: `'AWS_ACCESS_KEY_ID'`
- `aws_secret_access_key` is the AWS key used to access the secrets.
    - Default: `os.environ[aws_secret_access_key_env_name]'`
        - `aws_secret_access_key_env_name` is the name of the environment variable to use if `aws_secret_access_key` is not in kwargs.
            - Default: `'AWS_SECRET_ACCESS_KEY'`
- `service_name` is the service name of the secrets manager to connect to.
    - Default: `'secretsmanager'`
miptlabs 1.0.17.1
The package will help MIPT students to draw graphs easier
Requires Python: >=3.6

[![Documentation Status](https://readthedocs.org/projects/miptlabs/badge/?version=latest)](https://miptlabs.readthedocs.io/ru/latest/?badge=latest)


# Длинное описание, которое когда-то появится #

Для сборки:

```sh
python -m pip install --upgrade build wheel twine
python -m pip install -r requirements.txt
python -m build --no-isolation
twine upload dist/*
```

Для установки:

`pip install -i https://test.pypi.org/simple/ miptlabs`

Чтобы нарисовать что-то:

```
from miptlabs.plotter import pretty_plot, show
from numpy import linspace

# точки для построения графика
x = linspace(0, 5, 20) 
y = x * x

pretty_plot(x, y)
show()
```

![base_graph](examples/base.png)

Точки можно просто соединить написав line=True:

```
pretty_plot(x, y, line=True, legend='$y = x^2$')
```

![with_line_graph](examples/with_line.png)

Так как для данный с лаб простое соединение вряд ли подойдет, то в пакете есть разные апроксиматоры Для примера можно
взять зависимость координаты от рвемени при равноускоренном движении

```
from src.miptlabs.plotter import pretty_plot, show
from src.miptlabs.approximators import Polynomial
from numpy import linspace
import numpy as np


# точки для построения графика
x = linspace(0, 5, 20)
y = x * x + np.random.normal(size=x.shape)
ax = pretty_plot(x, y, legend='$x = t^2$ + random')


# Апроксимация
approximator = Polynomial(deg=2)
appr_x, appr_y = approximator.approximate(x, y)
# Вывод формулы для латеха
print(approximator.label('t', 'x'))
# >>> $y = 1.03t^{2}-0.205t+0.158$

№ Построение графика. Параметры говорят сами за себя
pretty_plot(appr_x, appr_y, axes=ax, points=False, line=True,
            legend=approximator.label('t', 'x'), xlabel='t, сек', ylabel='x, м', title='График $x(t)$')

ax.figure.savefig('examples/approx.png')
show()
```

![approx_graph](examples/approx.png)
py-envconfig 0.7.0
Managing environment config data
Requires Python: >=3.6

<h1 align='center'>
    py-envconfig ⚙️
</h1>

<h4 align='center'>
    Managing config data from the environment, inspired by envconfig
</h4>

[envconfig](https://github.com/kelseyhightower/envconfig)

## Install

```
pip install py-envconfig
```

## Usage

Set some environment variable, or write a `.env` file.

```bash
HOST=localhost
PORT=6000

MY_APP_SERVICE=bookings
RELEASE_NUMBER=12
ENV=dev
```

Then specify your config:

```python
from envconfig import param
from envconfig import EnvConfig


class AppConfig(EnvConfig):
    """App env config."""

    HOST = param.Str(required=True)
    PORT = param.Int(required=True)
    PASSWORD = param.Str(override="SECRET_REDIS_PW", required=True)

    SERVICE = param.Str(prefix="MY_APP_")
    VERSION = param.Int(override="RELEASE_NUMBER")
    ENV = param.Str(default="prod")


config = AppConfig()

# Access by class attribute or subscript
config.USER
config["USER"]
```

Setup flask config:

```python
config = AppConfig()
app.config.from_object(config)
```

Point to a `.env` file

```python
config = AppConfig("./.env")
```

### Load Dotenv

Some functionality provided by [dotenv](https://pypi.org/project/python-dotenv/)

- Increase verbosity

    ```python
    AppConfig(verbose=True)
    ```

- Override existing env vars with the env vars defined in `.env`.

    ```python
    AppConfig(override=True)
    ```

### Development

To publish package and tag git:

```bash
make tag
```
pbt-database 1.3.2
Database driver
Requires Python: >=3.9,<4.0

[![N|Solid](https://294904.selcdn.ru/git/logo.png)](https://portalbilet.ru/)
## Database driver

Provide PostgresSQL Model built-ins with i18n support.

Use as package with service core and setup with env variables.

## Maintain
Use poetry for all:
```sh
poetry install
poetry build
poetry publish
```

## CI/CD Options

| option          | type  | info     |
| -----           | ----- | -----    |
| **DB_HOST**       | str   |  Host    |
| **DB_PORT**       | int   |  Port    |
| **DB_NAME**       | str   | Database |
| **DB_USER**       | str   | Username |
| **DB_PASSWORD**   | str   | Password |


## Testing
```.sh
pytest tests
```
| :warning: Check database connection before launch - all data will be erased!|
|-----------------------------------------------------------------------------|

## License
```
MIT © PortalBilet Team, 2022
```