Skip to main content

DSA utility library — input helpers, algorithms, data structures, and AI assistant

Project description

supermegaexplosion

DSA utility library — interactive input helpers, string/math/array algorithms, data structures, and an AI assistant powered by Google Gemini.

from libbs import *

show_commands()          # list everything available
input_matrix()           # interactively type a matrix
is_palindrome("racecar") # True
sieve(100)               # primes up to 100
max_subarray_sum([-2,1,-3,4,-1,2,1,-5,4])  # 6
ListNode.from_list([1,2,3,4,5])

# AI assistant (requires API key + dependency)
respond_help("How to reverse a linked list?")

Install

pip install supermegaexplosion              # core (zero deps)
pip install supermegaexplosion[ai]          # with AI assistant (google-genai)

AI Setup

Get a free API key from https://aistudio.google.com/ and set it:

set GEMINI_API_KEY=your_api_key_here

Then use respond_help("your question") — free tier gives 60 requests/min, 1500/day.

Adding New Functions

Run the interactive helper:

python -m libbs.tools.add_func

It appends the function to the right module, updates the catalog, bumps the version, and optionally rebuilds + uploads to PyPI.

License

MIT

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

supermegaexplosion-0.2.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

supermegaexplosion-0.2.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file supermegaexplosion-0.2.0.tar.gz.

File metadata

  • Download URL: supermegaexplosion-0.2.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.4

File hashes

Hashes for supermegaexplosion-0.2.0.tar.gz
Algorithm Hash digest
SHA256 daaad974cb85526fbf9e6024fb739420f6ca1f17c8f8b26cae439ace2b5691ff
MD5 005b9797541a7cab1fe94d185ab1b831
BLAKE2b-256 d753748e1afe4739cb73202285899f644cee0f264e68f93d8dd2addd27e194ae

See more details on using hashes here.

File details

Details for the file supermegaexplosion-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for supermegaexplosion-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68c6a33b2965d7f682a879be55d0637136e94b2c291454b12ae5e83309b9c8c2
MD5 4daacd988a2a18570da405db69fe26be
BLAKE2b-256 4c9e45382b7b9723df6b23b90a9aefea075738a6384fb455afe999c127b67d2a

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