semvec/pypi-packages huggingface dataset:
autokeystroke-rb3 0.0.2
A python package for automatically processing and modeling keystroke log data
Requires Python: >=3.8

# AutoKeystroke

#### Start off by importing the necessary packages you will need to process your data.

```python
from autokeystroke.modeling.trainer import KeystrokeTrainer
from autokeystroke.utils.config import KeystrokeConfig
```

#### Make sure you have your data formatted in a csv file with columns id, event_id, and down_time

```python
data_pth = "your_data_path.csv"
```

#### Instantiate a KeystrokeConfig and KeystrokeTrainer and adjust the parameters of the config according to your preferences and specifications

```python
config = KeystrokeConfig()
trainer = KeystrokeTrainer(data_pth, config)
```

#### Call the run method of the trainer instance and you will be able to find the trained models and results saved in the output directory

```python
trainer.run()
```
checkers-imp-adv-code-proj 0.1.0
Checkers implementation in python based on the international draughts

# Checkers Implementation in Python 
> Built within the pygame framework as a university project

## Table of Contents
- Introduction
- Features
- Installation
- Usage
- Contact Info
- Dependancies

## Introduction
This project is comprised of 5 modules within the mypackage directory each responsible for handling thier respective features for the game, This project took around 20 - 25 hours to complete including research and experimentation with the pygame framework. This is my first time creating a project of this scale using pygame.

## Features
- Graphical User Interface
- Multiplayer Mode: Play 1v1 with a second player
- Save and Load Games: Your previous game is auto-saved upon quitting 
- Checker Rule Implementation: Game rules are based on international checkers guidelines


## Installation
To install the application:

Clone repository
```bash
git clone "https://github.com/ScreedVA/Checkers-implementation-pygame.git"
```

Move into repository directory
```bash
cd Checkers-implementation-pygame
```

Create virtual environment
```bash
python -m venv .venv
```

Activate virtual environment
```bash
.venv\Scripts\activate
```

Install pip (if nessasary) 
```bash
python -m pip install --upgrade pip
```

Install project dependancies
```bash
pip install -r requirements.txt
```

## Usage

Run application and configure game settings
```bash
python main.py
```

## Contact Info
[LinkedIn Profile](https://www.linkedin.com/in/christian-damete-yeboa-bb79442a3/)


## Dependancies
- Pygame Framework handles graphical user interface functionality
- Pillow Library is used for image manupluation and cropping
- Json libary handles python dictionary to json serialization
marsa 1.0.0
A Python library that lets you experiment with the mathematics of the Rivest–Shamir–Adleman (RSA) cryptosystem.
Requires Python: >=3.6

**MARSA** is a Python library that lets you experiment with the mathematics of the Rivest–Shamir–Adleman (RSA) cryptosystem.


![Badge](https://img.shields.io/github/license/jpvitan/marsa)
![Badge](https://img.shields.io/badge/code%20style-black-000000.svg)


## 📋 Quick Guide


### Installation


You can install **MARSA** using pip. Simply run the following command in your terminal or command prompt:


```
pip install marsa
```


### Key Generation


To generate a key pair, import the `rsa` module from the `marsa` package and create an instance of the `KeyPair` class:


```python
from marsa import rsa

key_pair = rsa.KeyPair()
```


### Encryption


To encrypt, create an instance of the `Encryptor` class with the public key from your `KeyPair` object and use the `encrypt()` method:


```python
encryptor = rsa.Encryptor(key_pair.public_key)
secret_message = encryptor.encrypt(message)
```


If you don't have access to the `KeyPair` object, you can manually create a key by using the `Key` class:


```python
public_key = rsa.Key(product, exponent)
```


### Decryption


Decryption works similar to encryption. If you need to decrypt, create an instance of the `Decryptor` class with the private key from your `KeyPair` object and use the `decrypt()` method:


```python
decryptor = rsa.Decryptor(key_pair.private_key)
message = decryptor.decrypt(secret_message)
```


## 🛠️ Software


### Developer


Built by [Justine Paul Vitan](https://jpvitan.com) as a solo project to demonstrate his knowledge in cryptography and number theory. The source code of this project is open and available to the public via GitHub for transparency and open-source collaboration.


### License


This project is under the [MIT license](https://github.com/jpvitan/marsa/blob/master/LICENSE). Please read the terms and conditions stated within the license before attempting any modification or distribution of the software.


## ⚠️️ Warning


### Production Use


**MARSA** is intended solely for educational purposes to illustrate the fundamental concepts of RSA encryption and decryption. It is not suitable for use in production environments where security is paramount. Please be aware that this implementation lacks essential security features, such as proper padding schemes, and should not be relied upon for real-world applications. For secure RSA implementations suitable for production use, consider utilizing established cryptographic libraries and frameworks.
metalgpu 1.0.3
A python wrapper for Apple's Metal API
Requires Python: <4.0,>=3.10

[![Python application](https://github.com/Al0den/metalgpu/actions/workflows/python-app.yml/badge.svg)](https://github.com/Al0den/metalgpu/actions/workflows/python-app.yml)

# Metal GPU

This is a simple python library, wrapping Apple's Metal API to run compute kernels from python, with full control over buffers and methods. No copying behind the scenes, and raw access to the buffers as numpy arrays

## Installing
Running `pip install metalgpu` to download latest release. After the first install, you will need to compile the C library.

To do so, simply run in your terminal `python -m metalgpu build`, and let it build the library. This leaves no files behind, apart from the compiled library.

Note: You need to have the git command line to use this tool, otherwise manually compile the folder `metal-gpu-c` and move the output library to the lib folder


## Examples

**main.py**
```python
import metalgpu

instance = metalgpu.Interface()  # Initialise the metal instance
shader_string = """
#include <metal_stdlib>

using namespace metal;

kernel void adder(device int *arr1 [[buffer(0)]],
        device int *arr2 [[buffer(1)]],
        device int *arr3 [[buffer(2)]],
        uint id [[thread_position_in_grid]]) {
    arr3[id] = arr2[id] + arr1[id];
}
"""
# Note: For clearer code, use instance.load_shader(shaderPath) to load a metal file

instance.load_shader_from_string(shader_string)
instance.set_function("adder")

buffer_size = 100000  # Number of items in the buffer
buffer_type = "int"

initial_array = [i for i in range(buffer_size)]

buffer1 = instance.array_to_buffer(initial_array)
buffer2 = instance.array_to_buffer(initial_array)
buffer3 = instance.create_buffer(buffer_size, buffer_type)

instance.run_function(buffer_size, [buffer1, buffer2, buffer3])

assert(all(buffer3.contents == [i * 2 for i in range(buffer_size)]))

buffer1.release()
buffer2.release()
buffer3.release()
```

## Performance
When tested using performance.py, on Apple Silicon M1 Pro, base specs:

| Function | CPU Compute Time | GPU Compute Time |
|---|---|---|
| Calculating 10 million cos values  | 3.553s  | 0.0100s |
| Calculating 10 million square roots  | 3.737s | 0.00694s |

Note: The GPU compute is almost as fast computing 1 million or 10 calculations, being limited by throughput to about 0.001s minimum per function run.
## Documentation

To view the documentation, simply go to the docs folder and view the `docs.md` file

## Known issues
- None :)

## Credits
- [metalcpp](https://github.com/bkaradzic/metal-cpp) The wrapper from Objective-C to Metal, that is used to interact with Metal
- [MyMetalKernel.py](https://gist.github.com/alvinwan/f7bb0cdd26c018f40052f9944fc5c679/revisions) Didn't manage to get this to work, overcomplicated for python code
- [metalcompute](https://github.com/baldand/py-metal-compute) Although similar, performs lots of array copies instead of buffer management, and has some memory leaks.
matching-statistics 0.3.0
Library for Matching Statistics using Suffix Tree
Requires Python: >=3.6

# matching-statistics

The MatchingStatistics library computes matching statistics for a pattern string against an input string using a suffix tree. It efficiently determines the position and length of the longest exact match for each suffix of the pattern within the input string.

## Installation

```bash
pip install matching-statistics
```

## Usage

```python
from matching_statistics.MatchingStatistics import MatchingStatistics

# Initialize with input string
input_string = "your_input_string_here"
matching_statistics = MatchingStatistics(input_string)

# Compute matching statistics for a pattern
input_pattern = "your_pattern_here"
ms_table = matching_statistics.get_matching_statistics_table(input_pattern)
```
# Comparison of Implementations

## Naive Implementation

The naive approach computes matching statistics by directly comparing the pattern with substrings of the input string. The time complexity of this approach is O(pattern_length * pattern_length * input_string_length). This arises because for each position in the input string, we potentially compare up to the length of the pattern.

## Suffix Tree Implementation

The suffix tree implementation leverages advanced data structures to achieve efficient pattern matching statistics computation. Specifically, it operates in linear time relative to the length of the pattern, O(pattern_length). This efficiency stems from the preprocessing step that constructs the suffix tree from the input string. Once constructed, the tree allows rapid lookup and comparison of patterns against suffixes of the input string.

## Performance Comparison

The performance difference between the two approaches can be significant for large input strings and patterns. While the naive method's complexity grows quadratically with the pattern length and linearly with the input string length, the suffix tree method ensures that the time complexity remains linear in relation to the pattern length. Therefore, for longer patterns or large input strings, the suffix tree implementation provided by `matching-statistics` offers considerable performance advantages.

![Time Complexity Comparison](images/time.png)
f1-weather 0.1.1
A weather app for Formula 1 enthusiasts
Requires Python: <4.0,>=3.11

# Formula 1 Weather

This project is a simple application that displays the weather forecast for the upcoming F1 sessions as well as historical weather data.

## Running

Simply running the command will display all the weather for the default year.

### Commands

`pretty`: Default. Show tables of each session's weather data.

`json`: Show the weather data in JSON format.

### Options

`--filter`: Filter the data by inputted text.

`--year`: Specify the year.

`--skip`: Skip sessions where weather data isn't available.

## Todo

Add tests!
srt-core 0.1.15
SolidRusT Core Libraries
Requires Python: >=3.11

# srt-core

[![Documentation Status](https://readthedocs.org/projects/srt-core/badge/?version=latest)](https://srt-core.readthedocs.io/en/latest/?badge=latest)

SolidRusT Core Libraries

## Overview

`srt-core` provides essential configuration management utilities for SolidRusT projects. This package helps load configurations from YAML files and environment variables, and it supports multiple language model providers.

## Installation

To install the package, use pip:

```sh
pip install srt-core
```

## Usage

Here is an example of how to use the `Config` class in your project:

```python
from srt_core.config import Config

config = Config()

# Access configuration variables
print(config.server_name)
print(config.default_llm_name)
```

To use the `Logger` class:

```python
from srt_core.utils.logger import Logger

# Initialize the logger
logger = Logger()

# Example of logging a message
logger.info("This is an info message.")
logger.warning("This is a warning message.")
```

Ensure you have a `config.yaml` file in the root of your project and set the necessary environment variables:

You can find an example configuration file in `config-example.yaml`.

Set the environment variables:

```sh
export PERSONA='Default'
export PORT=8650
export SERVER_NAME='0.0.0.0'
```

## Contributing

We welcome contributions! Please follow these steps:

1. Fork the repository.
2. Create a new branch.
3. Make your changes.
4. Submit a pull request.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Contact

For any inquiries or support, please contact [Suparious](mailto:suparious@solidrust.net).
daiego43-rasptank 0.0.9
This is a clearer implementation of a library to interact with the Adeept rasptank robot. Pins are hardcoded
Requires Python: >=3.10

# My Rasptank
Hello there! I created this version of the rasptank code to be more modular
and start developing a ROS code. With this implementation you can instantiate 
the object **Rasptank**, (only one can be created).

To install:
```bash
pip install daiego43_rasptank
```

## Rasptank Control
To control the rasptank you can use the following methods:
```python
from daiego43_rasptank.rasptank import Rasptank
rasptank = Rasptank()
```

A rasptank object is composed of the following sensors and actuators:
```python
class Rasptank:
    def __init__(self):
        # Brazo del robot
        self.link_4 = Servo(15, "end_effector", min_angle=0, max_angle=90, home_angle=90)
        self.link_3 = Servo(14, "wrist", min_angle=0, max_angle=180, home_angle=80)
        self.link_2 = Servo(13, "elbow", min_angle=0, max_angle=135, home_angle=110)
        self.link_1 = Servo(12, "base", min_angle=0, max_angle=180, home_angle=120)
        self.link_0 = Servo(11, "camera", min_angle=70, max_angle=120, home_angle=110)

        # Camara del robot
        self.video = Camera()

        # Ruedas del robot
        self.left_wheel = LeftWheel()
        self.right_wheel = RightWheel()

        # Sensor distancesensor
        self.ultrasonic_sensor = DistanceSensor()

        # Sensor de linea
        self.line_follower = MyLineSensor()
```

5 servos, 2 wheels, 1 camera, 1 ultrasonic sensor and 1 line sensor. The LEDs are not implemented bc I had to remove 
them from my unit.
Also all these classes are my own implementation and might have some errors.
But we can essentially get and set every sensor in the robot with a more friendly interface.

## Comments
Since for me this package is ready to be used with my own robot, now I am continuing with the ROS implementation.
If you reading this, would like to install this software or test it on your own robot, please let me know or contact me
and we can work together to make this package better for everyone :).

Now I am working on a ROS package that essentially publishes sensor info and subscribes to the wheels and servos to control the robot. I think that will be a separate package.
apkmod 1.3.0
Apk frida-gadget injector script

# apkpatcher
[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fmon231%2Fapkpatcher&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23AC3838&title=hits&edge_flat=false)](https://hits.seeyoufarm.com) <br />
Cross-Platform tool used to inject frida scripts and gadget to an APK <br />
This project started as a fork of [apkpatcher](https://github.com/badadaf/apkpatcher) <br />
<br />
*NOTE* that you should use this tool for debugging / educational purposes only!

## Installation
The cmdline tool `apkmod`, comes with the tool [`buildapp`](https://github.com/mon231/buildapp) <br />
Install using a pypi package, then fetch tools for buildapp:
> pip install apkmod --upgrade && buildapp_fetch_tools

## Automation
You can use `apkmod` in your github workflow process! <br />
Simply add a `build.yml` at your repo `.github/workflows` folder:
```yml
name: build patched app
on: [push]

jobs:
  build:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v3
      - uses: mon231/apkpatcher@master
        with:
          original-apk: 'original.apk'
          output-apk: 'patched.apk'
          frida-script: 'frida.js'
```

## Patching process
This tool gets an android app installation file (`.apk`) and a [frida js-script](https://frida.re/docs/javascript-api/) <br />
Then builds a new apk with frida-gadget & script runner ready to be installed on non-rooted android devices!

## Requirements
The tool uses [`buildapp`](https://github.com/mon231/buildapp) package, <br />
Therefore you have to provide it's [requirements](https://github.com/mon231/buildapp/#requirements) <br />
Or run the requirements fetcher tool `buildapp_fetch_tools` after the `pip install` command