semvec/pypi-packages huggingface dataset:
ml-security 0.0.7
PhD work/exploration @ FEUP, PORTO
Requires Python: >=3.10

# ml_security

Package for security in machine learning.
Contains known algorithms for adversarial attacks and defenses.

[![PyPi Version](https://img.shields.io/pypi/v/ml_security)](https://pypi.org/project/ml_security/)
[![GitHub](https://img.shields.io/github/stars/rufimelo99/ml_security?style=social)](https://github.com/rufimelo99/ml_security)
[![Documentation Status](https://readthedocs.org/projects/ml-security/badge/?version=latest)](https://ml-security.readthedocs.io/en/latest/?badge=latest)
[![Downloads](https://static.pepy.tech/badge/ml_security)](https://pepy.tech/project/ml_security)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/25cf2a7639dd468fa40868831caadeb7)](https://app.codacy.com/gh/rufimelo99/ml_security/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)

## Installation

```bash
conda create -n phd python=3.11
pip install ml_security/
```
throttling-toolkit 0.0.3
Python implementation of throttling resiliency pattern.
Requires Python: >=3.8

# fallback_toolkit

[![PyPI - Version](https://img.shields.io/pypi/v/fallback-toolkit.svg)](https://pypi.org/project/fallback-toolkit)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/fallback-toolkit.svg)](https://pypi.org/project/fallback-toolkit)
[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)
-----

(Yet Another) fallback implementation for python.


*No dependencies outside of standard python libraries*


## Table of Contents

- [Installation](#installation)
- [Examples](#examples)
- [License](#license)

## Installation

```console
pip install fallback-toolkit
```


## License

`fallback-toolkit` is distributed under the terms of the
[MIT](https://spdx.org/licenses/MIT.html) license.
django-replyify-oauth2 0.3.0
Replyify OAuth2 consumer for Django
Requires Python: ~=3.10
Keywords: replyify, oauth2, django

Official Django client for Replyify
===================================

A Django wrapper for Replyify's Python API bindings.

Installation
------------

You can install this package by using the pip tool and installing:
::

    $ pip install django-replyify-oauth2

Or:
::

    $ easy_install django-replyify-oauth2

Register Your Application with Replyify
---------------------------------------

-  Sign up for Replyify at https://app.replyify.com/access/signup

-  Register your application at
   https://app.replyify.com/oauth2/applications/register

   -  Supported OAuth2 configuration is Public / Authorization code.

Configure the django-replyify-oauth2 module
-------------------------------------------

From your previously configured app, found at https://app.replyify.com/oauth2/applications add the following to your Django `settings.py`:
::

    REPLYIFY_CLIENT_ID = '{ update me }'
    REPLYIFY_CLIENT_SECRET = '{ update me }'
    REPLYIFY_REDIRECT_URI = '{ update me, must match value set from previous step'
    REPLYIFY_USER_ID_FIELD = 'id'  # or other primary key user field like `guid`
    REPLYIFY_DENIED_REDIRECT = '/path/when/user/denies/access'  # defaults to home page

    INSTALLED_APPS = [
        ...
        'replyify_oauth2',
        ...
    ]

And add the following to your `urls.py`
::

    from django.urls import include, re_path
    urlpatterns = [
        ...
        re_path(r'^replyify/', include(('replyify_oauth2.urls', 'replyify_oauth2'), namespace='replyify')),
        ...
    ]

Run migrate
::

    **$ python manage.py migrate**

In templates
::

    <a href="{% url 'replyify:authorize' %}?next={% url 'home'|urlencode %}">Connect to Replyify</a>

Note: you can pass `next` query parameter to the authorize view to direct the user to correct page after OAuth flow has completed successfully.  Default will send user to '/'

In views as a decorator: this will kick off the Authorization flow or Refresh request (if token is expired) and will send the user back to the original requested url on completion
::

    from replyify_oauth2.decorators import replyify_auth_required

    @replyify_auth_required
    def my_view_that_needs_replyify(request):
        ...

Using the Replyify API
----------------------

Documentation for the python bindings can be found here:

-  https://app.replyify.com/api/docs
-  https://replyify.com/api/docs

In the standard documentation (the first link), most of the reference
pages will have examples in Replyify's official bindings (including
Python). Just click on the Python tab to get the relevant documentation.

In the full API reference for python (the second link), the right half
of the page will provide example requests and responses for various API
calls.
teanglann 0.1.1
Random Irish words from teanglann.ie
Requires Python: >=3.9

# Description

This is a library designed to return a random word in Irish
from http://www.teanglann.ie to help learns of Irish improve
their vocabulary.

<br>

This tool can be used by learners as inspiration to learn a
new random word in Irish. Even learning just one word a day can
make a big difference!

# About

This script uses Python 3 with BeautifulSoup and requests to
get information from teanglann.ie and parse the data.
black-pdbfixer 1.9.0
Fork of pdbfixer (https://github.com/openmm/pdbfixer) to be able to pip install it.
Requires Python: >=3.8

# Attention it is just a fork to be able to pip install it 

Good



[![PDBFixer Continuous Integration Workflow](https://github.com/openmm/pdbfixer/actions/workflows/CI.yml/badge.svg)](https://github.com/openmm/pdbfixer/actions/workflows/CI.yml)

PDBFixer
========

PDBFixer is an easy to use application for fixing problems in Protein Data Bank files in preparation for simulating them.  It can automatically fix the following problems:

- Add missing heavy atoms.
- Add missing hydrogen atoms.
- Build missing loops.
- Convert non-standard residues to their standard equivalents.
- Select a single position for atoms with multiple alternate positions listed.
- Delete unwanted chains from the model.
- Delete unwanted heterogens.
- Build a water box for explicit solvent simulations.

See our [manual](https://htmlpreview.github.io/?https://github.com/openmm/pdbfixer/blob/master/Manual.html)

## Installation

PDBFixer can be installed with conda or mamba.

```
conda install -c conda-forge pdbfixer
```

Alternatively you can install from source, as described in the manual.
xjm-device-tasks 0.0.9
Android device management and automation tasks
Requires Python: >=3.10

# XJM Publish

私有任务执行包，仅用于内部分发。

## 安装方法

### 方式1：直接从zip安装
1. 下载 XJM Publish 的 zip 包文件（例如：`xjm_device_tasks.zip`）

2. 使用 Python 的 zipimport 方式导入：
```python
import zipimport
importer = zipimport.zipimporter('xjm_device_tasks.zip')
xjm_publish = importer.load_module('xjm_device_tasks')

```

python -m build
python -m twine upload dist/*

git tag v0.0.4
git push origin v0.0.4
pyalsolver 0.0.12
A package for matrix factorization using alternating least squares
Requires Python: >=3.10

# ALSolver
![logo](https://github.com/user-attachments/assets/3c5208df-78ea-428a-beab-5193ec562189)

**ALSolver implements alternating least squares for matrix factorization to be used for building a recommender system**


## Installation

```console
pip install pyalsolver
```

## Development

ALSolver is managed by [uv](https://github.com/astral-sh/uv). So to start clone this repo and run:
```console
$ uv venv --python 3.12
$ uv sync
```

After any edits or updates, run ruff to fix any formatting or lining issues:

```console
$ uv run ruff format
$ uv run ruff check
```



## Usage
### Loading Data
```python
from pyalsolver.utils import MovieLens, download_dataset,
# This will download the dataset if it doesn't exist 
# or return its path if it exists
data_path = download_dataset('ml-32m')
print(data_path)
ml_dataset = MovieLens(
        data_path 
)
```
### Training a model
 ```python
from pyalsolver import ALSMF, ENGINE
from pyalsolver.utils import plot_rmse_history
model = ALSMF(0.2, 0.01, 0.01, k=20)
train_rmse_history, valid_rmse_history, loss_history = model.fit(
    ml_dataset.Rui_train, ml_dataset.Riu_train, ml_dataset.Rui_valid, 
    n_epochs=10, engine=ENGINE.NUMBA
)

# to plot rmse history

plot_rmse_history(20, train_rmse_history, valid_rmse_history)
```

### Recommending Movies to an already existing user

```python
uid = 10
pred_ratings, pred_item_indices = model.recommend(uid, topk=30)
pred_item_ids = [ml_dataset.idx_to_item_id[i] for i in pred_item_indices]
pred_item_titles = [ml_dataset.item_id_to_title[i] for i in pred_item_ids]
print(pred_ratings)
print(pred_item_titles)
```

### Coldstart a user with a single rating

```python
import numpy as np
pred_ratings, pred_item_indices = model.coldstart(
    np.array([5]), 
    np.array([628]), 
    topk=40,
    min_popularity=50  # Only consider items with at least 50 ratings
)
pred_item_ids = [ml_dataset.idx_to_item_id[i] for i in pred_item_indices]
pred_item_titles = [ml_dataset.item_id_to_title[i] for i in pred_item_ids]
print(pred_ratings)
print(pred_item_titles)
```

The packages provide three engines for computation:
1. `ENGINE.NUMPY`: uses NumPy and is recommended for small datasets
2. `ENGINE_NUMBA`: uses jitted numba code with not python objects and is recommended for large datasets.
3. `ENGINE_PARALLEL`: uses Python process parallelization for spinning up multiple processes that work to update different portions of the latent. It is only recommended if the overhead of spinning up a new process doesn't exceed the time of computing one iteration