📚 آموزش ساخت سیستم مکانیابی ساده (GPS) در پایتون بدون ماژولهای خارجی 📚
سلام دوستان! امروز میخوایم یاد بگیریم چطور یک سیستم مکانیابی ساده (GPS) رو بدون استفاده از هیچ ماژول خارجی در پایتون پیادهسازی کنیم. این آموزش برای کسانی که میخوان اصول پایه مکانیابی رو بفهمند بسیار مناسب هست.
1. تنظیمات اولیه 🛠️
ابتدا نیاز داریم که کتابخانههای ضروری پایتون رو وارد کنیم.
2. ایجاد توابع مورد نیاز 📋
برای پیادهسازی سیستم GPS، نیاز به برخی توابع پایهای داریم:
محاسبه فاصله بین دو نقطه جغرافیایی با استفاده از فرمول هاروسین
تعیین موقعیت جغرافیایی ی **📍
فرض کنیم چند موقعیت جغرافیایی داریم و میخواهیم فاصله بین آنها را محاسبه کنیم.
#Python #library
🆔 https://t.me/Python4all_pro
سلام دوستان! امروز میخوایم یاد بگیریم چطور یک سیستم مکانیابی ساده (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
Forwarded from تهران دیتا-دانشگاه تهران
آموزش 16 سرفصل کاربردی با 12 ابزار و نرم افزار تخصصی
https://tehrandata.org/courses/datascience
Please open Telegram to view this post
VIEW IN TELEGRAM
🖥 removal
یک email validator بسیار سریع پایتون است که به زبان Rust نوشته شده است که عملکرد ۱۰۰ تا ۱۰۰۰ برابری را نسبت به اعتبارسنجیهای استاندارد بهبود میبخشد.
▪ Github
#python #programming #developer
💎 آموزش پایتون برای همه
🆔 @Python4all_pro
یک email validator بسیار سریع پایتون است که به زبان Rust نوشته شده است که عملکرد ۱۰۰ تا ۱۰۰۰ برابری را نسبت به اعتبارسنجیهای استاندارد بهبود میبخشد.
▪ Github
#python #programming #developer
💎 آموزش پایتون برای همه
🆔 @Python4all_pro
Different ways to reverse a list in Python
#python #programming #developer #programmer #coding
🆔 @Python4all_pro
#python #programming #developer #programmer #coding
🆔 @Python4all_pro
This media is not supported in your browser
VIEW IN TELEGRAM
📹Supervision
یک کتابخانه پایتون برای حل آسان انواع مشکلات بینایی کامپیوتر
🔗Links:
https://github.com/roboflow/supervision
📖Docs: https://roboflow.github.io/supervision/
#Python #library
🆔 https://t.me/Python4all_pro
یک کتابخانه پایتون برای حل آسان انواع مشکلات بینایی کامپیوتر
🔗Links:
https://github.com/roboflow/supervision
📖Docs: https://roboflow.github.io/supervision/
#Python #library
🆔 https://t.me/Python4all_pro
Modern_Tkinter_for_Busy_Python_Developers_Quickly_learn_to_create.pdf
2.1 MB
Modern Tkinter for Busy Python Developers
Quickly learn to create great looking user interfaces for Windows, Mac and Linux using Python's standard GUI toolkit
#pdf
#Python_tricks
#python
🆔 @Python4all_pro
Quickly learn to create great looking user interfaces for Windows, Mac and Linux using Python's standard GUI toolkit
#Python_tricks
#python
🆔 @Python4all_pro
ترجمه سایت محبوب w3schools
این مخزن شامل مجموعهای جامع از نکات و دستورالعملهای پایهای پایتون به زبان فارسی است. مناسب برای کسانی که تازه وارد دنیای برنامهنویسی شدهاند یا به دنبال تمرین و تقویت مهارتهای اولیه خود در پایتون هستند. با این مخزن میتوانید مباحث مختلف شامل متغیرها، توابع، حلقهها و استثناها را به طریقی ساده و روان یاد بگیرید. مناسب برای دانشآموزان، دانشجویان و هر کسی که میخواهد پایتون را از صفر تا صد بیاموزد و در پروژههای ساده خود استفاده کند.
📱 GitHub Repo
🆔 @Python4all_pro
این مخزن شامل مجموعهای جامع از نکات و دستورالعملهای پایهای پایتون به زبان فارسی است. مناسب برای کسانی که تازه وارد دنیای برنامهنویسی شدهاند یا به دنبال تمرین و تقویت مهارتهای اولیه خود در پایتون هستند. با این مخزن میتوانید مباحث مختلف شامل متغیرها، توابع، حلقهها و استثناها را به طریقی ساده و روان یاد بگیرید. مناسب برای دانشآموزان، دانشجویان و هر کسی که میخواهد پایتون را از صفر تا صد بیاموزد و در پروژههای ساده خود استفاده کند.
📱 GitHub Repo
🆔 @Python4all_pro
This media is not supported in your browser
VIEW IN TELEGRAM
⚡️ PaletteSnap
PaletteSnap is a Python program designed to create readable color palettes from any image, ensuring good contrast and ease of use.
The application is installed via pip and automatically applies the generated palette as the system wallpaper.
PaletteSnap also supports software updates, allowing you to apply new palettes without having to reboot.
The program creates separate folders to store configuration and cache files, making it convenient for users familiar with pywal, a similar tool.
Additionally, PaletteSnap supports templating, allowing you to apply color palettes system-wide.
▪ Github
#Python
🆔 @Python4all_pro
PaletteSnap is a Python program designed to create readable color palettes from any image, ensuring good contrast and ease of use.
The application is installed via pip and automatically applies the generated palette as the system wallpaper.
PaletteSnap also supports software updates, allowing you to apply new palettes without having to reboot.
The program creates separate folders to store configuration and cache files, making it convenient for users familiar with pywal, a similar tool.
Additionally, PaletteSnap supports templating, allowing you to apply color palettes system-wide.
▪ Github
#Python
🆔 @Python4all_pro
نصب و مدیریت ورژن و مدیریت پکیج پایتون برای همیشه تغییر کرد و بی نهایت آسون شد!
نه تنها بینهایت آسون شد بلکه بسیار هم سریع شد!
خیلی از فریمورکها هم دارند سوییچ می کنند روش مثل FastAPI!
https://docs.astral.sh/uv/
#python
🆔 @Python4all_pro
نه تنها بینهایت آسون شد بلکه بسیار هم سریع شد!
خیلی از فریمورکها هم دارند سوییچ می کنند روش مثل FastAPI!
https://docs.astral.sh/uv/
#python
🆔 @Python4all_pro
Media is too big
VIEW IN TELEGRAM
Summarize Text in Python Using ChatGPT (and other NLP tasks)
In this video we integrate Chat GPT with Python in order to do three different NLP related tasks around text clean up and text summarization.
First we build a sentence averager that is able to take in a list of sentences and return a single summary sentence that represents the whole group.
Second, we build a straight up abstractive text summarizer that simply reads in a long piece of input text and returns a condensed summary.
And finally, we build a method that is able to take in a list of job titles and return back a single job title that represents the entire group. Basically, when you have a bunch of versions of the same job title written in slightly different ways, this method allows you to collapse them down into a single representative job title.
Link to git hub:
https://github.com/michaelgcortes/text-summarization-in-python-using-chatgpt
#Code #python
🆔 @Python4all_pro
In this video we integrate Chat GPT with Python in order to do three different NLP related tasks around text clean up and text summarization.
First we build a sentence averager that is able to take in a list of sentences and return a single summary sentence that represents the whole group.
Second, we build a straight up abstractive text summarizer that simply reads in a long piece of input text and returns a condensed summary.
And finally, we build a method that is able to take in a list of job titles and return back a single job title that represents the entire group. Basically, when you have a bunch of versions of the same job title written in slightly different ways, this method allows you to collapse them down into a single representative job title.
Link to git hub:
https://github.com/michaelgcortes/text-summarization-in-python-using-chatgpt
#Code #python
🆔 @Python4all_pro
Prettytable
This is a library for displaying tables in Python. It allows you to create beautiful and formatted tables with a minimum amount of code.
#library
#python
#Python_tricks
🆔 @Python4all_pro
This is a library for displaying tables in Python. It allows you to create beautiful and formatted tables with a minimum amount of code.
#library
#python
#Python_tricks
🆔 @Python4all_pro