so many ppl not understanding the difference between "advanced" - which is never claimed- and 'more advanced'. for that last one you need to understand to what they are comparing, in this case likely to a starting python dev. or starting from the skill level of a starting dev. it's like thinking "faster ways of transportation" should only list the "fastest ways of transporation", while biking is a legit answer/option if one is comparing to/starting from transportation by walking.
I really enjoyed this video, but felt for some of the more abstract examples it would be great to see the real world problems that these approaches would solve, particularly 3 & 4. Love the videos keep it up.
2:23 values=[] You call this array but it's not, mate. That's a list Also this is not recommended to put an empty list as the default value in the function, cuz it's mutable and will be the same for each function call.
All of these besides nonlocal are used in any reasonably sized Python shop. I’d consider them intermediate, but not necessarily advanced. I would say doing async Python with coroutines is advanced or context managers
Hey Tim, can you show us how to use OCR to extract text from uploaded images and pdfs (like user ids) and return the data so the user can use it? Is it possible to feed some images/pdf patterns (like specific country ID, for example) so the OCR can get even more precise? Thanks, bro!
If you need it urgent. U should check tesseract-ocr, its an ocr engine. Their documentation is solid and theres a lot of videos here explaining how to use it. You can also train your own data on it.
import pytesseract from pdf2image import convert_from_path from PIL import Image import os # Configure the path to the Tesseract executable pytesseract.pytesseract.tesseract_cmd = r'/usr/bin/tesseract' # Update this path as per your Tesseract installation def ocr_from_image(image_path): # Open an image file with Image.open(image_path) as img: # Use pytesseract to do OCR on the image text = pytesseract.image_to_string(img) return text def ocr_from_pdf(pdf_path): # Convert PDF to a list of images pages = convert_from_path(pdf_path) text = '' for page_number, page in enumerate(pages): # Use pytesseract to do OCR on each page image page_text = pytesseract.image_to_string(page) text += f'--- Page {page_number + 1} --- {page_text} ' return text # Detect the file type and perform OCR accordingly file_path = '/mnt/data/file-v6oYmeGhXPvbLDmDqioj6FUY' file_extension = os.path.splitext(file_path)[-1].lower() if file_extension == '.pdf': extracted_text = ocr_from_pdf(file_path) else: extracted_text = ocr_from_image(file_path) # Display the extracted text print(extracted_text)
As a beginner programmer, I found it very hard to grasp the concept of "closures" with this kind of arithmetic examples, I think the usefulness of closures is better understood with practical examples as in Javascript fetching "BaseURL + URL"
Didn't talk about argument unpacking func(**{'a':1, 'b':2} or forcing value passing by name only def func(*, a, b) smh Besides knowing how to use Vim, sending code like that is the best way to pickup compsci women
An intermediate dev from a professional perspective is a whole lot different than an intermediate student or junior dev. It's all about perspective. I'd argue this is an accurate title, based on the latters' perspective to grow into higher tier positions.
To learn programming and Python - check out Datacamp!
💻 Learn Python - datacamp.pxf.io/zNZ3Bx
💻 Learn Programming - datacamp.pxf.io/XY0AKy
so many ppl not understanding the difference between "advanced" - which is never claimed- and 'more advanced'.
for that last one you need to understand to what they are comparing, in this case likely to a starting python dev. or starting from the skill level of a starting dev.
it's like thinking "faster ways of transportation" should only list the "fastest ways of transporation", while biking is a legit answer/option if one is comparing to/starting from transportation by walking.
I really enjoyed this video, but felt for some of the more abstract examples it would be great to see the real world problems that these approaches would solve, particularly 3 & 4. Love the videos keep it up.
2:23 values=[]
You call this array but it's not, mate. That's a list
Also this is not recommended to put an empty list as the default value in the function, cuz it's mutable and will be the same for each function call.
Yes I’m aware I often use them interchangeably as I’m used to coding in JS daily but I appreciate the specific correction.
Everytime I’m like where is Tim you helped me a lot
Good introduction python beginners
"As you can see it says 15". (actually says 7 11)
Great one Tim.. I found it helpful
All of these besides nonlocal are used in any reasonably sized Python shop. I’d consider them intermediate, but not necessarily advanced. I would say doing async Python with coroutines is advanced or context managers
Hey Tim, can you show us how to use OCR to extract text from uploaded images and pdfs (like user ids) and return the data so the user can use it? Is it possible to feed some images/pdf patterns (like specific country ID, for example) so the OCR can get even more precise? Thanks, bro!
If you need it urgent. U should check tesseract-ocr, its an ocr engine. Their documentation is solid and theres a lot of videos here explaining how to use it. You can also train your own data on it.
import pytesseract
from pdf2image import convert_from_path
from PIL import Image
import os
# Configure the path to the Tesseract executable
pytesseract.pytesseract.tesseract_cmd = r'/usr/bin/tesseract' # Update this path as per your Tesseract installation
def ocr_from_image(image_path):
# Open an image file
with Image.open(image_path) as img:
# Use pytesseract to do OCR on the image
text = pytesseract.image_to_string(img)
return text
def ocr_from_pdf(pdf_path):
# Convert PDF to a list of images
pages = convert_from_path(pdf_path)
text = ''
for page_number, page in enumerate(pages):
# Use pytesseract to do OCR on each page image
page_text = pytesseract.image_to_string(page)
text += f'--- Page {page_number + 1} ---
{page_text}
'
return text
# Detect the file type and perform OCR accordingly
file_path = '/mnt/data/file-v6oYmeGhXPvbLDmDqioj6FUY'
file_extension = os.path.splitext(file_path)[-1].lower()
if file_extension == '.pdf':
extracted_text = ocr_from_pdf(file_path)
else:
extracted_text = ocr_from_image(file_path)
# Display the extracted text
print(extracted_text)
What is the best language program for website scarping tim?
can you make a Data Structure and Algorithms crash course thanks bro🤓
N8nlocal is kinda class. :)
As a beginner programmer, I found it very hard to grasp the concept of "closures" with this kind of arithmetic examples, I think the usefulness of closures is better understood with practical examples as in Javascript fetching "BaseURL + URL"
Thanks
what vscode theam
Super
Didn't talk about argument unpacking func(**{'a':1, 'b':2} or forcing value passing by name only def func(*, a, b) smh
Besides knowing how to use Vim, sending code like that is the best way to pickup compsci women
❤
I see nothing advanced 😒
😂😂😂😂 take y'all time
Well your advanced 🙌
Most likely you are too smart
Neither did Sgt. Schulz...
It says interesting.
Sorry sir, but if I am clicking on this vid. (not to waste time) then I am an Intmd. dev atleast, and these features are expected from me.
An intermediate dev from a professional perspective is a whole lot different than an intermediate student or junior dev. It's all about perspective. I'd argue this is an accurate title, based on the latters' perspective to grow into higher tier positions.
AGAIN very cool, interesting video.
Thanks for your explanations.
thank you sir.. you're great 🎉❤
Love from your Pakistani student🇵🇰😊
Very good tutorial. thanks.
So if I understood this right the nonlocal keyword is basically the global keyword but looks for the variable 1 scope far instead of the global scope?
thank you God bless
It takes patience, you'll see it
hi tim how is it going in UAE
Early gang
First view
Awesome
Nice
Hi