PLEASE Learn These Features of Python Functions

Поділитися
Вставка
  • Опубліковано 28 жов 2024

КОМЕНТАРІ • 45

  • @TechWithTim
    @TechWithTim  Місяць тому

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

  • @soul_maestro
    @soul_maestro 4 місяці тому +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.

  • @christoph231090
    @christoph231090 4 місяці тому +3

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

  • @razisthegreatest
    @razisthegreatest 4 місяці тому +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.

  • @Skrattoune
    @Skrattoune 2 місяці тому

    Good introduction python beginners

  • @andrewmenshicov2696
    @andrewmenshicov2696 4 місяці тому +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  4 місяці тому +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.

  • @alimihakeem841
    @alimihakeem841 4 місяці тому

    Great one Tim.. I found it helpful

  • @richard-b-riddick
    @richard-b-riddick 4 місяці тому +2

    Very good tutorial. thanks.

  • @jethrotayag1873
    @jethrotayag1873 4 місяці тому +1

    thank you God bless

  • @muhammadikram375
    @muhammadikram375 4 місяці тому +2

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

  • @Mecagothits
    @Mecagothits 3 місяці тому

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

  • @pararth4476
    @pararth4476 4 місяці тому +3

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

  • @neckbro
    @neckbro 4 місяці тому

    IN which field of programming are these features useful to apply? Data Analytics, ML, databases, network automation or something else?

  • @samukaze5810
    @samukaze5810 3 місяці тому

    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?

  • @ALIHALLAFI
    @ALIHALLAFI 4 місяці тому

    What is the best language program for website scarping tim?

  • @wulymammoth
    @wulymammoth 4 місяці тому +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 4 місяці тому

    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 4 місяці тому

      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 4 місяці тому

      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)

  • @SurafelTezera-d7o
    @SurafelTezera-d7o 4 місяці тому

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

  • @andresbonelli
    @andresbonelli 4 місяці тому +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 4 місяці тому

    Thanks

  • @avoimena
    @avoimena 4 місяці тому

    N8nlocal is kinda class. :)

  • @Al_Miqdad_
    @Al_Miqdad_ 4 місяці тому

    hi tim how is it going in UAE

  • @esrx7a
    @esrx7a 4 місяці тому

    Super

  • @lf1899
    @lf1899 4 місяці тому

    Nice

  • @nandhakumar.r2690
    @nandhakumar.r2690 4 місяці тому

    what vscode theam

  • @smokinafrican525
    @smokinafrican525 4 місяці тому

    It takes patience, you'll see it

  • @sakalagamingyt3563
    @sakalagamingyt3563 4 місяці тому

    Awesome

  • @erin1569
    @erin1569 4 місяці тому

    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

  • @harmansavla7510
    @harmansavla7510 4 місяці тому

    Hi

  • @orjinwekeclement5624
    @orjinwekeclement5624 2 місяці тому

  • @robel_asefa
    @robel_asefa 4 місяці тому +10

    I see nothing advanced 😒

  • @miguelcabaero5843
    @miguelcabaero5843 4 місяці тому

    Early gang

  • @yashtalele5540
    @yashtalele5540 4 місяці тому

    First view

  • @dummyboy3233
    @dummyboy3233 4 місяці тому

    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 4 місяці тому

      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.