semvec/pypi-packages huggingface dataset:
nshare-calc 0.1.2
Python library for calculating the optimal number of shares given a portfolio using integer programming.
Requires Python: >=3.7

# nshare-calc
Python package for calculating the optimal number of shares given a portfolio using integer programming.

## Problem statement

Given a portfolio with total asset $S$, price vector $\mathbf p$ and weight vector $\mathbf w$, find integer vector $\mathbf n$ such that

* The total value of all stocks must not exceed the total asset, i.e., $\mathbf p \cdot \mathbf n \leq S$;
* Minimize the total absolute difference between the desired values and the actual values for all stocks, i.e., $\Sigma_i |S w_i - p_i n_i|$.

## Installation

```sh
pip install nshare-calc
```

## Usage

```python
from nshare_calc import calc_n

# params
S = 100
p = [6, 5.5]
w = [0.6, 0.4]         # w will be automatically normalized

n = calc_n(S, p, w)    # Result: n = [10.  7.]
```
smoothlog 0.1.3
A nice and easy-to-use logger for python
Requires Python: >=3.8

## smoothlog

A modern, easy to use logger written in Python.

## Key Features

- Simple and readable output.
- Colored terminal for easier debugging.
- File management system for easy retracing.
- No external libraries required.

## Installing

**Python 3.8 or higher is required**

To install the library you should run the following command:

```shell
# Linux/macOS
python3 -m pip install -U smoothlog

# Windows
py -3 -m pip install -U smoothlog
```
> Note: This package isn't registered yet

## Quick Example

```python
import smoothlog

log = smoothlog.getLogger("logger")

log.info("Hello World!")
log.warn("Uh oh World!")
log.fail("Bye-bye World!")
```
Console Output:

![](https://i.imgur.com/FGg1quK.png)

You can find examples in the examples directory.
authz-analyzer 0.1.13
Analyze authorization.
Requires Python: >=3.8.1,<3.11

[![codecov](https://codecov.io/gh/SatoriCyber/authz-analyzer/branch/main/graph/badge.svg?token=8S85Z0CAEU)](https://codecov.io/gh/SatoriCyber/authz-analyzer)

authz-analyzer (AKA Authorization Analyzer) helps DevOps and data engineers quickly understand who has access to what data and how.

DevOps and data engineers are often tasked with managing the security of the databases, data lakes or warehouses they operate. This usually involves setting permissions to enable users to query the data they need. However, as the number of users and use-cases increase, complexity explodes. It's no longer humanly possible to remember who had access to what, how and why, which makes meeting security and compliance requirements impossible.

The root cause of this problem is that permissions to data are usually stored in normalized form, which is great for evaluating permissions but not so great when you want to clearly understand your permissions landscape. When asked "how come Joe can query that table?", it can be a long process to get to a definitive answer and that's just time we don't have. With so many data stores, each with its own security model, it's not feasible to manage it all manually.

Identifying this was an issue for many of our customers, the team at [Satori](https://satoricyber.com) decided to build *Authorization Analytics*, a service that helps admins to better manage their data store permissions. We believe no one should have to sift through DB system tables to get a clear picture of who can do what with data.

Authz Analytics is available in two forms:
1. authz-analyzer open source CLI - scan the permissions structure of a database to get the list of all users and data assets they can access.
2. Satori Authorization Analytics - a fully managed SaaS solution to periodically scan, store and visualize all users and data assets they can access. Learn more [here](https://satoricyber.com).

## Documentation
For more information on the authz-analyzer open-source, [go to the docs](https://satoricyber.github.io/authz-analyzer/).

## Contributing
Please follow the [contributing guidelines](CONTRIBUTING.md).

## Credits
This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [waynerv/cookiecutter-pypackage](https://github.com/waynerv/cookiecutter-pypackage) project template.