PLEASE Learn These Features of Python Functions

Поделиться
HTML-код
  • Опубликовано: 28 сен 2024

Комментарии • 44

  • @TechWithTim
    @TechWithTim  2 дня назад

    To learn programming and Python - check out Datacamp!
    💻 Learn Python - datacamp.pxf.io/zNZ3Bx
    💻 Learn Programming - datacamp.pxf.io/XY0AKy

  • @soul_maestro
    @soul_maestro 3 месяца назад +10

    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.

  • @razisthegreatest
    @razisthegreatest 3 месяца назад +2

    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.

  • @andrewmenshicov2696
    @andrewmenshicov2696 3 месяца назад +2

    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.

    • @TechWithTim
      @TechWithTim  3 месяца назад +3

      Yes I’m aware I often use them interchangeably as I’m used to coding in JS daily but I appreciate the specific correction.

  • @Mecagothits
    @Mecagothits 2 месяца назад

    Everytime I’m like where is Tim you helped me a lot

  • @Skrattoune
    @Skrattoune Месяц назад

    Good introduction python beginners

  • @pararth4476
    @pararth4476 3 месяца назад +3

    "As you can see it says 15". (actually says 7 11)

  • @alimihakeem841
    @alimihakeem841 3 месяца назад

    Great one Tim.. I found it helpful

  • @wulymammoth
    @wulymammoth 3 месяца назад +2

    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

  • @joaoarthurbandeira
    @joaoarthurbandeira 3 месяца назад

    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!

    • @herbertpurpora9452
      @herbertpurpora9452 3 месяца назад

      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.

    • @sportsuk6769
      @sportsuk6769 3 месяца назад

      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)

  • @ALIHALLAFI
    @ALIHALLAFI 3 месяца назад

    What is the best language program for website scarping tim?

  • @SurafelTezera-d7o
    @SurafelTezera-d7o 3 месяца назад

    can you make a Data Structure and Algorithms crash course thanks bro🤓

  • @avoimena
    @avoimena 3 месяца назад

    N8nlocal is kinda class. :)

  • @andresbonelli
    @andresbonelli 3 месяца назад +2

    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"

  • @andiglazkov4915
    @andiglazkov4915 3 месяца назад

    Thanks

  • @nandhakumar.r2690
    @nandhakumar.r2690 3 месяца назад

    what vscode theam

  • @esrx7a
    @esrx7a 3 месяца назад

    Super

  • @erin1569
    @erin1569 3 месяца назад

    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

  • @orjinwekeclement5624
    @orjinwekeclement5624 Месяц назад

  • @robel_asefa
    @robel_asefa 3 месяца назад +10

    I see nothing advanced 😒

  • @dummyboy3233
    @dummyboy3233 3 месяца назад

    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.

    • @mrgee9430
      @mrgee9430 3 месяца назад

      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.

  • @christoph231090
    @christoph231090 3 месяца назад +3

    AGAIN very cool, interesting video.
    Thanks for your explanations.

  • @muhammadikram375
    @muhammadikram375 3 месяца назад +2

    thank you sir.. you're great 🎉❤
    Love from your Pakistani student🇵🇰😊

  • @richard-b-riddick
    @richard-b-riddick 3 месяца назад +2

    Very good tutorial. thanks.

  • @samukaze5810
    @samukaze5810 2 месяца назад

    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?

  • @jethrotayag1873
    @jethrotayag1873 3 месяца назад +1

    thank you God bless

  • @smokinafrican525
    @smokinafrican525 3 месяца назад

    It takes patience, you'll see it

  • @Al_Miqdad_
    @Al_Miqdad_ 3 месяца назад

    hi tim how is it going in UAE

  • @miguelcabaero5843
    @miguelcabaero5843 3 месяца назад

    Early gang

  • @yashtalele5540
    @yashtalele5540 3 месяца назад

    First view

  • @sakalagamingyt3563
    @sakalagamingyt3563 3 месяца назад

    Awesome

  • @lf1899
    @lf1899 3 месяца назад

    Nice

  • @harmansavla7510
    @harmansavla7510 3 месяца назад

    Hi