A structured, hands-on learning repository for mastering Python fundamentals and the core data science stack β purpose-built for AIOps practitioners who want to apply ML/AI techniques to IT operations, monitoring, anomaly detection, and automation workflows.
AIOps demands more than just scripting knowledge. This repository bridges the gap between Python basics and production-ready data science skills, using real-world AIOps scenarios like:
Whether youβre an SRE, DevOps engineer, or platform engineer stepping into AI/ML β this is your guided path.
python-for-ai-ml/
β
βββ π 1-python-foundation/
β βββ 1-python-basics-conditionals-loops.ipynb
β βββ 2.1-lists-loops-methods-continue-break.ipynb
β βββ 2.2-lists-methods-sorting-slicing.ipynb
β βββ 3-tuple-concatenation-lists.ipynb
β βββ 4-functions.ipynb
β βββ 5-oops-itserverclass.ipynb
β βββ 6-stringmethods-logparsing.ipynb
β βββ 7.1-dictionaries-loops-functions.ipynb
β βββ 7.2-dictonaries-methods.ipynb
β βββ 8-list-comprehension.ipynb
β βββ 9-lists-functions-dictionaries-combine.ipynb
β βββ 10-file-Handling.ipynb
β βββ 11-exception-handling.ipynb
β βββ 12-modules.ipynb
β
βββ π 2-numpy/
β βββ 1-numpy-arrays.ipynb
β βββ 2-numpy-indexing-slicing.ipynb
β βββ 3-numpy-mathoperations-aggregations.ipynb
β βββ 4-numpy-booleanlogic-filtering.ipynb
β βββ 5-numpy-reshaping-dimensions.ipynb
β βββ 6-numpy-broadcasting.ipynb
β βββ 7-numpy-statistics.ipynb
β βββ 8-numpy-synthetic-it-metrics.ipynb
β βββ 9-numpy-anomaly-threshold-logic.ipynb
β
βββ π 3-pandas/
β βββ 1-pandas-series-dataframe.ipynb
β βββ 2-pandas-loading-inspection.ipynb
β βββ 3-pandas-filtering-selection.ipynb
β βββ 4-pandas-cleaning-missing.ipynb
β βββ 5-groupby-aggregation.ipynb
β βββ 6-pandas-merge-join.ipynb
β βββ app_logs.csv
β βββ incidents.csv
β βββ server_metrics.csv
β
βββ π 4-scikit-learn/ # π§ Coming Soon
βββ ...
Build a solid Python base with patterns commonly used in AIOps tooling, scripting, and automation β all grounded in IT operations contexts.
| Notebook | Topics Covered | AIOps Context |
|---|---|---|
1-python-basics-conditionals-loops |
Variables, conditionals, loops | Alert routing and threshold checks |
2.1-lists-loops-methods-continue-break |
List traversal, loop control | Iterating over log entries |
2.2-lists-methods-sorting-slicing |
Sorting, slicing, list methods | Ranking incidents by severity |
3-tuple-concatenation-lists |
Tuples, immutability, combining collections | Immutable config records |
4-functions |
Function definition, scope, return values | Reusable monitoring utilities |
5-oops-itserverclass |
Classes, objects, inheritance | Modeling servers and services as objects |
6-stringmethods-logparsing |
String ops, regex, formatting | Parsing application and system logs |
7.1-dictionaries-loops-functions |
Dict iteration, functional patterns | Processing structured event data |
7.2-dictonaries-methods |
Dict methods, nested dicts | Managing config maps and metadata |
8-list-comprehension |
Comprehensions, filtering, transforms | Compact log filtering pipelines |
9-lists-functions-dictionaries-combine |
Combining data structures | Building incident summary reports |
10-file-Handling |
Reading/writing files, CSV, JSON | Loading log files and config dumps |
11-exception-handling |
Try/except, custom exceptions | Resilient pipelines that donβt crash in prod |
12-modules |
Importing, __init__, packaging |
Structuring reusable AIOps toolkits |
Efficient numerical computing applied to raw telemetry, server metrics, and time-series operational data.
| Notebook | Topics Covered | AIOps Context |
|---|---|---|
1-numpy-arrays |
Array creation, dtypes, attributes | Storing metric snapshots as arrays |
2-numpy-indexing-slicing |
Indexing, slicing, fancy indexing | Extracting CPU/RAM time windows |
3-numpy-mathoperations-aggregations |
Arithmetic, sum, mean, min, max | Computing utilization statistics |
4-numpy-booleanlogic-filtering |
Boolean masks, dynamic thresholds | Anomaly detection on server metrics |
5-numpy-reshaping-dimensions |
Reshape, transpose, dimensions | Structuring multi-server metric matrices |
6-numpy-broadcasting |
Broadcasting, baselines, z-scores | Normalizing and comparing metrics per server |
7-numpy-statistics |
Moving averages, sliding correlations | CPU trend analysis and pattern detection |
8-numpy-synthetic-it-metrics |
Simulating CPU, RAM, disk, network data | Generating realistic test datasets |
9-numpy-anomaly-threshold-logic |
Static vs dynamic thresholds, consensus methods | Multi-method anomaly detection logic |
Data wrangling with real-world operational datasets β application logs, server metrics, and incident records.
Datasets used in this module:
| File | Description |
|---|---|
app_logs.csv |
Application log events with timestamps, levels, and services |
server_metrics.csv |
CPU, memory, disk metrics with duplicates and missing values |
incidents.csv |
Incident records for cross-dataset correlation and reporting |
| Notebook | Topics Covered | AIOps Context |
|---|---|---|
1-pandas-series-dataframe |
Series, DataFrames, indexing | Core structures for tabular ops data |
2-pandas-loading-inspection |
read_csv, dtypes, info, describe | Loading and profiling log exports |
3-pandas-filtering-selection |
Boolean filters, loc, iloc, query | Isolating critical-severity events |
4-pandas-cleaning-missing |
Nulls, IQR outlier removal, category normalization | Cleaning inconsistent metric records |
5-groupby-aggregation |
groupby, agg, error code frequency | Finding frequent errors, excluding noise |
6-pandas-merge-join |
merge, join, full cross-dataset pipeline | Building a complete server reliability report |
The next module will cover supervised and unsupervised ML for AIOps, including:
IsolationForest and LocalOutlierFactorβ Star this repo to get notified when the Scikit-learn module drops!
1-python-foundation βββΆ 2-numpy βββΆ 3-pandas βββΆ 4-scikit-learn (π§)
β β β β
Scripting & Numerical Wrangling ML Models
Automation Computing Ops Data for AIOps
Each module is grounded in real AIOps datasets and scenarios β no toy examples.
pip or conda# Clone the repository
git clone https://github.com/raviadapa-ai/python-for-ai-ml.git
cd python-for-ai-ml
# Create a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Launch Jupyter
jupyter lab
requirements.txtnumpy>=1.26
pandas>=2.0
matplotlib>=3.7
seaborn>=0.12
jupyterlab>=4.0
scikit-learn>=1.4 # for upcoming module
This repository is currently a personal learning and portfolio project.
External contributions are not being accepted at this time.
However, youβre welcome to:
For questions or discussions, feel free to open an issue.
This project is licensed under the MIT License.
Inspired by the growing need for ML literacy in the SRE and platform engineering communities. Built for practitioners who live in terminals, dashboards, and incident bridges β and want AI to work for them.
Made with β€οΈ for the AIOps community