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 Groq (primary), GitHub Models, and Stack Overflow.
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 — works out of the box (free embedded Groq key)
respond_help("How to reverse a linked list?")
# Direct Stack Overflow search — also works out of the box
stack_overflow("python reverse linked list")
Install
pip install supermegaexplosion # core (zero deps)
pip install supermegaexplosion[ai] # with Groq + GitHub Models
AI Setup
respond_help works immediately with the embedded Groq key. For better quota, set your own:
set GROQ_API_KEY=gsk_your_key_here
Optional — GitHub Models fallback:
set GITHUB_TOKEN=ghp_your_token_here
Provider chain: Groq (fastest) -> GitHub Models -> Stack Overflow -> built-in DSA answers.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file supermegaexplosion-0.4.0.tar.gz.
File metadata
- Download URL: supermegaexplosion-0.4.0.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
596edf381f64fd71ce49f6285b9e24fce032a511aa8201538a32e3dde0877f5f
|
|
| MD5 |
be9375cec3e6c9c0efc08ad9f455a9aa
|
|
| BLAKE2b-256 |
035b8939f71db6237ab3cd08fb23795963af1837771e453234516898a6d7b423
|
File details
Details for the file supermegaexplosion-0.4.0-py3-none-any.whl.
File metadata
- Download URL: supermegaexplosion-0.4.0-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f80ed03d012142377274a899e5b7ec77b5516329c1b4cd9c9f5bb0f8c332e1de
|
|
| MD5 |
11d7c5b1ccf88a3d2272124f3c217611
|
|
| BLAKE2b-256 |
5d786aa46fc8c131b33a46f71aad0ffbf596fd46177de41fce0f9244d560531c
|