semvec/pypi-packages huggingface dataset:
ts-django-filtering 1.1.0
TechServ in-house ORM model attribute filtering
Requires Python: >=3.12

# ts-django-filtering

![PyPI - Version](https://img.shields.io/pypi/v/ts-django-filtering)

In-house solution for kwarg and attribute access based filtering 
of Django ORM models.

## Install

```sh
$ pip install ts-django-filtering
```

## Usage

```python
from my_app.models import Person
from django_filtering import Filter, FilterSet

my_filters = [
    {
        "path": "job.name",
        "operator": "iexact",
        "value": "Engineer"
    },
    {
        "path": "job.requirement.name",
        "operator": "icontains",
        "value": "Plumbing"
    },
]

filters = Filter.from_list(my_filters)
print(Filter.merge_to_dict(*filters))
# {'job__name__iexact': 'Engineer', 'job__requirement__name__icontains': 'Plumbing'}

print(FilterSet(filters=filters).filter(Person))
# <QuerySet [<Person: Person object (1)>]>

### or for instance filtering

filters = Filter.from_list([
    {
        "path": "name",
        "operator": "exact",
        "value": "Joe"
    }
])

people = [
    Person(name="Jeff"),
    Person(name="John"),
    Person(name="Joe"),
]

FilterSet(filters=filters).filter(people)
# <List [<Person: Person object("Joe")>]>
```
busGal-api 0.3.0.0
Python API wrapper for the galician public transport
Keywords: bus, buses, transport, public transport, galicia, api

# bus.gal-api 🚍

[![GitHub license](https://img.shields.io/github/license/peprolinbot/bus.gal-api)](https://github.com/peprolinbot/bus.gal-api)
[![PyPI version](https://img.shields.io/pypi/v/busGal-api?label=pypi%20package)](https://pypi.org/project/busGal-api)
[![Upload Python Package](https://github.com/peprolinbot/bus.gal-api/actions/workflows/python-publish.yml/badge.svg)](https://github.com/peprolinbot/bus.gal-api/actions/workflows/python-publish.yml)

Python API wrapper for [the galician public transport](https://www.bus.gal/) which uses the
associated
[app](https://play.google.com/store/apps/details?id=gal.xunta.transportepublico)'s
http API to get the inforamtion about buses, your card and your user
account. I got the endpoints using [mitmproxy](https://mitmproxy.org/).

## 📜 Documentation

Documentation can be found [here](https://peprolinbot.github.io/bus.gal-api). There are two main submodules: `busGal_api.transport` and `busGal_api.accounts`, the first one has all the functions related to transportation and the second one allows you to manage cards and accounts, as the name implies.

## 🔧 Installation

Just run:

``` bash
pip install busGal_api
```

## ✅ Quick examples

There are quick examples for both the submodules mentioned above in their `__main__.py` and their docs.

## ⚠️ Disclaimer

This project is not endorsed by, directly affiliated with, maintained
by, sponsored by or in any way officially related with la Xunta de
Galicia, the bus operators or any of the companies involved in the
[bus.gal](https://www.bus.gal/) website and the
[app](https://play.google.com/store/apps/details?id=gal.xunta.transportepublico).

This software is provided 'as is' without any warranty of any kind. The user of this software assumes all responsibility and risk for its use. I shall not be liable for any damages or misuse of this software. Please use the code and information in this repo responsibly.
thinqpbo 0.1.5
A thin QPBO wrapper for Python

# Thin wrapper for QPBO
Thin Python wrapper for a modified version of the quadratic pseudo-Boolean optimization (QPBO) algorithm by Vladimir Kolmogorov. The original source code by Vladimir Kolmogorov availbable at http://pub.ist.ac.at/~vnk/software.html. This wrapper uses a modified version with support for larger graphs and slightly lower memory usage. See [submodule repository](https://github.com/Skielex/QPBO) for more details.

## QPBO vs. Maxflow
While the QPBO algorithm performs a *s-t* graph cut similar to [Maxflow](https://github.com/Skielex/thinmaxflow), it allows for non-submodular energy terms, which Maxflow doesn't. Amongst other things, this allows QPBO to solve optimization problems with exclusions terms, which can be very usefull. The graph constructed by the QPBO implementation is twice the size of a Maxflow graph for an equivalent problem. Thus, QPBO uses more memory and is slightly slower than Maxflow.

## Installation
Install package using `pip install thinqpbo` or clone this repository (including [submodule](https://github.com/Skielex/QPBO)). Building the package requires Cython.

## Graph types
Currently, there are three different types of graphs: `QPBOInt`, `QPBOFloat` and `QPBODouble`. The only difference is the underlying datatypes used for the edge capacities in the graph. For stability, it is recommended to use `QPBOInt` for integer capacities and `QPBODouble` for floating point capacities. However, in some cases, it maybe be favourable to use `QPBOFloat` to reduce memory consumption.

## Advanced features (QPBO-P and QPBO-I)
The QPBO implementation has a few advanced extensions known as QPBO-P and QPBO-I. Currently, not all advanced functions have been wrapped. If you need to use features of the QPBO C++ library that are not wrapped by `thinqpbo`, please let me know by creating an issue on GitHub.

## Tiny example
```python
import thinqpbo as tq

# Create graph object.
graph = tq.QPBOInt()

# Number of nodes to add.
nodes_to_add = 2

# Add two nodes.
first_node_id = graph.add_node(nodes_to_add)

# Add edges.
graph.add_unary_term(0, 0, 5) # E1(0) = 5, s     --5->   n(0)
graph.add_unary_term(0, 1, 0) # E0(0) = 1, n(0)  --1->   t
graph.add_unary_term(1, 5, 0) # E0(1) = 5, n(1)  --5->   t
graph.add_pairwise_term(0, 1, 0, 7, 0, 4)   # E01(0,1) = 7, n(0)  --7->   n(1)
                                            # E11(0,1) = 4, Not possible with standard Maxflow


# Find maxflow/cut graph.
graph.solve()
graph.compute_weak_persistencies()
twice_energy = graph.compute_twice_energy()

for n in range(nodes_to_add):
    segment = graph.get_label(n)
    print('Node %d has label %d.' % (n, segment))
# Node 0 has label 0.
# Node 1 has label 0.
    
print('Twice energy/flow: %s' % twice_energy)
# Twice energy/flow: 12
```

## License
As the QPBO implementation is distributed under the GPLv3 license, so is this package.
ntlm-bruteforce 0.1
Librairie Python pour bruteforce NTLM hash
Requires Python: >=3.6

# NTLM Bruteforce

Une librairie Python pour rÃ©cupÃ©rer et brute-forcer un hash NTLM Ã  partir des fichiers SAM et SYSTEM.

## Installation

Pour installer la librairie, utilisez la commande suivante :
pip install ntml_bruteforce

## Exemple d'utilisation

```python
from ntlm_bruteforce import NTLMBruteforcer

bruteforcer = NTLMBruteforcer(
    sam_path="C:/Windows/System32/config/SAM",
    system_path="C:/Windows/System32/config/SYSTEM",
    charset="azerty123",
    min_len=1,
    max_len=5
)
bruteforcer.run()


---

### 3. Construire et publier sur PyPI (optionnel)

Si tu veux publier sur **PyPI**, tu peux utiliser ces commandes pour construire et uploader ton package.

#### Installer les outils nÃ©cessaires :
```bash
pip install setuptools wheel twine
goat-sdk-plugin-spl-token 0.1.4
Goat plugin for spl_token
Requires Python: <4.0,>=3.10
Keywords: goat, sdk, agents, ai, spl_token

# SPL Token Plugin for GOAT SDK

A plugin for the GOAT SDK that provides functionality for interacting with Solana Program Library (SPL) tokens on the Solana blockchain.

## Installation

```bash
# Install the plugin
poetry add goat-sdk-plugin-spl-tokens

# Install required wallet dependency
poetry add goat-sdk-wallet-solana
```

## Usage

```python
from goat_plugins.spl_token import spl_token, SplTokenPluginOptions

# Initialize the plugin
options = SplTokenPluginOptions(
    rpc_url="${RPC_PROVIDER_URL}"  # Your Solana RPC URL
)
plugin = spl_token(options)

# Get token account info
token_info = await plugin.get_token_account_info(
    token_address="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",  # USDC
    wallet_address="your_wallet_address"
)

# Transfer tokens
transfer = await plugin.transfer(
    token_address="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",  # USDC
    recipient="recipient_wallet_address",
    amount=1000000,  # 1 USDC (6 decimals)
)

# Create token account
new_account = await plugin.create_token_account(
    token_mint="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",  # USDC
    owner="owner_wallet_address"
)
```

## Features

- Token Account Management:
  - Create token accounts
  - Close token accounts
  - Get account information
  - Get token balances
  
- Token Operations:
  - Transfer tokens
  - Approve token delegation
  - Revoke token delegation
  - Burn tokens
  
- Token Mint Operations:
  - Create token mints
  - Mint new tokens
  - Set mint authority
  - Freeze/thaw accounts
  
- Advanced Features:
  - Multi-signature support
  - Associated token accounts
  - Token program v2 support
  - Metadata program integration
  
- Network Support:
  - Solana Mainnet
  - Solana Testnet
  - Solana Devnet

## License

This project is licensed under the terms of the MIT license.
goat-sdk-plugin-jupiter 0.1.3
Goat plugin for jupiter
Requires Python: <4.0,>=3.10
Keywords: goat, sdk, agents, ai, jupiter

# Jupiter Plugin for GOAT SDK

A plugin for the GOAT SDK that provides Jupiter DEX aggregator functionality for token swaps on Solana.

## Installation

```bash
# Install the plugin
poetry add goat-sdk-plugin-jupiter

# Install required wallet dependency
poetry add goat-sdk-wallet-solana
```

## Usage

```python
from goat_plugins.jupiter import jupiter, JupiterPluginOptions

# Initialize the plugin
options = JupiterPluginOptions(
    rpc_url="${RPC_PROVIDER_URL}"  # Your Solana RPC URL
)
plugin = jupiter(options)

# Get swap quote
quote = await plugin.get_swap_quote(
    input_mint="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",  # USDC
    output_mint="So11111111111111111111111111111111111111112",  # SOL
    amount=1000000,  # 1 USDC (6 decimals)
    slippage_bps=50  # 0.5% slippage tolerance
)

# Execute swap
result = await plugin.swap(
    input_mint="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",  # USDC
    output_mint="So11111111111111111111111111111111111111112",  # SOL
    amount=1000000,  # 1 USDC (6 decimals)
    slippage_bps=50,  # 0.5% slippage tolerance
    wallet_address="your_wallet_address"
)
```

## Features

- Token price discovery
- Swap quote generation
- Token swap execution
- Best route finding
- Supported tokens:
  - All SPL tokens
  - Native SOL
  - Wrapped SOL (WSOL)
- Features:
  - Multi-route swaps
  - Split trades
  - Price impact protection
  - MEV protection

## License

This project is licensed under the terms of the MIT license.
wasaclip 0.2.1
Sharp like wasabi, fast like a ninja — your clipboard’s secret weapon! WasaClip takes your clipboard entries and gives them a spicy refresh! Trim, replace, reformat, or clean up text with lightning speed.
Requires Python: >=3.11

# WasaClip 🌶️✂️

WasaClip takes your clipboard entries and gives them a spicy refresh! Trim, replace, reformat, or clean up text with lightning speed. Just copy, let WasaClip process it, and paste the perfect result—sharp, clean, and ready to go. Whether you're editing code, removing extra spaces, or transforming text, WasaClip makes it effortless.

![WasaClip](https://raw.githubusercontent.com/rotten77/wasaclip/main/wasaclip.png)

## Install

    pip install wasaclip

## How to Use WasaClip

Create a processor file (e.g., `my_processor.py`) with a process function.

Run WasaClip and pass the processor file as an argument:

    wasaclip my_processor.py

## Processors

The processor file should contain a process function that:

* Takes a string argument (the clipboard content).
* Returns either a string (the processed content) or None (to skip processing).
* Can import and use any Python libraries.
* May include additional helper functions if needed.

**Check the [examples](https://github.com/rotten77/wasaclip/tree/main/examples) folder🌶️**

*Example:*

    # lowercase.py
    def process(content: str) -> str:
        return f"{content.lower()}"
mathoptdev 0.1.5
Python CLI and SDK for mathopt.dev the platform for mathematical optimization
Requires Python: >=3.12

# MathOpt

To interact with mathopt, we provide a CLI and a Python SDK. It contains tools to help developers solve combinatorial problems in the cloud. 

## Installation 

Install with pip
```bash
pip install mathoptdev
```
Install with uv (recommended package manager): 
```bash
uv add mathoptdev 
```
This installs a CLI that you can call with:
```bash
opt --help 
```
or 

```bash
alias opt="uv run opt" # set and alias for uv
opt --help 
```
## Login 

This command will guide you through the login process:
```bash
opt login 
```
We store the API token in the MATHOPT_API_TOKEN variable in your .env file. 

After logging in, check the user with 
```bash
opt user 
```

## REST API
You can call the API directly with a HTTP POST request. You need to specify the x-mathopt-api-token header. 

```bash
curl -X POST https://www.mathopt.dev/api \
  -H "x-mathopt-api-token: YOUR_MATHOPT_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "get_user"
  }'
```
We also have a helper function in python

```python
import mathoptdev as opt 
body = {
  "action": "get_user"
}
opt.send_request(body) 
```

## Create problem instances 
To get you started, we provide the following helper command that generates a Travelling Salesman Problem (TSP):

```bash
opt tsp -c 5 
```
The option `-c` corresponds to the number of cities in the problem. The MPS file will be saved in the tsp folder in your current directory. 

Once instances are generated, upload them with the following command: 
```bash
opt instance create tsp 
```
To verify that we successfully processed your instances, you can query the backend with the command:
```bash
opt instance list 
```
or in python
```python
import mathoptdev as opt 
opt.queries.get_instances() 
```

## Solve instances 
To solve an instance, you need to create a job with its id and the id of the strategy you want to use to solve it. 

The list of available strategies can be queried with 
```bash
opt strategy list 
```

We provide an example on how to create and queue a set of jobs in these scripts: 
- [create_jobs.py](https://github.com/laroccacharly/mathoptdev/blob/main/examples/create_jobs.py)
- [queue_jobs.py](https://github.com/laroccacharly/mathoptdev/blob/main/examples/queue_jobs.py)

# Monitor your jobs
You can monitor your jobs with:
```bash
opt job list 
```
or 
```python
import mathoptdev as opt 
opt.queries.get_jobs() 
```

# Download solutions
You can download the parquet file associated with a solution:
```python
import mathoptdev as opt 
body = {
  "action": "download_solution",
  "solution_id": "my_solution_id"
}
opt.send_request(body) 
```
There is a full example at the link: 
[download_solutions.py](https://github.com/laroccacharly/mathoptdev/blob/main/examples/download_solution.py)
hipersim 0.1.13
A collection of wind energy simulation tools
Requires Python: >=3.7

# Hipersim

## Introduction
Hipersim is a collection of tools for computationally-efficient simulation of Wind Energy problems using statistical and machine learning methods. Currently, the package contains the following submodules:

- **turbgen**: 
    - Generation of 3D frozen turbulence fields ("turbulence boxes") with the Mann turbulence spectrum
    - Constrained turbulence field generation and application of constraints on pre-generated turbulence fields

- **surrogates**:
    - A feedforward neural network toolbox, training and evaluation of feedforward neural networks. 
	- A set of tools for surrogate-based modeling and analysis of wind farms

## Links

- [Online documentation of new interface](https://hipersim.pages.windenergy.dtu.dk/hipersim/)
- [Manual describing old interface + theory references]( https://gitlab.windenergy.dtu.dk/HiperSim/hipersim/-/blob/master/doc/Turbgen_Manual_0.0.24.pdf?ref_type=heads)
- [MIT License](https://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/blob/master/LICENSE)
langchain-graph-retriever 0.8.0
LangChain retriever for traversing document graphs on top of vector-based similarity search.
Requires Python: >=3.10
Keywords: RAG, graph RAG, langchain

# LangChain Graph Retriever

LangChain Graph Retriever is a Python library that supports traversing a document graph on top of vector-based similarity search.
It works seamlessly with LangChain's retriever framework and supports various graph traversal strategies for efficient document discovery.

## Features

- **Vector Search**: Perform similarity searches using vector embeddings.
- **Graph Traversal**: Apply traversal strategies such as breadth-first (Eager) or Maximal Marginal Relevance (MMR) to explore document relationships.
- **Customizable Strategies**: Easily extend and configure traversal strategies to meet your specific use case.
- **Multiple Adapters**: Support for various vector stores, including AstraDB, Cassandra, Chroma, OpenSearch, and in-memory storage.
- **Synchronous and Asynchronous Retrieval**: Supports both sync and async workflows for flexibility in different applications.

## Installation

Install the library via pip:

```bash
pip install langchain-graph-retriever
```

## Getting Started

Here is an example of how to use LangChain Graph Retriever:

```python
from langchain_graph_retriever import GraphRetriever
from langchain_core.vectorstores import Chroma

# Initialize the vector store (Chroma in this example)
vector_store = Chroma(embedding_function=your_embedding_function)

# Create the Graph Retriever
retriever = GraphRetriever(
    store=vector_store,
    # Define edges based on document metadata
    edges=[("keywords", "keywords")],
)

# Perform a retrieval
documents = retriever.retrieve("What is the capital of France?")

# Print the results
for doc in documents:
    print(doc.page_content)
```

## License

This project is licensed under the Apache 2 License. See the LICENSE file for more details.