semvec/pypi-packages huggingface dataset:
django-aieditor 1.0.14
Django-AiEditor 是一个为 Django 框架提供的 AiEditor 富文本编辑器集成包。
License: MIT
Requires Python: >=3.7

# Django-AiEditor

Django-AiEditor 是一个为 Django 框架提供的 AiEditor 富文本编辑器集成包。AiEditor 是一个强大的 Web 富文本编辑器。

## 安装

```bash
pip install django-aieditor
```

## 快速开始

1. 将 'django_aieditor' 添加到你的 INSTALLED_APPS 中：

```python
INSTALLED_APPS = [
    ...
    'django_aieditor',
]
```

2. 配置上传URL路由，在项目的urls.py中添加：

```python
from django.urls import path, include

urlpatterns = [
    ...
    path('aieditor/', include('django_aieditor.urls')),
]
```


3. 在你的模型中使用：

```python
from django_aieditor.fields import AiEditorModelField

class MyModel(models.Model):
    content = AiEditorModelField("内容")
```

4. 在你的表单中使用：

```python
from django_aieditor.fields import AiEditorField

class MyForm(forms.Form):
    content = AiEditorField()
```

## 配置

在你的 settings.py 中可以添加以下配置：

```python
AIEDITOR_CONFIG = {
    'toolbarKeys': ['bold', 'italic', 'link', 'image'], # 工具栏
}
```
更多配置请访问：[https://aieditor.dev/zh/](https://aieditor.dev/zh/)

## 特性

- 完整支持 AiEditor 的所有功能
- 简单的 Django 集成
- 支持文件上传（支持本地存储和云存储）
- 支持自定义配置
- Django Admin 集成

## 更新日志

### v1.0.14 (2025-04-16)
- 修复在settings.py中配置不生效的问题
- 更新文档，添加正确的配置示例

### v1.0.13 (2025-04-16)
- 升级 AiEditor 到 1.3.6 版本
- 新增高亮块功能支持
- 新增文字计数器功能
- 新增工具栏按钮大小调整功能
- 优化粘贴配置，增强粘贴体验

## 文档

aiEditor 文档请访问：[https://aieditor.dev/zh/](https://aieditor.dev/zh/)

Django-AiEditor 文档请访问：[https://github.com/mircool/django-aieditor](https://github.com/mircool/django-aieditor)

## License

MIT License
gerapy-prometheus-exporter-mod 0.1.2
Prometheus Exporter Components for Scrapy & Gerapy
License: MIT
Requires Python: >=3.6.0


# Gerapy Prometheus Exporter

This is a package for supporting Prometheus in Scrapy, also this
package is a module in [Gerapy](https://github.com/Gerapy/Gerapy).

And the source code is modified from [https://github.com/rangertaha/scrapy-prometheus-exporter](https://github.com/rangertaha/scrapy-prometheus-exporter).

## Installation

```shell script
pip3 install gerapy-prometheus-exporter
```

## Usage

Set it to settings.py:

```python
EXTENSIONS = {
    'gerapy_prometheus_exporter.extension.WebService': 500,
}
```

By default the extension is enabled. To disable the extension you need to set `PROMETHEUS_EXPORTER_ENABLED` to False.

The web server will listen on a port specified in `PROMETHEUS_EXPORTER_PORT` (by default, it will try to listen on port 9410)

The endpoint for accessing exported metrics is:

```
http://0.0.0.0:9410/metrics
```

## Settings

These are the settings that control the metrics exporter:

### PROMETHEUS_EXPORTER_ENABLED

Default: True

A boolean which specifies if the exporter will be enabled (provided its extension is also enabled).

### PROMETHEUS_EXPORTER_PORT

Default: [6080]

The port to use for the web service. If set to None or 0, a dynamically assigned port is used.

### PROMETHEUS_EXPORTER_HOST

Default: '0.0.0.0'

The interface the web service should listen on.

### PROMETHEUS_EXPORTER_PATH

Default: 'metrics'

The url path to access exported metrics Example:
```
http://0.0.0.0:9410/metrics
```

### PROMETHEUS_EXPORTER_UPDATE_INTERVAL

Default: 5

This extensions periodically collects stats for exporting. The interval in seconds between metrics updates can be controlled with this setting.
gffx 0.1.4
A minimal graphics library in PyTorch
License: MIT
Requires Python: <4.0,>=3.8

### gffx - a minimal library for (differentiable) graphics

```Python
import gffx
import torch
import matplotlib.pyplot as plt

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

# Setup Camera
camera = gffx.ray.Camera(
    width   = 512,
    height  = 512,
    pos = [0, 0, 3],
    dir = [0, 0, -1],

    device = device
)

# Setup list of meshes
vertices          = torch.load('path/to/vertices.pt').to(device)
faces             = torch.load('path/to/vertices.pt').to(device)

object_list = [
    gffx.obj.mesh_from_vertices_and_faces(
        vertices             = vertices,
        faces                = faces,
        init_translation     = [0, 0.0, 2],
        init_rotation        = [0, 0, 0],
        init_scale           = [1, 1, 1],
        
        ambient_color        = [0.5, 0.5, 0.5],
        diffuse_color        = [0.5, 0.5, 0.5],
        specular_color       = [0.5, 0.5, 0.5],
        specular_coefficient = 1,
        
        device           = device
    )
]

# Ray Trace Render
images = gffx.ray.mesh_render(
    meshes = object_list,
    camera = camera,
    light_intensity = 1.0,
    ambient_intensity = 0.2,
    light_pos = [5, 5, 5],
    background_color = [0, 0, 0],
    ray_chunk_size = 4096,
    
    device = device
)

plt.imshow((images[0].cpu()).permute(1, 0, 2))
plt.gca().invert_yaxis()
plt.show()
```

### [WIP] CLI

```
python -m gffx --vertices '/path/to/vertices.pt' --faces 'path/to/faces.pt'
```

```
python -m gffx --vertices '/path/to/vertices.pt' --faces 'path/to/faces.pt'\
    --center_and_scale --camera_width 512 --camera_height 512\
    --camera_pos "[0,0,1.2]" --camera_dir "[0,0,-1]"\
    --camera_screen_distance 1.0 --ambient_color "[0.5, 0.5, 0.5]"\
    --diffuse_color "[0.5, 0.5, 0.5]" --specular_color "[0.5, 0.5, 0.5]"\
    --specular_coefficient 1.0 --light_intensity 1.0\
    --ambient_intensity 0.2 --light_pos "[5, 5, 5]"\
    --background_color "[0, 0, 0]" --ray_chunk_size 4096\
    --outimg './out.png'

    python -m gffx --vertices  --faces /mnt/d/_doctorate/cache/vocaset/170725_00137/faces_template.npy --center_and_scale --camera_width 512 --camera_height 512 --camera_pos "[0,0,1.2]" --camera_dir "[0,0,-1]" --camera_screen_distance 1.0 --outimg ./outimg.png
```

### Motivation
1. Installing PyTorch3D everytime in colab is a hassle. This library's first aim is to render a mesh using native operations in PyTorch.
masks-fp 1.0.0
Masks fp is a powerful wrapping tool that preserves meta and anatomical information. 🎭
License: MIT
Requires Python: >=3.10
Keywords: python, wrapper, functional-programming, tool, fp

# 🎭 Masks fp

### Functional wrapping for Python.
Advanced ⬦ Powerful ⬦ Tooling

[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/A-4S/masks-fp/python-app.yml?logo=github&label=CI&style=for-the-badge)](https://github.com/A-4S/masks-fp/actions/workflows/python-app.yml) [![PyPI - Version](https://img.shields.io/pypi/v/masks-fp?style=for-the-badge)](https://pypi.org/project/masks-fp/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/masks-fp?style=for-the-badge)](https://pypi.org/project/masks-fp/)

---
## Background
Wrapping is a technique targeting function extensibility, taking metadata of one function and merging it with another, including any intended additional functionality, forming a new function.

## Usage
Mask fp is a powerful tool made for wrapping functions and is built on top of the `functools.wraps` function. The `masks` function allows for quick creation of *wrapper* function look-alikes by placing the `masks` *decorator* over target *wrapper* functions and calling it along with the desired target *wrapped* function. Furthermore, the `masks` function will preserve type hinting, signatures, annotations, and the application of default arg and kwarg values, for an enhanced developer experience and potentially advanced use cases.

## Features
- Automatic application of default arguments during calls, just as it would originally.
- Fully applied `__signature__` and `__annotations__` for wrappers; parameters of `wrapped` and return annotation of `wrapper`.
- Type hinting for newly created wrapper functions! ✨

## Install
Using pip
```sh
pip install masks-fp
```

Or using Poetry
```sh
poetry add masks-fp
```

## Example
```python
from collections.abc import Callable, Iterable

from mask_fp import masks


def decorator(f: Callable[..., Iterable[int]]) -> Callable:
    @masks(f)
    def wrapper(*args, **kwargs) -> dict[str, int | Iterable[int]]:
        """
        From ``wrapper`` ``docstring``. 👋
        """
        print(f"Sum of {f(*args, **kwargs)} is {sum(f(*args, **kwargs))}. 🎓")

        return f(*args, **kwargs)

    return wrapper


@decorator
def wrapped(a: int, /, b: int = 2, *, c: int = 3) -> tuple[int, int, int]:
    """
    From ``wrapped`` ``docstring``. 👋
    """
    return (a, b, c)
```

**Without using default values**
```python
>>> print(wrapped(1, 2, c=3))
Sum of (1, 2, 3) is 6. 🎓
(1, 2, 3)
```

**Using default values**
```python
>>> print(wrapped(1))
Sum of (1, 2, 3) is 6. 🎓
(1, 2, 3)
```