semvec/pypi-packages huggingface dataset:
django-cards-admin 0.3.3
Show cards in changelist instead of table for django admin site.
License: MIT
Keywords: django admin extentions, django cards admin

# django-cards-admin

Show cards in changelist instead of table for django admin site.

## Install

```shell
pip install django-cards-admin
```

## Settings

**pro/settings.py**

```python
INSTALLED_APPS = [
    ...
    "django_simple_tags",
    "django_cards_admin",
    ...
]
```

## Usage

**app/admin.py**

```python
from django.contrib import admin
from django_cards_admin.admin import DjangoCardsAdminMixin
from .models import Book

class BookAdmin(DjangoCardsAdminMixin, admin.ModelAdmin):
    result_cards_columns = 5
    max_cards_number = 5
    result_card_body_height = 200
    list_display = ["title", "author", "isbn"]

admin.site.register(Book, BookAdmin)
```

## Configurations

- result_cards_columns = 4 # how many columns
- max_result_cards_number = 10 # if the number of the results is more than max_cards_number, show list instead of cards
- result_card_body_height = 100 # card body height in px
- result_card_body_min_width = 200 # card body min-width in px
- result_card_title_template = "result-card-title.html" # card title template, smart select by app_label and model_name
- result_card_body_template = "result-card-body.html" # card body template, smart select by app_label and model_name
- result_card_footer_template = "result-card-footer.html" # card footer template, smart select by app_label and model_name

## Release

### v0.1.0 2020/02/23

- First release.

### v0.2.0 2020/03/19

- Fix result-cards width problem in filtered changelist.

### v0.3.0 2020/03/21

- Add item link and link title override mechanism. Requires django-simple-tags>=0.4.0.

### v0.3.1 2020/04/28

- Remove print() statements in admin.py.

### v0.3.2 2023/09/15

- Doc update.

### v0.3.3 2025/10/21

- Doc update.
dbc-menamot 2.0.1
A Python package for Discrete Bayesian and Minmax Classifiers
License: MIT
Requires Python: >=3.11

# Introduction
This is a Python package that implement classes: `DiscreteBayesianClassifier`.

Discrete Bayesian Classifier is a classification model that works by first partitioning the feature space into multiple
small profiles using various discretization methods. It then implements Bayesian decision rule to get the result.

Discrete Minmax Classifier is a classifier proposed by Cyprien Gilet and it base on Discrete Bayesian Classifier. By 
calculating a best prior probability that minimize the maximum class conditional risk, it can balance the risk of 
different classes, and also make it perform well in the face of imbalanced datasets. 

## Discretization Methods Implemented
- **K-Means** : `KMeansDiscretizer` and `KMeansClasswiseDiscretizer`
- **Fuzzy C-Means** : `CMeansDiscretizer` and `CMeansClasswiseDiscretizer`

## How to install

To install the `dbc` package, run the following command in your terminal:

```sh
pip install dbc-menamot
```

Make sure you have activated the correct Python environment to avoid potential dependency conflicts.

## Example

A notebook file is provided to give a example in examples folder. And below is an simple example of how to use 
`KmeansDiscreteBayesianClassifier`:

```python
import dbc
from dbc.discretizers import *
from sklearn.datasets import load_iris

# Load dataset
X, y = load_iris(return_X_y=True)

# Create classifier instance
model = dbc.DiscreteBayesianClassifier(
    discretizer=CMeansClasswiseDiscretizer(n_clusters_per_class=3, fuzzifier=1.5),
    minmax=True,
    minmax_eps = 1e-2,
)

# Fit model
model.fit(X, y)

# Predict
y_pred = model.predict(X)
print(y_pred)
```

# Reference

- [1] C. Gilet, “Classifieur Minimax Discret pour l’aide au Diagnostic Médical dans la Médecine Personnalisée,”
  Université Côte d’Azur, 2021.
- [2] C. Gilet, S. Barbosa, and L. Fillatre, “Discrete Box-Constrained Minimax Classifier for Uncertain and Imbalanced
  Class Proportions,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 44, no. 6, pp. 2923–2937, Jun. 2022, doi:
  10.1109/TPAMI.2020.3046439.
- [3] Chen, Wenlong, et al. "Robust Discrete Bayesian Classifier Under Covariate and Label Noise." International
  Conference on Scalable Uncertainty Management. Cham: Springer Nature Switzerland, 2024.

# Contribution

Contributions to this project are welcome. Please submit feature requests and bug reports. If you would like to
contribute code, please submit a pull request.

# License

This project is licensed under the MIT License. See the LICENSE file for more details.
qt-ingot 0.0.5
A lightweight, themeable boilerplate for creating tab-based PyQt applications.
License: MIT
Requires Python: >=3.12
Keywords: gui, pyqt, pyqt6, qt, scaffolding, template

<h1 align="center">
  <img src="https://raw.githubusercontent.com/Yrrrrrf/qt-ingot/main/resources/img/template.png" alt="qt-ingot Icon" width="128" height="128">
  <div align="center">qt-ingot</div>
</h1>

<div align="center">

[![GitHub: Repo](https://img.shields.io/badge/qt--ingot-58A6FF?&logo=github)](https://github.com/Yrrrrrf/qt-ingot)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow)](./LICENSE)
[![PyPI version](https://img.shields.io/pypi/v/qt-ingot)](https://pypi.org/project/qt-ingot/)
[![PyPI Downloads](https://img.shields.io/pypi/dm/qt-ingot)](https://pypi.org/project/qt-ingot/)

</div>

> A lightweight, themeable boilerplate for creating tab-based PyQt applications.

`qt-ingot` is a Python library designed to accelerate desktop application development by providing a self-configuring main window, an intelligent SASS-based theming engine, a data-driven menu bar, and a flexible layout system.

## 🚦 Getting Started

### Installation

```bash
uv add qt-ingot
```

#### Quick Start

Here's a minimal example to get you started:

```python
# your_project/main.py
import sys
from PyQt6.QtWidgets import QApplication, QLabel
from ingot.app import IngotApp
from ingot.views.base import BaseView

# 1. Define your application's configuration
APP_CONFIG = {
    "title": "My Awesome Ingot App",
    "icon": "img.my_icon"  # A rune-lib friendly path
}

# 2. Define your menu structure
MENU_CONFIG = {
    "File": [
        {"name": "Exit", "shortcut": "Esc", "function": sys.exit}
    ],
    "Help": [
        {"name": "About", "function": lambda: print("About This App!")}
    ]
}

# 3. Define the content for your tabs
class MyCustomView(BaseView):
    def __init__(self):
        super().__init__()
        self.layout().addWidget(QLabel("This is my application's content!"))

# 4. Launch the app
def main():
    app = QApplication(sys.argv)
    
    main_window = IngotApp(view_factory=MyCustomView, config=APP_CONFIG)
    main_window.set_menu(MENU_CONFIG)

    main_window.show()
    sys.exit(app.exec())

if __name__ == "__main__":
    main()
```

## 📄 License

This project is licensed under the **MIT License**. See the [LICENSE](./LICENSE) file for details.
django-app-requires 0.3.6
A simple Django app that allows you to specify app dependencies and middleware dependencies in your own apps, and also add defaults for additional configurations.
License: MIT
Keywords: django utils

# django-app-requires

A simple Django app that allows you to specify app dependencies and middleware dependencies in your own apps, and also add defaults for additional configurations.


## Install

```
pip install django-app-requires
```

## Usage

**your_app/\_\_init\_\_.py**

```
app_requires = [
    "your",
    "required",
    "apps",
]

app_middleware_requires = [
    "your",
    "required",
    "middlewares",
]

# Django's setting key must be in upper case.
# default values will be overrided by items in pro/settings.py.

app_setting_defaults = {
    "HELLO": "WORLD",
}

app_setting_callbacks = {
    "your_app.setting_callbacks.callback1",
}
```

**your_app/setting_callbacks.py**

```
def callback1(globals):
    globals["EXTRA_ITEM"] = "EXTRA_VALUE"
```

**pro/settings**

```
INSTALLED_APPS = [
    ...
    'your_app',
    ...
]

#
# at the bottom of settings.py
#
from django_app_requires import patch_all
patch_all()

# so the final INSTALLED_APPS = [
#     "your",
#     "required",
#     "apps",
#     "your_app",
#     "django_app_requires",
# ]

# so the final MIDDLEWARE = [
#    ...
#    "your",
#    "required",
#    "middlewares",
#    ...
# ]

# so the final you got a new setting item:
# HELLO = "WORLD"

## so the final you got a new setting item which provided by callback1:
# EXTRA_ITEM = "EXTRA_VALUE"
```


## Releases

### v0.1.0

- First release.

### v0.1.1

- Add fastutils & magic-import in requirements.txt.
- Fix problems of recursive required.

### v0.2.0

- Add collect_requirements function. **Removed**

### v0.2.1

- Don't scan all app, exclude third-part apps.
- Suggest to use collect_requirements command before doing project package.

### v0.2.2

- Output sorting.

### v0.2.3

- Remove collect_requirements command.
- Test with Django 3.2.

### v0.2.4

- We are not care about Django's version and fastutils' version, so let the end user to choose the version.

### v0.2.5

- Fix bdist_wheel problem that including useless files.


### v0.3.0

- Rename add_app_requires to load_app_requires.
- Add load_app_middleware_requires.
- Add load_app_setting_defaults.
- Add load_app_setting_callbacks.
- Add patch_all to load_app_requires, load_app_middleware_requires, load_app_setting_defaults and load_app_setting_callbacks.

### v0.3.1

- Fix app_setting_callbacks duplicate load problem.

### v0.3.2

- Doc update.
- Use zenutils.

### v0.3.3

- Doc update.

### v0.3.4

- Fix unit tests.

### v0.3.6

- Doc update.
texpatch 0.1.1
Fix TeX/LaTeX quirks in Markdown for KaTeX/MathJax (Python minimal).
License: MIT
Requires Python: >=3.9
Keywords: cli, katex, latex, markdown, mathjax, obsidian, quarto, tex

# TeXPatch (Python)

TeXPatch fixes small TeX/LaTeX quirks in Markdown so it renders cleanly in KaTeX/MathJax.

This is a minimal Python port with a safe, local transform and a CLI.

## Install

```
pip install texpatch
```

## Usage

API:

```py
from texpatch import convert
print(convert('f(x)=|x|'))  # f(x)=\lvert x\rvert
```

CLI:

```
echo "f(x)=|x|" | python -m texpatch
```

Notes:
- Guardrails: does not modify fenced or inline code.
- For fuller rule coverage see the JavaScript library `texpatch`.