semvec/pypi-packages huggingface dataset:
unicode-string-to-identifier 0.1.0a0
A tool that converts arbitrary text (like user input or file names) into valid Python identifiers while preserving as much of the original meaning as possible.
Requires Python: >=2

A tool that converts arbitrary text (like user input or file names) into valid Python identifiers while preserving as much of the original meaning as possible.

## Example Usage

```python
from __future__ import print_function
from unicode_string_to_identifier import unicode_string_to_identifier

print(unicode_string_to_identifier(u""))
# u"_"
print(unicode_string_to_identifier(u" \r\n\t"))
# u"_"
print(unicode_string_to_identifier(u"123abc"))
# u"_123abc"
print(unicode_string_to_identifier(u"&abc 123"))
# u"_abc_123"
print(unicode_string_to_identifier(u"  hello  world  $"))
# u"_hello_world__"
print(unicode_string_to_identifier(u"测试@unicode"))
# u"测试_unicode"
```

## How It Works

First, `get_character_type()` categorizes each Unicode character into one of four types:

- `LETTER_OR_UNDERSCORE` (Unicode category starting with 'L' or underscore `_`)
- `DECIMAL_DIGIT` (Unicode category 'Nd')
- `SPACE_OR_CONTROL` (Unicode categories starting with 'Z' or 'Cc')
- `OTHER` (all other characters)

Then, it implements the following conversion rules using a state machine:

- The first character must be a letter/underscore. If the first character is a digit, prepend `_` to make it valid.
- Subsequent valid characters (letters/underscores/digits) are kept as-is.
- Other characters are replaced with underscores, but whitespace/control character sequences are collapsed into single underscores.
- Ensures the output is non-empty (appends `_` if empty).

## Contributing

Contributions are welcome! Please submit pull requests or open issues on the GitHub repository.

## License

This project is licensed under the [MIT License](LICENSE).
types-pyflakes 3.4.0.20250701
Typing stubs for pyflakes
Requires Python: >=3.9

## Typing stubs for pyflakes

This is a [PEP 561](https://peps.python.org/pep-0561/)
type stub package for the [`pyflakes`](https://github.com/PyCQA/pyflakes) package.
It can be used by type-checking tools like
[mypy](https://github.com/python/mypy/),
[pyright](https://github.com/microsoft/pyright),
[pytype](https://github.com/google/pytype/),
[Pyre](https://pyre-check.org/),
PyCharm, etc. to check code that uses `pyflakes`. This version of
`types-pyflakes` aims to provide accurate annotations for
`pyflakes==3.4.*`.

This package is part of the [typeshed project](https://github.com/python/typeshed).
All fixes for types and metadata should be contributed there.
See [the README](https://github.com/python/typeshed/blob/main/README.md)
for more details. The source for this package can be found in the
[`stubs/pyflakes`](https://github.com/python/typeshed/tree/main/stubs/pyflakes)
directory.

This package was tested with
mypy 1.16.0,
pyright 1.1.400,
and pytype 2024.10.11.
It was generated from typeshed commit
[`3f727b0cd6620b7fca45318dd34542b1e1c7dbfb`](https://github.com/python/typeshed/commit/3f727b0cd6620b7fca45318dd34542b1e1c7dbfb).
polardb-mysql-mcp-server 0.8.0
MCP server for polardb mysql
Requires Python: >=3.12

PolarDB MySQL MCP Server
=======================
PolarDB MySQL MCP Server serves as a universal interface between AI Agents and PolarDB MySQL databases. It enables seamless communication between AI Agents and PolarDB MySQL, helping AI Agents retrieve PolarDB MySQL database metadata and execute SQL operations.
# Environment Variables  
* POLARDB_MYSQL_HOST: Database host address  
* POLARDB_MYSQL_PORT: Database port 
* POLARDB_MYSQL_USER: Database user  
* POLARDB_MYSQL_PASSWORD: Database password  
* POLARDB_MYSQL_DATABASE: Database name  
* POLARDB_MYSQL_ENABLE_UPDATE: Enable update operation(default:false)  
* POLARDB_MYSQL_ENABLE_DELETE:  Enable delete operation(default:false)  
* POLARDB_MYSQL_ENABLE_INSERT:  Enable insert operation(default:false)  
* POLARDB_MYSQL_ENABLE_DDL:  Enable ddl operation(default:false)  
* SSE_BIND_HOST: The host address to bind for SSE mode  
* SSE_BIND_PORT: The port to bind for SSE mode  
* RUN_MODE: The run mode(sse|stdio),(default:sse)  

# Components
## Tools
* execute_sql: 执行符合PolarDB MySQL语法的SQL语句
* polar4ai_update_index_for_text_2_sql: 利用polardb的AI节点,对当前库的表建索引，用于文本转SQL或者文本转chart
* polar4ai_text_2_sql:利用polardb的AI节点,将用户的文本转换成sql语句
* polar4ai_text_2_chart:利用polardb的AI节点,将用户的文本统计需求直接转换成图表
* polar4ai_create_models:使用polar4ai语法，创建各种自定义算法模型  
* polar4ai_import_doc:利用polardb的AI节点,将用户本地目录的文档导入到PolarDB中形成知识库
* polar4ai_search_doc:利用polardb的AI节点,从PolarDB中的知识库中搜索用户问题并返回答案  
## Resources
* polardb-mysql://tables: 列出当前数据库中所有的表  
* polardb-mysql://models: 列出当前数据库中创建的所有自定义算法模型   
## Resource Templates
* polardb-mysql://{table}/field: 获取到表中字段的名称、类型和注释
* polardb-mysql://{table}/data: 从表中获取数据，默认获取50条数据    
## Cursor 
1. config for mcp.json  
```json
{
  "mcpServers": {
    "polardb-mysql-mcp-server": {
      "command": "uvx",
      "args": [
        "--from",
        "polardb-mysql-mcp-server",
        "run_polardb_mysql_mcp_server"
      ],
      "env": {
        "POLARDB_MYSQL_HOST": "127.0.0.1",
        "POLARDB_MYSQL_PORT": "15001",
        "POLARDB_MYSQL_USER": "xxxx",
        "POLARDB_MYSQL_PASSWORD": "xxx",
        "POLARDB_MYSQL_DATABASE": "xxx",
        "RUN_MODE": "stdio",
        "POLARDB_MYSQL_ENABLE_UPDATE": "false",
        "POLARDB_MYSQL_ENABLE_DELETE": "false",
        "POLARDB_MYSQL_ENABLE_INSERT": "false",
        "POLARDB_MYSQL_ENABLE_DDL": "false"
      }
    }
  }
}
```
dill-retnet 1.0.2
A simple but potentially powerful RetNet inspired model.
Requires Python: >=3.6

# dill-retnet

This is a simple but potentially powerful RetNet inspired model.

### Usage:
```python
import torch
from dill_retnet import RetNet

# Define model configuration
dim = 512         # Dimensionality
depth = 6         # Number of layers
heads = 8         # Number of heads

# Initialize the RetNet model
model = RetNet(dim=dim, depth=depth, heads=heads)

# Create a sample input (batch of token embeddings)
# For example: batch size = 2, sequence length = 128
x = torch.randn(2, 128, dim)

# Pass input through the model
output = model(x)

# Output shape should match input: (batch_size, seq_length, dim)
print("Output shape:", output.shape)
```