semvec/pypi-packages huggingface dataset:
weller 0.0.0a1
Modern cache for modern people
License: MIT
Requires Python: >=3.9,<4.0

# Weller

### Installation:
`pip install weller`

### What is it?
weller it's a modern library for caching. It add a TTL cache per item, auto values refresh and also so
easy interface for ruling this

### What it includes:
- Weller - a automatic dispatcher for your perfect cache
- StrictCached and LazyCached - a simply TTL cache per item
- StrictAutoCached and LazyAutoCached - the same as the upper one, but with automatic values refresh 

### Strict and Lazy difference
This library has the concept of strict and lazy caches.

- First, the Lazy, deletes or refreshes only the data that you receive
- Second, the Strict, deletes or refreshes all data from a storage per any request

### Usage examples:

```python
import asyncio
from typing import Any, Annotated

from weller import Weller, Depends
from weller.dispather.storage import WellerMemoryStorage


storage = WellerMemoryStorage()


# If first_long = True, then first get of data will download all the data. Default False
weller = Weller(storage=storage, first_long=False)

async def get_db() -> dict[str, Any]:
    return {"some_key": "some_data"}


@weller.add("some_long", duration=5)
async def get_long_data(db: Annotated[dict, Depends(get_db)]):
    await asyncio.sleep(2)

    return db.get("some_key")


async def main():
    await weller.get("some_long")  # it will take 2 seconds
    await weller.get("some_long")  # but it will be done instantly

    
asyncio.run(main())

```
You can see other examples in weller -> examples  

### Documentation: 
_In development and will be available soon_

### Roadmap:
- Add redis storage
- Work and with stability and security
linlei04-pdesign 0.0.2.dev0
My package description
License: MIT
Requires Python: >=3.7

[![PyPI](https://img.shields.io/pypi/v/xmlclone-pdesign.svg)](https://pypi.org/project/xmlclone-pdesign/)
[![PyPI](https://img.shields.io/pypi/pyversions/linlei04-pdesign.svg)](https://pypi.org/project/xmlclone-pdesign/)
[![PyPI - Implementation](https://img.shields.io/pypi/implementation/xmlclone-pdesign)](https://pypi.org/project/xmlclone-pdesign/)
[![license](https://img.shields.io/github/license/xmlclone/pdesign.svg)](https://github.com/xmlclone/pdesign/blob/main/LICENSE)
[![GitHub contributors](https://img.shields.io/github/contributors/xmlclone/pdesign.svg)](hhttps://github.com/xmlclone/pdesign/graphs/contributors)

# 说明

设计模式&常用算法的Python实现，本文环境如下:

```shell
$ cat /proc/version
Linux version 5.15.90.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Fri Jan 27 02:56:13 UTC 2023

$ conda --version
conda 23.7.4

$ conda create -n vpdesign python=3.12 -y
$ conda activate vpdesign

$ python --version
Python 3.12.0

$ make --version
GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
```

# Demo使用

```shell
# 安装
pip install xmlclone-pdesign
```

# 项目环境

```shell
# 创建并激活虚拟环境
conda create -n vpdesign python=3.12 -y
conda activate vpdesign

# 安装依赖
pip install -r requirements.txt

# 测试
make test

# 打包发布
make release
```

# 其它配置

## readthedocs

1. 登录[readthedocs](https://about.readthedocs.com/)
2. 导入本项目进行编译即可

## pypi

1. 当需要发布版本时，通过`git tag -a [version]`的方式创建版本并`git push --tags`推送到`git`
2. 通过`make release`即可发布到[pypi](https://pypi.org/)
ppm-display 1.1.3
PPM/PGM image viewer
License: MIT
Keywords: ppm pgm image python package ppm-display ppm-disp

# ppm-display
 A simple tool that displays ppm/pgm files via OpenCV and saves the images in png format. The default maximum window size is 600x600.
## Usage
    ppm-disp -i
    ppm-disp -s <size> <file>...
    ppm-disp <file>...
## Options
    -i  about the tool
    -s  display images with a non-default maximum windows size
## Possible Use Case
    - Create a batch file/shell script with the following line:
    - (Windows) ppm-disp %*
    - (Linux)   ppm-disp $*
    - And now you can drag-and-drop ppm/pgm files into it and view the images instantly
    - A batch file example is included in the Github repo
fairprice 0.1.2
Balance the price of your products
License: MIT
Requires Python: >=3.9

# fairprice

> python module to balance prices

[![PyPI](https://img.shields.io/pypi/v/fairprice.svg)](https://pypi.org/project/fairprice/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Python module for balancing product prices. It takes USD price and uses various strategies of your choice to calculate the price in other currencies.

## Installation

Pip is required to install the module. If you don't have pip installed, you can follow the instructions [here](https://pip.pypa.io/en/stable/installing/).

```sh
pip install fairprice
```

## Usage example

```python
from fairprice import FairPrice
from fairprice.strategy import BigMac

fp = FairPrice(strategy=BigMac)
fp.calculate(10, "PLN")
```

## Development setup

Clone the repository and install the requirements.

```sh
git clone https://github.com/Style77/fairprice.git
cd fairprice
pip install -r requirements.txt
```

## Contributing

1. Fork it (<https://github.com/Style77/fairprice/fork>)
2. Create your feature branch (`git checkout -b feature/fooBar`)
3. Commit your changes (`git commit -am 'Add some fooBar'`)
4. Push to the branch (`git push origin feature/fooBar`)
5. Create a new pull request
busrt-worker 0.1.7
busrt-worker is a Python-based async busrt message handle framework
License: MIT
Requires Python: >=3.10,<4.0
Keywords: busrt,message,rpc

# Busrt Worker
> `BUS/RT`是一个快速、灵活且非常易于使用的框架，它使用Rust/Tokio编写，受到NATS、ZeroMQ和Nanomsg的启发。

Busrt Worker是一个基于busrt消息中间件的异步框架，它对Python库进行了封装，使其更易于使用。


## 特点

- 异步：Busrt Worker基于python asyncio异步引擎，可以轻松处理高并发请求。
- 易用性：Busrt Worker对原生的busrt python客户端进行了封装，使用装饰器即可轻松创建rpc服务。
- 高性能：BUS/RT 使用Rust/Tokio编写，具有出色的性能和可靠性。

## 用法

要使用Busrt Worker，请按照以下步骤操作：

1. 安装Busrt Worker：`pip install busrt-worker`
2. 导入Busrt Worker：在您的Python项目中导入Busrt Worker。
3. 创建Busrt Worker App：创建一个App对象，并注册连接信息。
4. 处理消息：使用装饰器指明消息处理方式。

以下是一个示例代码片段，演示如何使用Busrt Worker：

```python
import asyncio

from loguru import logger

from busrtworker import App, ConnectionInfo
# 创建 App对象
app = App()

# 连接信息
api_ci = ConnectionInfo('api', 'localhost:9800', 'busrt.worker.test', static=True, topic='test/#')
caller_ci = ConnectionInfo('caller', 'localhost:9800', 'busrt.worker.test', static=True)

# 注册连接
api = app.registry(api_ci)
app.registry(caller_ci)

# rpc调用
@api.on_call()
def add(a, b):
    return a + b

# 主题订阅
@api.subscribe('test/:name')
def print_name(name: str):
    logger.info(f'{name} pub message')

# 钩子函数注册
@app.run_on_startup
async def test(server):
    async def call():
        await asyncio.sleep(1)
        logger.info(f'call remote add result {(await app.caller.add(api_ci.final_name,a=1, b=2))}')
        await app.caller.send('test/i_am_caller')
    asyncio.create_task(call())

# 启动程序
app.run()
```

## License
The MIT License.
keycloak-fast-sso 2023.11.13
FastAPI Keycloak SSO
License: MIT
Requires Python: >=3.6
Keywords: keycloak fastapi sso

.. figure:: /docs/keycloakfastsso.png
   :alt: keycloakfastsso

   keycloakfastsso

.. figure:: https://img.shields.io/pypi/l/Keycloak-fast-sso
   :alt: PyPI - License

   PyPI - License

keycloak-fast-sso
=================

``keycloakfastsso`` is a Python package that facilitates the integration
of Keycloak authentication in applications built with the FastAPI web
framework.

Features 🎁
-----------

-  Authentication with bearer JWT tokens.
-  JWT token validation.
-  Authorization based on roles, groups and the user’s email
   verification state in Keycloak.
-  Provides information about the validated user.
-  Handy tools for checking roles, groups and other user attributes.

Usage 💡
--------

Middleware
~~~~~~~~~~

Use KeycloakFastSSOMiddleware to protect your API routes. You must first
configure the connection to Keycloak with the appropriate parameters.

.. code:: python

   from fastapi import FastAPI
   from keycloakfastsso.middleware import KeycloakFastSSOMiddleware

   app = FastAPI()
   app.add_middleware( KeycloakFastSSOMiddleware,
                       server_url="https://my-keycloak-url/auth/",
                       client_id="my-client-id",
                       realm_name="my-realm-name",
                       client_secret_key="my-client-secret-key")

Decorators
~~~~~~~~~~

These decorators can be used to restrict access to routes based on user
roles or groups.

.. code:: python

   from keycloakfastsso.decorators import require_role, require_group, require_scope, require_email_verified, require_active_user, require_token_type, require_resource_access, require_allowed_origin

   @app.get("/require_role")
   @require_role(["admin"])
   def require_role_endpoint(): 
       return {"Hello": "World"}

   @app.get("/require_group")
   @require_group(["my_group"])
   def require_group_endpoint(): 
       return {"Hello": "World"}

   # other routes continue the same way 

Utilities
~~~~~~~~~

The utilities allow you to retrieve specific information about the
currently authenticated user.

.. code:: python

   from keycloakfastsso.utils import KeycloakUtils

   # In your route
   @app.get("/whoami")
   def who_am_i(request: Request):
       return {"user_id": KeycloakUtils.get_user_id(request)}

Installation 🛠️
---------------

You can install ``keycloakfastsso`` with pip:

.. code:: bash

   pip install keycloak-fast-sso

--------------

For more information on how to use this package, please refer to the
official documentation.
Opytools 0.2.4
Libreria de herramientas para física computacional
License: MIT
Requires Python: >=3.10.12

## Herramientas para la física computacional

* 1. Integracion por montecarlo: Este método se basa en la generación de números aleatorios para aproximar el valor de una integral definida.

* 2. Ajuste usando Kernel: Este método se basa en la generación de una función de densidad de probabilidad a partir de un conjunto de datos.
gpustat-web 0.3.0
A web interface of gpustat --- consolidate status across multiple nodes.
License: MIT
Requires Python: >=3.6
Keywords: nvidia-smi gpu cuda monitoring gpustat

gpustat-web
===========

A web interface of [`gpustat`][gpustat] ---
aggregate `gpustat` across multiple nodes.

<p align="center">
  <img src="screenshot.png" width="800" height="192" />
</p>

**NOTE**: This project is in alpha stage. Errors and exceptions are not well handled, and it might use much network resources. Please use at your own risk!


Installation
-----

```
pip install gpustat-web
```

Python 3.6+ is required.

Usage
-----

Launch the application as follows. A SSH connection will be established to each of the specified hosts.
Make sure `ssh <host>` works under a proper authentication scheme such as SSH authentication.

```
gpustat-web --port 48109 HOST1 [... HOSTN]
```

You might get "Host key is not trusted for `<host>`" errors. You'll have to accept and trust SSH keys of the host for the first time (it's stored in `~/.ssh/known_hosts`);
try `ssh <host>` in the command line, or `ssh -oStrictHostKeyChecking=accept-new <host>` to automatically accept the host key. You can also use an option `gpustat-web --no-verify-host` to bypass SSH Host key validation (although not recommended).

Note that asyncssh [does NOT obey](https://github.com/ronf/asyncssh/issues/108) the `~/.ssh/config` file
(e.g. alias, username, keyfile), so any config in `~/.ssh/config` might not be picked up.


[gpustat]: https://github.com/wookayin/gpustat/


### Endpoints

- `https://HOST:PORT/`: A webpage that updates automatically through websocket.
- `https://HOST:PORT/gpustat.html`: Result as a static HTML page.
- `https://HOST:PORT/gpustat.txt`: Result as a static plain text.
- `https://HOST:PORT/gpustat.ansi`: Result as a static text with ANSI color codes. Try `curl https://.../gpustat.ansi`

Query strings:

- `?nodes=gpu001,gpu002`: Select a subset of nodes to query and display


### Running as a HTTP (SSL/TLS) server

By default the web server will run as a HTTP server.
If you want to run a secure SSL/TLS server over the HTTPS protocol, use `--ssl-certfile` and `--ssl-keyfile` option.
You can use letsencrypt (`certbot`) to create a pair of SSL certificate and keyfile.

Troubleshoothing: Verify SSL/TLS handshaking (if TLS connections cannot be established)
```
openssl s_client -showcerts -connect YOUR_HOST.com:PORT < /dev/null
```


### More Examples

To see CPU usage as well:

```
python -m gpustat_web --exec 'gpustat --color --gpuname-width 25 && echo -en "CPU : \033[0;31m" && cpu-usage | ascii-bar 27'
```


License
-------

MIT License

Copyright (c) 2018-2023 Jongwook Choi