semvec/pypi-packages huggingface dataset:
collectlicense 0.2.0
collect-license: Collect license files for packages installed with pip.
License: MIT
Keywords: LICENSE.txt LICENSE Collect

# collect-license

pipインストールされたパッケージのライセンスファイルを収集するモジュールです。
pip-licensesを使用します。

## 動作確認OS

- `Windows 11 Pro`

## インストール方法

``` cmd or bash
pip install collectlicense
```

## 実行方法

``` cmd or bash
python -m collectlicense --out .licenses --clear
```
- --out：収集したライセンスファイルの保存先ディレクトリ
- --clear：--outで指定したディレクトリを削除してから収集する


## ソースから実行する方法

``` cmd or bash
git clone https://github.com/hamacom2004jp/collect-license.git
cd collect-license
python -m venv .venv
.venv\Scripts\activate
python.exe -m pip install --upgrade pip
pip install -r requirements.txt
python -m collectlicense
deactivate
```

## pyplにアップするための準備

``` cmd or bash
python setup.py sdist
python setup.py bdist_wheel
```

- pyplのユーザー登録【本番】
  https://pypi.org/account/register/

- pyplのユーザー登録【テスト】
  https://test.pypi.org/account/register/

- それぞれ2要素認証とAPIトークンを登録

- ホームディレクトリに```.pypirc```を作成
``` .pypirc
[distutils]
index-servers =
  pypi
  testpypi

[pypi]
repository: https://upload.pypi.org/legacy/
username: __token__
password: 本番環境のAPIトークン

[testpypi]
repository: https://test.pypi.org/legacy/
username: __token__
password: テスト環境のAPIトークン
```

- テスト環境にアップロード
  ```.pyplrc```を作っていない場合はコマンド実行時にusernameとpasswordを要求される
  成功するとURLが返ってくる。
``` cmd or bash
twine upload --repository testpypi dist/*
```
- pipコマンドのテスト
``` cmd or bash
pip install -i https://test.pypi.org/simple/ collectlicense
```

- 本番環境にアップロード
``` cmd or bash
twine upload --repository pypi dist/*
```
numberdividend 0.1.2
A tool for dividend distribution analysis.
License: MIT
Requires Python: >=3.6
Keywords: dividend distribution analysis

# NumberDividend

A simple Python package to split a list of numbers so that their sum matches a target value.

## Installation
```bash
pip install numberdividend
```
## Usage
You can use it as a module:
```python
from numberdividend import NumberCore

array = [1, 2, 3, 5, 6]

div = NumberCore.dividend(array, 900, 3, 5)
NumberCore.display(div)
```
___
```python
NumberCore.dividend(array, target_sum, limit, decimal)
```
Calculate the dividend distribution of an array.
| Value | Type | Description |
|--|--|--|
| array | List[float] | List of float numbers to be distributed. |
| target_sum | float | Target sum for the distribution. |
| limit | int, optional | Maximum number of elements to consider from the array. |
| decimal | int, optional | Number of decimal places for the output. |
| return | List[Tuple[float, float]] | List of tuples containing the index and the dividend value |
___
```python
NumberCore.display(array)
```
Display the dividend distribution using matplotlib.
| Value | Type | Description |
|--|--|--|
| array | List[float] | List of dividend values to be displayed. |
___
### CLI Usage
```bash
python -m numberdividend C:\User\path\...\input.csv 300 C:\User\path\...\output.csv --limit 30 --display
```
⚠️ Only `.csv` files are supported as input.
Structure of `input.csv`:
| No column name |
|--|
| 1 |
| 2 |
| 3 |
| 5 |
| 9 |
___
Command struct
| Value | Type | Description |
|--|--|--|
| path | str | Input file path |
| target | int | Value of sum the array |
| save | str | Output file path |
| --limit | int | Optional limit on the number of elements considered |
| --display | none | Optional displays the processed array |
### License
MIT
### Author
Sabolch - [Github profile](https://github.com/SaboIch)
cfglog 1.0.0
Configure Logging Easily
License: MIT

# cfglog: Configurate Logging Easily

`cfglog` provides an easy way to setup logging. It supports the configuration of datetime in the logging system, which is useful when you want to share the time spent on the program's execution without revealing when the program was run.


## Installation

```bash
pip install --upgrade cfglog
```

## Usage Example

```python
>>> import datetime as dt
>>> import logging
>>> import sys
>>> import cfglog
>>> cfglog.basicConfig(
...     level=logging.DEBUG,  # logging when level >= DEBUG
...     format="%(asctime)s [%(levelname)s] %(message)s",
...     datefmt="%H:%M:%S",
...     datetime=dt.datetime(2000, 1, 1),  # set current datetime in logging system as 2000-01-01T00:00:00
...     stream=sys.stdout,  # write to stdout rather than stderr
...     force=True,  # overwrite existing configuration
... )
>>> logging.debug("This is a debug message.")
00:00:00 [DEBUG] This is a debug message.
>>> logging.info("This is an info message.")
00:00:00 [INFO] This is an info message.
>>> logging.warning("This is a warning message.")
00:00:00 [WARNING] This is a warning message.
>>> logging.error("This is an error message.")
00:00:00 [ERROR] This is an error message.
>>> logging.critical("This is a critical message.")
00:00:00 [CRITICAL] This is a critical message.
```

## APIs

class `TimeoffsetFormatter`: An extended version of `logging.Formatter` that supports datetime configuration via the parameter `datetime`.

Function `basicConfig()`: An extended version of `logging.basicConfig()` that supports datetime configuration via the parameter `datetime`, and some features in newer/future version of Python such as `style`, `handlers`, `force`, `encoding`, and `errors`.