Skip to main content

Centralized Underage Distributed Arithmetic - Automated Assignment And Group Hashing

Project description

CUDAAAAGH (Centralized Underage Distributed Arithmetic - Automated Assignment And Group Hashing)

CUDAAAAGH allows you to distribute arithmetic computations across a network of children doing their maths homework Computation Partners by replacing Python's standard integer operations with remote calls to a manual computation server.

image

This allows you mine Bitcoin or train AI models for free.

image

CUDAAAAGH includes:

  • A custom integer type (CUDAAAAGHInt) that provides standard arithmetic operations
  • A manual computation server for processing arithmetic operations
  • An implementation of SHA-256 using only basic arithmetic operations
  • Support for bitwise operations decomposed into simple arithmetic

See my blog post introducing CUDAAAAGH and my new company MinorMiner for more details.

Installation

pip install CUDAAAAGH

Quick Start

  1. Start the computation server:
from CUDAAAAGH import start_server
import asyncio

if __name__ == "__main__":
    asyncio.run(start_server(host="127.0.0.1", port=8000))
  1. In another terminal, use CUDAAAAGH for computations:
from CUDAAAAGH import CUDAAAAGHInt, set_compute_endpoint

# Configure the endpoint
set_compute_endpoint("http://localhost:8000/compute")

# Basic arithmetic
a = CUDAAAAGHInt(10)
b = CUDAAAAGHInt(5)

# Any computation will be performed remotely by a Computation Partner/child
# doing their maths homework!
#
# This will take a few seconds for a Computation Partner to solve:
result = a + b
print(f"10 + 5 = {result}")

# This will take a few thousand years or so:
hash_result = sha256("Hello!", CUDAAAAGHInt)
print(f"SHA-256 hash: {hash_result}")

Features

  • Basic Arithmetic: Addition (+), Subtraction (-), Multiplication (*), Floor Division (//)
  • Bitwise: AND (&), OR (|), XOR (^), Left Shift (<<), Right Shift (>>)
  • Comparison: Equal to (==), Greater than (>), Less than (<), Greater than or equal to (>=), Less than or equal to (<=)

Advanced Features

  • SHA-256 implementation using only basic arithmetic
  • Parallel computation support using futures
  • Automatic operation decomposition

Development

  1. Clone the repository:
git clone https://github.com/robert/CUDAAAAGH.git
cd CUDAAAAGH
  1. Install development dependencies:
pip install -e ".[dev]"
  1. Run tests:
pytest

Contributing

Contributing to this project is unlikely to be a good use of your time. But if you insist:

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

Author

Robert Heaton (blog, @robjheaton)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cudaaaagh-0.1.3.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cudaaaagh-0.1.3-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file cudaaaagh-0.1.3.tar.gz.

File metadata

  • Download URL: cudaaaagh-0.1.3.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for cudaaaagh-0.1.3.tar.gz
Algorithm Hash digest
SHA256 17a9c22447c48a651c9b376ad47599635a97f1873cdd5e3f31fc6212e6d7abb8
MD5 8db0ae41c13284c8058e70072de683af
BLAKE2b-256 e997e5666bfff2704453cc1c87dc7717e6acc39216e0be4da134d65a4eee868b

See more details on using hashes here.

File details

Details for the file cudaaaagh-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: cudaaaagh-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for cudaaaagh-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 449ad174ed46ba921f3f521a284325934840f71b4d1c6afa9e004eeb5c78077a
MD5 4e205671122a12809d8282c71583f27a
BLAKE2b-256 9449f404e36e7dc1c275f00c8a813fdb76296204d57f2b5d5fca1bd9fe1336db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page