semvec/pypi-packages huggingface dataset:
pyVMO 0.0.7
A test python toolkit for variant site analysis
Requires Python: >=3.5

# pyVMO
pyVMO (python Variant Memmap Object), a Python toolkit to help you work with huge variant matrices.


## Installation
```
pip install pyvmo
```

## Usage

### From GWAS

1. Compress and index your raw vcf files
```
bgzip your_raw.vcf
tabix -p vcf your_raw.vcf.gz
```

2. Convert the vcf file to vmo, which is a numpy based memmap file (memory map) that will help you read oversized matrices to get the job done in limited memory

shell
```
PyVMO converter -vcf2vmo your_raw.vcf.gz test.vmo
```

python
```
from pyvmo import VMO

vmo_path = "give_me_your_vmo_path"
raw_vcf_file = "your_raw.vcf.gz"

vmo = VMO(vmo_path)
vmo.store_vcf_to_vmo(raw_vcf_file)
```

3. Extraction of useful submatrices by sample listing, variant site quality control

shell
```
PyVMO extractor sample.id.list test.vmo filter.vmo
```

python
```
# extract by sample list
spl_idx_list = vmo.get_samples_index(sample_id_list)
spl_vmo_path = "give_me_your_sample_list_filtered_vmo_path"
spl_vmo = vmo.extract_sub_vmo(spl_vmo_path, spl_idx_list=spl_idx_list)

# extract by variant site quality control
var_idx_list = spl_vmo.site_filter(maf_thr=0.05, mis_thr=0.5, chunk_size=1000, n_jobs=20)
var_vmo_path = "give_me_your_variant_site_filtered_vmo_path"
var_vmo = spl_vmo.extract_sub_vmo(var_vmo_path, var_idx_list=var_idx_list)
```

4. Convert the vmo file into bimbam format

shell
```
PyVMO converter -vmo2bimbam filter.vmo filter.bimbam
```

python
```
bimbam_file = "give_me_your_bimbam_file_path"
var_vmo.to_bimbam(bimbam_file)
```

5. get genetic distance matrix

shell
```
PyVMO distance filter.vmo ibs.matrix
```

### From Other practices

1. Get numpy array from vmo
```
m = var_vmo.get_matrix()
```

2. Get the sample list
```
sample_list = var_vmo.get_sample_info()
```

3. Get the variant information in a pandas dataframe
```
from yxsql import pickle_load_obj, pickle_dump_obj

var_info_df = var_vmo.get_variant_info()

var_index = 1

chr_id = var_info_df.iloc[i]['CHROM']
pos = int(var_info_df.iloc[i]['POS'])
ref = var_info_df.iloc[i]['REF']
alt = pickle_load_obj(var_info_df.iloc[i]['ALT']) # alt is a list
qual = pickle_load_obj(var_info_df.iloc[i]['QUAL'])
filter = pickle_load_obj(var_info_df.iloc[i]['FILTER'])
info = pickle_load_obj(var_info_df.iloc[i]['INFO']) # info is a dict
```
image-processing-mf92286 0.0.1
Pacote criado para fins de estudo
Requires Python: >=3.0

# package_name

Description. 
The package image-processing is used to:
Image processing    
    Combination:
	- Find difference between two images
	- Transfer histogram to other image
    Transformation:
    - Resize image
Utils:
    IO:
    - Read image
    - Save image
    Plot:
    - Plot Image
    - Plot Result
    - Plot Histogram


## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install image-processing-mf 

```bash
pip install image-processing-mf 
```

## Usage

```python
from image_processing.processing import combination, transformation 
image_processing.my_function()
```

## Author
MÃ¡rcio Fernando

## License
[MIT](https://choosealicense.com/licenses/mit/)
image-processing-asdf-lkj-lkjsadf 0.0.1
Pacote criado para fins de estudo
Requires Python: >=3.0

# package_name

Description. 
The package image-processing is used to:
Image processing    
    Combination:
	- Find difference between two images
	- Transfer histogram to other image
    Transformation:
    - Resize image
Utils:
    IO:
    - Read image
    - Save image
    Plot:
    - Plot Image
    - Plot Result
    - Plot Histogram


## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install image-processing-mf 

```bash
pip install image-processing-mf 
```

## Usage

```python
from image_processing.processing import combination, transformation 
image_processing.my_function()
```

## Author
MÃ¡rcio Fernando

## License
[MIT](https://choosealicense.com/licenses/mit/)
sqlinjection 0.0.6
Sql injection detector
Requires Python: >=3.10

# SQL injection detector

This package proporcionates the capability of detecting sql injection in your json/dict data.
Regardles of how your data looks like and how nested is your dictionary, it will go through 
each step and provide a response

Usage:

import libs

```python 
from sqlinjection.sql_injection import SqlInjectionChecker
from sqlinjection.errors import SqlInjectionException
```

for validating a dictionary

```python 
try:
    SqlInjectionChecker().validate_json(data)
except SqlInjectionException as exc:
    # if an sql injection has been detected an exception will be raised
    print(exc)
```
instrumentcontrol 0.1.40
Python Instrument Control for Load tuner and PA testing integration
Requires Python: >=3.8

# Instrument Control Library #

Used to interact with RF instrument controls for lo tuning and PA testing through SCPI commands

### Version History ###

0.1.0 : Initial Build. 
0.1.1 : Remove Unneeded libraries 

## Additional Editing and Build instructions ##

You need to have the project packaged to be able to run it in a test mode. the commands are:

python3 -m pip install build
python3 -m build --wheel
pip3 install dist/focustuner-0.1.0-py3-none-any.whl

python -m pip install build
python -m build --wheel
pip install dist/focustuner-0.1.0-py3-none-any.whl

and using:

```
python3 -m unittest discover
python -m unittest discover
```

python -m unittest discover

to test the code

### Library Creation ###
This library was created using instructions form https://medium.com/analytics-vidhya/how-to-create-a-python-library-7d5aea80cc3f
Frankly it was started more than once so there is a high probability there are unnecessary components. It was a valiant effort though. 

try number 2
https://medium.com/@tushar_datascience/creating-a-python-library-a-step-by-step-guide-with-a-simple-example-c87b653b9a4e

You need to set up pypi API token. This is done by creating a API token on pypi and then creating a file in Users/[username]/ called .pypirc with the following:

[pypi]
  username = __token__
  password = [password from pypi]

  If you have done it correctly you will get these instructions (again) from pypi. 

Also you have to delete old dist files when uploading.

```
python -m build
twine upload dist/* --repository pypi --verbose
```

Ensure you update the version number and delete previous tar.gz and whl files for the previous version. This seems to do it.

### Start virtual environment ###

```
python -m venv venv
```

Activate for windows:

```
. venv\Scripts\activate
```

Activate for Mac:

```
. venv/bin/activate
```
format-logger 0.0.5
Description.
Requires Python: >=3.6

# Format-Logger

Format Logger allows you to have a nice looking log, with relevant information as function and time, and calculate the elapsed time during the functions, with a easy to use structure. 

## Install

```
pip install format-logger
```

## Example

```
from format_logger.logger import logger

def foo_function(log : logger) -> None:
    log = log.start_function("foo_function")

    log.INFO("Hello World!")
    time.sleep(1)

    log.end_function()

if __name__ == "__main__":

    log = logger("logger_example", "main")

    foo_function(log)

    log.end_function()
```
Output: 

logger_example | main | 2024-10-09 17:19:18.563839 | INFO | Starting function main at 2024-10-09 17:19:18.563839

logger_example | foo_function | 2024-10-09 17:19:18.563839 | INFO | Starting function foo_function at 2024-10-09 17:19:18.563839

logger_example | foo_function | 2024-10-09 17:19:18.563839 | INFO | Hello World!

logger_example | foo_function | 2024-10-09 17:19:19.564759 | INFO | Function foo_function ended - time 1.00092 Seconds

logger_example | main | 2024-10-09 17:19:19.564759 | INFO | Function main ended - time 1.00092 Seconds
labjack-pic 0.0.11
Program PIC microcontrollers using LabJack U3
Requires Python: >=3.6

# labjack_pic

Program PIC microcontrollers using LabJack U3

I have multiple PICkits 1, 2, and 3, but none of them can program the
part I selected for my latest project. Rather than shell out for yet
another PICkit, I wrote this script to program the part using a
[LabJack U3](https://labjack.com/products/u3) which I already had
lying around.

## Connections

Connect GND, MCLR, ICSPDAT, ICSPCLK to FIOs on the LabJack. Defaults are:

 - MCLR on FIO4
 - ICSPDAT on FIO5
 - ICSPCLK on FIO6

You can select different pins with the `--mclr`, `--icspdat`, and
`--icspclk` arguments.

If your circuit is OK with 5V power and doesn't draw too much current,
you can power it with VS (USB power).  Otherwise arrange some other
power supply. LabJack outputs are 3.3 V, so lower voltages are a bad
idea.

## Installation

`pip3 install labjack_pic`

## Usage

`labjack_pic [filename.hex]`
  
This programs the hex file:

 - If the hex file contains program code, it will bulk erase that area first
 - If the hex file contains config words, it will erase those first
 - If the hex file contains user id words, it will erase that area first
 - If the hex file contains EEPROM data, it will not erase that
   first. It will update any bytes specified.

## Devices supported

This script only supports low-voltage programming. This means MCLR is
not available as a general-purpose input in the circuit.  This also
means that this programmer cannot recover a part that has been
programmed to MCLR-as-input.

Currently supports devices covered by [Programming Specification 40002317](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/ProgrammingSpecifications/PIC16F180XX-Family-Programming-Specification-40002317.pdf), [Programming Specification 40002266](https://ww1.microchip.com/downloads/aemtest/MCU08/ProductDocuments/ProgrammingSpecifications/PIC16F171XX-Family-Programming-Specification-40002266.pdf), and [Programming Specification 40001683B](https://ww1.microchip.com/downloads/en/DeviceDoc/40001683B.pdf)

These are:

- PIC16F1703
- PIC16LF1703
- PIC16F1704
- PIC16LF1704
- PIC16F1705
- PIC16LF1705
- PIC16F1707
- PIC16LF1707
- PIC16F1708
- PIC16LF1708
- PIC16F1709
- PIC16LF1709
- PIC16F17114
- PIC16F17115
- PIC16F17124
- PIC16F17125
- PIC16F17126
- PIC16F17144
- PIC16F17145
- PIC16F17146
- PIC16F17154
- PIC16F17155
- PIC16F17156
- PIC16F17174
- PIC16F17175
- PIC16F17176
- PIC16F18013
- PIC16F18023
- PIC16F18014
- PIC16F18024
- PIC16F18044
- PIC16F18054
- PIC16F18074
- PIC16F18015
- PIC16F18025
- PIC16F18045
- PIC16F18055
- PIC16F18075
- PIC16F18026
- PIC16F18046
- PIC16F18056
- PIC16F18076

I would accept patches to support other PICs, but larger memory
devices are probably going to be obnoxiously slow to program with
LabJack hardware.

## Performance

The SPI clock of the U3 is relatively slow.  Writing takes maybe 2-3x
as long as a proper programmer that can do the full 5 MHz clock.
eyefocus 0.3.0
Stay focused!
Requires Python: >=3.12

# eyefocus

**Stay focused!**

Built with:

- uv for project management.
- PyTorch for model training.
- Modal for model infra.
- FastHTML for the frontend.
- Ruff for linting and formatting.

## Set Up

Set up the environment:

```bash
uv sync --all-extras --dev
uv run pre-commit install
```

Optionally, set up Modal:

```bash
modal setup
```

## Repository Structure

```bash
.
├── frontend            # landing page.
├── ft                  # classifier training.
├── src                 # pypi package.
```

## Development

### PyPI

Run locally:

```bash
uv run eyefocus -vv
```

Build the package:

```bash
uvx --from build pyproject-build --installer uv
```

Upload the package:

```bash
uvx twine upload dist/*
```

Test the uploaded package:

```bash
uv run --with eyefocus --no-project -- eyefocus -vv
```

### Frontend

Run the app:

```bash
modal serve frontend/app.py
```

Deploy on Modal:

```bash
modal deploy frontend/app.py
```

### Training

Optionally, manually collect screenshots:

```bash
uv run ft/collect.py
```

Run ETL on HF dataset (or collected screenshots if available):

```bash
uv run ft/etl.py
```

or

```bash
uv run modal run ft/etl.py
```

Train the model:

```bash
uv run torchrun --standalone --nproc_per_node=<n-gpus> ft/train.py
```

or

```bash
uv run modal run ft/train_modal.py
```
osrparse 7.0.1
Parser for osr files and lzma replay streams for osu!
Keywords: osu!, osr, replay, replays, parsing, parser, python

[![PyPi version](https://badge.fury.io/py/osrparse.svg)](https://pypi.org/project/osrparse/)

# osrparse, a python parser for osu! replays

This is a parser for the ``.osr`` format for osu! replay files, as described by [the wiki](https://osu.ppy.sh/wiki/en/Client/File_formats/Osr_%28file_format%29).

## Installation

To install, simply:

```sh
pip install osrparse
```

## Documentation

Please see the full documentation for a comprehensive guide: <https://kszlim.github.io/osu-replay-parser>. A quickstart follows below for the impatient, but you should read the full documentation if you are at all confused.

### Quickstart

```python
from osrparse import Replay, parse_replay_data
# parse from a path
replay = Replay.from_path("path/to/osr.osr")

# or from an opened file object
with open("path/to/osr.osr") as f:
    replay = Replay.from_file(f)

# or from a string
with open("path/to/osr.osr") as f:
    replay_string = f.read()
replay = Replay.from_string(replay_string)

# a replay has various attributes
r = replay
print(r.mode, r.game_version, r.beatmap_hash, r.username,
    r.replay_hash, r.count_300, r.count_100, r.count_50,
    r.count_geki, r.count_miss, r.score, r.max_combo, r.perfect,
    r.mods, r.life_bar_graph, r.timestamp, r.replay_data,
    r.replay_id, r.rng_seed)

# parse the replay data from api v1's /get_replay endpoint
lzma_string = retrieve_from_api()
replay_data = parse_replay_data(lzma_string)
# replay_data is a list of ReplayEvents

# write a replay back to a path
replay.write_path("path/to/osr.osr")

# or to an opened file object
with open("path/to/osr.osr") as f:
    replay.write_file(f)

# or to a string
packed = replay.pack()

# edited attributes are saved
replay.username = "fake username"
replay.write_path("path/to/new_osr.osr")
```
shades 2.0.1a0
A python module for generative 2D Image creation
Requires Python: >=3.9

# Shades 🕶️

The main branch for this is now for shades v2 which is still a work in progress (finding and fixing bugs).

There's a bunch of bug fixing and optimisation to come, but I've overhauled the API now to:
- use lazy evaluation to allow some efficiencies
- shift a lot of the computation over into numpy for efficiency
- improve the api with some nicer functional patterns around the canvas object