- 66
- 566 083
2MinutesPy
India
Приєднався 10 вер 2023
Learn Python-related topics while you prepare your noodles.
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
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
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
This is good content 🤝 clear explanation i think bro needs to create a whole python series 🎉
go and learn this from somewhere else. It just tells you what a metaclass is theoratically supposing you know __new__ etc.
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
Great video, Thanks man <3
Appreciate the support!
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.
Great Explanation :)
@@Dailythingsx thanks
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!
Great Explanation and Great Presentation , It's very interactive...👏
So nice of you
Saw few other videos but you explained metaclass the best!
Happy to hear that!
Well explained! Useful topic!
Thanks for the support
Nice one!
Thanks!
How much this is useful in production applications? I mean will it be effective in large scale
If used correctly, it can make a huge impact.
2 minutes well spent
Great
simple superb
Thanks a lot
Cool. THX
Thanks for the support
💓💓
Thanks
Phenomenal
Thanks
Tail recursion ?
Yeah, it can also optimize recursion but Python doesn't support TCO
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.
1:10 these visualizations are helpful. Thank you
Thanks for support
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
@@dweepverma3662 ✅👍
These things make programming more interesting
@@nottomention-h8w yeah 100% agreed
After a long time
@@maxpythoneer yeah
After watching multiple videos this is the explanation which clicked on my mind . Thank you so much sir for your explanation
Thanks for your support!
I don't know Rick, it looks fake...
thank you! It's a really cool concept
Thanks for the support
Game-Changer?😅
Isn't it same as ABCs: Abstract Base Class?
what TTS do you use? It sounds pretty good
amazing video I finally learnt what init does
If we have a second abstract class, for example Mammals, is it possible for Mammals to inherit from ABC and Animals in python ?
Yes, Python supports Multiple Inheritance
Nicely stolen from mcoding
how about print(dir(__builtins__)) ?
This is really usefull if you try to scrap a webpage using serverless env (such as AWS Lambda).