semvec/pypi-packages huggingface dataset:
edugrid 0.0.2
A Gymnasium grid environment for educational purposes
Requires Python: >=3.10

[![pypi](https://img.shields.io/pypi/v/edugrid)](https://pypi.org/project/edugrid)
[![license](https://img.shields.io/github/license/philsteg/edugrid)](https://github.com/philsteg/edugrid)
[![tests](https://github.com/philsteg/edugrid/actions/workflows/python-app.yml/badge.svg)](https://github.com/philsteg/edugrid/actions/workflows/python-app.yml)

# EduGrid

> [!NOTE]
> EduGrid is intended for educational purposes and is hence not optimized for speed. If you don't need so much flexibility, have a look at the Gymmasium environments ["Minigrid"](https://minigrid.farama.org/index.html) and ["Frozen Lake"](https://gymnasium.farama.org/environments/toy_text/frozen_lake/).

EduGrid is a Gymnasium grid environment with focus on flexibility for educational purposes. The agent moves in a grid of cells and tries to reach target cells. Furthermore, dynamic programming algorithms are implemented and can iteratively be inspected.

## Features
- The following environment properties can be inspected and modified:
    - `transition_matrix` with shape `(rows, columns, actions, rows, columns)` specifying the probabilities for all "state-action-next_state" transitions
    - `reward_matrix` with shape `(rows, columns, actions, rows, columns)` specifying the rewards for all "state-action-next_state" transitions
    - `terminal_matrix` with shape `(rows, columns)` specifying whether states are terminal.
- Custom cells can be defined by implementing the abstract class `Cell` and overriding callbacks such as `on_left`, `on_entered`, `on_step`, `is_blocking`, and `render`.
- The dynamic programming algorithms "policy evaluation", "policy iteration" and "value iteration" are implemented in `edugrid.algorithms`. They can iteratively be executed and inspected.

## Installation
`pip install edugrid`

## Examples

### Environment creation and modification:

```python
import edugrid
import gymnasium as gym

env = gym.make(
        "philsteg/EduGrid-v0",
        size=(3, 3),
        agent_location=(0, 0),
        wall_locations=[(2, slice(None))],
        sink_locations=[(0, 1), (1, 0)],
        target_locations=[(0, 2)],
        slip_prob=0.5,
    )

# Modify the reward matrix
env.unwrapped.reward_matrix[:, :, :, 0, 0] = 5
```

### Algorithm: Value Iteration

```python
import edugrid
from edugrid.algorithms.dynamic_programming import ValueIteration
import gymnasium as gym

env = gym.make("philsteg/EduGrid-v0")

value_iteration = ValueIteration(env, mode="state", gamma=1.0)

for i, values in enumerate(value_iteration.iter()):
    # Inspect the values in each iteration
    ...

policy = value_iteration.get_policy(values, type="stochastic")
```

See the more sophisticated examples in `examples`.
origenomi 0.1.3
Trim circular overlaps, find dnaA/oriC, rotate sequences, and report.
Requires Python: >=3.9

# Origami

Command-line tool that:
- Trims duplicated terminal overlaps in circular assemblies (half2 → DB(half1) via BLAST).
- Runs **one BLAST per DB** (dnaA and oriC) on the concatenated FASTA.
- Keeps **top 3 dnaA** and **top 7 oriC** per record (dedup by `sseqid`, ordered by evalue→identity→coverage→bitscore).
- Pairs dnaA–oriC via midpoint proximity (1% then 5% of record length, else closest), computes AT/GC on the oriC segment, and chooses the pair with **highest AT/GC ratio** (tie → higher AT%).
- Rotates so the **earlier** of dnaA/oriC starts the sequence (or the single site if only one found).
- Writes exactly two outputs: `origami_<prefix>.fna` and `origami_<prefix>_report.txt`.

## Install
```bash
pip install -e .
```

## Usage

### Full pipeline
```bash
origami run -i genome.fna --dnaA-db /path/new_dnaA_DB --oric-db /path/DoriC_DB
```

### Trim only
```bash
origami trim -i genome.fna
```

### OriC only (no trim)
```bash
origami oric -i genome.fna --dnaA-db /path/new_dnaA_DB --oric-db /path/DoriC_DB
```

## Outputs
1. origami_<prefix>.fna
2. origami_<prefix>_report.txt
3. Temps in ./temp/<prefix>/, cleaned unless --keep-temp.
capx 1.0.1
reCAPTCHA v2 Image Solver using YOLO and Selenium
Requires Python: >=3.8

# reCAPTCHA v2 Image Solver

reCAPTCHA v2 Image Solver using YOLO and Selenium.

https://github.com/user-attachments/assets/22308be7-3a90-4757-8799-b47008b32bf0

## How it works
- Spots objects (cars, buses, crosswalks, etc.) in the images
- Clicks the right tiles for you
- Works with 3x3, 4x4, static, and dynamic challenges

### 1. virtual environment (optional but recommended)
```bash
python -m venv venv
# Linux/macOS
source venv/bin/activate
# Windows
venv\Scripts\activate
```

### 2. Install
```bash
pip install capx
```

### 3. Quick example
```python
from selenium import webdriver
from selenium.webdriver.firefox.service import Service
from webdriver_manager.firefox import GeckoDriverManager
from capx.solver import RecaptchaSolver

driver = webdriver.Firefox(service=Service(GeckoDriverManager().install()))
driver.get("https://www.google.com/recaptcha/api2/demo")

solver = RecaptchaSolver(driver)
solver.solve()  # Done!

print("reCAPTCHA solved!")
input("Press Enter to quit...")
driver.quit()
```

Have fun! 🚀
MainShortcuts2 2.6.5
Сокращение и улучшение функций + консольные утилиты
Requires Python: <4.0,>=3.6

# MainShortcuts2
## Описание
Сокращение и улучшение функций
## Установка
Для установки через `pip` используйте
```bash
python3 -m pip install -U MainShortcuts2
```
## Использование
Импорт модуля
```python
from MainShortcuts2 import ms
```
Встроенная информация о модуле
```python
ms.version -> str # Версия модуля
```
-# README в разработке, это оказалось сложнее, чем писать сам модуль
kaizo 1.5.5
declarative YAML-based configuration parser
Requires Python: >=3.10

# Kaizo

Kaizo is a **declarative YAML-based configuration parser** for Python.
It allows you to dynamically load, resolve, and execute Python objects, functions, and plugins from YAML configuration files.

Key features:

- Cross-file imports
- Lazy execution
- Result caching
- Plugin dispatch
- Variable references
- Local Python module support

---

## Installation

Install Kaizo via pip:

```bash
pip install kaizo
```

Or install from source:

```bash
git clone https://github.com/NaughtFound/kaizo.git
cd kaizo
pip install -e .
```

Requirements:

- Python 3.10+
- PyYAML

---

## Quick Start

Create a simple configuration file `hello.yaml`:

```yaml
hello:
  module: builtins
  source: print
  args:
    - "Hello Kaizo"
```

Load and execute it:

```python
from kaizo import ConfigParser

parser = ConfigParser("hello.yaml")
config = parser.parse()

# Accessing the entry automatically resolves and executes it
config["hello"]  # Outputs: Hello Kaizo
```

---

## Documentation

Full documentation, including configuration, parser architecture, plugins, and utilities, is available in the docs:

[Kaizo Documentation](https://naughtfound.github.io/kaizo/)

---

## Contributing

Contributions are welcome! Please submit issues or pull requests via GitHub.

---

## License

[Apache License](LICENSE)
capx-client 1.0.1
capx client for solving reCAPTCHA challenges.
Requires Python: >=3.8

# capx-client

capx client for solving reCAPTCHA using Selenium and capx server. 

## Installation

Install via pip:

```
pip install capx-client
```

## Usage

Here's an example of how to use it:

```python
from selenium import webdriver
from selenium.webdriver.firefox.service import Service
from webdriver_manager.firefox import GeckoDriverManager
from capx_client.solver import RecaptchaSolver

driver = webdriver.Firefox(service=Service(GeckoDriverManager().install()))
driver.get("https://www.google.com/recaptcha/api2/demo")

solver = RecaptchaSolver(driver)
solver.solve()  # Done!

print("reCAPTCHA solved!")
input("Press Enter to quit...")
driver.quit()
```

## Details

- Uses Selenium for browser interaction.
- Relies on a local API (localhost:8000) for image detection.
rtopy 0.2.0
Lightweight bridge for calling R functions from Python
Requires Python: >=3.7
Keywords: r, python, bridge, statistics, data-science

# rtopy

Lightweight Python bridge for calling R functions with seamless type conversion.

## Features

- **Simple API**: Call R functions with native Python types
- **Auto type conversion**: Supports int, float, str, bool, list, dict, numpy, pandas
- **Minimal dependencies**: Only requires R + jsonlite package
- **Library support**: Use any R package in your functions
- **Fast**: Direct subprocess execution, no rpy2 overhead

## Installation

```bash
# Install package
pip install rtopy

# Install with optional numpy/pandas support
pip install rtopy[full]

# Requires R to be installed and in PATH
# Install R from: https://cran.r-project.org/
# Install jsonlite in R: install.packages("jsonlite")
```

## Quick Start

```python
from rtopy import RBridge, call_r

# One-off function call
result = call_r(
    r_code="add <- function(x, y) x + y",
    r_func="add",
    x=5, 
    y=3
)
print(result)  # 8.0

# Reusable bridge
rb = RBridge()

# Statistical analysis
code = '''
library(stats)
analyze <- function(data) {
    list(
        mean = mean(data),
        median = median(data),
        sd = sd(data)
    )
}
'''
stats = rb.call(code, "analyze", return_type="dict", data=[1,2,3,4,5])
print(stats)  # {'mean': 3.0, 'median': 3.0, 'sd': 1.58...}

# Return as pandas DataFrame
code = '''
make_data <- function(n) {
    data.frame(
        x = 1:n,
        y = rnorm(n),
        group = sample(c("A", "B"), n, replace=TRUE)
    )
}
'''
df = rb.call(code, "make_data", return_type="pandas", n=100)
```

## Return Types

- `"auto"`: Automatically infer best type (default)
- `"int"`, `"float"`, `"str"`, `"bool"`: Python scalars
- `"list"`, `"dict"`: Python collections
- `"numpy"`: NumPy array (requires numpy)
- `"pandas"`: pandas DataFrame/Series (requires pandas)
- `"raw"`: Raw JSON-parsed output

## Advanced Usage

```python
# Custom timeout and verbose mode
rb = RBridge(timeout=60, verbose=True)

# Use any R package
code = '''
library(dplyr)
library(ggplot2)

process_data <- function(values) {
    df <- data.frame(x = values)
    df %>%
        mutate(squared = x^2) %>%
        summarise(mean_x = mean(x), mean_squared = mean(squared))
}
'''
result = rb.call(code, "process_data", data=[1, 2, 3, 4, 5])

# Pass NumPy arrays and pandas DataFrames
import numpy as np
import pandas as pd

arr = np.array([1, 2, 3, 4, 5])
result = rb.call(code, "my_func", data=arr)

df = pd.DataFrame({'x': [1, 2, 3], 'y': [4, 5, 6]})
result = rb.call(code, "another_func", df=df)
```

## Requirements

- Python >= 3.7
- R >= 3.6
- R package: jsonlite

Optional:
- numpy >= 1.19 (for numpy return type)
- pandas >= 1.1 (for pandas return type)

## License

BSD License Clause Clear
capx-core 1.0.1
Core AI engine for solving reCAPTCHA image challenges
Requires Python: >=3.8

# capx-core

Core AI engine for solving reCAPTCHA v2 image challenges.

## Install

```bash
pip install capx-core
````

## Quick example

```python
from capx_core.detector import detect_cells
import numpy as np

# image as numpy array (H, W, 3)
image = np.zeros((300, 300, 3), dtype=np.uint8)

cells = detect_cells(
    image=image,
    grid="3x3",        # "3x3" or "4x4"
    target_text="cars"
)

print(cells)  # e.g. [1, 3, 7]
```
kubedownscaler 0.4.2
Scale down and restore Kubernetes deployments and statefulsets
Requires Python: <4.0,>=3.10

# kubedownscaler

Scales down Kubernetes Deployments and StatefulSets to 0 replicas, keeps note of the number
of replicas in annotations, and scales everything back up to the original number of replicas.

Can operate on a single namespace, or the entire cluster.
Can operate only on Deployments and StatefulSets that use a specific StorageClass

Ideal for performing a controlled shutdown, maintenance, etc.

Uses whatever context your local `kubectl` has.

## Install

```sh
pip install kubedownscaler
```

## Use

Either `-d|--down` or `-u|--up` must be specified.

```
usage: kubectl downscale [-h] (-d | -u) [--dry-run] [-n NAMESPACE] [--deployments | --no-deployments]
               [--statefulsets | --no-statefulsets] [--storageclass STORAGECLASS]

options:
  -h, --help            show this help message and exit
  -d, --down            scale down cluster resources
  -u, --up              scale up to restore state
  --dry-run             don't actually scale anything
  -n NAMESPACE, --namespace NAMESPACE
                        namespace to operate on
  --deployments, --no-deployments
                        scale Deployments (default: True)
  --statefulsets, --no-statefulsets
                        scale StatefulSets (default: True)
  --storageclass STORAGECLASS
                        only scale Deployments and StatefulSets that are consuming a specific StorageClass
```

## Build

```sh
poetry install
poetry build
poetry publish
```
s3-url-helper 0.4.3
S3Url is a helper class that can help with simple operations on AWS S3 objects
Requires Python: >=3.7

[![Coverage Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/n-orlov/f26292d8b498fa22b87e6425ddc7d235/raw/9624db6266b021187ae76483eb2aa7d9f5ed5a75/s3_url_helper_coverage_badge__master.json)](https://gist.github.com/n-orlov/f26292d8b498fa22b87e6425ddc7d235#file-code-coverage-results-md)

## Overview
S3Url is a helper class that can help with simple operations on AWS S3 objects.<br>
### Installation
Get from https://pypi.org/project/s3-url-helper/
<br> e.g `pip install s3-url-helper`<br>
### Usage
    from s3_url import S3Url

    file_url = S3Url(f's3://test-bucket/prefix/file.json')

    # url component properties
    assert file_url.bucket == 'test-bucket'
    assert file_url.key == 'prefix/file.json'

    # factory methods
    file_url = S3Url.from_url('s3://test-bucket/prefix/file.json')
    file_url = S3Url.from_bucket_key(bucket='test-bucket', key='prefix/file.json')

    # access underlying boto3 s3 resource object
    boto3_obj = file_url.object

    # return url string
    url_str: str = file_url.url
    url_str: str = str(file_url)
    assert url_str == 's3://test-bucket/prefix/file.json'

    # check if file exists
    exists: bool = file_url.exists()
    assert exists

    # check if any files exist in prefix (url should end with /)
    prefix_exists = S3Url('s3://test-bucket/prefix/').prefix_exists()
    assert prefix_exists

    # read text/json
    file_content: str = file_url.read_text()
    file_content_json: json = file_url.read_json()

    # delete file
    file_url.delete()
    assert not file_url.exists()

    # write text/json
    file_url.write_text("test data")
    file_url.write_json({"testEntry": "test data"})
    assert file_url.exists()

    # copy to another object
    file_url.copy_to('s3://test-bucket/prefix/file-copy.json')
    S3Url('s3://test-bucket/prefix/another-file-copy.json').copy_from(file_url)

    # delete all filed in prefix
    prefix_url = S3Url('s3://test-bucket/prefix/')
    prefix_url.delete_dir()

    assert not prefix_url.prefix_exists()
    assert not file_url.exists()

    # see tests for more examples

## Development notes
Install dev dependencies: 
    pip install '.[dev]'
    pip install '.[build]'

build/upload:

    py -m build
    py -m twine upload --repository pypi dist/*  

todo - write docstrings
gw-limr 0.2.4
Add your description here
Requires Python: >=3.10

# limr

This is the Late-Inspiral Merger Ringdown (LIMR) model. It is a non-parametric non-spinning higher multipole model for the gravitational waves emitted from merging black holes.

## Installation

TODO

## Documentation

TODO

code that fit the models lives [here](https://gitlab.com/SpaceTimeKhantinuum/ml/-/tree/master/waveforms/p(h)enom-non-spinning/dev-examples/merger_only/nr-catalogue/initial_modelling/model-using-calibration-set)

## Development

### Publish

`uv` commands like `build`, `build --clear`, `version X.Y.Z`

and publish to pypi with

```bash
$ uv publish --username __token__
```


### Run an example

```bash
uv run --with gw-limr --no-project -- python examples/limr_example.py
```