{"id":29745609,"url":"https://github.com/satvikpraveen/numpymasterpro","last_synced_at":"2026-05-08T15:13:24.832Z","repository":{"id":305610651,"uuid":"1023350043","full_name":"SatvikPraveen/NumPyMasterPro","owner":"SatvikPraveen","description":"A hands-on, production-ready toolkit to master NumPy — from first principles to real-world applications. Includes modular Jupyter notebooks, reusable utility scripts, cheatsheets, and advanced projects like K-Means clustering from scratch.","archived":false,"fork":false,"pushed_at":"2025-07-21T03:50:24.000Z","size":80,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-21T05:33:38.294Z","etag":null,"topics":["broadcasting","data-analysis","data-science","data-source","data-visualization","jupyter-notebook","kmeans-clustering","linear-algebra","machine-learning","matrix-algebra","numerical-computation","numpy","numpy-broadcasting","numpy-examples","numpy-tutorial","open-source","python","scientific-computing","standardization","vectorization"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SatvikPraveen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-21T03:18:59.000Z","updated_at":"2025-07-21T03:50:28.000Z","dependencies_parsed_at":"2025-07-21T05:33:41.447Z","dependency_job_id":"77672a73-f881-4342-b26e-f197f8dce287","html_url":"https://github.com/SatvikPraveen/NumPyMasterPro","commit_stats":null,"previous_names":["satvikpraveen/numpymasterpro"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/SatvikPraveen/NumPyMasterPro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SatvikPraveen%2FNumPyMasterPro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SatvikPraveen%2FNumPyMasterPro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SatvikPraveen%2FNumPyMasterPro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SatvikPraveen%2FNumPyMasterPro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SatvikPraveen","download_url":"https://codeload.github.com/SatvikPraveen/NumPyMasterPro/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SatvikPraveen%2FNumPyMasterPro/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267128007,"owners_count":24040156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["broadcasting","data-analysis","data-science","data-source","data-visualization","jupyter-notebook","kmeans-clustering","linear-algebra","machine-learning","matrix-algebra","numerical-computation","numpy","numpy-broadcasting","numpy-examples","numpy-tutorial","open-source","python","scientific-computing","standardization","vectorization"],"created_at":"2025-07-26T06:16:15.109Z","updated_at":"2026-05-08T15:13:24.824Z","avatar_url":"https://github.com/SatvikPraveen.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧠 NumPyMasterPro\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![Python](https://img.shields.io/badge/Python-3.10%2B-darkgreen.svg)](https://www.python.org/)\n[![CI/CD](https://img.shields.io/badge/CI%2FCD-GitHub%20Actions-brightgreen.svg)](https://github.com/SatvikPraveen/NumPyMasterPro/actions)\n[![Tests](https://img.shields.io/badge/Tests-Pytest-blue.svg)](https://docs.pytest.org/)\n[![Issues](https://img.shields.io/github/issues/SatvikPraveen/NumPyMasterPro?color=yellowgreen)](https://github.com/SatvikPraveen/NumPyMasterPro/issues)\n[![Jupyter Notebooks](https://img.shields.io/badge/Jupyter-Notebook-orange.svg)](https://jupyter.org/)\n[![Docker Ready](https://img.shields.io/badge/Docker-Ready-blueviolet.svg)](https://www.docker.com/)\n[![NumPy Focused](https://img.shields.io/badge/NumPy-100%25-brightgreen.svg)](https://numpy.org/)\n[![Real-World Use Cases](https://img.shields.io/badge/Use%20Cases-Included-ff69b4.svg)](#)\n[![K-Means Project](https://img.shields.io/badge/Project-K--Means%20From%20Scratch-9cf.svg)](#)\n\n**NumPyMasterPro** is a comprehensive, modular, and hands-on project designed to help you **master NumPy from first principles to real-world applications**.\n\nThis project isn't just a learning exercise — it's a **complete reference toolkit**, **interview-ready resource**, and a **portfolio-quality project** that showcases your fluency with one of Python’s most essential libraries for scientific computing and data analysis.\n\n---\n\n## 🚀 Why This Project Matters\n\n\u003e Most learners stop at tutorials. This repository takes you further — by combining theory, implementation, real-world use cases, and production practices in one place.\n\n✅ Covers **100% of NumPy's essential concepts**  \n✅ Demonstrates **clean project structure and modular code reuse**  \n✅ Includes **interview-ready topics** like broadcasting, vectorization, and matrix algebra  \n✅ Provides **Jupyter notebooks + Python utility scripts + cheat sheet**  \n✅ Ends with a **K-Means algorithm from scratch with Elbow Method** — great for resumes\n\n---\n\n## 📌 Project Objectives\n\n- 🔍 **Master Core NumPy Syntax** through progressively organized notebooks\n- 🔄 **Understand Memory Efficiency**: broadcasting, vectorization, views vs. copies\n- ⚙️ **Practice Clean Coding** using reusable utility scripts in `/scripts`\n- 🧠 **Explore Real-World Scenarios**: regression, simulations, image ops, clustering\n- 📂 **Build a Reference Toolkit** for revision, projects, and technical interviews\n\n---\n\n## 🧱 Folder Structure\n\n```bash\nNumPyMasterPro/\n├── notebooks/                 # 📓 Themed Jupyter Notebooks (core + advanced topics)\n├── scripts/                   # 🛠️ Modular, reusable Python utilities\n├── datasets/                  # 📁 Data files used in notebooks\n├── docs/                      # 📜 Cheat sheets and markdown-based quick notes\n├── requirements.txt           # 📦 Minimal dependencies to run the project\n├── requirements_dev.txt       # 📦 Full dev environment\n├── .env.example               # 🛡️ Sample env file for Docker-based config (login-free setup)\n├── docker-compose.yml         # 🐳 Multi-container orchestration for Jupyter Lab\n├── Dockerfile                 # 🐳 Docker image setup using Jupyter minimal notebook base\n├── .gitignore                 # ❌ Files to exclude from version control\n└── README.md                  # 📘 This file!\n```\n\n---\n\n## 🧮 Topics Covered\n\n| Notebook                          | Description                                                  |\n| --------------------------------- | ------------------------------------------------------------ |\n| `01_array_basics.ipynb`           | Array creation, types, shapes, memory attributes             |\n| `02_indexing_slicing.ipynb`       | Indexing, slicing, masking, `.take()`, `.put()`              |\n| `03_array_manipulation.ipynb`     | Reshaping, stacking, splitting, tiling, padding              |\n| `04_math_operations.ipynb`        | Element-wise ops, aggregation, rounding, broadcasting        |\n| `05_linear_algebra.ipynb`         | Dot product, inverse, norms, eig/SVD, solving systems        |\n| `06_statistics_probability.ipynb` | Descriptive stats, histograms, correlations, sampling        |\n| `07_masking_conditions.ipynb`     | `where`, `select`, logical ops, `nonzero`, `isfinite`, etc.  |\n| `08_file_io_memory.ipynb`         | `save`, `load`, `memmap`, vectorize, views vs. copies        |\n| `09_real_world_cases.ipynb`       | Regression, image ops, time-series scaling, simulations      |\n| `10_kmeans_from_scratch.ipynb`    | 🎯 BONUS: K-Means Clustering + Elbow Method using NumPy only |\n\n---\n\n## 🧰 Utility Scripts\n\n| File                      | Purpose                                                        |\n| ------------------------- | -------------------------------------------------------------- |\n| `array_utils.py`          | Inspect shapes, types, identities, and metadata                |\n| `linear_algebra_utils.py` | Matrix algebra: dot, inverse, SVD, eigenvalues                 |\n| `math_utils.py`           | Element-wise math: power, root, trig, rounding, logs, exponent |\n| `aggregation_utils.py`    | Sum, mean, std, var, min, max — global \u0026 axis-wise             |\n| `stats_utils.py`          | Z-score, normalization, correlation, histogram bins            |\n| `logical_utils.py`        | Boolean logic, masking, conditionals (`any`, `all`, `where`)   |\n| `kmeans_utils.py`         | K-Means from scratch, inertia calculation, and centroid init   |\n\nExample usage:\n\n```python\n# Direct module import\nfrom scripts.kmeans_utils import kmeans, compute_inertia\n\n# Or use convenient re-exports from __init__.py\nfrom scripts import kmeans, describe_array, minmax_normalize\n```\n\n---\n\n## 🎛️ Streamlit Frontend (Interactive Demo)\n\nYou can try the K-Means algorithm with different datasets or number of clusters using:\n\n```bash\nstreamlit run kmeans_app.py\n```\n\nThis allows you to upload `.csv` files, set cluster count, and visualize results in real time.\nGreat for experiments, education, and showcasing clustering interactively.\n\n---\n\n## 🐳 Docker-Based Setup (Optional)\n\nPrefer running in a **containerized Jupyter Lab** environment?\n\n```bash\ndocker compose up --build\n```\n\nThen open the browser at:\n👉 [http://localhost:8889](http://localhost:8889)\n\n\u003e You can also stop the container with:\n\n```bash\ndocker compose down --volumes --remove-orphans\n```\n\n---\n\n## 🔐 Authentication \u0026 Security\n\nThis project is configured for **login-free use** of Jupyter Lab — no password or token required.\n\n- ✅ `.env.example` is included with recommended settings.\n- 🚫 `.env` is deliberately **excluded** from the repo (add your own if needed).\n- 🛡️ You may modify the `docker-compose.yml` to add a token or hashed password later.\n\n---\n\n## 🧠 Recommended Use\n\n- ✍️ Study each notebook sequentially and refer back as needed\n- 🧪 Use `/scripts/` functions in other projects or interview tasks\n- 🧵 Treat `docs/numpy_cheatsheet.md` as your quick review guide\n- 🧠 Use `10_kmeans_from_scratch.ipynb` in your resume to show NumPy fluency\n- 💡 Add your own notebooks (e.g., PCA from scratch, numerical integration, etc.)\n\n---\n\n## 🔧 Getting Started (Without Docker)\n\n1. **Clone the repo**\n\n   ```bash\n   git clone https://github.com/SatvikPraveen/NumPyMasterPro.git\n   cd NumPyMasterPro\n   ```\n\n2. **Create \u0026 activate a virtual environment**\n\n   ```bash\n   python -m venv venv\n   source venv/bin/activate        # On Windows: venv\\Scripts\\activate\n   pip install -r requirements.txt\n   ```\n\n3. **Launch the Jupyter Lab interface**\n\n   ```bash\n   jupyter lab\n   ```\n\n---\n\n## 🧪 Testing\n\n**NumPyMasterPro** includes a comprehensive test suite with **80+ unit tests** covering all utility modules.\n\n### Quick Testing\n\n```bash\n# Install test dependencies\npip install pytest pytest-cov\n\n# Run all tests\npytest\n\n# Run with coverage\npytest --cov=scripts --cov-report=term-missing\n```\n\n### Using Makefile Commands\n\n```bash\nmake test              # Run all tests\nmake test-coverage     # Generate coverage report\nmake lint              # Check code quality\nmake format            # Auto-format code\nmake all               # Run complete checks\n```\n\n### Test Coverage\n\n- ✅ Array utilities (describe, compare, flags)\n- ✅ Logical operations (any, all, where, masking)\n- ✅ K-Means algorithm (clustering, inertia)\n- ✅ Math operations (arithmetic, trig, rounding)\n- ✅ Linear algebra (matrices, eigenvalues, SVD)\n- ✅ Statistics (normalization, correlation)\n\n📖 **Detailed testing guide:** [TESTING.md](docs/TESTING.md)\n\n### CI/CD Pipeline\n\nAutomated testing runs on:\n- 🔄 Every push to `main`/`develop`\n- 🔄 All pull requests  \n- ✅ Multi-OS (Ubuntu, macOS, Windows)\n- ✅ Python 3.10, 3.11, 3.12\n- ✅ Code linting \u0026 formatting checks\n- ✅ Notebook validation\n- ✅ Docker build verification\n\n---\n\n## 📄 License\n\nThis project is licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0). See the [LICENSE](./LICENSE) file for more details.\n\n---\n\n## 🌟 Showcase \u0026 Star\n\nIf this project helped you master NumPy, feel free to ⭐ it and share it with others!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatvikpraveen%2Fnumpymasterpro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsatvikpraveen%2Fnumpymasterpro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatvikpraveen%2Fnumpymasterpro/lists"}