Machine Learning with Python
68.4K subscribers
1.3K photos
95 videos
170 files
960 links
Learn Machine Learning with hands-on Python tutorials, real-world code examples, and clear explanations for researchers and developers.

Admin: @HusseinSheikho || @Hussein_Sheikho
Download Telegram
Harvard has made its textbook on ML systems publicly available. It's extremely practical: not just about how to train models, but how to build production systems around them - what really matters.

The topics there are really top-notch:

> Building autograd, optimizers, attention, and mini-PyTorch from scratch to understand how the framework is structured internally. (This is really awesome)
> Basic things about DL: batches, computational accuracy, model architectures, and training
> Optimizing ML performance, hardware acceleration, benchmarking, and efficiency

So this isn't just an introductory course on ML, but a complete cycle from start to practical application. You can already read the book and view the code for free. For 2025, this is one of the strongest textbooks to have been released, so it's best not to miss out.

The repository is here, with a link to the book inside 👏

👉 @codeprogrammer
Please open Telegram to view this post
VIEW IN TELEGRAM
6👍2
How to test code without a real database

During unit testing, connecting to a real DB is unnecessary:
• tests run slowly
• become unstable
• require a working server


It is much better to mock the call to pandas.read_sql and return dummy data

Example function:

def query_user_data(user_id):
    query = f"SELECT id, name FROM users WHERE id = {user_id}"
    return pd.read_sql(query, "postgresql://localhost/mydb")


Test with mock:

from unittest.mock import patch
import pandas as pd

@patch("pandas.read_sql")
def test_database_query_mocked(mock_read_sql):
    mock_read_sql.return_value = pd.DataFrame(
        {"id": [123], "name": ["Alice"]}
    )

    result = query_user_data(user_id=123)
    assert result["name"].iloc[0] == "Alice"


This way you test only the business logic — quickly, reliably, and without unnecessary dependencies

https://t.me/CodeProgrammer
5👍2🔥2
I never believed a simple bot could change my workflow — until I met @MegaRenamerV2Bot. It renames thousands of MEGA files in seconds, saving me hours every day. No more manual hassle, just pure efficiency.

Curious how it works? Discover the secret here 👉 https://t.me

Join RSC Bots and step up your file game!

#ad InsideAds