Okay. Good morning, everyone. Let's begin with a word of prayer. Let me pray. Heavenly Father, we thank You for the truth of Your Word. Father, we thank You that Your Word is living. It is powerful. It is working in us. Father God, even as we take time to study Your Word this morning, we pray that we will encounter You in a fresh and a new way of God. Father, be glorified in and through Jesus' name we pray. Amen. So in the past class, we started with the workings or the methods that Satan uses to attack. Attack is a big word, but to interfere in the lives of people and we saw that he will try to up his influence and we have to be very, very careful to deal with it in the lowest stage or the lowest level possible. There are a couple of common methods that he has used time and again. If we understand these methods, then it becomes easy for us also to overcome it. So temptation is the basic technique that he uses against people. We saw that temptation is something that happens in the area of the mind. He can work the way he worked in Eve's temptation where he tries to affect us through the lust of the eyes, the lust of the flesh and also the pride of life. But we can say no to what Satan is doing. Now we will today try and understand the progression of temptation in the mind. It's not only temptation, but any wrong thought process can become stronger in the same pattern. So let's look at a passage. This is in 2 Corinthians chapter 10 verses 3 to 6. So if anybody has the mic right next to you, please read into it. 2 Corinthians chapter 10 verses 3 to 6. So it is the process in which temptation takes over our minds. For now we walk in the flesh. We do not war according to the flesh. For the weapons of our warfare are not carnal but mighty in God for pulling down strongholds. Casting down arguments and every high thing that exalts itself against the knowledge of God bringing every thought into captivity to the obedience of Christ and being ready to punish all disobedience when your obedience is fulfilled. Okay, that's wonderful. Let's also read from James chapter 1 verses 13 to 16. Then we will discuss. Let no one say, when he is tempted, I am tempted by God. For God cannot be tempted by evil, nor does he himself tempt anyone. But each one is tempted when he is drawn away by his own desires and enticed. Then when desire has conceived, it gives birth to sin. And sin, when it is full grown, brings forth death. Do not be deceived, my beloved brethren. Okay, so we read two passages of scripture. I'll take up the second passage first. So the second passage says that temptation, it's not from God. So for us to say when we are going through a temptation that God is testing me through this temptation would be wrong because we've already seen that God does not tempt anyone. But where does temptation come from? In what James is saying, he's saying it comes from within. We have certain desires. On which the enemy can play it up. And when we start yielding to it, what happens? It can lead to when desire has conceived, it gives birth to sin, he says. So we let that desire stay and grow within us till it comes to a place where we act it out in some way or it is released in some way and then sin happens through us. And through sin again, what happens? It will lead to destruction. So there is a progression again that is taking place. But it starts with temptation. Temptation not originating from God but from the enemy. And the important thing that Satan needs is our desire. So from our desire, the temptation will progress. So that is something we have seen. Now going back to that first passage which we read in 2nd Corinthians 10 verses 3 through 6, there are certain terms used there. Terms like imaginations, reasoning, argument, bringing every thought captive, stronghold. So you have things mentioned there which have to do with the mind. Now for us to go deeply into this, I would encourage us to read a publication by the name of The Conquest of the Mind. It's available. You can either get it as a PDF version from the book section on our website or simply go to apcwo.org forward slash books and you can download it. The Conquest of the Mind. It explains this progression very in a detailed manner. But I'm just going to touch on it. So there is a progression that can take place in our mind. And as we've said, Satan initiates the temptation. But we have to agree with it. In the last class, you recall, we saw Jesus's statement where he said that Satan, he has nothing in me. So when there is nothing in us to which aligns to Satan and his views, then it's fine. The temptation will not work. But if we have something in us like a desire or a thought that says, yeah, it's okay, you're agreeing with Satan, then it leads to this progression. So what is the progression? It's here in our notes, thoughts, imaginations, reasoning or argument, stronghold. So let's begin with a thought. A simple thought. So there can be thoughts in our minds which are not in agreement to the word of God. Many times Satan will plant those thoughts. Let's say, you remember we talked about alcohol. Now that's a strong example. But then I'm just sharing it over here. So if let's say a young person, he's taught about alcohol and all, hey, it's not good for you. And being addicted to it will lead you to all kinds of destructive behavior. So he knows this reality. But he has a thought in his mind and young people experience everything. So why can't I experience it? So that's the thought, the initial thought that the enemy may put in his mind. Like, hey, just try it once. It's not a problem. That's the thought. It's just a single thought. Now, if he doesn't deal with it then and then, if he's a strong believer in the word, he will take out the weapon of God's word. The sword of the spirit. And he can quote a couple of scriptures. How proverb says that wine is a brawler. Nobody who goes in these ways will, like basically there'll be a lot of destruction. You are unwise if you drink. So you would probably quote passages like that.  So he would quote these scriptures and overcome the enemy at the first step, which is a thought, a simple thought. Now, if it is not dealt with at that level, what happens? It may move to the next level. So that would be imaginations. Now, how does it work? The person may just imagine themselves going and hanging out with their friends and nothing. It's just in their imagination. They haven't even done anything right now. So they're just imagining, oh, good evening and I'm just going. It's okay, it's fine. So they're painting pictures in their mind of actually engaging in action. And that happens to our mind. That's the way our mind is designed. If you don't deal with the wrong thoughts, it'll eventually lead to imagination. And that happens even to the right thoughts, isn't it? You think of the good things and then you begin to imagine, oh, yeah, I'm studying. I'm in that college. I'm doing well. So imagination is the next level. Now, if the person doesn't deal with it at the level of the imagination where you go and you bind every wrong thought, you quote the scriptures and you study the word to see, hey, is it really beneficial or not? If they don't do all those things, then it progresses further. It goes to the next level, which is reasoning and argument. Maybe their conscience or their renewed mind will tell them, no, it's not good for you. This is not a good testimony. So many things the renewed mind will say, but the unrenewed mind can come up with arguments. Arguments are something like, hey, I read a research which it says, oh, you should have red wine every day. It's good for your heart. Like basically justification. So you come up with justification, reasoning, arguments. Oh, Jesus, what was his first miracle? He turned water into wine. So if God can turn water into wine, what is the problem? So what's happening?  Isn't it? Or in the communion, God said, they served in the early church, they served wine, they served bread. Why did God choose wine to serve? Nothing is wrong. So justification. So in somebody's head, now the imagination is turning into arguments where we know how to justify ourselves. There's nothing wrong. Where in the Bible does it say, don't drink. It only says don't get drunk. So I'm not getting drunk. You know, there are many ways of arguing or to say, oh, sometimes in weddings without our knowledge, they may just serve something. Maybe it's real wine also by mistake. You drink it. In some weddings they do that. But suppose, I'm just saying suppose, let's say there was a church wedding and they served wine and this young person saw their pastor drinking it, even pastor drank it. So what's the problem? So what's happening? Imagination, arguments, reasonings. So the mind is going to another place where we are able to justify the wrong thing that we want to do. This is just an example. Okay. I'm just using alcohol because it's easier to explain. Now what happens if the person still doesn't deal with the reasonings, with the truth of God's word and renew their minds, then it goes to the next level. What is that? It's called as a stronghold. Now we all know what strongholds are. Strongholds are fortresses. Now some of our older, olden kings and rulers, they have built structures around cities, which are known as fortresses. It's very difficult to penetrate. People cannot enter, people cannot come out. That is a fortress or protection. It was built many years ago. That was their way of protecting. So stronghold is like that. Something which is very strong and difficult to break. That's the point. So in our minds, these thoughts settle down. In a very strong way. Now if you know cement, when people are mixing cement and they're putting it, it's so soft like you're working with it and all. But then it has a setting time. So after it is set, do you think you can rework it? You don't want the way it looks. You want to rework it and put it in another way. It doesn't happen. Once it sets, it's very hard. You have to break it and chip it off. Stronghold is like that. Once it is set in our mind. I'm not doing anything wrong. You move on to self-deception. Where the person is convinced. There's nothing wrong. What did I do wrong? I didn't do anything wrong. Then we have come to the place of stronghold. Now strongholds are very dangerous. Especially for believers. Because strongholds act as a place where demons can come and hide. So they use it as a fortress for them. They stay there. And that is why we say people are demonized. A believer cannot be possessed. Because who stays in our spirit? The Holy Spirit.  So Holy Spirit is living in my spirit. But what's happening? My mind is not renewed. My mind has strongholds. Those strongholds are now the home for demonic spirits. So a believer is behaving badly. A believer has attitudes and you know you can't even imagine this person is a believer. But yeah, they can be a believer but a very carnal believer with strongholds. Demonization. That's how it works. So having understood these things. What does it lead to? It leads us to a place where we have to recognize even one ungodly thought in my mind should not be allowed. That's what 2nd Corinthians 10 says. It says pulling down every thought and imagination that exalts itself against the knowledge of God. So if I find one thought in my mind which is not correct, that in itself is dangerous. I have to bring it down. Pull down every thought, taking every thought captive. So how should the mind of a believer be? Renewed mind. Renewed mind. That is when like Romans 12 says right then we can prove the good and acceptable will of God. When we are transformed by the renewing of our minds. But when we have an unrenewed mind, sorry. It's very difficult to live a godly life. Because we have this progression in our minds where imagination, reasoning, argument, strongholds and it shows in our life the way we are when it comes to many temptations. I just simply used alcohol but it could be lust, it could be money, it could be so many things, pride, jealousy, so many things. So that's how this progression of temptation works. But we can overcome it. Sean, you had a question? I thought I saw you raising your hand. Yeah, please use the mic. My question was like when you come to reasoning and arguments is that when the person living in denial, can you call that? But then you already covered in strongholds. Yeah, very strongholds. That's when you start to live in denial. They go into denial. You may even want to call it deception point where though everyone around is understanding that this is not good for you, that person is not understanding because they are convinced. So those are the dangers of yielding to temptation. And Satan knows if he finds a believer who's agreeing with his promptings, he knows he can lead them into the stronghold place Stronghold, he can keep them captive. But we have to do the opposite. Every thought we have to take it captive, pull it down. Wrong thought, pull it down. One Corinthians 10, 13 says, no temptation has overtaken you, but that which is common to man.  So God is gracious. And also we see that Jesus, he was tempted in every way yet without sin. That's what we are told about Jesus. And because of that, he has become a very compassionate high priest to us because he can sympathize with our weaknesses. And one more beautiful thing is he can go boldly into his presence to ask for mercy and grace. He can go to the throne of grace. So we may be going through temptation. Sometimes it's very difficult. But in those moments, we may feel very unworthy. Like how could I, I'm a believer and you know, how could I yield to what Satan is saying and all that. But instead of condemning ourselves, we can go to God and say God, you know, I'm sorry, I know that you understand. I need your forgiveness. I need your mercy. I need your strength. And so we can find that deliverance, forgiveness and strength out of temptation. But here the point we want to make is that temptation is a method or if you, if you want to call it a technique, which Satan uses through one thought, he can plant in our minds. And if we are not careful, that can lead into all these things. Okay. Imagination, reasoning and stronghold. But we can overcome like Jesus. How did Jesus overcome? How was his first and best method of overcoming temptation? Word of God. It is written. Okay. Every time Satan put a thought, come worship me. No, it is written that you will worship only the Lord your God. Or Satan put a thought in Jesus's, his mind. You jump from the, you know, the top of the temple. Because Satan is also using God's word because it says that God will protect you with his angels. So twisting the word, he knows very well. Okay. Which is why we should understand the word properly. Otherwise word is there, but it is twisted. That's how Satan works. But Jesus said, no, you will not test the Lord your God. So when you know the word, when you understand the word, when you remember the word, use the word, he has no chance in our lives. That's the best way to overcome temptation. Now, when Jesus was tempted to not go to the cross, what did he do? What did he do? He was under high pressure He was in Gethsemane. Okay, let me give you another clue. What did Jesus do in Gethsemane? Prayer. So another way to overcome temptation is prayer. Just spend a lot of time in prayer. Okay. When Jesus felt he couldn't Lord, take away this cup. He was in that place. But he said, okay, let me pray. He also asked his friends, his disciples to pray. Unfortunately, they slept off. Okay. But there is power in prayer. We can pray to overcome the suggestions of the enemy. So these are ways in which we can overcome. Now, the second technique. Okay, we have a comment here. I'll just quickly read it. So Prince is saying, as believers, we are the temple of God and it's Holy Spirit who dwells in us. But as we talk, when a believer has strong holds, he or she will be demonized. But how can demons come and take place when Holy Spirit is dwelling in oneself? Because Holy Spirit and demons can't go hand in hand. My question is, how can Holy Spirit and demons both can dwell in believer? Okay. Yeah, I know. It sounds very schizophrenic, right? Like this God is saying, you've seen those cartoons, you'll have a God is selling. Don't do this. And the devil is saying, no, you do this. Everything going on inside one person. So Prince will answer your question. It's coming up. Okay. It's coming up just a little later in inclusion. Okay. The third section here. So let me take up intrusion first and you will understand. So I said temptation is one way. Another way would be intrusion. It's number three in our notes. Intrusion is illegal entrance. Illegal. Okay. Or you could call it unlawful access. Now, if this compound or this land has been officially given to a certain person, anyone else coming in and trying to build on this land is illegal. Unlawful. Now, in the same way, what Satan tries to do in the lives of believers is, he knows what is legal. He knows covenant. Covenant says we are healed. Covenant says we are blessed. Covenant says God is our provider. Covenant says we have peace. So Covenant says a lot of things. God has promised us many things. The cross has given us many blessings. But what will he do? He knows legally for the believer. This is what is valid. But he will try to come in and illegally occupy. Okay. And do the opposite. So what are, what is the opposite he will do? Bring strife, confusion in the place of peace. Bring oppression, you know, in the place of freedom. Bring sickness and disease in the place of health and wholeness. So he will, he loves to do that. Illegal work. Which is why we say, you know, sometimes we, we, when we pray or Jesus, we read about Jesus in Matthew chapter 8. Peter's mother-in-law was sick. What did Jesus do?  No. We read, he rebuked the fever because he, Jesus is understanding power, authority, covenant. And he says, it's not right. You know, and similarly look chapter 13. There's a woman, she's bound. She's the daughter of Abraham. How can she be bound? Cast out that spirit. So there's a sense of militancy that Jesus has because, what you're doing is illegal.  Rebuke. That is why rebuke. You know, in Hindi, I used to always wonder, what is rebuke? Badna. You, you don't, you don't scold somebody who's doing a good thing. You only scold somebody who's doing the wrong thing. So that is why we have a rebuke because he's an intruder. He likes to come in illegally. Now to answer Prince's question, you know, Jesus, Jesus said, right in John 10, 10, like in that passage, he talks about him being the good shepherd, laying down his life for the sheep, protect, protecting the sheep. And he says, I've come that you may have life and have it in abundance. But the thief comes to steal, kill, destroy all illegal activity to take away, to rob us. That's why Satan comes. So he is an intruder. No thief who comes to anybody's house, do they give you a check and, you know, some gifts and make you richer? And you're like, wow, they came to my house. How wonderful. Never they come to only subtract, take away, destroy, right, create calamity. So that is Satan's job. He comes to steal, kill and destroy. Now we have to ask the question. Okay. How is it that he can enter? So sometimes he tries to enter forcefully. Okay. And we have to evict him. That's when we have to pray, we have to confess the word. We have to rebuke, we have to bind, do all those spiritual warfare activity. But sometimes what he does is, he finds a back door open. That is easy for him. Anyway, he's trying to get in to bring all the calamity into our lives. Now, if he sees, oh, here is a wonderful believer, church going, you know, tongue talking believer, but they have a weakness. They have a weakness for, let's say, simply, some examples I'm saying, gossip. They have a weakness for, you know, just pride and not respecting leaders, something. He finds some weakness in a believer. Now that is an open for open door for him. It's a crack in the wall. So nobody is there to stop him. You can easily come in. Now Paul calls it, you know, don't give the devil any place Ephesians 4 27 or in other versions, it says foothold access. Don't give the devil any access. So to answer your question Prince, how can we stay and Holy Spirit also if they have access, they can come in. So already we said that when a believer does not deal with sin in their lives, the Holy Spirit will convict us. It's best to respond immediately. Now, as believers, let's take for example, maybe God is convicting me about the way I'm handling money. Okay. I don't yield to the voice.  Though Holy Spirit is speaking to me, I am moving in that path of stronghold. And it's like when that sin is not dealt I'm giving Satan access. I'm giving demons access. So with my wrong attitude demons can come in. Am I a believer? Yes. But is it possible for me to be demonized? Yes. So that's how Prince, I hope you got your answer. So both Satan demons and Holy Spirit can dwell in a believer in that sense. So in strongholds demons can stay but in the spirit of a believer Holy Spirit will stay. Yeah. All right. So that is about intrusion. So what should we do about this intruder? Even Apostle Peter, he says you know like be vigilant be alert, be vigilant because the adversary the devil he's like a roaring lion. He's waiting to see whom he can devour. So that is his thing. He loves to do illegal things and bring it on our lives. So we have to be very careful and the Bible also says resist the devil. Stop him. He has no legal access. Today if we find somebody trying to enter into our campus will we keep quiet? No. We'll tell them sorry you have no rights to take over. So in the same way it comes to our spiritual inheritance or blessings we have to stop the devil. Resist the devil. But you know one more wonderful thing in that passage James chapter 4 verse 7 it says resist the devil and he will flee from you. But before that it actually says submit to God. Sometimes what happens to believers by binding the devil rebuking the devil we are fighting against very hard against the devil. But our life is not submitted to God.  We are not surrendered to God but we are using spiritual authority. So it's very beautiful. Once I heard pastor say this our level of authority is based on our level of submission. How much I am submitted to God that much authority I can use. See when I fight against the devil if I am submitted to God in that area he cannot open his mouth. Because he knows oh this person they have set it right in the matters of whatever money or lust or pride anything. They are obedient to God in this area. So I cannot point a finger at them. So our level of authority will depend on our level of submission. So yes resist the devil. He will flee from you but first submit to God. So our spiritual warfare starts where shooting at the devil all the time no that is step 2 first is submit submit to God resist the devil then we will be very effective in our spiritual warfare. So intrusion is another way in which he works. So we should not let him intrude. Intimidation this is the second one in our notes here and intimidation I explained the other day intimidation is making one fear ok like just now we saw first Peter chapter 5 that our adversary the devil is like a roaring lion so when we see a lion what happens oh we get scared oh my goodness don't even go there you know if a lion roars we are like it's so powerful it's scary but notice even in that verse it says he's like a roaring lion so whether he can damage our lives or not he will pretend that hey I'm going to damage I'm going to do this I'm going to destroy you then what does it create intimidation fear anxiety and when we get scared what happens we don't resist him effectively we give in ok so that's another way that Satan works he tries to scare the believers you remember in acts all the believers they go and preach they go and plant churches and at that time they have lot of resistance authorities they come and they say if you ever preach in the name of Jesus you know stop preaching in Jesus name so what is that all that is intimidation scaring us from doing the right thing Satan loves to do that to scare us if you don't do this you wait and see what I'm going to do so unfortunately for lot of believers they lose the battle because of intimidation they never even take a step they're like oh I'm so scared you know what if I fail what if this happen what if what if not doing anything you know how will you know if you don't do it if we yield to intimidation we will never overcome the devil because basically he's pretending like I'm very strong you can't do anything so that is another tactic which he uses are you all awake alive yeah ok great so then we will move on let's go to chapter 4 here the point 4 here which is opposition so Satan's next technique is opposing so Paul writes to the Thessalonian church he says look I wanted to come to you I wanted to meet you but you know what Satan did he tried to stop me he tried to oppose he tried to create difficulties when we read about different places also where Paul went to do ministry he face lot of opposition sometimes as believers we feel we will serve God wherever we go everybody will accept us it's gonna be amazing but does it work like that it may not because time to time Satan will try to create some confusion some opposition if you are doing the work for God in the right way also he will try to come create something come on let's stop this person did he try to stop Jesus yeah Jesus did miracles and all but think about this people had such opposite response like that pigs know that day we had that discussion about pigs so demons are cast out of the man we will think oh they might they might throw a party for Jesus that this man is set free but what they tell what do they tell Jesus please leave our city Jesus you are affecting our business how sad but that is the opposition that Jesus face see Satan is very good at this he will try to create opposition to try and stop us from doing what God wants to do so we have to be aware of that and there can be times so we have to have we have to use our authority when it comes to opposition remember we said we have the keys of the kingdom to bind to lose so if we are facing opposition from a certain kind of spirits we just say I bind you in the name of Jesus I release whatever authority God is given I release the power of God or the other thing is when opposition is coming from the devil we need to use our wisdom devil is this how you are going to do let me do that I will just give you one small example for church like for not church now the timings have changed but we used to go very early in the morning so I would notice in the early days I would notice that in the morning when we are getting ready something or the other will go wrong like the parl went so now how to iron my clothes or something I forgot the charger for the laptop they have to do power point over there I will go there and I will be like oh no I left the charger then another person has to go there so many things were going wrong so I thought what is this sometimes what believers do they will say the devil I know the devil doesn't want me to go to church that is why all this is happening but don't blame the devil for everything ok yes sometimes he will oppose that is a reality but every time saying devil is attacking me or people also say I started doing ministry and many things are going wrong in my life have you heard that because they feel now the devil will try to attack me more see as long as we are living in the world that is his job whether you are doing ministry or not doing ministry yes of course when we are trying to do ministry he knows maybe he will target little more that is there because the scriptures say you know you strike the shepherd and the sheep will be scattered so he knows that if he can target a leader it's a lot more beneficial for him but having said that God has given us wisdom ok so we can become smarter than the devil ok come on let's plan better so I've gone a little crazy in this area that you know I pack my bag I keep everything sometimes I even put the water in the water bottle and keep it in the car because otherwise in the morning I forget there will be like a pastor please bring that form bring that key there will be some thousand things which you have to take and go one thing if you forget you know you go so far and so I am just saying instead of blaming the devil that he is opposing me he is opposing me we can use our wisdom ok so maybe we can plan better we can organize better we can have some backup ha if papa doesn't know ok fine we'll do this right so oh devil you are smarter than you so just try to gain God's wisdom to overcome the devil ok we can overcome by spiritual warfare but also wisdom and pastor has given a wonderful he has written out his dream and he has interpreted that dream also I encourage you to read that in point number 4 in your notes where in his dream he felt that many many strategies of the devil were attacking him but each time God gave him a a new way to tackle the enemy and finally when he prayed for the interpretation of the dream he got those passages where it says that the cross is the wisdom and the power of God Satan thought he has defeated Jesus by mailing him to the cross but God's wisdom and power of the cross which he could not understand right so God can give us his wisdom for us to overcome the opposition of the devil so these are all ways in which Satan will try to affect us so what we'll do is in the next class we'll try and complete the remaining methods I'll pause right now to just check if there's anything that you want to clarify further exact meaning and what does it mean okay it's a more severe and a serious thing Rebuke so Rebuke is not just scold in the Hindi language he's telling us that another word is used for Rebuke where somebody is somebody how do you say it yeah or tell them that they are unworthy like sort of assert that they are unworthy or they don't have the right to do what they are doing so that is Rebuke okay great so don't let the devil you know sometimes we just welcome the devil yeah please come do whatever you want to do cup of tea don't play friends with the devil when you are noticing this is not right go against it okay Jesus said no I've given you the keys of the kingdom use it bind, lose so that's the job of us believers we cannot tolerate the devil and his works okay so alright let's pray in close for today and we will come back to discuss more in the next class Sean can you please pray since you have the mic yeah Heavenly Father thank you very much for gathering us all here that's Heavenly Father thank you very much for understanding much better Heavenly Father thank you very much as I understand about how to defend against demonic powers Heavenly Father thank you very much for speaking through my Heavenly Father and Heavenly Father please help us to keep all that we learnt in our minds Heavenly Father and please help us to use it mightily as we go forward Heavenly Father and please help us to learn more new things in our class Heavenly Father in Jesus name we pray amen amen amen amen thank you everyone for connecting we will meet again next week bye for now thank you


Hey everyone, so before we get into the video I'd like to direct you all to my latest in the light up the world tour series the Spain video It's got a lot of amazing content here. It's just been uploaded on my channel I wouldn't want you guys to miss any of the series. So please check it out. I'll leave a link down below Thank you all for your support, but for now, let's get into this video What do you mean by vegan? You mean like an animal rights? You don't mean health Just because left the animal principle. Yeah moral principle. Yeah, and I agree 100% since 999 like 18 years ago I start to be like Wow, you know, it's a long time. Yeah, I was a teenager, but the question is Sometimes I go like some people invite me. Oh, there would be like a vegan dinner I want you to give your workshops about nutrition and plant based and health and the animal rights But sometimes I'm working with a person, you know, they are smoking like weed before the workshop or they are drinking alcohol and Sometimes so you're working with someone who does the workshop with you Yes, the vegan who someone conducts a workshop and smokes weed beforehand I don't think anyone should be going to schools and smoking weed and getting drunk beforehand though Yes, I mean, I mean if you're representing If you're doing a workshop, I don't I don't think it's cool to get drunk beforehand or whatever Sometimes I don't express like you may not the individuals might lead a lifestyle that isn't completely healthy Yes, because sometimes I'm working in a there's a for example vegan meeting or a vegan weekend in some place And I go there and I spent two hours speaking about health about lifestyle exercise and eating a whole plant And I have seven guests and they like but after I have a problem with the organization for example The vegan they say oh, you speak too much about health. We are not Promoting health or just promoting veganism, but and they are eating like why do you work with them? If they if you promote health and they promote animal rights. No, I but cannot veganism can Can be connected with health because well, I know it can't No, it can't Plant-based nutrition whole foods plant-based nutrition is a diet Yes, but if you can veganism is a moral principle Yes, but it's nothing to do like like if you eat a whole foods plant-based diet You've you've eradicated most of the cruelty because a lot of it happens in food But in terms of maintaining a healthy lifestyle, this has nothing to do with the moral principle of Non-exploitation of sentient beings.  Yes, this is my point Yeah, I have my best friend. I love him like he taught me about Veganism who was a Hare Krishna, but he's 40 years old. He's fat. He has The beginning of diabetes. He has inflammation in his joints and I know because he just eats Junk vegan and he's an activist. He's has the tattoos and everything and we are angry all the time Oh dear friend, I love you. You're an activist But that is a personal choice of his and sometimes I feel that I am like out of the vegan Activism and the vegan thing that the vegan word Because I try to use like dr. Mcgregor It's a good way of advocating. I mean it can be a strong way of Advocating to add health into it, but in terms of the moral principles of veganism health is Got nothing to do with it. So I'm not telling I'm right and they're wrong or anything sometimes. Well, you're both right like look look look In terms of you being a health advocate, I Wouldn't work with animal rights activists because they're two separate things. I mean if you want to bring animal rights into your health I'm just telling you straight out what it what what if you want to ask me a question I'll tell you exactly what I think health and The ethics of veganism are completely separate you can bring them together and mesh them together and go Okay, if you eat a healthy health foods plant-based diet, you can reverse heart disease and diabetes and and it's also good for animals And good for them, but that's a good way to advocate My goal is I always think about the animals, okay? It was my My motivation when I became vegan, but I saw like my yoga teacher in India was with disease My best friend vegan with that's a different fire and I thought okay. I grow vegan, but I cannot just eat like sheeps and Like well, that's your personal choice. This is a completely different area. You're going into here you're going into helping people and Which is good. I'm not saying it's bad. I'm not saying you're wrong But if you want to look after your health, that's great But it's got nothing to do with animal rights and the moral principle that holds together But if I can I can reach like one thousand I'm not saying it's bad. I use health to advocate as well like you can use like but it's not the only way And if you're telling if you're going to say to animal rights people that you you got a door this way But you do it that way that that's your it's it's separate from animal animal rights I never had any problem with meat eaters with anybody, but sometimes some vegans. They say all your points Is not the animal for no if well, it's true. It's true that veganism is about the animals You can't be vegan and You can't be vegan for health You cannot you just can't because you can still wear a leather jacket and go to a circus and eat a plant-based diet Yes, I agree. Yeah.  They eat all kinds of meat I'm telling you so it's more like so all I'm saying is is you can't be vegan for health and the environment You can only be vegan for the animals Because it's a principle of non-exploitation. That's okay. Yeah, and Okay, because sometimes I don't know I know how to because I think you're mixing the two you're mixing plant-based nutrition with veganism But if you put me in a in a place with 100 people I can spend two hours giving recipes And that's great and everything is speaking about the animals and health and all the signs What I don't know is how to do with vegan some place because sometimes they are Looking facing the animals and I agree. I'm with them But you're trying a different method and like when we go like when we see to have a dinner Sometimes I say sorry, but as a vegan Like you I cannot eat these or drink these or smoke this why not because as a vegan if it's vegan Like I'm vegan like you but I was not That's got nothing to do with anyone this is what this is where you're putting your personal choice of health on other people when it's It's not a moral issue When people exploit animals, that's a moral issue where you should get involved But when someone makes health decisions, that's a personal choice So I want to be calm about this if my best friend who taught me about veganism is sick Because he's eating junk because you care about him. That's different. That's your friend. Yes So if my mum smoking cigarettes, I'll get like mum, you know He's not smoking cigarettes, but if a stranger smoking cigarettes, it's like like maybe The only moral issue with someone smoking cigarettes is the fact they're tested on animals Okay, I'm just telling this because sometimes looking we can create a new Activism inside the vegan community like you should be roving and you should be plant-based vegan I want to stop this But I want you to know how to deal with different like the health There is no such thing as a health vegan, but there's a there's healthy vegans But like I said, you can't be vegan for health You have to like this is what what I think happens People have a misconception about what the word vegan means and I think you just look at the Definition of veganism and it's to do with using animals. Okay. I'm trying to because in English Amazing, we have many people like you in Australia, but in Portuguese. We don't have many Yeah, I should understand like better what I'm doing like to save I think I think you should just do your own thing And don't worry about what other vegans are eating and stuff like that as long as they're not harming animals or You know, I think if I think if a vegan is telling you something that isn't vegan is vegan I think that's a problem if they're doing if they're participating in animal exploitation Then that's not vegan, but in terms of their meeting a big greasy burger and some chips and smoking some weed That's our own personal choice. I mean, I guess you are gonna run into problems with people if you if you um Preach a health message on to people who care about ethics Because I could start dumping heads with people and no everything's okay, but I I felt this working together Sometimes, okay, we'll have a Sunday vegan picnic and some and sometimes Some difference some arguments. So I'm learning how to deal with the like what's veganism So I'm learning reaching people bring them first because of health issues because people are sick and That's what the plant-based doctors do plant-based doctors don't promote veganism. You know that, right? Yes, very rare. I can hear maybe Neil Barnard sometimes But doctors promote plant-based nutrition. It's not veganism Dr. McGregor and all the doctor Gregor promotes plant-based. They're doctors. They care about health. They're not it's not it's not veganism But they give up a base a very strong argument that we can be healthy on plants, which is good for animals Most of people in the community they go they say, okay, I would try to give up everything But I I need some doctor's opinion or some science. So I use this but my goal is to save animals You know, I just use this as a method Well, then what about if you met someone that love burgers and love French fries would you tell them and love Smoking weed would you tell them? That's not vegan. No, even the weeds. Okay, but would you tell them that? No, no, no, no, no Look, don't don't don't don't eat the junk food because that's not vegan. Would you say that? Be honest It's okay if you do But are you sure like if someone's eating chips and you just told me you had a problem with what vegans were eating So I'll tell you like this if you tell someone Veganism is about health and they can't have their favorite food but veganized They're more likely to go stuff this vegan diet if I have to eat whole foods all the time And I can't have my burgers and my chocolate and my chips and I'm going to go back to eating animal products Because this person told me veganism is about health and about raw foods and about all these amazing I want to have my burgers and then they go back to Burger king and get a beef burger because they can't have their junk food as well. So I think giving them Both options Is a good idea if you if you care about I don't care what diet people eat as long as it doesn't exploit and harm the innocent so Don't want to mix thinking that one thing is another thing Okay Some people really care about health and you can go on that avenue with them. Some people don't care about health They care about they might care more about ethics. So I think you you should um alter your approach Depending on who you're talking to Find out not everyone is the same as you not everyone cares about health A lot of people do though. So you can use it on them I feel like uh, we have to be careful not to let the animals get lost in The health and environment message because they're already forgotten Yes, if your goal is to turn your average person vegan and your average person eats here Yes, I'm just you know, I mean they're eating fried chicken. They're eating big burgers with cheese.   They have the option If you wanted to broaden your reach You should you could adapt to any situation or any individual Yes, because as a personal trainer when I see someone smoking for example, first thing I want I want to speak about Smoking And I forget sometimes about like because that's your focus. That's you and I think I think if you're health happy There is a happy health vegan channel youtube channel like something like this I want to bring them to to be happy health and so sometimes Instead of keeping them vegan and smoking. I want to to speak about like how smoking is harmful for your health and And sometimes I lost like should keep them vegan or health vegan So if they're vegan and smoking, I don't care if they will have length I think you're confusing veganism with health That's all because I studied this in university Plant-based nutrition and veganism are two different things. I mean smoke vegan cigarettes and eat drink vegan alcohol and have Terrible, but you can have a vegan heart attack. It's just a common misconception.   They're not vegan doctor. A lot of these doctors aren't vegan Yeah, yeah, but they're not they're plant-based I don't know the difference because I just see them on the internet. Maybe you know them The reason they don't recommend veganism is because veganism can be oil and can be fries and can be Chips and can be any coke can of coke. That's why the plant-based doctors don't recommend Veganism for health because they're health focused Never forget the animals in your conversation because you cannot be vegan for health You cannot be vegan for the environment Okay, these are benefits of veganism, but veganism is a moral principle against the exploitation of animals Okay, you can eat a plant-based diet wear leather jackets and go to circuses zoos and aquariums and use Products tested on animals. You are not a vegan


Caesar Clown is many things to many people. A mad scientist, a sociopath, a tongue enthusiast. However, to me, Caesar Clown is rather simply a subscriber to the Grand Line Review, who receives regular One Piece content uploaded straight into his YouTube feed, and knowing that it really is difficult to despise this lavender clown. Not impossible, of course, not impossible at all actually, but certainly, you know, mildly more difficult. Hello and welcome to the Grand Line Review, your source for everything One Piece and more specifically, Saga's End Minutes. The series that aims to equip you with the basic knowledge to leap into the wilderness of One Piece, and today, we are heading into the New World at last to examine the mammoth piece of story that is the Dressrosa Saga. The Dressrosa Saga is the eighth in the series consisting of two arcs, but in absolutely mega 148 manga chapters, which makes it the longer saga that we have covered to date, and as such, I'm telling you right here and now, this is certainly not going to be finished within a single video. But to kick things off, we are finally here, as we pick up with the Straw Hats emerging into the New World, and immediately they are met with some of the most chaotic and apocalyptic weather conditions that we have ever faced in the series, signifying that this stretch of water is on a completely different level. From here, our New World Log Pose presents three possible destinations to the crew, of which Luffy chooses none of them because they also receive a distress call from a location known as Punk Hazard, and smelling a decent mystery, Luffy becomes determined to visit this island. The Straw Hats are not the only one to receive this signal, however, as this transmission is intercepted by now Vice Admiral Smoker and his G5 Marine forces, who were lying in wait for Luffy at the island that they suspected he was most likely to choose, but as a result, they also set sail for Punk Hazard. After arriving on the island, the crew splits into two groups, with the initial landing party being Luffy, Robin, Zoro and Uso, who traverse this fiery hellscape and almost immediately stumble upon a dragon which is quickly defeated. In the meantime, the remaining Straw Hats aboard the Thousand Sunny are captured and imprisoned in a mysterious facility on the other half of Punk Hazard, which is also a hellscape but a frozen one. And here we encounter two very strange things, the first of which is a group of children who are being experimented on at the facility, and the second is a samurai or part of a samurai named Kinamon, and over the course of Punk Hazard, Kinamon's various separated body parts would be collected together to form one unit of solid samurai. Soon enough though, it becomes apparent that Kinamon was rendered in the state by one Trafalcal Law, a member of the worst generation, and who post timeskip has now become a warlord of the sea, and who furthermore appears to be working with the cast of antagonists in control of Punk Hazard. And Law's presence on the island is first discovered by Smoker, and the two engage in combat, which resulted in Law's victory via removing Smoker's heart with the incredible powers of his devil fruit. To make matters worse, Law is then able to switch the bodies of Smoker and Toshigi, resulting into Toshigi's consciousness being placed into Smoker's fleshy vessel and vice versa. Furthermore, Law also goes on to do this with the secondary group of Straw Hats, and Nami, Sanji, Frankie and Chopper all undergo a hilarious body swap. And as for who becomes who in this situation, while Nami was placed into the body of Frankie, resulting in one very pretty cyborg, whereas Frankie went into the body of Chopper, resulting in the abomination that is this thing. Meanwhile, Chopper went to the body of Sanji, giving us one very adorable chef, and finally, Sanji was thrown into the body of Nami, which was something of a dream come true for him, although he was threatened by the overwhelming newfound cyborg powers of Nami, not to do anything untoward with her body.  At this point though, Luffy stumbles upon Law, and remembers him being responsible for saving his life during the Marine for Dark, not only providing Luffy with an escape vessel from the war, but also treating his wounds. And after some shenanigans, eventually Law approaches Luffy with a bold proposition, claiming that he has a plan to take down one of the four emperors, and he even suggests that he and Luffy form an alliance to do so. And despite his present crew members warning against the danger of a pirate alliance, Luffy almost immediately accepts his proposition, and Law begins to implement his complicated plan, which begins right here on Pongkazut, and he also gradually undoes all of the crazy body swapping he implemented within the crew. But step one of Law's master plan has to do with the ultimate antagonist of Pongkazut, a man named Caesar Clown, who was responsible for experimenting on the children, as well as the production of various chemical weapons, and producing a substance known as SAD, or S-A-D, which is then used to create artificial devil fruits by Caesar's benefactors, one of which is eventually revealed to be Warlord of the Sea, Don Quixote de Flamingo, who then uses this to do business with an Emperor of the Sea, that the Luffy Law alliance is targeting, who is later revealed to be Kaido. And in order to put a halt to this, an operation is implemented to capture Caesar Clown, which is easier said than done, because another presence arrives on the island in the form of Vice-Satmar Virgo, who is a double agent within the Marines, and an extreme physical powerhouse. And just on power, it should be noted that Caesar Clown isn't exactly a weak existence himself, as he had consumed a Logia double-type fruit known as the Gasugasunomi, which allows him to conjure, manipulate, and become gas. Which means that he can do all sorts of crazy crap, such as remove all of the oxygen from the air around him, which went on to instantly defeat a whole host of our good guys. Furthermore at this stage, a faction of the Straw Hats get captured by Caesar Clown, along with Law, Smoker, and Toshigi, and at this point they form a temporary alliance with Smoker and the G5 Marines, after which Law restores their bodies, and all of a sudden we have quite the miniature army here, marching in full force on Punk Hazard. Meanwhile, Caesar is currently in the process of broadcasting his brand new chemical weapon, which threatens to kill everybody on the island, putting a great sense of urgency into this pirate-marine alliance. And Caesar's weapon would comprise a complex set of operations, whereby he infused some of his own poisonous gas and a Zoan-type devil fruit to create what I would call a big old blob of death, which was named Smiley. However, this was but the tame form of Caesar's weapon, as basically after consuming a tasty candy designed for Smiley that would go and kill the creature, that would reveal the true form of the weapon, which was the widespread release of the gas on mass. Interestingly enough though, this also provided us with the very first example of what happens to a devil fruit after its user passes away, which is that the power immediately reincarnates into the nearest appropriate fruit for future use. Very interesting stuff right there. Now very notably at this point, there are also quite a few parties watching this broadcast who are representatives from power all over the world, and we do recognize certain figures, such as Bacoms and Tamago from the Big Man Pirates, but also used as a kid from the worst generation. But many of these figures were entirely unknown characters and have been referred to as the underground brokers. As part of the ensuing skirmish Trafalgar Law and Smoker team up to take on Vice Admiral Virgo in an incredibly hard fought battle, however the duo eventually overcome him and Virgo is left in a state of separation thanks to Law's abilities. As this is going on, Luffy is gunning toward Caesar to defeat and capture him, although along the way, he discovers a child by the name of Momonosuke, who appears to have eaten an artificial devil fruit not created by Caesar though. Instead, it was crafted by the legendary Dr. Vegapunk, and it has the effect of turning Momonosuke into a small eastern dragon, although the young boy is not capable of controlling his abilities very well at this point in the story. The most important thing about Momonosuke though, is that he is a comrade of the puzzle samurai Kinamon, a duo whose mystery on Pankazad would be unraveled over the course of many, many arcs. In any case, Luffy does eventually find and defeat Caesar with the other allied forces proving victorious in their individual endeavors as well. One other notable conflict is that Zora and Toshigi teamed up to defeat Monet, the user of a snow-type low gear fruit. Chaos on Pankazad has certainly not gone unnoticed so, and Dol Flamingo is well aware of the trouble that his business is currently facing. Choosing first of all to send two members of the Don Quixote Pirates, being Buffalo and Baby Five to ensure order on the island. Although after their failure, as well as with the sudden breaking contact with Monet, who in a very complicated manner was accidentally killed by Caesar, Dol Flamingo decides to make his way to the island himself. After the victory of the allied forces though, a short break slash no party occurs, in which Lora reveals the next stage of his plan, which is to visit Green Bit, an island territory connected to that of Dressrosa, the island that Dol Flamingo currently rules as a king. And after discovering that Lora and the straw hats are headed to Dressrosa, Kinamon expresses his desire to visit the island as well, because he has mysterious business there and so Kinamon and Momonosuke join the fun and the alliance sails away from Pankazad, which sees a clown in chains. This leaves Smoker and the G5 Marines on the island, who are shortly after confronted by the arrival of Dol Flamingo, who attempts to kill Smoker, but is ultimately stopped by the very well timed arrival of another figure being former Marine Admiral Alkegi, who now is just known by his real name Kuzan. In any case not wanting to face off against Kuzan, Dol Flamingo smugly retreats back to his kingdom, while Kuzan and Smoker then have a little chat. Now at this point it should be stated that Kuzan has resigned from the Marines after battling Sakazuki for the position of fleet Admiral, a 10 day affair that actually took place on Pankazad and is the reason why the entire island's climate has been irrevocably morphed into a half fire, half ice, pookyball style island. And so at the moment Kuzan is acting as more of a rogue agent of justice, although there are allegedly some terrible rumors surrounding his actions and current associates. More delicious delicious mystery, but Kuzan still retains an incredible degree of trust in Smoker and even requests that Smoker does not report his presence to the Marines at large. And now on route to Dressrosa with the leverage of Caesar Clown, law calls Dol Flamingo and issues him with an ultimatum, in that he will hand Caesar over in exchange for Dol Flamingo resigning his position as a warlord of the sea, which Dol Flamingo does agree to, and a hostage exchange is arranged on the territory of Green Bit. This opportunity is also taken to introduce us to the current make up of the seven warlords of the sea, which does include some familiar faces being Dracule Mihawk, Boa Hancock, Bartholomew Kuma and Dol Flamingo of course. And in addition to this, there are two new warlords mentioned being Trafalgar Law and Buggy the Clown, who was invited to the organization after his actions during Marineford. But there is one seventh final member who we are keeping a mystery for now, so so many mysteries happening here, but furthermore elsewhere in the world it is announced not only have Luffy and Law formed an alliance, but another cohort of the worst generation have done the exact same, being used to scared scratch menopu and Basil Hawkins. And I guess by default you can also include massacre soldier killer in this alliance, because he is a direct subordinate of Kid. And this alliance was also created with the intention of bringing down one of the four emperors, although that emperor is unknown at this point in the story. But despite the seemingly amicable agreement between Dol Flamingo and Law, both parties are planning all sorts of fun and betrayal, as Law charges a section of the straw hats with finding and destroying the Smile Factory on Dressrosa, whilst he exchanges he's a clown on Green Bit. And in the meantime, Dol Flamingo also has roughly a billion tricks up his sleeve, including invoking his influence on the world government to have a brand new marine admiral sent to the island in order to assist him. And in addition to that, Dol Flamingo also has a plan to lure Luffy into a trap, as he has organised a tournament in the Corridor Coliseum, with the ultimate prize being the Merimeronomy, a devil fruit once owned by Luffy's now passed brother, podcast DA's. And with that, the stage is now set for one of the most complex and chaotic events to ever take place in the series, as the crew land on the island of love, passion and toys, Dressrosa. Next time on Saga's In Minutes, we are tackling the second part of this incredibly long saga, and leaping straight into conflict with the heavenly demon Dol Flamingo, with the second part of the Dressrosa saga. But what do you guys think about the Dressrosa saga so far? Please do leave your thoughts in the comment section below or even join my Discord server. And if you're keen for more One Piece content, then please do check out my other videos and even subscribe to the channel for regular One Piece amazingness, delivered straight to your YouTube feed. But for now, this has been the Grand Line Review, and I'll see you next time.


Hello, and we are back and I hear an echo so Is it you it's not me because it's often me Okay, okay So yeah, so next up for the rest of the day we have two lessons about an hour long first is advanced numpy So in past years, we've given a basic numpy lesson about the basics of using numpy array objects So since we've already done that we have the material you can read we have a video from the previous year Actually, I should make sure to link that but we're trying something different and Talk going under the hood and looking inside the array object and how it works and why you might need to know how it is So this is advanced so if you're new to numpy then basically watch and observe and Then if you haven't already then you can Follow the basic material later, but then we have pandas But with me here are two great co-instructors Mariah Van Blent and Johan Helzwick And I'll give it to them so Great. Thank you Richard. Yes. Welcome everyone to advanced numpy where Johan and I will try to teach you some some things that that are not covered in the the basic Numpy tutorials that you find but are actually very useful when you actually start using numpy for any type of serious data analysis and Throughout this this this hour there's three things we want to cover with you and The first is to discuss like why numpy is fast Python is quite slow as a programming language if you try to do any type of serious like Data analysis in plain Python. It's actually really slow, but numpy is really really fast and why is that? But numpy is not always fast When you actually start using numpy you will sometimes encounter points where sometimes things are fast and sometimes things Are are way slower than you would expect them to be And this is not obvious at all in a place that we will we will try to explain more about that how that works And then there's a third topic That is all about memory management Sometimes numpy will copy data sometimes numpy will not copy data It's not always obvious when that actually happens We will go into that and this is relevant for when you have like Large data arrays and if you have like a few gigabytes of data loaded into memory Then you really want to know if numpy is going to make a copy of the data or not all right So Well, let's get right into it to the first thing like why is numpy fast so Yoan what maybe maybe you can tell me when I mean Python is quite slow, but numpy can be really fast and Why is that? What what do people usually say when when we ask? Yeah, so there are a number of reasons. So numpy has been designed to be fast and One way to achieve this has been to write the the kernels of numpy into C code which is compiled code Another thing is this that a lot of the arithmetics which are performed in numpy are standardized arithmetics with as all the form which is contained in mathematical libraries such as the Blas basic linear algebra library and and also more large Yeah, packages as them Intel math kernel library and this have been optimized over many decades To perform and be stable on a large variety of the hardware Exactly so to recap numpy is fast because it's Implemented in C code. It's it's not in written in Python. It's mostly written in C But not any C as we will see So, yeah and For this we have designed to first exercise In this in this new course So when we say numpy is fast because it's implemented in C. Let's let's put that actually to the test I have a snippet of C code here. So C is a compiled language That is compiles down to machine instructions and this is why it's really fast And this snippet of C code here It generates 10 million random numbers and then acts of them all together. So we're adding 10 million random numbers here And you know, and maybe you can demonstrate what this code actually does you can grab grab my screen.  So you don't have to so for you For the students at home if you have to see compiler at hand, you know how to use it Feel free to to type along with this. If not, and just feel free to just watch Watch this as a demo Yes, thanks for you. So we have the the C code snippet here And as usual, there is a copy button here if you would like to copy the code into an editor and compile it So I have here a terminal window And let's see what I have here. I have here The C source code speed random C And then I have the executables. So speed random sum underscore opt. That's my fastest binary. So let's see how this performs So right here time and speed random sum Opts And that took in yeah, the whole time here was 1.4 seconds And the user time nine point Let's zero point nine six Yeah, but the real time is what we care about most I think so it took 1.4 seconds this C version to to run Okay, so that's the time in C um and I I'm gonna grab the screen share back Okay, that's the time in C Now for you All following the course I have a challenge for you the first exercise a first like numpy warm-up if you will Can you write A little python script or just a little cell in a jupyter notebook or or anything that uses numpy That can do this faster Then you always left it could do it in C So to recap The task for you is to use numpy to generate 100 million random numbers And then add them all together So a good hint here is not to use python for loops But use the numpy functionality to do this And can you beat the c-verse of course you will run into your own laptop or or own machine So a different hardware we will compare python versus c on yoan's laptop After the exercise But as a warm-up I challenge you to do this for yourself If you find you are having trouble writing this Then That's a good reminder for you to to after this lesson go back to the the basic numpy lesson Please do check out the materials through there Okay, we will give you 10 minutes for this I'm gonna leave the exercise here on the screen. I think it's also on the hack md. I believe And I wish you all the best of luck Welcome back everybody I see in the hack md That a lot of you managed to actually do this and a lot of you got really fast times Much faster than the c-code But of course the the c-code was running on your laptop. So to be fair Yoan, could you also run the the python code on your laptop and Raise c versus python on the same machine Yes So I do it here within a jupyter notebook report numpy Then print So I'll first just execute it Yes See that it's correct. Yes. Okay. So that was correct Then I copy it And I had in the beginning here a time it command let's see So it will now be executed a few times seven runs and 1.39 Oh, okay. That's not not so good. It was actually more than when I tried it five minutes ago I guess it really depends what else is running on your machine Exactly because We are not running on a dedicated resource just to run this random number generation, but we have here the operating system and Perhaps not least we do have here both marines computer and on my computer. We have the the zoom client in order to capture the video and sound So that it can be both causes on tweets and zoom as you probably Notice many of you can be quite happy So even still it was faster Even still it was faster We could also for the sake of comparison we could see what happens if we execute The python code not in jupyter, but we invoke it From the terminal window So switch to a terminal window And Yeah, okay. We have a few timings Yeah, so we were sometimes we were faster already. Yeah. Yeah, that's right. So I write it again time height on Speed random sum dot pi Okay, one point three Yeah, okay Let let let let's continue we can we can we can play all day with this The point is that Well, even like and this is a clear example even with taking the time that python takes to start into account NumPy is faster than that. You see code Why is that? Well, because python numpy Doesn't use naive like poorly written ccode numpy uses really Highly optimized ccode for this. So as as joan already told you Numpy is compiled against a library such as mkl or a library such as blast And these are software libraries. I mean blast stems from like 1979. It's been optimized ever since I mean, this is like over 40 years ago and Mkl is developed by intel who optimized it especially for intro processors. So these libraries implement things like multiple array multiplication and vector math and things like that and they've been optimized Through and through So Well, let's have another demonstration this for for example. So this um One of the things that uh blast has for example, uh blast has a dedicated function to compute a vector norm and um The the point is whenever numpy has a dedicated function for something chances are very good that it sort outsources that to a dedicated blast function Or like a dedicated function underlying Libraries, so even numpy can be faster than numpy So joan could you could you demonstrate this one for example? So let's let's make um Sort of a manual version of computing the vector norm. The vector norm is like the length Of a vector in in in the coordinate space, which can use compute using the PyTagoras theorem Um, and also demonstrate How that works if we just do it through numpy The through the dedicated function Yes So at first I take this code snippet here Yep, and execute it This is simply to store away The set of random numbers into the variable a Now we want them to implement the PyTagoras theorem manually So start here with the time it command Then I have a variable l That will be equal to the Numpy Square root And then we go to the Summation of all elements of the array so some And it's not the array but the square of each element in the array so a Star star two Let's see now Yeah, we can also have green And as before it will execute a few times so that you get an average and it clocks here to 560 milliseconds in average And let's see then But what if you use the dedicated function? Yeah, yes, exactly. So just again the timer Using the same variable nine l equal to Numpy Lynn Alec is a class and then the norm function So norm here is the The the standard two norm as you have it in PyTagoras Okay, let's see. Oh, this is faster One can see with a bear eye It's executing many times Yes, the time it command will sort of dynamically tune how many times it runs depending on how long it takes One hundred sixteen milliseconds. So that's a vast improvement. That's a factor of five five times faster Okay, so let that sink in. That's the the the first big takeaway from From this advanced numpy course If you want to write better numpy code if you want to write faster numpy code one of the best things you can do Is study the numpy documentation go over Sort of try to learn a bit the functions that are there The more you know of numpy what kind of functions are there and using those functions the faster your code will be Because if if there's a dedicated function to do what you want to do Chances are it's much faster than if you implemented yourself All right, and that is of course because it outsources that to like BLOSS and MKL and that sort of sense Okay That's one way numpy is fast. Um, let's go to a second way Uh, numpy is fast and that has to do with data managing so Let's uh, well, let's also start that you're on with with an example um, so let as Let's do the transpose example. So let's let's make a nice big matrix. Let's make like a Matrix 10,000 rows 20,000 columns. So we have a nice big chunk of data to work with Yes, so um I do that in Jupiter Or maybe this one you can just copy paste Okay Yeah, okay, I'll paste the remaining Copy and paste Yeah, so this was then Creating the matrix a which is 10,000 by 20,000 and we don't care about the elements here. So we just fill it with random numbers Then But we yeah, but we care about this nice and big.  Um, so What does the transpose function actually do? Johan, so what what what are we doing here? Yes, so so the the transpose for the case of a two-dimensional array Then transpose is nothing else than Swapping what are rows and what are columns? Yes, but all the time you are playing with the same elements in the array Yes, so it it it transforms the array that rows becomes columns columns becomes rows So we might expect that's an awful lot of data to now shuffle about because Uh, almost every element in this matrix is going to change places with some other element That's a lot of data that now needs to be shoveled around. Let's time it How long does it take numpy to actually do this? It feels like it's taking a long time, but that is actually because time it run it The time of command ran it 10 million times this piece. Oh, okay. Yeah. Yeah And it took 104 nanoseconds Order of nanoseconds Right, even though the matrix is now completely shoveled up nanoseconds What's going on here? Um, what kind of like deep magic is numpy Doing here that a matrix transpose is basically for free It doesn't matter how large your array is how large your matrices are transpose is always Extremely fast. What's happening here? And if you want to know that You need to understand how numpy actually manages memory. Um, this has all to do with memory. So Um, let me actually grab the screen again So, um, yeah, so this is transposing. So this is an important image Look at this for a little while. Um So even uh, even when you when you create, uh, a two day a 2d array in numpy say we create a matrix in numpy um We index this array saying so if we want an element from this array, we say to numpy. Okay. I want a row Give me row number two And then give me column number three, right? So we when we want elements. We have two numbers there But of course computer memory doesn't really work that way the the operating system exposes the memory always as a flat list a long 1d list of of values um And this is also how numpy always sees your data numpy always sees your data as a flat list um, so if you make a matrix a 2d 2d array a matrix Numpy will actually store this like row by row it concatenates all the rows together into a one big long thing That is actually what numpy is operating on So numpy sort of is faking this second dimension for me whenever you print an array or you you do some math on it Then numpy will quickly like pretend that this this is a 2d thing But always in the background all the data all your data is always a big long 1d array strength um so and a thing now A thing that numpy needs to solve Because this is where the magic comes from this will become apparent later um, a thing that numpy always needs to solve is say the user wants um this element like element on row number two column number three Numpy needs internally to translate this into the correct element in its long 1d list So element two comma three here this element is actually in a flattened thing is element number 11. Why because um We first have like the first row. So if we want the second row So we at first have to skip through the first row skip through the second row then we're in the correct row Um, and now we need to correct column. So it's column number three. So now we need to go All the way there to the column. Yes, that's number 11. That's what numpy needs to do constantly Um, and in order to understand that properly, um, I'm calling for for a second exercise um And at least I want you to give this a try. So it's okay. If you don't uh, completely succeed in this We will continue but at least try it for a little while So let's let's give the the students 10 minutes, uh again to do this um And your exercise is now this To write a function, uh, you can call it ravel. Um, and that function will Will translate between a row index and a column index To the proper element In the 1d array. So if I give that function, I want two comma three that functions would give. Well, that's that's that's element Number 11 in my list. If I give that function zero comma zero. That's the first one. Is it uh, remember python zero indexed not one indexed Zero comma zero. That's the very first one, right? Uh, or uh, one comma zero is this one. So that is item number four Take 10 minutes see if you can solve this problem yourself So the yeah the exercise description is here, uh, we will be back in 10 minutes With the answer and we'll continue we'll pick up from there You know, good. Okay. Welcome back everybody um It was interesting reading the hack and D for some people. This was really easy for others. It was more complicated the reason why we we we gave you this exercise is Um, that we wanted you to think like what does it take to actually do this computation? Um, because then you are in a good headspace to understand how numpy solves this So to recap I I've opened the solution here. This is the solution Uh to this problem So if if you want for example, if we want row number two and column number three What we must do is we must like move In the in uh in this one the array We need we need to like take steps if we want to go to the next row We take a step in that array and that step is like the number of columns wide and we take certain steps And then for the columns we take a smaller step That's how you solve this thing now numpy, of course Doesn't only solve this for the two-dimensional case numpy needs to solve this for an arbitrary number of dimensions you can make a An array with 200 dimensions and still needs to be able to solve this. So this is how numpy does it Every numpy array for example here. I uh, this is a four by eight LA Has a strides parameter and the strides lists for each dimension So this is a tuple of two the strides of this one Because it's a two-dimensional array and this tuple lists For each dimension, how many steps do I need to take in this big long one d array? To get to the next element along that dimension. So say the first dimension in uh, Will be rows to get to the next row in this array I need to take 64 steps in the one d array and if I want to get to the next column I need to take eight steps into that array This is a four times eight Matrix so you might wonder now if you're clever like why 64 that doesn't add up Um, if I want to move down one row. I need to skip over eight columns But that is because this is measured in bytes um, so by default numpy operates in double precision floating point numbers and each of those bad boys takes up eight bytes So each element is eight bytes. So to move to the next row It's eight times eight is 64 bytes that we need to skip along in so that's So that's how it solves it in uh, that's numpy. How numpy solves this Okay, why am I telling you all this? Why do you need to know this? You need to notice because now We can solve the mystery of transpose Let's go back to the question. Why transpose was insanely fast. Why is it so fast? Well, uh, you know, maybe you can show what's happening to the to the strides parameter Or not parameter the stride property of the arrays when we transpose something So maybe the the quick one someone you can already Think of the solution. So Why do you think uh transpose is fast try to think about it and meanwhile, Johan will Write the code there or copy paste the code there. Yeah Yeah, so here we have the strides example. Well, you can run it and see that. Yeah Yeah, and actually we had the solution here already in in the comments here in the code itself So for a four by eight matrix the stride was 64 and eight and then for the five dimensional array And the field with zeros the strides Yeah mentioned here, but they go out here. Okay. Yeah, but what happens when we transpose an array? So that's that's the next example So Maybe we can bring that in. Yes Scroll down here.  But now we print so we print original the strides of the original matrix and we print the strides of the Transpose matrix. I'll see what happened. Well, the answer is also there But look at that Yes, we have the two variable names a is the original matrix. Yeah, and b is the transpose So now you see how numpy is actually doing this Um, and it's the same for matlab. It's the same for r. It's the same for julia Matlab of a numpy Um, can't do transpose instantly because all it needs to do Is flip the values of the strides You see so now rows becomes columns columns becomes rows. That's just a trick Um of messing around with these stride values It's just a trick of messing around how many elements in this big 1d array Do I need to traverse to get to the next row? How how many do I need to go to the next column? So this is why transpose is really really fast and now that you know this You might also be able to guess why the reshape operation is really really fast so Reshaping changing the men the dimensions of a matrix saying we first have like 20 000 rows and 10 000 columns um, also this uh If you then reshape it to be Like 40 000 times 5000 you can you can you can reshape uh arrays in in umpire as long as the number of elements stays the same um You can also see uh, this is implemented by just messing around with the stripe So the big 1d array memory buffer is completely untouched. It's not messed around data is not moved at all The only thing that changes is the strides parameter and the shape parameter of uh of an array okay um So That brings us to the to the final point. Um, they want to instill in so we've seen Transposing super fast great. We've seen reshaping very fast because we can just do this by messing around with the stride So if we have an array and we first transpose it And we then reshape it it should be fast, right?  This should run instantly Um, let's see. Well, this yeah this piece of code should run instantly um Let's see with yeah, we have a big example there And sorry, it was the It's okay. First run the one above this. Yes, exactly. Uh that one. Yeah, yes So we create the large array Yeah, and then first transpose it and then reshape it Yes, and that's in this composed statement Uh transpose and then reshape Yes So it uses here actually a shortcut from transpose. So before we wrote transpose transpose all the way as a method call um Actually transpose transposing is so fast that numpy included a shortcut matlab does this as well um You can just write your matrix dot capital letter t. Um, that's short for the skimmy transpose version and it's just it's free. So This takes no time at all compute. Why is this taking so long now, Johan? So transpose will be fast reshaping should be fast somehow. This is taking an awful lot of time now Um, yeah, numpy is actually copying over all of our data. It took 39 seconds to do this Uh, and this is one of the the the things that are not obvious about numpy All right Why is that? Well, if you uh, if you could run the second, um example there So let's take a look actually. So what what happens when we transpose a matrix and then reshape the matrix So this example code We we create a small matrix so we can actually print them out and and see what's happening Yes, exactly. So Here we have only the elements one two three and four five six in a matrix which is then three by two Let's see What we get the Sorry, the rhythm matrix is two by three two rows and three columns And When we transpose it you can see you have one two three in the first column four five six in the second column But when we then apply also the reshaping Look here at the elements. It's one four two and five three six in the rows So even though it's a six Same elements that we had from the very start. They have been re-sruffled And there is no way that this re-suffling can be done without Numpy copying data in the background. Yes, that's the important part So the like transposing or other reshaping. Yeah, the elements have reshuffled, but look there now we shovel in such a way We can't obtain this this shuffle ordering by being clever with the strides Um, it's shuffled too badly now. Um, there's no way to apply a shortcut with just modifying strides Um to obtain this and this is why numpy in this case numpy had no choice But to actually go over the data and copy over everything So that's something you need to realize now that you know this memory model When you know that that every array is basically in stored in memory is a big 1d list You can understand why transposing and reshaping is fast sometimes um, but when you stack them together or when your Matrix has been transposed before and saved and it's now in the wrong order. Yeah, wrong order. It's it's an alternative layout And then you try to reshape suddenly. Uh, it's super super super slow Um That's one thing. Um, there's one more point. I want to give you before we go into the break Um, there's one other big consequence of this Another thing that's really fast and numpy is is this is selecting a subset. So say we create a huge array Um, and then uh, and then only select for example the first row or only select some snippet in the middle This is also super fast in numpy numpy does not need to copy data and you realize why Um, what numpy will do is just it will tweak the shape. It will tweak the strides Um, it will also apply an offset. That's another parameter that an array has we haven't covered yet But then also with with the offset the strides and the shape numpy can just Would uh create what is called a view of this data But it will not touch the original big Uh data array But this comes with a caveat So if you want to save memory for example, you say, okay, we first load in all of my data Now my memory is almost full. So in order to free up memory in speed is up I will only select the first row of my array and I will continue my analysis on that Be mindful even if you select only first row this big data array is still a memory. It will not get free You will not free up any memory. Um, actually when you do this So what what does the situation now becomes this you will have like your big memory buffer still still there You will now have just multiple views into this memory buffer Each array is basically a view into the memory buffer. Um, and different views can share the same memory buffer Memory will not get free um, if you do that another thing to take note of is when you modify data in place so, um Because the memory buffer can be shared between various arrays Um, and it will be shared. Uh, what if you change the data in one array? That data will also be Will have changed in your second array because they share the same memory buffer So be aware of this. Um, when does numpy make a copy? When does numpy just create a view into the same data? It's very relevant Um, that's funny. Oh, we didn't edit here. Okay The final thing I should of course tell you that arrays have have a dot copy function attached to them So if you at some point really want to make a copy and sometimes you want to Um, you can call array dot copy and it will create a new memory buffer for you a new copy So there's no surprises there All right Um, and now I think you have all deserved a break Um, and then after the break we go on to hand us, but That's it from us from now And we'll see you in a bit