Machine Learning with Python
68.8K subscribers
1.34K photos
108 videos
175 files
1.01K 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
• Apply a simple blur filter.
from PIL import ImageFilter
blurred_img = img.filter(ImageFilter.BLUR)

• Apply a box blur with a given radius.
box_blur = img.filter(ImageFilter.BoxBlur(5))

• Apply a Gaussian blur.
gaussian_blur = img.filter(ImageFilter.GaussianBlur(radius=2))

• Sharpen the image.
sharpened = img.filter(ImageFilter.SHARPEN)

• Find edges.
edges = img.filter(ImageFilter.FIND_EDGES)

• Enhance edges.
edge_enhanced = img.filter(ImageFilter.EDGE_ENHANCE)

• Emboss the image.
embossed = img.filter(ImageFilter.EMBOSS)

• Find contours.
contours = img.filter(ImageFilter.CONTOUR)


VII. Image Enhancement (ImageEnhance)

• Adjust color saturation.
from PIL import ImageEnhance
enhancer = ImageEnhance.Color(img)
vibrant_img = enhancer.enhance(2.0)

• Adjust brightness.
enhancer = ImageEnhance.Brightness(img)
bright_img = enhancer.enhance(1.5)

• Adjust contrast.
enhancer = ImageEnhance.Contrast(img)
contrast_img = enhancer.enhance(1.5)

• Adjust sharpness.
enhancer = ImageEnhance.Sharpness(img)
sharp_img = enhancer.enhance(2.0)


VIII. Drawing (ImageDraw & ImageFont)

• Draw text on an image.
from PIL import ImageDraw, ImageFont
draw = ImageDraw.Draw(img)
font = ImageFont.truetype("arial.ttf", 36)
draw.text((10, 10), "Hello", font=font, fill="red")

• Draw a line.
draw.line((0, 0, 100, 200), fill="blue", width=3)

• Draw a rectangle (outline).
draw.rectangle([10, 10, 90, 60], outline="green", width=2)

• Draw a filled ellipse.
draw.ellipse([100, 100, 180, 150], fill="yellow")

• Draw a polygon.
draw.polygon([(10,10), (20,50), (60,10)], fill="purple")


#Python #Pillow #ImageProcessing #PIL #CheatSheet

━━━━━━━━━━━━━━━
By: @CodeProgrammer
17🔥6👍2🎉2
python-interview-questions.pdf
1.2 MB
100 Python Interview Questions and Answers

This book is a practical guide to mastering Python interview preparation. It contains 100 carefully curated questions with clear, concise answers designed in a quick-reference style.

#Python #PythonTips #PythonProgramming

https://t.iss.one/CodeProgrammer
7🔥2
Tip for clean code in Python:

Use Dataclasses for classes that primarily store data. The @dataclass decorator automatically generates special methods like __init__(), __repr__(), and __eq__(), reducing boilerplate code and making your intent clearer.

from dataclasses import dataclass

# --- BEFORE: Using a standard class ---
# A lot of boilerplate code is needed for basic functionality.

class ProductOld:
def __init__(self, name: str, price: float, sku: str):
self.name = name
self.price = price
self.sku = sku

def __repr__(self):
return f"ProductOld(name='{self.name}', price={self.price}, sku='{self.sku}')"

def __eq__(self, other):
if not isinstance(other, ProductOld):
return NotImplemented
return (self.name, self.price, self.sku) == (other.name, other.price, other.sku)

# Example Usage
product_a = ProductOld("Laptop", 1200.00, "LP-123")
product_b = ProductOld("Laptop", 1200.00, "LP-123")

print(product_a) # Output: ProductOld(name='Laptop', price=1200.0, sku='LP-123')
print(product_a == product_b) # Output: True


# --- AFTER: Using a dataclass ---
# The code is concise, readable, and less error-prone.

@dataclass(frozen=True) # frozen=True makes instances immutable
class Product:
name: str
price: float
sku: str

# Example Usage
product_c = Product("Laptop", 1200.00, "LP-123")
product_d = Product("Laptop", 1200.00, "LP-123")

print(product_c) # Output: Product(name='Laptop', price=1200.0, sku='LP-123')
print(product_c == product_d) # Output: True


#Python #CleanCode #ProgrammingTips #SoftwareDevelopment #Dataclasses #CodeQuality

━━━━━━━━━━━━━━━
By: @CodeProgrammer
7🎉1
Forwarded from Machine Learning
📌 PyTorch Tutorial for Beginners: Build a Multiple Regression Model from Scratch

🗂 Category: DEEP LEARNING

🕒 Date: 2025-11-19 | ⏱️ Read time: 14 min read

Dive into PyTorch with this hands-on tutorial for beginners. Learn to build a multiple regression model from the ground up using a 3-layer neural network. This guide provides a practical, step-by-step approach to machine learning with PyTorch, ideal for those new to the framework.

#PyTorch #MachineLearning #NeuralNetwork #Regression #Python
5
Comprehensive Python Cheatsheet.pdf
6.3 MB
Comprehensive Python Cheatsheet

This Comprehensive #Python Cheatsheet brings together core syntax, data structures, functions, #OOP, decorators, regular expressions, libraries, and more — neatly organized for quick reference and deep understanding.

https://t.iss.one/CodeProgrammer
18
All Cheat Sheets Collection (3).pdf
2.7 MB
Python For Data Science Cheat Sheet

#python #datascience #DataAnalysis

https://t.iss.one/CodeProgrammer

React ♥️ for more amazing content
15👍4👏2🔥1
Numpy @CodeProgrammer.pdf
2.4 MB
🏷 Sections of the «NumPy» library
⬅️ From introductory to advanced


👨🏻‍💻 This is a long-term project to learn Python and NumPy from scratch. The main task is to handle numerical #data and #arrays in #Python using NumPy, and many other libraries are also used.


✏️ This section shows a structured and complete path for learning #NumPy; but the code examples and exercises help to practically memorize the concepts.


⭕️ Introduction to NumPy
🟠 NumPy arrays
⭕️ Introduction to array features
🟠 Basic operations on arrays
⭕️ Functions for statistical and aggregative purposes
🟠 And...

https://t.iss.one/CodeProgrammer ⚡️
Please open Telegram to view this post
VIEW IN TELEGRAM
11🆒4👍3
Mastering pandas%22.pdf
1.6 MB
🌟 A new and comprehensive book "Mastering pandas"

👨🏻‍💻 If I've worked with messy and error-prone data this time, I don't know how much time and energy I've wasted. Incomplete tables, repetitive records, and unorganized data. Exactly the kind of things that make analysis difficult and frustrate you.

⬅️ And the only way to save yourself is to use pandas! A tool that makes processes 10 times faster.

🏷 This book is a comprehensive and organized guide to pandas, so you can start from scratch and gradually master this library and gain the ability to implement real projects. In this file, you'll learn:

🔹 How to clean and prepare large amounts of data for analysis,

🔹 How to analyze real business data and draw conclusions,

🔹 How to automate repetitive tasks with a few lines of code,

🔹 And improve the speed and accuracy of your analyses significantly.

🌐 #DataScience #DataScience #Pandas #Python

https://t.iss.one/CodeProgrammer ⚡️
Please open Telegram to view this post
VIEW IN TELEGRAM
8👍2
Please open Telegram to view this post
VIEW IN TELEGRAM
9👍5🏆2🎉1
This media is not supported in your browser
VIEW IN TELEGRAM
The #Python library #PandasAI has been released for simplified data analysis using AI.

You can ask questions about the dataset in plain language directly in the #AI dialogue, compare different datasets, and create graphs. It saves a lot of time, especially in the initial stage of getting acquainted with the data. It supports #CSV, #SQL, and Parquet.

And here's the link 😍

👉 https://t.iss.one/CodeProgrammer
Please open Telegram to view this post
VIEW IN TELEGRAM
13👍2🔥1
I'm happy to announce that freeCodeCamp has launched a new certification in #Python 🐍

» Learning the basics of programming
» Project development
» Final exam
» Obtaining a certificate

Everything takes place directly in the browser, without installation. This is one of the six certificates in version 10 of the Full Stack Developer training program.

Full announcement with a detailed FAQ about the certificate, the course, and the exams
Link: https://www.freecodecamp.org/news/freecodecamps-new-python-certification-is-now-live/

👉 @codeprogrammer
Please open Telegram to view this post
VIEW IN TELEGRAM
12
📱 A collection of videos on PyTorch and neural networks

This is not a full-fledged course with a unified program, but a collection of nine separate videos on PyTorch and neural networks gathered in one playlist.

Inside, there are materials of different levels and formats that are suitable for selective study of topics, practice, and a general understanding of the direction.

What's here:
🏮 Introductory videos on PyTorch and the basics of neural networks;

🏮 Practical analyses with code writing and project examples;

🏮 Materials on computer vision and working with medical images;

🏮 Examples of creating chat bots and models on PyTorch;

🏮 Analyses of large language models and generative neural networks;

🏮 Examples of training agents and reinforcement tasks;

🏮 Videos from different authors without a general learning logic.
The collection is suitable for those who are already familiar with Python and want to selectively study PyTorch without a strict study plan — get it here.

https://www.youtube.com/playlist?list=PLp0BA-8NZ4bhBNWvUBPDztbzLar9Jcgd-


tags: #pytorch #DeepLearning #python

@CodeProgrammer
Please open Telegram to view this post
VIEW IN TELEGRAM
11🎉2🔥1
Forwarded from Machine Learning
🔖 40 NumPy methods that cover 95% of tasks

A convenient cheat sheet for those who work with data analysis and ML.

Here are collected the main functions for:
▶️ Creating and modifying arrays;
▶️ Mathematical operations;
▶️ Working with matrices and vectors;
▶️ Sorting and searching for values.


Save it for yourself — it will come in handy when working with NumPy.

tags: #NumPy #Python

@DataScienceM
Please open Telegram to view this post
VIEW IN TELEGRAM
10👍2
👩‍💻 FREE 2026 IT Learning Kits Giveaway

🔥Whether you're preparing for #Cisco #AWS #PMP #Python #Excel #Google #Microsoft #AI or any other in-demand certification – SPOTO has got you covered!

🎁 Explore Our FREE Study Resources
·IT Certs E-book : https://bit.ly/3YvSMHL
·IT exams skill Test : https://bit.ly/4r4VHnd
·Python, ITIL, PMP, Excel, Cyber Security, cloud, SQL Courses : https://bit.ly/4qNWl8r
·Free AI online preparation material and support tools : https://bit.ly/4qKiKTN

🔗 Need IT Certs Exam Help? contact: wa.link/dm4kyz
📲 Join IT Study Group for insider tips & expert support:
https://chat.whatsapp.com/BEQ9WrfLnpg1SgzGQw69oM
5👍3
⚡️ All cheat sheets for programmers in one place.

There's a lot of useful stuff inside: short, clear tips on languages, technologies, and frameworks.

No registration required and it's free.

https://overapi.com/

#python #php #Database #DataAnalysis #MachineLearning #AI #DeepLearning #LLMS

https://t.iss.one/CodeProgrammer ⚡️
Please open Telegram to view this post
VIEW IN TELEGRAM
13👍1
Collection of books on machine learning and artificial intelligence in PDF format

Repo: https://github.com/Ramakm/AI-ML-Book-References

#MACHINELEARNING #PYTHON #DATASCIENCE #DATAANALYSIS #DeepLearning

👉 @codeprogrammer
15🎉2👍1🆒1
🎯 Want to Upskill in IT? Try Our FREE 2026 Learning Kits!

SPOTO gives you free, instant access to high-quality, updated resources that help you study smarter and pass exams faster.
Latest Exam Materials:
Covering #Python, #Cisco, #PMI, #Fortinet, #AWS, #Azure, #AI, #Excel, #comptia, #ITIL, #cloud & more!
100% Free, No Sign-up:
All materials are instantly downloadable

What’s Inside:
📘IT Certs E-book: https://bit.ly/3Mlu5ez
📝IT Exams Skill Test: https://bit.ly/3NVrgRU
🎓Free IT courses: https://bit.ly/3M9h5su
🤖Free PMP Study Guide: https://bit.ly/4te3EIn
☁️Free Cloud Study Guide: https://bit.ly/4kgFVDs

👉 Become Part of Our IT Learning Circle! resources and support:
https://chat.whatsapp.com/FlG2rOYVySLEHLKXF3nKGB

💬 Want exam help? Chat with an admin now!
wa.link/8fy3x4
3
Numpy_Cheat_Sheet.pdf
4.8 MB
NumPy Cheat Sheet: Data Analysis in Python

This #Python cheat sheet is a quick reference for #NumPy beginners.

Learn more:
https://www.datacamp.com/cheat-sheet/numpy-cheat-sheet-data-analysis-in-python

https://t.iss.one/DataAnalyticsX
9👍1🔥1🎉1
Design patterns are proven solutions to common problems in development. If you've ever found yourself constantly writing the same thing when creating objects or struggling with managing different types of objects, then the factory pattern might be exactly what you need.

In this tutorial:
https://www.freecodecamp.org/news/how-to-use-the-factory-pattern-in-python-a-practical-guide/

you'll learn what a factory is, why it's useful, and how to implement it in #Python. We'll gather practical examples that will show when and how to apply this pattern in real tasks.

The code can be found on #GitHub
https://github.com/balapriyac/python-basics/tree/main/design-patterns/factory

https://t.iss.one/CodeProgrammer
6👍1