Programming
سلام دوستان امیدوارم حالتون خوب باشه❤️ امروز میخوام آموزش OCR (استخراج متن از تصویر) در هوش مصنوعی رو با پایتون یادتون بدم. (خیلی راحت در سه خط کد). خب برای اینکار طبق عکس اول٬ باید برید این صفحه گیتهاب و نرم افزار مربوط به OCR رو دانلود و نصب کنید در یک…
〽️ tesseract ocr on GNU/LINUX using python3
Installation guide on GNU/LINUX:
Step 1:
install tesseract program:
on ubuntu/debian:
install pytesseract library:
نحوه نصب در گنو لینوکس:
قدم اول:
نصب نرم افزار tesseract:
در اوبونتو/دبین:
نصب کتابخانه pytesseract:
Installation guide on GNU/LINUX:
Step 1:
install tesseract program:
on ubuntu/debian:
sudo apt-get install tesseract-ocr
on fedora:sudo dnf install tesseract
on arch:sudo pacman -Syu tesseract
Step 2:install pytesseract library:
pip3 install pytesseract
〽️ آموزش بیرون کشیدن متن از فایل عکس با پایتون در سیستم عامل گنو لینوکس:نحوه نصب در گنو لینوکس:
قدم اول:
نصب نرم افزار tesseract:
در اوبونتو/دبین:
sudo apt-get install tesseract-ocr
در فدورا:sudo dnf install tesseract
آرچ:sudo pacman -Syu tesseract
قدم دوم:نصب کتابخانه pytesseract:
pip3 install pytesseract
✅ @PySourcesor you can pass **kwargs as dict like this:
#setattr
#getattr
✅ @PySources
a = argument_to_property(**{"test":"test", "other_test":"test"})
#OOP#setattr
#getattr
✅ @PySources
How to generate a random password using python ⚡️
چگونه با پایتون پسورد رندوم درست کنیم ⚡️
#password
#string
#random
#security
✅ @PySources
چگونه با پایتون پسورد رندوم درست کنیم ⚡️
#password
#string
#random
#security
✅ @PySources
hurry.filesize is a good human readable file size module that help you to show byte sizes to users
hurry.filesize یک ماژول خوب برای نشان دادن سایز های بایتی به کاربران نرم افزار/سایت شما با خوانایی بالا
example:
#human_readable_filesize
#filesize
#byte
#byte_size
✅ @PySources
hurry.filesize یک ماژول خوب برای نشان دادن سایز های بایتی به کاربران نرم افزار/سایت شما با خوانایی بالا
example:
>>> # pip3 install hurry.filesize
>>> from hurry.filesize import size, alternative
>>> size(1024, system=alternative)
'1 KB'
>>> size(1024 * 1024 * 3, system=alternative)
'3 MB'
————————————————#human_readable_filesize
#filesize
#byte
#byte_size
✅ @PySources
installation:
usage:
دانلود فایل با پایتون با ساده ترین روش
pip install wgetusage:
from wget import download
url = "your url"
out = download(url)
print(out)
دانلود فایل با پایتون با ساده ترین روش
Programming
installation: pip install wget usage: from wget import download url = "your url" out = download(url) print(out) دانلود فایل با پایتون با ساده ترین روش
Streaming download using
🔗: https://gist.github.com/m0h4mad/34a56d41d44aedcd81ead8b60a83b53c
use
asyncio, aiohttp, aiofiles ⚡️:🔗: https://gist.github.com/m0h4mad/34a56d41d44aedcd81ead8b60a83b53c
use
asyncio.gather to download more asynchronouslyHow to use
چگونه با فایل هایی با پسوند
#config
#ini
#configparser
✅ @PySources
.ini files in python ⚡️چگونه با فایل هایی با پسوند
.ini در پایتون استفاده کنیم ⚡️#config
#ini
#configparser
✅ @PySources
How to use
چگونه از فایل هایی با پسوند
#yaml
✅ @PySources
.yaml files in python ⚡️چگونه از فایل هایی با پسوند
.yaml در پایتون استفاده کنیم ⚡️#yaml
✅ @PySources
from PIL import Image, ImageDraw, ImageFont~ how to write on images with python
def write(
text:str,
x_y:tuple,
color:tuple,
font_path:str, font_size:int,
file_input:str, file_output:str
) -> None:
img = Image.open(file_input)
draw = ImageDraw.Draw(img)
font = ImageFont.truetype(font_path, font_size)
draw.text(x_y, text, color, font)
img.save(file_output)
img.close()
~ نوشتن روی تصاویر با پایتون
استاد یه برنامه نویس باگ/ارور هاشه
Bugs/errors are masters of a programmer
Bugs/errors are masters of a programmer
Example of new python3 feature (match case)
🔗 https://docs.python.org/3/whatsnew/3.10.html#simple-pattern-match-to-a-literal
✅ @PySources
🔗 https://docs.python.org/3/whatsnew/3.10.html#simple-pattern-match-to-a-literal
✅ @PySources
New features related to type hints in python3 new version:
🔗 https://docs.python.org/3/whatsnew/3.10.html#new-features-related-to-type-hints
قابلیت جدید پایتون ۳ مربوط به تایپ هینت ها
🔗 https://docs.python.org/3/whatsnew/3.10.html#new-features-related-to-type-hints
قابلیت جدید پایتون ۳ مربوط به تایپ هینت ها
تاریخچه اینترنت-جادی
Jadi mirmirani
تاریخچه اینترنت
با تشکر از:
@jadinet
ویدیو:
https://news.1rj.ru/str/PyArchive/64
منبع پادکست:
https://youtu.be/08kkmPyT9EI
با تشکر از:
@jadinet
ویدیو:
https://news.1rj.ru/str/PyArchive/64
منبع پادکست:
https://youtu.be/08kkmPyT9EI
https://www.tiobe.com/tiobe-index/
پایتون محبوب ترین زبان سال ۲۰۲۱ شد
پایتون محبوب ترین زبان سال ۲۰۲۱ شد
What is the result?
1: True
2: False
3: None
4: Error
Comment your answer
کامنت کنید
Source: instagram of python_hub
https://news.1rj.ru/str/PySources/431?comment=70312
1: True
2: False
3: None
4: Error
Comment your answer
کامنت کنید
Source: instagram of python_hub
https://news.1rj.ru/str/PySources/431?comment=70312