semvec/pypi-packages huggingface dataset:
tennisrank 0.1.8
Library for ranking tennis players
Requires Python: >=3.7

# tennis-rank
Computes tennis player ranks using pagerank algorithm on match graph

## Install

Using pip:

```shell
pip install tennisrank
```

Run tests:

```
make lint
make test
```

## Example

```python
from tennisrank.utils import load_atp
from tennisrank.model import Player, PlayerRank
from tennisrank.algorithm import TennisRank

matches = load_atp(2021)
ranker = TennisRank(matches)
# Get top 3 on all surfaces
top = 3
for surface in [Surface.ANY, Surface.HARD, Surface.CLAY, Surface.GRASS]:
    print(f'Top {top} on {surface.name} surface (unit weight):')
    ranks = ranker.get_ranks(surface=surface)
    for player_rank in ranks[:top]:
        print('-', player_rank)
    print(f'{len(ranks)-top} more...')
    print()

# Get rank of particular player
ranker.get_rank('Novak Hukohic', surface=Surface.GRASS)  # fuzzy matching
```

Creates the following output:

```text
Top 3 on ANY surface (unit weight):
- PlayerRank(player=Player(id=100644, name='Alexander Zverev'), rank=1, surface=<Surface.ANY: 3>)
- PlayerRank(player=Player(id=104925, name='Novak Djokovic'), rank=2, surface=<Surface.ANY: 3>)
- PlayerRank(player=Player(id=106421, name='Daniil Medvedev'), rank=3, surface=<Surface.ANY: 3>)
389 more...

Top 3 on HARD surface (unit weight):
- PlayerRank(player=Player(id=106421, name='Daniil Medvedev'), rank=1, surface=<Surface.HARD: 0>)
- PlayerRank(player=Player(id=100644, name='Alexander Zverev'), rank=2, surface=<Surface.HARD: 0>)
- PlayerRank(player=Player(id=104925, name='Novak Djokovic'), rank=3, surface=<Surface.HARD: 0>)
316 more...

Top 3 on CLAY surface (unit weight):
- PlayerRank(player=Player(id=104745, name='Rafael Nadal'), rank=1, surface=<Surface.CLAY: 2>)
- PlayerRank(player=Player(id=104925, name='Novak Djokovic'), rank=2, surface=<Surface.CLAY: 2>)
- PlayerRank(player=Player(id=126774, name='Stefanos Tsitsipas'), rank=3, surface=<Surface.CLAY: 2>)
221 more...

Top 3 on GRASS surface (unit weight):
- PlayerRank(player=Player(id=104925, name='Novak Djokovic'), rank=1, surface=<Surface.GRASS: 1>)
- PlayerRank(player=Player(id=200000, name='Felix Auger Aliassime'), rank=2, surface=<Surface.GRASS: 1>)
- PlayerRank(player=Player(id=126610, name='Matteo Berrettini'), rank=3, surface=<Surface.GRASS: 1>)
164 more...

(PlayerRank(player=Player(id=104925, name='Novak Djokovic'), rank=1, surface=<Surface.GRASS: 1>),
 0.7407407407407407)
```

## Publish new version

> For developers

### Via Github Actions

- Update version number in pyproject.toml
- Merge to main (via PR, direct push to main or other way)
- Create new release on Github

### Direct to PyPI

Build and upload:

```shell
python -m build
twine upload dist/*
```
gmcli 0.0.1
CLI to interact with the Gaijin Market.

# Gaijin-Market-CLI
 CLI tool for Gaijin Market.


Setup:
1. Execute `python -m venv venv`
2. Execute `venv\Scripts\activate` on Windows, or `source venv/bin/activate` on Unix/MacOS
3. Install the requirements with `pip install -r requirements.txt`

Run:
1. ~~Use keyword 'gmcli' in terminal to show all commands.~~
2. Execute `python main.py`
aad 0.1.5
Async Python SDK for validating Azure AD B2C access tokens
Requires Python: >=3.10

# Azure AD B2C

> Simplified Python SDK for verifying AD B2C-issued JWTs

## Usage

```python
import aad

token = "..." # JWT to verify
tenant = "..." # B2C tenant (as in `"{tenant}.b2clogin.com/{tenant}..."`)
app_id = "..." # ClientID of app registered in the B2C tenant
policy = "B2C_1_..." # policy (aka user flow) name

await aad.authorize(token, tenant, app_id, policy)
# {
#   "idp": "...",
#   "aud": "...",
#   ... # other JWT fields
#   ... # fields configured in B2C
# }
```

## FastAPI dependency

```bash
pip install aad[fastapi]
```

```python
from fastapi import FastAPI
import aad

Claims = aad.claims(tenant, app_id, policy)
app = FastAPI()

@app.get("...")
def get(claims: Claims):
    ...
```

## Disclaimer

The JWT decoding part is heavily inspired by [azure-ad-verify-token](https://pypi.org/project/azure-ad-verify-token/), but with an async interface
queue-az 0.1.0
Async Python SDK for Azure Queue Storage
Requires Python: >=3.10

# Azure Queue Storage

## Installation

```bash
pip install queue-az
```

## Authorization

The required connection string can be obtained from the Azure Portal, within the Storage account, "Access keys" tab

### Environment (.env)

For convenience, you can set `os.environ["BLOB_CONN_STR"]`. If you do, you can skip specifying it on every call.

E.g., create a `.env` file:

```bash
BLOB_CONN_STR="<BLOB_CONN_STR>"
```

Then load it before importing

```python
from dotenv import load_dotenv
load_dotenv()
import queue_az as qz

qz.client() # just works!
```

## API

- Asynchronous (everything is a coroutine)
- Single calls or multiple using a same client:
  ```python
  # single call
  await qz.list.containers(conn_str=CONN_STR) # ain't necessary with a .env file

  # multiple calls
  async with qz.client() as client:
    queues = await qz.list(client=client)
    for q in queues:
      print(await qz.msg.list(q, client=client))
  ```

### Functions

```python
queue_az
  def client(...) -> QueueServiceClient
  async def create(...)
  async def delete(...)
  async def list(...)
  msg
    async def send(...)
    async def pop(...)
    async def list(...)
```