پایتون | Data Science | Machine Learning
◀️اینجا با تمرین و چالش با هم پایتون رو یاد می گیریم ⏮بانک اطلاعاتی پایتون پروژه / code/ cheat sheet +ویدیوهای آموزشی +کتابهای پایتون تبلیغات: @alloadv 🔁ادمین : @maryam3771
Show more📈 Analytical overview of Telegram channel پایتون | Data Science | Machine Learning
Channel پایتون | Data Science | Machine Learning (@python4all_pro) in the Farsi language segment is an active participant. Currently, the community unites 24 669 subscribers, ranking 5 461 in the Technologies & Applications category and 13 686 in the Iran region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 24 669 subscribers.
According to the latest data from 30 June, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by 1 465 over the last 30 days and by 22 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 3.22%. Within the first 24 hours after publication, content typically collects 1.84% reactions from the total number of subscribers.
- Post reach: On average, each post receives 794 views. Within the first day, a publication typically gains 453 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 1.
- Thematic interests: Content is focused on key topics such as مصنوعی, دنیا, آموزش, پایتون, وبینار.
📝 Description and content policy
The author describes the resource as a platform for expressing subjective opinions:
“◀️اینجا با تمرین و چالش با هم پایتون رو یاد می گیریم
⏮بانک اطلاعاتی پایتون
پروژه / code/ cheat sheet
+ویدیوهای آموزشی
+کتابهای پایتون
تبلیغات:
@alloadv
🔁ادمین :
@maryam3771”
Thanks to the high frequency of updates (latest data received on 01 July, 2026), the channel maintains relevance and a high level of publication reach. Analytics show that the audience actively interacts with content, making it an important point of influence in the Technologies & Applications category.
from sqlmodel import Field, SQLModel
class Hero(SQLModel, table=True):
id: int | None = Field(default=None, primary_key=True)
name: str
secret_name: str
age: int | None = None
فقط با همین چند خط:
✅ یه جدول SQL ساخته شد
✅ یه مدل Pydantic برای validation داری
✅ یه ORM برای کوئری زدن داری
🔧 استفاده در FastAPI
from fastapi import FastAPI, Depends
from sqlmodel import Session, select
from .models import Hero
app = FastAPI()
# ساخت session
def get_session():
with Session(engine) as session:
yield session
@app.post("/heroes/")
def create_hero(hero: Hero, session: Session = Depends(get_session)):
session.add(hero)
session.commit()
session.refresh(hero)
return hero
@app.get("/heroes/")
def read_heroes(session: Session = Depends(get_session)):
heroes = session.exec(select(Hero)).all()
return heroes
🎯 ویژگیهای کلیدی
🔗 یکپارچگی با Pydantic
؛validation خودکار با همان type hints
🔗 یکپارچگی با SQLAlchemy
تمام قابلیتهای ORM در دسترس
⚡ سازگاری کامل با FastAPI
🪶 کد کمتر
یک مدل به جای دو مدل جداگانه
خطاها در زمان توسعه گرفته میشن
مناسب برای پروژههای بزرگ
📦 نصب
pip install sqlmodel
🔗 لینک گیتهاب:
https://github.com/fastapi/sqlmodel
مستندات:
https://sqlmodel.tiangolo.com/
🆔 @python4all_pro
🧩لینک کانال در بله 👇👇
https://ble.ir/Python4all_proimport matplotlib.pyplot as plt
import numpy as np
fig = plt.figure(figsize=(8, 6))
X = list(range(10))
plt.plot(X, np.exp(X))
plt.title('Annotating Exponential Plot using plt.annotate()')
plt.xlabel('x-axis')
plt.ylabel('y-axis')
plt.annotate('Point 1', xy=(6, 400),
arrowprops=dict(arrowstyle='->'),
xytext=(4, 600))
plt.annotate('Point 2', xy=(7, 1150),
arrowprops=dict(arrowstyle='->',
connectionstyle='arc3,rad=-.2'),
xytext=(4.5, 2000))
plt.annotate('Point 3', xy=(8, 3000),
arrowprops=dict(arrowstyle='-|>',
connectionstyle='angle,angleA=90,angleB=0'),
xytext=(8.5, 2200))
plt.show()
توضیح مرحله به مرحله
۱. ایمپورت کتابخونهها
import matplotlib.pyplot as plt
import numpy as np
matplotlib.pyplot برای رسم نمودار و numpy برای محاسبات عددی (مثل تابع exp) لازمه.
۲. ساخت شکل و رسم داده
fig = plt.figure(figsize=(8, 6))
X = list(range(10))
plt.plot(X, np.exp(X))
یک شکل با اندازهی ۸×۶ ساخته میشه و تابع نمایی e^x روی بازهی ۰ تا ۹ رسم میشه.
۳. عنوان و برچسب محورها
plt.title('Annotating Exponential Plot using plt.annotate()')
plt.xlabel('x-axis')
plt.ylabel('y-axis')
۴. حاشیهنویسیها با plt.annotate()
تابع annotate() سه پارامتر کلیدی داره:
پارامتر
کارش
text
متنی که میخوای نشون بدی
xy
نقطهای که فلش بهش اشاره میکنه
xytext
موقعیت متن روی نمودار
arrowprops
استایل فلش
Point 1 — فلش ساده:
plt.annotate('Point 1', xy=(6, 400),
arrowprops=dict(arrowstyle='->'),
xytext=(4, 600))
فقط یه فلش معمولی از متن به نقطه.
Point 2 — فلش منحنی:
plt.annotate('Point 2', xy=(7, 1150),
arrowprops=dict(arrowstyle='->',
connectionstyle='arc3,rad=-.2'),
xytext=(4.5, 2000))
با connectionstyle='arc3,rad=-.2' فلش به صورت کمان با انحنای -0.2 رسم میشه (منفی یعنی انحنا به یه سمت خاص).
Point 3 — فلش با زاویهی سفارشی:
plt.annotate('Point 3', xy=(8, 3000),
arrowprops=dict(arrowstyle='-|>',
connectionstyle='angle,angleA=90,angleB=0'),
xytext=(8.5, 2200))
اینجا connectionstyle='angle' با angleA=90 و angleB=0 یه فلش زاویهدار میسازه. سر فلش هم -|> یعنی پیکان کلاسیک با خط صاف.
💡 نکته: کلید اصلی plt.annotate() همینه: با xytext متن رو هر جا که دلت بخواد بذار، و با xy مشخص کن فلش به کدوم نقطهی واقعی روی نمودار اشاره کنه.
🆔 @python4all_pro
🧩لینک کانال در بله 👇👇
https://ble.ir/Python4all_proimport turtle
screen = turtle.Screen()
screen.title("🌿 International Yoga Day 🧘")
screen.bgcolor("#FFF8E7")
t = turtle.Turtle()
t.speed(3)
t.width(3)
t.hideturtle()
# --- رسم برگ ---
t.penup()
t.goto(0, 100)
t.pendown()
t.color("#2E8B57", "#90EE90")
t.begin_fill()
t.circle(60, 90)
t.circle(60, -90)
t.end_fill()
# --- متن اصلی ---
t.penup()
t.goto(0, 30)
t.color("#1B5E20")
t.write("Happy International Yoga Day!",
align="center", font=("Arial", 24, "bold"))
t.goto(0, -10)
t.color("#388E3C")
t.write("🧘 Breathe. Stretch. Grow. 🌿",
align="center", font=("Arial", 16, "italic"))
t.goto(0, -60)
t.color("#6D4C41")
t.write("#InternationalYogaDay #YogaForWellness",
align="center", font=("Arial", 12, "normal"))
turtle.done()
توضیح کوتاه درمورد اینکه هر بخش کارش چیه
screen.bgcolor(...)
رنگ پسزمینهی کارت (کرم روشن)
t.circle(60, 90)
رسم یک برگ سبز ساده با دو کمان
t.write(...)
نوشتن متن اصلی، زیرنویس و هشتگها
align="center"
متنها از مرکز تراز میشن
ایدههایی برای شخصیسازی
✨ رنگ برگ: #2E8B57 (سبز تیره) و #90EE90 (سبز روشن) رو با هر رنگ دلخواه عوض کن
🪷 شکل متفاوت: به جای برگ، یه نماد Om (ॐ) یا خورشید بکش
💐 گل لوتوس: با چند تا circle کوچکتر یه گل ساده بکش
🎨 خروجی تصویر:
با
screen.getcanvas().postscript(file="yoga.eps")
کارت رو ذخیره کن (بعد با ابزار دیگهای به PNG تبدیل کن)
🆔 @python4all_pro
🧩لینک کانال در بله 👇👇
https://ble.ir/Python4all_pro
Available now! Telegram Research 2025 — the year's key insights 
