2MinutesPy
2MinutesPy
  • 66
  • 566 083
Understanding self & __init__ in Python | 2MinutesPy
In this video, we'll understand the purpose of self and __init__ in Python and what are their roles.
The __init__ method in Python: ua-cam.com/video/mYKGYr0xaXw/v-deo.html
Join👇👇
Discord: discord.gg/zhGX3WHD7T
#__init__ #init #python #objectorientedprogramming #2minutespy
Переглядів: 1 308

Відео

How to use lru_cache decorator in Python?
Переглядів 2,3 тис.День тому
In this video, we'll dive into what LRU (Least Recently Used) actually means and how Python's lru_cache works. Join👇👇 Discord: discord.gg/zhGX3WHD7T #LRUCache #caching #python #pythontips #codingtips #2minutespy
Take the Best Out of Recursions THIS Way...
Переглядів 1,3 тис.14 днів тому
How recursion can be optimized? In this video, you'll see how to optimize recursion to save memory and avoid redundant recursive calls. Join👇👇 Discord: discord.gg/zhGX3WHD7T #recursion #optimization
Why Can’t We Instantiate Abstract Classes
Переглядів 4,3 тис.Місяць тому
Abstract classes in Python are meant to enforce specific methods into subclasses or concrete classes. In this video, we'll discuss why can't we instantiate an abstract class if it is a class. Join👇👇 Discord: discord.gg/zhGX3WHD7T #oop #objectorientedprogramming
Concurrency is not what you think it is...
Переглядів 6 тис.Місяць тому
Concurrency is often confused with parallelism, but they are different. In this video, we'll see that concurrency is not parallelism. How are concurrency and parallelism different from each other? Join👇👇 Discord: discord.gg/zhGX3WHD7T #concurrency #parallelism
How Packaging Works in Python?
Переглядів 9 тис.Місяць тому
In this video, we'll understand how Python decides whether a package should be a namespace or a regular package. Skip to the main part: 0:36 How Packaging Works in Python? Join👇 Discord: discord.gg/zhGX3WHD7T #init # init #namespace #regular #package
Is PyPy a drop-in replacement for Python? 2MinutesPy
Переглядів 2,3 тис.Місяць тому
PyPy is, on average, 4.4 times faster than CPython 3.7. However, recently, Python released Python 3.13, and with time, Python is getting better and better. So is PyPy still better than CPython. By the way, PyPy currently supports Python 3.10. This video compares PyPy (latest) and CPython on speed, memory usage, compatibility with libraries like Django, NumPy, and Scikit-learn, and concurrency. ...
Intuition and Math Behind KNN Classifier in ML Explained
Переглядів 1,5 тис.2 місяці тому
K Nearest Neighbors is one of the simplest machine learning algorithms used for regression and classification tasks. It includes a class KNeighborClassifer, which is used to classify a data point based on the majority vote of the nearest neighbors. But how is the classification done? We'll see the intuition (working) and maths involved in the KNN Classifier. Like this video, comment if you want...
FINALLY a Worthy Alternative to Thunder Client...
Переглядів 1,4 тис.2 місяці тому
In this video, we'll discuss EchoAPI, an API testing and debugging extension for VS Code that is loaded with impactful features and completely free. This could be a good alternative to Thunder Client as it provides unlimited requests and collections. Feel free to explore. Join us: discord.gg/zhGX3WHD7T #api #apitesting #tool #vscode #vscodeextensions
The WILDCARD type in typing Module || 2MinutesPy
Переглядів 1,9 тис.2 місяці тому
What's so special about typing.Any in Python - Why can't we instantiate Any type and check if anything is an instance of Any? Well, we're going to demystify typing.Any in this video, so stay tuned. Chapter: 0:00 Intro 0:12 typing.Any 0:40 Any cannot be used with isinstance() 1:18 Any cannot be instantiated 1:39 Why is it so? 1:55 Outro Join us: Discord: discord.gg/5jPJngfe
Do you still need __init__.py file in Python packages? 2MinutesPy
Переглядів 4,7 тис.2 місяці тому
You know how crucial an init .py file is to creating packages in Python. But do you really need them to do so? The answer is not really. Python has both regular packages and namespace packages. Since version 3.3 , Python supports creating packages without init .py file which was proposed in PEP 420. PEP 420: peps.python.org/pep-0420/ ✨More on 2MinutesPy👇👇 ▶️What should you write into the init ....
How to fix circular imports in Python | 2MinutesPy
Переглядів 2,7 тис.3 місяці тому
Have you ever come across circular imports in Python? Well, in this video, we'll discover different ways to get rid of circular imports. Chapters: 0:00 Intro 0:14 Demo: Circular Import 0:37 Different Methods to Avoid Circular Imports 1:19 Circular Imports in Python Packages ✨More on 2MinutesPy👇👇 ▶️How to Create a Class in Python? ua-cam.com/video/GCW5CQJnMAk/v-deo.html ▶️ Python's init Method: ...
How Popular Python Frameworks are designed for REST APIs? 2MinutesPy
Переглядів 3,1 тис.3 місяці тому
What are the design principles or design philosophies behind Django, Flask, and FastAPI? How are REST APIs created using Django, Flask, and FastAPI? Which Python web framework is best? This video discusses all the questions mentioned above. Don’t forget to like, subscribe, and hit the bell for more Python goodness! ✨More on 2MinutesPy👇👇 ▶️ JIT compiler and Python: ua-cam.com/video/7_DixOdxC6U/v...
JIT compiler is useless… but Python has something else
Переглядів 4,3 тис.3 місяці тому
Is JIT (Just-In-Time) compilation really useful in Python? 🤔 While other languages rely on JIT for speed, CPython doesn’t! In this video, we’ll explore why JIT is considered "useless" in Python and what Python does to boost performance instead. Don’t forget to like, subscribe, and hit the bell for more Python goodness! ✨More on 2MinutesPy👇👇 ▶️ R.I.P GIL in Python 3.13: ua-cam.com/video/mvxR6_G4...
How to Disable GIL in Python3.13 | Free-threaded Python | 2MinutesPy
Переглядів 2,9 тис.3 місяці тому
How to Disable GIL in Python3.13 | Free-threaded Python | 2MinutesPy
How I Created an Image Converter Webapp Using Python | 2MinutesPy
Переглядів 1,4 тис.3 місяці тому
How I Created an Image Converter Webapp Using Python | 2MinutesPy
What is the use of "Metaclasses" in Python? 2MinutesPy
Переглядів 5 тис.3 місяці тому
What is the use of "Metaclasses" in Python? 2MinutesPy
Redis for Generative AI Explained in 2 Minutes
Переглядів 3,2 тис.4 місяці тому
Redis for Generative AI Explained in 2 Minutes
What Exactly are "Context Managers" in Python?
Переглядів 5 тис.4 місяці тому
What Exactly are "Context Managers" in Python?
I Bet You Didn’t Know "THIS" in Selenium
Переглядів 1,8 тис.4 місяці тому
I Bet You Didn’t Know "THIS" in Selenium
This Python REPL *FEATURE* is a Game-Changer | Python 3.13 Update
Переглядів 10 тис.4 місяці тому
This Python REPL *FEATURE* is a Game-Changer | Python 3.13 Update
Why self is used in Python classes?
Переглядів 4,8 тис.4 місяці тому
Why self is used in Python classes?
Python Class Vs Instance | Understanding the Fundamentals with Analogy
Переглядів 2,5 тис.4 місяці тому
Python Class Vs Instance | Understanding the Fundamentals with Analogy
How to Hash Passwords in Python
Переглядів 3,2 тис.5 місяців тому
How to Hash Passwords in Python
Python List Methods Visualized | 2MinutesPy
Переглядів 3,3 тис.5 місяців тому
Python List Methods Visualized | 2MinutesPy
R.I.P GIL in Python 3.13 | Will Python Be Faster Now??
Переглядів 25 тис.5 місяців тому
R.I.P GIL in Python 3.13 | Will Python Be Faster Now??
The "Diamond Problem" in Class Inheritance
Переглядів 2,8 тис.5 місяців тому
The "Diamond Problem" in Class Inheritance
Parallel Tasks in a Pool of Threads and Processes
Переглядів 2,8 тис.6 місяців тому
Parallel Tasks in a Pool of Threads and Processes
Why set items can't be indexed? The real reason | 2MinutesPy
Переглядів 2,2 тис.6 місяців тому
Why set items can't be indexed? The real reason | 2MinutesPy
What should you write into the __init__.py file? 2MinutesPy
Переглядів 68 тис.6 місяців тому
What should you write into the init .py file? 2MinutesPy

КОМЕНТАРІ

  • @u-2333
    @u-2333 15 годин тому

    This is good content 🤝 clear explanation i think bro needs to create a whole python series 🎉

  • @stickercode
    @stickercode 19 годин тому

    go and learn this from somewhere else. It just tells you what a metaclass is theoratically supposing you know __new__ etc.

  • @wtfdoiputhere
    @wtfdoiputhere День тому

    Oh, the __init__ method? It’s just Python’s way of pretending it’s a ‘serious’ language like C, giving developers the illusion of structure while they lazily avoid dealing with real memory management. It’s like putting a bowtie on a hoodie and calling it formal wear

  • @Saptarshi88
    @Saptarshi88 2 дні тому

    Great video, Thanks man <3

  • @sander_bouwhuis
    @sander_bouwhuis 2 дні тому

    Today I decided to move away from Postman because of all the restrictions. I got recommended Thunder Client... only to find out they literally just 2 months ago ALSO started throwing up all sorts of limitations. So, really happy to see that EchoApi is a worthy alternative. Let's see how long we can use this before it, too, no longer functions properly.

  • @Dailythingsx
    @Dailythingsx 4 дні тому

    Great Explanation :)

  • @nikolaoschairopoulos9005
    @nikolaoschairopoulos9005 4 дні тому

    Must point out that is for IO wait occasions such as (request api, databases reads, text reads etc). Will not make your code faster in general but only on these IO occasions. Nice work!

  • @gunavardhanrao5923
    @gunavardhanrao5923 6 днів тому

    Great Explanation and Great Presentation , It's very interactive...👏

  • @dhartdata5998
    @dhartdata5998 8 днів тому

    Saw few other videos but you explained metaclass the best!

  • @blanky_nap
    @blanky_nap 10 днів тому

    Well explained! Useful topic!

  • @BTFranklin
    @BTFranklin 10 днів тому

    Nice one!

  • @norendermoody6509
    @norendermoody6509 10 днів тому

    How much this is useful in production applications? I mean will it be effective in large scale

    • @thediaclub4781
      @thediaclub4781 10 днів тому

      If used correctly, it can make a huge impact.

  • @Jiohotstar_original
    @Jiohotstar_original 11 днів тому

    2 minutes well spent

  • @kdpr007
    @kdpr007 11 днів тому

    simple superb

  • @krzysiekkrzysiek9059
    @krzysiekkrzysiek9059 11 днів тому

    Cool. THX

    • @2MinutesPy
      @2MinutesPy 11 днів тому

      Thanks for the support

  • @SantoKhan-mk3hp
    @SantoKhan-mk3hp 13 днів тому

    💓💓

  • @kdpr007
    @kdpr007 14 днів тому

    Phenomenal

  • @jeromefaucheux5871
    @jeromefaucheux5871 15 днів тому

    Tail recursion ?

    • @2MinutesPy
      @2MinutesPy 14 днів тому

      Yeah, it can also optimize recursion but Python doesn't support TCO

  • @samuelepadoan4993
    @samuelepadoan4993 15 днів тому

    1:36 Actually every recursive algorithm can be rewritten as an iterative one. The fact is that the most of the times recursion is elegant, and much easier to read. Many times you can rewrite a complex loop with just a few clear lines.

  • @anshumaan1024
    @anshumaan1024 15 днів тому

    1:10 these visualizations are helpful. Thank you

  • @dweepverma3662
    @dweepverma3662 16 днів тому

    1. Recursion with memoization 2. Divide and Conquer approach to reduce recursion depth 3. Iterative Deepening 4. Use iterative approach instead of recursive approach if possible 5. Limit recursion depth explicitly 6. Optimize base cases 7. Use lazy evaluation

    • @2MinutesPy
      @2MinutesPy 16 днів тому

      @@dweepverma3662 ✅👍

  • @nottomention-h8w
    @nottomention-h8w 16 днів тому

    These things make programming more interesting

    • @2MinutesPy
      @2MinutesPy 16 днів тому

      @@nottomention-h8w yeah 100% agreed

  • @maxpythoneer
    @maxpythoneer 16 днів тому

    After a long time

  • @sunnykaran1358
    @sunnykaran1358 22 дні тому

    After watching multiple videos this is the explanation which clicked on my mind . Thank you so much sir for your explanation

    • @2MinutesPy
      @2MinutesPy 20 днів тому

      Thanks for your support!

  • @wiskasIO
    @wiskasIO 22 дні тому

    I don't know Rick, it looks fake...

  • @tobsfavela8721
    @tobsfavela8721 23 дні тому

    thank you! It's a really cool concept

  • @f4zii
    @f4zii 24 дні тому

    Game-Changer?😅

  • @adityamathur2284
    @adityamathur2284 24 дні тому

    Isn't it same as ABCs: Abstract Base Class?

  • @lukewood5751
    @lukewood5751 26 днів тому

    what TTS do you use? It sounds pretty good

  • @slipperysoap-bob
    @slipperysoap-bob 27 днів тому

    amazing video I finally learnt what init does

  • @Mindingsesssion
    @Mindingsesssion 27 днів тому

    If we have a second abstract class, for example Mammals, is it possible for Mammals to inherit from ABC and Animals in python ?

    • @SaiponathGames
      @SaiponathGames 27 днів тому

      Yes, Python supports Multiple Inheritance

  • @GuerreroMisterioso95
    @GuerreroMisterioso95 28 днів тому

    Nicely stolen from mcoding

  • @utkucanaytac5417
    @utkucanaytac5417 29 днів тому

    how about print(dir(__builtins__)) ?

  • @utkucanaytac5417
    @utkucanaytac5417 29 днів тому

    This is really usefull if you try to scrap a webpage using serverless env (such as AWS Lambda).