semvec/pypi-packages huggingface dataset:
k3jobq 0.1.6
Concurrent job queue manager with multi-threading support
License: MIT
Requires Python: >=3.9
Keywords: jobq, queue, concurrent, threading, worker

# k3jobq

[![Build Status](https://github.com/pykit3/k3jobq/actions/workflows/python-package.yml/badge.svg)](https://github.com/pykit3/k3jobq/actions/workflows/python-package.yml)
[![Documentation Status](https://readthedocs.org/projects/k3jobq/badge/?version=stable)](https://k3jobq.readthedocs.io/en/stable/?badge=stable)
[![Package](https://img.shields.io/pypi/pyversions/k3jobq)](https://pypi.org/project/k3jobq)

k3jobq processes a series of inputs with functions concurrently

k3jobq is a component of [pykit3] project: a python3 toolkit set.


k3jobq is a manager to create cuncurrent tasks.
It processes a series of inputs with functions concurrently and
return once all threads are done::

    def add1(args):
        return args + 1

    def printarg(args):
        print(args)

    k3jobq.run([0, 1, 2], [add1, printarg])
    # > 1
    # > 2
    # > 3



# Install

```
pip install k3jobq
```

# Synopsis

```python

#!/usr/bin/env python

import k3jobq

if __name__ == "__main__":

    def add1(args):
        return args + 1

    def multi2(args):
        return args * 2

    def printarg(args):
        print(args)

    k3jobq.run([0, 1, 2], [add1, printarg])
    # > 1
    # > 2
    # > 3

    k3jobq.run((0, 1, 2), [add1, multi2, printarg])
    # > 2
    # > 4
    # > 6

    # Specify number of threads for each job:

    # Job 'multi2' uses 1 thread.
    # This is the same as the above example.
    k3jobq.run(list(range(3)), [add1, (multi2, 1), printarg])
    # > 2
    # > 4
    # > 6

    # Create 2 threads for job 'multi2':

    # As there are 2 thread dealing with multi2, output order will not be kept.
    k3jobq.run(list(range(3)), [add1, (multi2, 2), printarg])
    # Output could be:
    # > 4
    # > 2
    # > 6

    # Multiple threads with order kept:

    # keep_order=True to force to keep order even with concurrently running.
    k3jobq.run(list(range(3)), [add1, (multi2, 2), printarg],
               keep_order=True)
    # > 2
    # > 4
    # > 6

    # timeout=0.5 specifies that it runs at most 0.5 second.
    k3jobq.run(list(range(3)), [add1, (multi2, 2), printarg],
               timeout=0.5)

    # Returning *k3jobq.EmptyRst* stops delivering result to next job:

    def drop_even_number(i):
        if i % 2 == 0:
            return k3jobq.EmptyRst
        else:
            return i

    k3jobq.run(list(range(10)), [drop_even_number, printarg])
    # > 1
    # > 3
    # > 5
    # > 7
    # > 9

```

#   Author

Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>

#   Copyright and License

The MIT License (MIT)

Copyright (c) 2015 Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>


[pykit3]: https://github.com/pykit3
k3log 0.1.8
A collection of log utilities for Python logging
License: MIT
Requires Python: >=3.9
Keywords: logging, log, handler, formatter, utilities

# k3log

[![Build Status](https://github.com/pykit3/k3log/actions/workflows/python-package.yml/badge.svg)](https://github.com/pykit3/k3log/actions/workflows/python-package.yml)
[![Documentation Status](https://readthedocs.org/projects/k3log/badge/?version=stable)](https://k3log.readthedocs.io/en/stable/?badge=stable)
[![Package](https://img.shields.io/pypi/pyversions/k3log)](https://pypi.org/project/k3log)

k3log is a collection of log utilities.

k3log is a component of [pykit3] project: a python3 toolkit set.


k3log is a collection of log utilities for logging.



# Install

```
pip install k3log
```

# Synopsis

```python

# make a file logger in one line
logger = pk3logutil.make_logger('/tmp', level='INFO', fmt='%(message)s',
                                datefmt="%H:%M:%S")
logger.info('foo')

logger.stack_str(fmt="{fn}:{ln} in {func}\n  {statement}", sep="\n")
# runpy.py:174 in _run_module_as_main
#   "__main__", fname, loader, pkg_name)
# runpy.py:72 in _run_code
#   exec code in run_globals
# ...
# test_logutil.py:82 in test_deprecate
#   pk3logutil.deprecate()
#   'foo', fmt='{fn}:{ln} in {func}\n  {statement}', sep='\n')

```

#   Author

Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>

#   Copyright and License

The MIT License (MIT)

Copyright (c) 2015 Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>


[pykit3]: https://github.com/pykit3
k3httpmultipart 0.1.4
HTTP multipart form data encoder
License: MIT
Requires Python: >=3.9
Keywords: http, multipart, form-data, upload

# k3httpmultipart

[![Action-CI](https://github.com/pykit3/k3httpmultipart/actions/workflows/python-package.yml/badge.svg)](https://github.com/pykit3/k3httpmultipart/actions/workflows/python-package.yml)
[![Documentation Status](https://readthedocs.org/projects/k3httpmultipart/badge/?version=stable)](https://k3httpmultipart.readthedocs.io/en/stable/?badge=stable)
[![Package](https://img.shields.io/pypi/pyversions/k3httpmultipart)](https://pypi.org/project/k3httpmultipart)

This module provides some util methods to get multipart headers and body.

k3httpmultipart is a component of [pykit3] project: a python3 toolkit set.


#   Name

k3httpmultipart

#   Status

The library is considered production ready.




# Install

```
pip install k3httpmultipart
```

# Synopsis

```python

import os

import k3httpmultipart
import k3fs

# http request headers
headers = {'Content-Length': 1200}

# http request fields
file_path = '/tmp/abc.txt'
k3fs.fwrite(file_path, '123456789')
fields = [
    {
        'name': 'aaa',
        'value': 'abcde',
    },
    {
        'name': 'bbb',
        'value': [open(file_path), os.path.getsize(file_path), 'abc.txt']
    },
]

# get http request headers
multipart = k3httpmultipart.Multipart()
res_headers = multipart.make_headers(fields, headers=headers)

print(res_headers)

#output:
#{
#    'Content-Type': 'multipart/form-data; boundary=FormBoundaryrGKCBY7',
#    'Conetnt-Length': 1200,
#}

# get http request body reader
multipart = k3httpmultipart.Multipart()
body_reader = multipart.make_body_reader(fields)
data = []

for body in body_reader:
    data.append(body)

print(''.join(data))

#output:
#--FormBoundaryrGKCBY7
#Content-Disposition: form-data; name=aaa
#
#abcde
#--FormBoundaryrGKCBY7
#Content-Disposition: form-data; name=bbb; filename=abc.txt
#Content-Type: text/plain
#
#123456789
#--FormBoundaryrGKCBY7--

```

#   Author

Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>

#   Copyright and License

The MIT License (MIT)

Copyright (c) 2015 Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>


[pykit3]: https://github.com/pykit3
k3heap 0.1.10
Binary min heap implemented with reference
License: MIT
Requires Python: >=3.9
Keywords: python, heap, binary-heap, data-structure

# k3heap

[![Action-CI](https://github.com/pykit3/k3heap/actions/workflows/python-package.yml/badge.svg)](https://github.com/pykit3/k3heap/actions/workflows/python-package.yml)
[![Documentation Status](https://readthedocs.org/projects/k3heap/badge/?version=stable)](https://k3heap.readthedocs.io/en/stable/?badge=stable)
[![Package](https://img.shields.io/pypi/pyversions/k3heap)](https://pypi.org/project/k3heap)

k3heap is a binary min heap implemented with reference

k3heap is a component of [pykit3] project: a python3 toolkit set.


In this module RefHeap is a binary min heap implemented with reference: a parent has two references to two children and a child has a parent reference to its parent.

RefHeap is not thread safe::

    import k3heap

    h = k3heap.RefHeap()

    x = []
    h.push(x)
    h.push(x)  # ValueError
    h.push([]) # OK



# Install

```
pip install k3heap
```

# Synopsis

```python

import k3heap

h = k3heap.RefHeap([5, 1, 4, 2, 3])

while h.size > 0:
    print(h.pop())

```

#   Author

Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>

#   Copyright and License

The MIT License (MIT)

Copyright (c) 2015 Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>


[pykit3]: https://github.com/pykit3
k3fs 0.1.10
File-system utilities for reading, writing, and directory operations
License: MIT
Requires Python: >=3.9
Keywords: fs, file, directory, filesystem

# k3fs

[![Build Status](https://github.com/pykit3/k3fs/actions/workflows/python-package.yml/badge.svg)](https://github.com/pykit3/k3fs/actions/workflows/python-package.yml)
[![Documentation Status](https://readthedocs.org/projects/k3fs/badge/?version=stable)](https://k3fs.readthedocs.io/en/stable/?badge=stable)
[![Package](https://img.shields.io/pypi/pyversions/k3fs)](https://pypi.org/project/k3fs)

File-system Utilities

k3fs is a component of [pykit3] project: a python3 toolkit set.


# Install

```
pip install k3fs
```

# Synopsis

```python
>>> fwrite('/tmp/foo', "content")

>>> fread('/tmp/foo')
'content'
>>> 'foo' in ls_files('/tmp/')
True
```

#   Author

Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>

#   Copyright and License

The MIT License (MIT)

Copyright (c) 2015 Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>


[pykit3]: https://github.com/pykit3
k3fmt 0.1.4
Several string operation functions for formatting and manipulation
License: MIT
Requires Python: >=3.9
Keywords: python, string, format, text

# k3fmt

[![Action-CI](https://github.com/pykit3/k3fmt/actions/workflows/python-package.yml/badge.svg)](https://github.com/pykit3/k3fmt/actions/workflows/python-package.yml)
[![Documentation Status](https://readthedocs.org/projects/k3fmt/badge/?version=stable)](https://k3fmt.readthedocs.io/en/stable/?badge=stable)
[![Package](https://img.shields.io/pypi/pyversions/k3fmt)](https://pypi.org/project/k3fmt)

It provides with several string operation functions.

k3fmt is a component of [pykit3] project: a python3 toolkit set.


#   Name

k3fmt

It provides with several string operation functions.

#   Status

This library is considered production ready.




# Install

```
pip install k3fmt
```

# Synopsis

```python

import k3fmt

lines = [
    'hello',
    'world',
]

# add left padding to each line in a string
k3fmt.line_pad('\n'.join(lines), ' ' * 4)
# "    hello"
# "    world"


# format a multi-row line
items = ['name:',
         ['John',
          'j is my nick'
          ],

         'age:',
         26,

         'experience:',
         ['2000 THU',
          '2006 sina',
          '2010 other'
          ],
         ]

k3fmt.format_line(items, sep=' | ', aligns='llllll')
# outputs:
#    name: | John         | age: | 26 | experience: | 2000 THU
#          | j is my nick |      |    |             | 2006 sina
#          |              |      |    |             | 2010 other

```

#   Author

Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>

#   Copyright and License

The MIT License (MIT)

Copyright (c) 2015 Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>


[pykit3]: https://github.com/pykit3
pathgenerator 0.1.2
Human-like mouse path generation using PD control
License: MIT
Requires Python: >=3.8

# Path Generator
![Tests](tests/tests-badge.svg) ![Coverage](tests/coverage-badge.svg)

A Python library for generating human-like mouse paths using PD (Proportional-Derivative) control.

![](path_viewer.gif)

## Installation

### Core Library
Install the core library (only requires numpy):
```bash
pip install pathgenerator
```

### With Windows Emulator
Install with `pywin32` for high-performance cursor emulation (Windows only):
```bash
pip install pathgenerator[windows]
```

### With Server
Install with the optional FastAPI server:
```bash
pip install pathgenerator[server]
```

## Usage

### Human Motion Parameters
- `mouse_velocity`: Base movement velocity (unitless, 0.1-1.0).
- `kp_start` / `kp_end`: Correction strength at start vs. end.
- `stabilization`: Damping factor to smooth out jitters (0.0-1.0).
- `noise`: Amount of random hand tremor (0.0-10.0+).
- `overshoot_prob`: Probability of overshooting the target and correcting (0.0-1.0).
- `arc_strength`: Tendency to move in a curved arc (0.0-0.5).
- `keep_prob_start` / `keep_prob_end`: Point density (drop probability) at start/end.
- `offset_x` / `offset_y`: Global offset added to all points.

### Generating Paths
```python
from pathgenerator import PDPathGenerator

gen = PDPathGenerator()
path, progress, steps, params = gen.generate_path(
    start_x=100.0, start_y=100.0,
    end_x=1800.0, end_y=900.0,
    mouse_velocity=0.65,
    noise=2.6,
    offset_x=0, offset_y=0  # Optional viewport offset
)
```



### Tuning Workflow (Server + JSON)

The easiest way to find realistic parameters is to use the interactive playground.
*(Requires: `pip install pathgenerator[server]`)*

1.  **Launch the server**:
    ```bash
    python -m pathgenerator.server
    ```
2.  **Tune settings** at `http://127.0.0.1:8001`.
3.  **Download JSON**: Click "Export Preset" to save your settings as `human_relaxed.json`.
4.  **Load in Python**:
    ```python
    # Initialize generator with your custom preset
    gen = PDPathGenerator("human_relaxed.json")
    
    # All generated paths will now use those settings by default
    path, *_ = gen.generate_path(100, 100, 500, 500)
    ```

### Executing Paths (Windows Only)
The `PathEmulator` class includes a helper `get_position()` to simplify generating paths from your current mouse location.

```python
from pathgenerator import PDPathGenerator, PathEmulator

# Requires: pip install pathgenerator[windows]
emulator = PathEmulator()
gen = PDPathGenerator()

# 1. Get current mouse position
start_x, start_y = emulator.get_position()

# 2. Generate path to target (e.g., 500, 500)
# calculate offset if you are targeting a window relative to screen 0,0
path, *_ = gen.generate_path(start_x, start_y, 500, 500)

# 3. Move the mouse (optional delay to control playback speed)
emulator.execute_path(path, delay_between_points=0.001)
```