Harry bhai you are truly right when I started learn c in 2017 there were only a handful of channels with classroom type teaching videos, I joined a local coaching just to learn that language, still makes me think how quickly things have changed, all thanks to creators like you, and the god who created this tech called internet
To understand this you must know ( if you are a beginner like me) 1)nested functions 2)passing function as a parameter and argument 3)returning function from function
# Define a decorator function def my_decorator(func): def wrapper(): print("Something is happening before the function is called.") func() print("Something is happening after the function is called.") return wrapper # Use the decorator with the "@" symbol @my_decorator def say_hello(): print("Hello!") # Call the decorated function say_hello()
@@ajayshankar3200 😂😂 ho sakhta hai q k aksr comment chatgpt k hi hote hai aysay "# Use the decorator with the "@" symbol" yeh line dekh kr pata chal raha hai chatgpt nay kiya hai but literally jab takh kudh say mehnat kr k loogh nahi padenghay to apnay fool banatay rahenghay, please kudh say mehnat kiya kro, dusro ko apna code show off kr k apnay aapko fake happiness de kr kiya faida
After about 60 days of this series, I believe that this series is really helpful for beginners but belive that there could be some higher topics too like best sorting methods, numpy, pandas etc (Hope it comes in the future) Overall i give it a 5 rating as Harry Bhai is really the GOAT ⭐️⭐️⭐️⭐️⭐️ Keep up the good work 👏
This is the implementation of decorator pattern of Gang of Four, in which we add additional responsibility, if we use @ method then it apply on every call but second method only call on those on which we applied
we can use lambda function in place of def to write addition function . for example. def greet(fx): def mfx(*args,**kwargs): print("Good Morning") fx(*args,**kwargs) print("Thanks for using the Decorators function") return mfx add = greet(lambda a,b: print(a+b)) add(10,5)
timestamp 2.44 Harry sir Apaki teaching bahut hi acchi hai, is decorator ka example to bahut hi achha hai. mere paas shabda nahi hai aapko thank you bolane ke liye. Thank you .............upto infinity.
Harry Bhai. Really nice explanation. Saying modified function instead of wrapper and writing greet(hello)() solves my doubt and clear my concept. Thanks man and best wishes.
Harry Bhai todays's lecture is amazing.I have a doubt that " *args and **kwargs " course main sayad nahi hey ,main follow kar rahan hun course ko,agar ho sake toh next video main iske bare main thoda explain kardete toh bahat ache se samajh aajayega. Thank You !
Bro *args hai sayad it generally use when we do not have any idea that how many arguments a function take so check the argument video jisme types of argument baataya hai
As far I think, sometimes we don't know how much arguments we want to give or the user may give. For eg. A function that add some numbers. You may think as a developer that the user will give 2 numbers to add or 3 numbers. But what if the user gives 10 numbers to add up them? You don't know na. So, you use "**arga"... And return all the sum of that numbers. Then it won't be a static function. It'll become a dynamical function.
def dec(fn): def modify(first,second): if second>first: first,second=second,first fn(first,second) return modify @dec def swap(a,b): print(a/b) swap(8,24) # dec ek decorator function hai jo swap function ko as a argument leta hai ,modify funtion us function ko modify karta hai or modify function return ho jata hai jisse dec funtion chlta hai
I think he is a genius and I am mad b'coz I'm finding best python video's and I didn't even play his videos....but now I'm the luckiest....❤❤❤ Thank you sir and srry i believed on stupid rummors 💐💐
Herry bhai, I am waiting for Laravel beginner Tutorial playlist. I am seen other laravel playlist but videos not easy. I request you please make a laravel playlist easy and best for beginners..😊
# Decorator function def decorator(fun): #Accepting the transaction func def wrapper(): #wrapping up the transaction func before and after print("Transaction initiated:") fun() #control goes back to original transaction function print("Transection been successfully completed:") return wrapper # control goes to the transaction call @decorator #Control goes to decorator def transaction(): print("Transection is under process:") #Control goes to the decorator transaction()
ham log ko *args and **kwargs pass karne ki koi jarurat nhi iske jagah par ye bhi kiya jaa sakta h : def greet(fx): def mfx(a, b): print("it will give you average of two numbers") fx(a, b) print("thanks for using this function") return mfx def avg(a, b): print((a + b) / 2) greet(avg)(6, 7)
so what is the need of defining mfx function , why we can't directly use the print statement and sandwich the function which is given as an argument in greet function , can anyone clear my doubt ???
Hello! @code_with_harry sir, Ham firse wahi kr rahe hai kee, har def ko @greet kro. ab 1000 def hai to unko 1000 @greet lagao, koi aisa tarika hai kya kee ek(1) @greet lagao aur sare def ko apne aap lag jaye
LIne no. 16 i.e. greet(hello)() print's the greet message Twice i.e Good Morning Good Morning Hello world Thanks for using this function Thanks for using this function greet(hello()) does the real job i.e. Good Morning Hello world Thanks for using this function Coudn't understand why , it should have been syntax error according to me
It is happening because you might forgot to comment out one of these two. (1) @greet or (2) greet(hello)() Just remove one of them you'll get the correct result. 😇
Harry bhai you are truly right when I started learn c in 2017 there were only a handful of channels with classroom type teaching videos, I joined a local coaching just to learn that language, still makes me think how quickly things have changed, all thanks to creators like you, and the god who created this tech called internet
thank cern
potti
Salute for that guy who created internet 🫡
Mujhse mt puchna Google krlo 😅
To understand this you must know ( if you are a beginner like me)
1)nested functions
2)passing function as a parameter and argument
3)returning function from function
yea i didnt understand anything in this vid
you just should know about functions
Thanks
We need Django full course with amazing projects. Man 💣
yess
ysss
+100
Yes
yes
10:00 Harry bhai giving full motivation wala speech
# Define a decorator function
def my_decorator(func):
def wrapper():
print("Something is happening before the function is called.")
func()
print("Something is happening after the function is called.")
return wrapper
# Use the decorator with the "@" symbol
@my_decorator
def say_hello():
print("Hello!")
# Call the decorated function
say_hello()
Ye to chat gpt ka response hai😂
@@ajayshankar3200 😂😂 ho sakhta hai q k aksr comment chatgpt k hi hote hai aysay "# Use the decorator with the "@" symbol" yeh line dekh kr pata chal raha hai chatgpt nay kiya hai but literally jab takh kudh say mehnat kr k loogh nahi padenghay to apnay fool banatay rahenghay, please kudh say mehnat kiya kro, dusro ko apna code show off kr k apnay aapko fake happiness de kr kiya faida
After about 60 days of this series, I believe that this series is really helpful for beginners but belive that there could be some higher topics too like best sorting methods, numpy, pandas etc (Hope it comes in the future)
Overall i give it a 5 rating as Harry Bhai is really the GOAT ⭐️⭐️⭐️⭐️⭐️
Keep up the good work 👏
tujhe kuch samaj bhi aaya hai kya
He is making general python tutorial, what you are asking is related to data Science 🧪
He has made separate videos on Numpy, Pandas
This is the implementation of decorator pattern of Gang of Four, in which we add additional responsibility, if we use @ method then it apply on every call but second method only call on those on which we applied
we can use lambda function in place of def to write addition function . for example. def greet(fx):
def mfx(*args,**kwargs):
print("Good Morning")
fx(*args,**kwargs)
print("Thanks for using the Decorators function")
return mfx add = greet(lambda a,b: print(a+b))
add(10,5)
Best tutorials and guidance, organized by topic, in short videos with full descriptions, are awesome.
The intro video gives us just that much goosebump hype such that we are going to prepare for a mission right now.....!💫💥💥💥💛💚
timestamp 2.44 Harry sir Apaki teaching bahut hi acchi hai, is decorator ka example to bahut hi achha hai.
mere paas shabda nahi hai aapko thank you bolane ke liye. Thank you .............upto infinity.
Motivation from Harry bhai start from 10:04 💃💃
Harry Bhai. Really nice explanation. Saying modified function instead of wrapper and writing greet(hello)() solves my doubt and clear my concept. Thanks man and best wishes.
Harry Bhai todays's lecture is amazing.I have a doubt that " *args and **kwargs " course main sayad nahi hey ,main follow kar rahan hun course ko,agar ho sake toh next video main iske bare main thoda explain kardete toh bahat ache se samajh aajayega.
Thank You !
Bro *args hai sayad it generally use when we do not have any idea that how many arguments a function take so check the argument video jisme types of argument baataya hai
Args kwargs nhi honge but * , ** ke bareme bataya hsi jo apko tuple aur dictionary as arguments lene me help karegi
Present sir
Can you please tell the use of *args and **kwargs in detail and give more use - cases.
As far I think, sometimes we don't know how much arguments we want to give or the user may give. For eg. A function that add some numbers. You may think as a developer that the user will give 2 numbers to add or 3 numbers. But what if the user gives 10 numbers to add up them? You don't know na. So, you use "**arga"... And return all the sum of that numbers. Then it won't be a static function. It'll become a dynamical function.
@@username_taken_se_pareshan_boi good bro
Thanks for updating my knowledge sir ji 🙏
as far as i remember , you have not shared *args and **karg in previous videos
in very short actually
Love u bhai because of u I have learned a lot in python
Bro
Thanks to you
For giving us precious computer knowledge in todays technology era
def dec(fn):
def modify(first,second):
if second>first:
first,second=second,first
fn(first,second)
return modify
@dec
def swap(a,b):
print(a/b)
swap(8,24)
# dec ek decorator function hai jo swap function ko as a argument leta hai ,modify funtion us function ko modify karta hai or modify function return ho jata hai jisse dec funtion chlta hai
"I will see you next time" is an emote for real, same smile and gesture every time lol it's amazing.
#HarryBhaiOP
#100DaysOfCode
That smile while saying "let's get started"
😇🤩
Thanks sir, 5 min me concept clear kr diya aapne!
your notes are not ignored. they are very useful.
thank you harry..this was helpful
I think he is a genius and I am mad b'coz I'm finding best python video's and I didn't even play his videos....but now I'm the luckiest....❤❤❤ Thank you sir and srry i believed on stupid rummors 💐💐
What a deep line brother God bless you
10:26 motivation level 999999999%
I feel like hugging you for this course ngl.❤
I'm a Backlogger of 26 classes but still watching this coz of curiosity 🙂
bro I am gratefull to you . thanks providing these resources free.
Good content Harry Brother
you thought of anything , harry bhai is already with playlist waiting for u to come and learn from him........💙
Sir, you are doing just a great things for us .we don't have words to thank you .thanks a lot Sir, hate off to you 🤩🤩🤩😍
words hai nahi toh kyu bol raha hai
@@shivansuxinonmedical7800 sarcastic ho rahaye ho
thank you for teaching us decorators.
Always inspired by u d way u teach.grt Harry👍
LIKHNA NAI ONDA
Congratulation ! haris bro on 3.7 million students
Thank you for your best explanation
Bahut acha kaam!
Herry bhai,
I am waiting for Laravel beginner Tutorial playlist. I am seen other laravel playlist but videos not easy. I request you please make a laravel playlist easy and best for beginners..😊
best explanation harry ,thanks
5:45 bhai kya bataya ha ek bar me doubt khatam
(*args) and (*kwargs )did not explained by you :- HARRY BHAI😻😻😻😻😻😻😻
Vote for a video n Why, How, when is Indentation used
👇
That's the motivation bro , This is the only one life changing rule. 💸💸💸
How you indented the 3 lines just by selecting at 3:38, is it editing?
Thank you for this video.
Harry Bhai 23/01/2023 se ye Python series start kiya
Aur aaj 25/01 pura 58 videos dekha hu with notes and practice
Literally Nasha hogaya hai🙌
Amazing man❤ thanks!!
lots of love from Nepal my brother
thanks harry bi i am bangladeshi
i love your video and you
Great sir❤️
"Harry bhai you are really awesome"🤩❤️
thank you bhaiya finally samjh agya😭😭🐢🐢
concept was explained vey well
*arg or **kwarg को chatgpt मे डालो aachi तरह से समझाया hsi
6:11 value added ✅🫡
# Decorator function
def decorator(fun): #Accepting the transaction func
def wrapper(): #wrapping up the transaction func before and after
print("Transaction initiated:")
fun() #control goes back to original transaction function
print("Transection been successfully completed:")
return wrapper # control goes to the transaction call
@decorator #Control goes to decorator
def transaction():
print("Transection is under process:")
#Control goes to the decorator
transaction()
ham log ko *args and **kwargs pass karne ki koi jarurat nhi iske jagah par ye bhi kiya jaa sakta h :
def greet(fx):
def mfx(a, b):
print("it will give you average of two numbers")
fx(a, b)
print("thanks for using this function")
return mfx
def avg(a, b):
print((a + b) / 2)
greet(avg)(6, 7)
Harry bhaiya thank you
Present Sir 🤞
really very usefull this cource bhai
#Doubt Why did we make an mfx function inside greet function. Is it required to make two functions in a decorator everytime
because we can return a function from a function only when returning function is defined inside that outer function
Sir pls make a video on app development with latest technology...
#Day59 Present Sir
Great..!!👌👌
Present Sir on Day-59 ✋
@CodeWithHarry bro you did'nt teach us about *args and **kwargs
Thanks Harry Bhai😍
Hi Harry, is this 100 day course enough for preparing for pcap certification?
Yes
video start from 10:24🔥 😆
looked at it a few times, almost there,but still revise once more
so what is the need of defining mfx function , why we can't directly use the print statement and sandwich the function which is given as an argument in greet function , can anyone clear my doubt ???
plus one
Hello! @code_with_harry sir,
Ham firse wahi kr rahe hai kee, har def ko @greet kro. ab 1000 def hai to unko 1000 @greet lagao, koi aisa tarika hai kya kee ek(1) @greet lagao aur sare def ko apne aap lag jaye
Simpler Example
def decorator(func):
def wrapper():
print("Start")
func()
print("END")
return wrapper
@decorator
def hello():
print("OG")
#function calling
hello()
6:33 ye karke ye karke . ye karke dikhao ye ye ye karke dikhao😅. Rap chal rha
harry bhai ek help chahiye ye aaap notes likhe hona uska pdf upload karo bhai description mai plz bcz it helps for revision
bhai replet ka link dia h description mai vhan sb hai notes bhi hai
Harry bhai , I want to give you a suggestion please teach slowly with simple example!!! plz
The code written in the notes is returning both the decorator and result. What does this mean?
@harry bhai? where you taught *args and **kwargs in previous videos?
Harry bhai thank you i wasted so much money going to a institute
you are great!!
8:29 add function without arguments kaise call ho rha hai. anyone can you please explain ?
Samajh gyii 😁
Technology Sakha channel got (1 million subscribers) in 5 days😲😲😲
nice
code ka kum aur life gyaan jyada batata hai harry bhai
harry bhai app na please motivation rhne hi doo hahaha, but pdate bdyo ho❤❤
mfx function call toh hua nahi.... toh run kaise hua harry bro?
Big fan harry bhai😇
thanks for motivation
its start getting complex
What if we have 3 args to pass to a function ??
Sir few days back I am unwell 🤕 so say for don't continue this course.
But I ma well so I continue this course.😊
I am present bhaiya ❤
Why do we need to wrap greet function with mfx() ?
to accept *args and **kwargs parametres
Python Decorator behaves like Javascript First class Function. Thanks
LIne no. 16 i.e. greet(hello)() print's the greet message Twice i.e
Good Morning
Good Morning
Hello world
Thanks for using this function
Thanks for using this function
greet(hello()) does the real job i.e.
Good Morning
Hello world
Thanks for using this function
Coudn't understand why , it should have been syntax error according to me
It is happening because you might forgot to comment out one of these two. (1) @greet or (2) greet(hello)()
Just remove one of them you'll get the correct result. 😇
ROFL "Nahi ho aise theek" :D ...Haha very well explained and superb MOM like comments :)
Present sir 🤚
wooooooow
wanted to see me after 42 days
day 58 done
Please provide a playlist on freelancing tutorial