پایتون ( Machine Learning | Data Science )
23.6K subscribers
468 photos
57 videos
103 files
335 links
◀️اینجا با تمرین و چالش با هم پایتون رو یاد می گیریم

بانک اطلاعاتی پایتون
پروژه / code/ cheat sheet
+ویدیوهای آموزشی

+کتابهای پایتون
تبلیغات:
@alloadv

🔁ادمین :
@maryam3771
Download Telegram
دانشگاه شریف سال گذشته دوره‌ی «برنامه‌نویسی پایتون و خلاقیت الگوریتمی» را برای هزاران دانش‌آموز متوسطه‌ی سراسر کشور برگزار کرد.
تمام محتوای این دوره شامل ویدئوی کلاس‌ها، تمرین‌های نظری و عملی «به صورت رایگان» به همه‌ی دانش‌آموزان ایران تقدیم می‌شود:

http://www.learn-python.ir

#پایتون
🆔 @Python4all_pro
🖥 Model smith

This is a useful Python library that allows you to get structured answers in the form of Pydantic models and ready-made python types from Anthropic, Google Vertex AI and OpenAI.


Github




#library
#python

🆔 @Python4all_pro
This media is not supported in your browser
VIEW IN TELEGRAM
دوره‌ی «پایتون هوش‌مصنوعی برای مبتدیان» از Andrew Ng استاد دانشگاه استنفورد را به همه‌ی علاقمندان پیشنهاد می‌کنم

توضیحات دوره از زبان Andrew Ng و لینک دانلود در پست بعدی


🆔 @Python4all_pro
I'm teaching a new course! AI Python for Beginners is a series of four short courses that teach anyone to code, regardless of current technical skill. We are offering these courses free for a limited time.

Generative AI is transforming coding. This course teaches coding in a way that’s aligned with where the field is going, rather than where it has been:

(1) AI as a Coding Companion. Experienced coders are using AI to help write snippets of code, debug code, and the like. We embrace this approach and describe best-practices for coding with a chatbot. Throughout the course, you'll have access to an AI chatbot that will be your own coding companion that can assist you every step of the way as you code.

(2) Learning by Building AI Applications. You'll write code that interacts with large language models to quickly create fun applications to customize poems, write recipes, and manage a to-do list. This hands-on approach helps you see how writing code that calls on powerful AI models will make you more effective in your work and personal projects.

With this approach, beginning programmers can learn to do useful things with code far faster than they could have even a year ago.

Knowing a little bit of coding is increasingly helping people in job roles other than software engineers. For example, I've seen a marketing professional write code to download web pages and use generative AI to derive insights; a reporter write code to flag important stories; and an investor automate the initial drafts of contracts.

With this course you’ll be equipped to automate repetitive tasks, analyze data more efficiently, and leverage AI to enhance your productivity.

If you are already an experienced developer, please help me spread the word and encourage your non-developer friends to learn a little bit of coding.

I hope you'll check out the first two short courses here!

https://www.deeplearning.ai/short-courses/ai-python-for-beginners/



🆔 @Python4all_pro
📚 آموزش الگوریتمی برای حل مسائل پیچیده ریاضی در پایتون 📚

سلام دوستان! امروز می‌خوایم یاد بگیریم چطور یک الگوریتم برای حل مسائل پیچیده ریاضی رو در پایتون پیاده‌سازی کنیم. این آموزش برای کسانی که می‌خوان اصول پایه حل مسائل ریاضی با استفاده از الگوریتم‌ها رو بفهمند بسیار مناسب هست.

1. تنظیمات اولیه 🛠️
ابتدا نیاز داریم که کتابخانه‌های ضروری پایتون رو وارد کنیم. برای این کار از کتابخانه‌ی math و numpy استفاده می‌کنیم.

نصب numpy
برای نصب numpy از دستور زیر استفاده کنید:
pip install numpy

2. ایجاد توابع مورد نیاز 📋
برای حل مسائل پیچیده ریاضی، نیاز به برخی توابع پایه‌ای داریم. در اینجا الگوریتمی برای حل معادلات خطی با استفاده از روش گاوس-ژردن (Gaussian Elimination) رو پیاده‌سازی می‌کنیم.

حل معادلات خطی با استفاده از روش گاوس-ژردن
import numpy as np

def gaussian_elimination(A, b):
n = len(b)
M = A

for i in range(n):
M[i] = M[i] / M[i, i]
b[i] = b[i] / M[i, i]
for j in range(i + 1, n):
ratio = M[j, i]
M[j] = M[j] - ratio * M[i]
b[j] = b[j] - ratio * b[i]

x = np.zeros(n)
for i in range(n - 1, -1, -1):
x[i] = b[i] - np.dot(M[i, i + 1:], x[i + 1:])
return x

3. تست الگوریتم 📈
حالا که الگوریتم رو پیاده‌سازی کردیم، می‌تونیم اون رو تست کنیم.

تعریف ماتریس A و بردار b
A = np.array([[2, 1, -1],
[-3, -1, 2],
[-2, 1, 2]], dtype=float)

b = np.array([8, -11, -3], dtype=float)

solution = gaussian_elimination(A, b)
print("راه‌حل معادلات:")
print(solution)

4. مزایا و کاربردهای استفاده از الگوریتم گاوس-ژردن

مزایا:
1. دقت بالا: روش گاوس-ژردن دقت بالایی در حل معادلات خطی دارد.
2. سرعت: این الگوریتم نسبت به روش‌های دیگر برای حل سیستم‌های خطی سریع‌تر عمل می‌کند.
3. سادگی پیاده‌سازی: الگوریتم گاوس-ژردن ساده و قابل فهم است و پیاده‌سازی آن پیچیدگی زیادی ندارد.

کاربردها:
1. حل مسائل فیزیک و مهندسی: این الگوریتم در حل مسائل مختلف فیزیک و مهندسی که به حل سیستم‌های خطی نیاز دارند، استفاده می‌شود.
2. بهینه‌سازی: در بسیاری از مسائل بهینه‌سازی، حل معادلات خطی ضروری است و این الگوریتم کاربرد دارد.
3. مدل‌سازی مالی: در تحلیل‌های مالی و اقتصادی برای مدل‌سازی و پیش‌بینی از این الگوریتم استفاده می‌شود.

#Python #library

🆔 https://t.me/Python4all_pro
Adding a Watermark to a Plot in Matplotlib


#Code

🆔 @Python4all_pro
📚 آموزش ساخت سیستم مکان‌یابی ساده (GPS) در پایتون بدون ماژول‌های خارجی 📚

سلام دوستان! امروز می‌خوایم یاد بگیریم چطور یک سیستم مکان‌یابی ساده (GPS) رو بدون استفاده از هیچ ماژول خارجی در پایتون پیاده‌سازی کنیم. این آموزش برای کسانی که می‌خوان اصول پایه مکان‌یابی رو بفهمند بسیار مناسب هست.

1. تنظیمات اولیه 🛠️
ابتدا نیاز داریم که کتابخانه‌های ضروری پایتون رو وارد کنیم.

import math

2. ایجاد توابع مورد نیاز 📋
برای پیاده‌سازی سیستم GPS، نیاز به برخی توابع پایه‌ای داریم:

محاسبه فاصله بین دو نقطه جغرافیایی با استفاده از فرمول هاروسین
def haversine(lat1, lon1, lat2, lon2):
R = 6371 # شعاع زمین به کیلومتر
dlat = math.radians(lat2 - lat1)
dlon = math.radians(lon2 - lon1)
a = math.sin(dlat / 2) ** 2 + math.cos(math.radians(lat1)) * math.cos(math.radians(lat2)) * math.sin(dlon / 2) ** 2
c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a))
distance = R * c
return distance

تعیین موقعیت جغرافیایی ی **📍
فرض کنیم چند موقعیت جغرافیایی داریم و می‌خواهیم فاصله بین آن‌ها را محاسبه کنیم.

locations = {
"location1": (35.6892, 51.3890), # تهران
"location2": (34.0522, -118.2437), # لس‌آنجلس
"location3": (48.8566, 2.3522) # پاریس
}

def calculate_distances(locations):
distances = {}
keys = list(locations.keys())
for i in range(len(keys)):
for j in range(i + 1, len(keys)):
loc1, loc2 = keys[i], keys[j]
lat1, lon1 = locations[loc1]
lat2, lon2 = locations[loc2]
distance = haversine(lat1, lon1, lat2, lon2)
distances[(loc1, loc2)] = distance
return distances

distances = calculate_distances(locations)
for loc_pair, dist in distances.items():
print(f"فاصله بین {loc_pair[0]} و {loc_pair[1]}: {dist:.2f} کیلومتر")



#Python #library

🆔 https://t.me/Python4all_pro
🆕 آخرین دوره جامع علم داده در تابستان 1403

📣 دوستان، آشنایان و همکاران خود را دانشگاه تهرانی کنید و هر سه تخفیف بگیرید!

🩷دوره ی ۳۵۰ ساعته( آنلاین و پروژه محور) مناسب تمامی مقاطع🩷

آموزش 16 سرفصل کاربردی با 12 ابزار و نرم افزار تخصصی

0️⃣2⃣🔣 تخفیف با شرایط اقساطی ویژه🎁

💯 بهره گیری از مطرحترین و برجسته ترین اساتید دیتایی👍

🎓 اعطای گواهی دوزبانه با قابلیت ترجمه رسمی و تحت نظارت وزارت علوم با امکان استعلام از دانشگاه تهران

ℹ️ اطلاعات بیشتر
https://tehrandata.org/courses/datascience

🔝 دریافت مشاوره رایگان جهت ثبت‌نام 🆓
👩‍💻 @tehrandata_admin
📞 09377516759
📱 کانال تلگرامی
🌐 واتساپ
🌐 لینکدین
📲 اینستا
🌐 وبسایت
Please open Telegram to view this post
VIEW IN TELEGRAM
🖥 removal

یک email validator بسیار سریع پایتون است که به زبان Rust نوشته شده است که عملکرد ۱۰۰ تا ۱۰۰۰ برابری را نسبت به اعتبارسنجی‌های استاندارد بهبود می‌بخشد.


Github



#python #programming #developer

💎 آموزش پایتون برای همه

🆔 @Python4all_pro