Now that we've introduced this idea of complex data types known as objects We're going to get into effectively the data type that we are going to be exploring for the rest of the semester something known as lists and the quickest way to think about a list is using another word it's a collection of of Values and what I mean by that is now when we're dealing with variables, you know, let's say for example, I had an X before X was just a single variable 42 or Hello, it was a string, but it was always just some single digit or single valued variable The variable was just some single value, but now that we're dealing with this idea of Collections of values were now saying that oh well this particular variable just to put it in here Numbers numbers could happen to have Multiple values associated to it. So in this case it has six values associated to a single variable well in that case we need a way to Deal with each one of those values and we do that through some new Terminology the first one and the second one the biggest one is this idea of something known as an index and then the second is Something known as element now element. It's just the value Associated or those values that are stored in the collection. So let's imagine we had the days of the week as Strings in a collection. Well Monday That is an element and it's just a you know again It's a spot in the list, but specifically now we're dealing with where it's located Inside of a list you're going to see Some associated Indices attached to them now one of the things that we have to do when we're dealing with programming is we start at Zero So if I was to start my list of weeks off at Sunday, then the index for Sunday would be zero and Then okay. Well, what's the day that follows? Sunday, it's Monday obviously so in that case it would just be one element over or one index over One and that would be our Monday, and then two would be Tuesday three would be Wednesday Four would be Thursday you sort of get the point But it's now that we have these indices to reference specific spots in Memory now we're gonna use a very basic case here for a second. Let's just imagine I have a list of numbers 8675309 Okay, well each one of those numbers if we're going super super super basic Each one of those numbers has or can be represented with 32 bits if we're thinking about once again Physical memory So just to draw out that memory stick one more time we're thinking about memory and We're thinking about that eight. So that would be zero zero zero Zero thinking in the top of my head Zero one zero zero. I think that's right. Don't quote me on that But the entire idea is those are all the ones and zeros needed to represent that eight then Right beside that would be some more zero so zero zero zero zero zero Four two zero Okay, so let me correct that because someone on the internet will freak out area So again, the entire idea is well when I have all of these elements In a list again if we're looking at it from the days of the week It's very easy to understand. Oh well Sunday and then Sunday ends and Monday begins What's really going on there is effectively we're saying in memory I need to skip some 32 bits to get to my next index So again, if you think about it eight is the zero index six is one seven is two five is three four five Six and I'm effectively saying if I want to access a particular element. I need to Go to some starting point wherever that starting point is in memory plus 32 in our case 32 bits because we're dealing with numbers times Some index so in the case of that eight start at the starting point because zero times 32 nothing one times 32 however 32 not eights but for our sake that would skip over these ones and zeros and then start right about here And it would go on and on and on again We're not dealing with the super complex memory, but the more important aspect to this is specifically We start counting at zero and we move on from there so How do we represent and work with lists? Well quite simply we are going to be utilizing Square brackets and the square brackets represent in Python. I'm dealing with a list Then I simply just pass in the values. I want at any particular Index so in this case Days of the week is the variable name And then I have Sunday Monday Tuesday Wednesday Thursday Friday Saturday for all of the different respective Elements in that list. Okay. Well now that I have a variable and I have created my list What can I do with it? That's where we start to get into accessing elements from the list in this case I Would still be using that variables name. That's just my way of associating You know again where in memory to start Then I would use the square brackets and give it The index that we're working off of so print days of the week three What would that be? Well, and if we look at the days of the week again, we start counting at zero one two three So this would print out Wednesday we can also store them in temporary variables just in case so I could Take that Wednesday if I don't want to type out days of the week Three every single time I need to work with that variable. I could just Save it as temp And now that we're again thinking about this we can also Manipulate our elements as well. So let's say for example for whatever reason We want to change Thursday into Thursday. We are paying our homage because you know I don't know Disney plus and Marvel and Loki Going on right. I don't know but we want to replace Thursday with Thursday. Well in that case again, just like we would do with making any variable if I had a variable X Five and then later on in my code. I said X is going to equal 10 I'm just changing the value of the variable. I don't want to change all of the days of the week I only want to change Specifically one value at a particular index. So again, I would put in square brackets the index and Wouldn't you know it? I now have access to alright. I've now changed Thursday into Thursday


With that said, 2 Corinthians chapter 13, we're going to look today as mentioned at verses 7 through 14. I'll begin reading here at verse 7. I'll read to verse 10 and we'll get into our study. 2 Corinthians chapter 13, reading from verses 7 through 10. Paul writes, Now I pray to God that you do no evil, not that we should appear approved, but that you should do what is honorable, though we may seem disqualified. For we can do nothing against the truth, but for the truth. For we are glad when you are weak and you are strong. And this also we pray that you may be made complete. And therefore I write these things being absent. And as being present, I should use sharpness according to the authority which the Lord has given me for edification and not for destruction. And so Paul has challenged the church to examine itself to see if Christ is within them. He's concerned for them because they've been infected. They've been infected with bad teaching. There are a lot of people who don't understand the value of teaching and rightly dividing the word of truth. Today in the church, I think there's a great weakness where people have become Google theologians and all. And they think that they know because they read what somebody else has said. And so what we've ended up with is we've ended up with people who are susceptible to deception. And so if somebody picks up a Bible and says something from it, they automatically think it must be true. Then they argue that person's point. That happened in second to the Corinthian church. False teachers have crept in. They brought in bad doctrine. Bad doctrine always produces badly lived lives. And so they've entered in. They've been teaching them things coming into opposition to the apostle Paul and the things that Paul has taught. And so Paul has been writing all through this letters of second Corinthians to correct the errors and to encourage the people. And they have been infected and he's concerned for them because as he's already mentioned, the fruit of the bad teaching is disunity and carnality. He had just spoken of contentions and jealousies. He spoke of outbursts of wrath and backbidings. He spoke of whisperings and conceits and tummels that was taking place in the church. And these are not the kinds of things that you want your church to be known for. He also spoke of selfish ambitions.  Selfish ambition is seeking your own interests first. It's a desire to place yourself above somebody else. Selfish ambition would easily provoke contentions and disunity in the church. You see, remaining united in the face of opposition is of paramount importance because Satan desires to provoke believers into opposing one another instead of opposing him. So that gives us insight into Paul's word of warning against such attitudes. He said to the Philippians in chapter two, verses three and four in the book of Philippians, he said to that church, do nothing from selfish ambition or conceit. The word conceit speaks of excessive pride. But in humility, count others more significant than yourselves. Let each of you look not only to his own interests, but also to the interests of others. You see, instead of selfish ambition and conceit, this incorrect sense of who you are, we're to value other people. We must learn to be other-centered, not self-centered. And that protects us from selfish ambition and self-importance. And so with this in mind, Paul is making it clear that he's praying for them. And in verse seven, he says, I pray to God that you do no evil. Not that we should appear approved, but that you should do what is honorable, though we may seem disqualified. So my prayer is that you should do what is honorable. There should be fruit that is evident in you that reveals salvation. That's genuine. You should have a faith that has been revealed in repentance, a desire for righteousness, sincere holiness, a willing obedience to God in his word, a love for the Lord. Because these are the things that evidence genuine faith in Jesus. Repentance, a desire for righteousness, sincere holiness, willing obedience, a love for God, a love for others. This is a demonstration that you actually are born again. Again, we can use these things and examine our own hearts and see whether these things are evident within us, because that's what is called the fruit, the fruit of the Spirit. And Paul's making it clear that his desire for them is that they live in such a way as they glorify the Lord. And it's such a strong desire that he lifts them before the Lord in prayer concerning this. You see, Paul, when you read his writings and get to know who he is through Scripture, you'll see that Paul was a genuine shepherd. And as a pastor, as a shepherd, Paul made sure to lift the people up to the Lord. And he did so in prayer. And this is something he did regularly on behalf of believers living in various places. We mentioned the Philippians a moment ago in the book of Philippians chapter 1, verses 9 and 10, he said this. He said, this is my prayer that your love may abound more and more in knowledge and depth of insight so that you may be able to discern what is best and may be pure and blameless until the day of Christ. In Ephesians in chapter 3 verse 17, he prayed that Christ may dwell in your hearts through faith. In 1 Thessalonians 5-23, he said, the very God of peace sanctify Holy, and I pray God, your whole spirit and soul and body will be preserved blameless to the coming of our Lord Jesus Christ. So he prayed for the church and the various places that it was meeting. And so he's praying that they would, verse 7, do no evil. You see, if they do no evil, then he'll not have to exercise apostolic authority. He'll not have to come. He'll not have to discipline them and God would humble him among them. So he desires them to grow in grace, that they do that which is morally right. His prayer reveals that he desires them to live worthy of the gospel of Jesus Christ. Again, that's a prayer of a genuine shepherd that the people would live in a way that is appropriate for someone who's on their way to heaven.   You see, this calling has taken us from the present age, its places in the coming one. In Colossians 1 Thessalonians 13, it says he has delivered us from the power of darkness, conveyed us in the kingdom of the Son of His love. So we are presently citizens of heaven, though we're walking here on the face of the earth. And so we should live in such a way that we bring honor to the King. And the gospel that we've received and that we share with other people is a message that promises transformation. Somebody who's come into a faith of crisis, their life is going to be changed. You're not going to be the same person. You're going to be different. And people who know you will see that difference. I have a guy in our fellowship who went to high school with me. I've known him since we're 14. He comes to our church. He may be watching us right now online.  You ought to be here. Anyway, just plain.  I know that's true. But anyway, he's known me since I was 14 years old. He's known me for at least 10 years. No, he's known me for a long time and he came here for a year. A year and he didn't know it was me. And finally his wife wrote and said, Did you go to Sierra High School? And I saw her last name and it's not a common last name. So I wrote back and I said, Are you married to Art? And she writes back, yes. They were here for a year. And he saw me up here. He knew we used to, let's just say we were not good kids together in high school. I've known him a long time. The change was so complete. And it's not because I'm so old. Because you don't outgrow since sometimes people think, Well, you're just too old to sit. No, there's no center like an old center. You don't stop sending, you refine it. You learn how to do it and not get caught. When you're young, you get caught. When you're old, you can sin and not get caught. There's no center like an old center. You don't outgrow sin, you turn from sin. And he saw me for a year and finally she said, He thought that could be you because your name and you mentioned that you grew up in Norwalk and you had mentioned that you went to school in Whittier. She said it is you. See, God changes us guys. That's what the gospel does when embraced by faith. You have a new life. If any man be in Christ, it's a new creation. Old things are passed away. Behold, all things are become new. And so the word of God transforms you when it's applied. When you hold fast to it by faith and you say, God, by your word, I'm going to be somebody different. And Paul's speaking concerning that because God has taken us from this, from the power of dark disease, he's conveyed, as he said, to the kingdom of the son of his love. And so we are now being transformed. And he had said this in chapter three verse 18. We're being transformed into the image of Christ.  In 2 Timothy 1 9, it says God has saved us and called us with a holy calling. In Ephesians 4, 4 1, it says, I therefore the prisoner of the Lord beseech you to walk worthy of the calling with which you were called. The calling is holy and thus we should walk worthy of it. We should have a holy life. See the one who has called us, the one who has called us is holy. And we live holiness. In 1 Peter 1 15 and 16, as he who called you is holy, you also be holy in your conduct because it's written be holy for I am holy. So walk in worthy. It speaks of living a life that brings honor to God. Such a life pleases the Lord because it's earmarked by good works and spiritual growth. It's not it's not not all that outward adornment. I mean, you know, Jesus speaks concerning that Paul speaks concerning that. You find it from Genesis to Revelation that that God doesn't want to just clean up the outside. The Bible says he cleans you up from the inside. And so it's not that I pray and it's not that I fast and it's not that I give. Those are all earmarks of somebody who has a genuine faith, but it's something different and steeper. It's a it's a transformed life. It's a new life that you have through Jesus Christ. And and so his prayer is that believers will walk in a way that honors God. Again, in Colossians 110 that you may walk worthy of the Lord, fully pleasing him, being fruitful in every good work and increasing in the knowledge of God. So with this in mind here in verse seven, Paul prays that they do no evil. Now, that's interesting how he says it. I pray to God that you do no evil. The word evil is a word that speaks of something that causes trouble. It speaks of that which is injurious. I pray that you don't that you're not troublesome, that you don't injure people, do evil things. He says, I don't want to be forced to use my authority. I don't want to have to bring church discipline. And he says, and I'm praying that you should do no evil. Verse seven, not that we should appear approved, but that you should do what is honorable. I'm not trying to give myself the appearance of apostolic authority other people. I'm fully aware that some are challenging my authority, but my motives are pure. I'm not praying that you live a good life so that you don't embarrass me. Now, some of you were probably raised in a similar way as as me.  So we would pull up to somebody's house and I still remember my mom doing this.  I can still remember pulling up in front of one of their friends' houses and we're going to go visit. My brother and I did not want to go. They didn't have kids. We're just going to sit in their front room. We would be bored and who wants to be bored in all of that and some old person's house? And my mom, I still remember my mom leaning over the backseat of that 1957 Ford station wagon. I still remember I was sitting on the right side. My brother was on the left side. I was conservative and I still remember her leaning over saying we're going to visit in her hand. My mom used to talk with her hand in her chancla and she would hit her sandal and she'd go, we're about to visit your dad's friends. Your dad's friends respect your dad. If you do anything that brings shame to your father, I will deal with you. My mom would deal with us. There's no doubt about that. But it was so that my dad didn't look bad. Paul's not saying that. He's not saying I want you to do things in a good way so I don't look bad. I'm not concerned about that. He says, I'm saying do good things because it honors God and it blesses you. It's not outer appearance. There are a whole lot of people who live well outer appearance ways. They look good. They look clean and nice and they speak well. But inwardly, that's not truth of their soul. They're really not that way. So he's saying, I'm not telling you to do this so that verse 7, that we should appear approved, but that you should do what is honorable. My desire is that you do what is honorable because it honors God. Now, when he speaks about what is honorable, the word honorable means beautiful by reason of purity of heart and life. Something that's beautiful because it's pure. My prayer is that you're honorable. My prayer is that you have good testimonies of the grace of God because this way of living is eternally profitable. Not only for you, but for others too. Now, when you live properly, your life is going to be blessed. In 1st Timothy 4, verse 8, Paul said, bodily exercise profits little. There are a lot of people who do a lot of physical exercise. Nothing wrong with it. It does profit. And if you're out there working, sweating and building your muscles and all of that, and more power to you, that's a good thing. It's good for your cardio. It's good for everything. I remember that. I don't do it anymore, but I respect you. I get tired watching you. But the bottom line is bodily exercise profits a little for this time and this place. But godliness is profitable to all things, having promise of the life that now is and of that which is to come. So your physical strength and everything that you have, eventually, no matter how hard you work, is still, eventually, age is just what age is. You know, I've seen some older people who hit the weights and you look at that body and you say, my goodness, that guy's, he's ripped. Then you look at his face and you say, but he's old. You can't do any kind of bench press for your face. That's a fact. He says, this is my desire, even if to some we appear to be disqualified. Some may say that we are not true apostles. It matters not as long as you're living properly. In verse eight, he says, for we can do nothing against the truth, but for the truth. Even if it seems that Paul is disqualified and in the wrong. Well, the fact is he's not. He's saying I have in no way violated the message of the gospel. I have not violated in my doctrine or in my practice. I've lived out the gospel. I've done so with purity of heart. I've done so with a clean conscience. He had said in second Corinthians in chapter one, verse 12, we can say with confidence and a clear conscience. That we have lived with a God given holiness and sincerity in all our dealings. We have depended on God's grace, not on our own human wisdom. That is how we have conducted ourselves before the world and especially toward you. So I have not violated the message either in my doctrine, my teaching or in the way that I live. I've lived it out. He goes on in verse nine to say, for we are glad when we are weak and you are strong. Why is that? Well, that's because we don't have to exercise apostolic authority when you're strong. It's when you're not strong that I have to exercise church discipline. He says in verse nine and this also we pray that you may be made completely mature.  That makes me not have to bring apostolic discipline. It makes it unnecessary. Again, my greatest desire, Paul is saying is for you to grow up in the things of God. My greatest desire is for every Christian to mature and every minister to continue growing. He said to the Galatians in chapter four, verse 19, my little children, for whom I labor and birth again until Christ is formed in you. I desire you. I have a passion. I have a deep groaning and longing within me to see you mature, to grow up in the things of God. You see, in the Christian life, every believer goes through a series of growth stages if they're pursuing God. You're going to grow in different stages. You don't get saved on one day and the next day become a Billy Graham. It doesn't happen that way. It is it is not an automatic that you suddenly are spiritually mature. You actually go through a process of growing. The Bible speaks concerning that process. John gives us insight into it. In 1st John chapter two, verses 12 to 14, listen to what he says.  I write to you fathers because you have known him who's from the from the beginning. I write to you young men because you have overcome the wicked one.  I've written to you fathers because you've known him who's from the beginning. I have written to you young men because you're strong and the word of God abides in you and you have overcome the wicked one. He gives us three stages of growth. He speaks of little children. It's interesting how he puts that because to the little children, he simply says you know that your sins are forgiven and you've known the father. That's the first stage. My sins are forgiven. I know God. You remember that? Do you remember when you got saved? Do you remember we old enough to actually have been converted? There are a lot of people who've been blessed to be raised in Christian homes where mom and dad has raised you right and given you the word of God and prayed with you and brought you to church and you've fellowshiped in all of your life. You only know that you've come to church and gave your heart to Christ in the early year. You don't really know when they happen. But there's others who can say, oh, for me, December 27th, 1970, I can tell you when I passed from the darkness into the light, I can tell you the day that happened. A lot of people are able to do that. And when I passed from darkness into the light, when I came to faith in Christ, I'm a little child and I know the Father. That's basically all I knew. I went home and I told people about Jesus. I started very early. I mean, from the day I got saved, I actually was supposed to have received a, actually a friend of mine was receiving a kilo of marijuana from Thailand. And some of you, some of you may remember what marijuana was. Some of you still do.  Oh, pastors, glaucoma. Okay, we'll talk later. But we were, we would receive kilos from Thailand in stuffed animals. That was before they had the dogs sniffing at airports. That doesn't happen anymore to my knowledge. I wouldn't know. I'll ask John, he still smokes. And so we were supposed to receive a kilo. And instead of receiving the kilo, I received the Lord the day I got saved. So I went to the house of a friend of mine who was receiving the kilo. I went because he lived directly across the street from me. And I went to his house to go and tell him about Jesus. He wasn't there. His mom was there. Couple of sisters were there. I was brand new. Just gave my heart to Christ. Just was dropped off. Actually just drove home from giving my heart to Christ. And I sat down at the table with his mom and two sisters. And I knew him well. I was there quite often. And I told him, I said, you know what happened today? Brand new. You know what happened today? What's that, David? I gave my heart to Jesus Christ. Uh-huh. No, I did. I gave my heart to Jesus Christ today. And this is what happened. And I gave my testimony to the mother. We used to smoke pot in the bedroom there in the garage.  You could tell that we were all loaties. You could tell. I mean, that's just that. Now I'm clear-eyed and I'm happy and I'm and I'm and she couldn't. She just looking at me right. But she gave her heart, not through me, but she gave her heart. Then her daughter gave her heart to Christ and another one. And one of her daughters, who was my dear friend, God became a worship leader in a church and God did marvelous things. But that began when I got saved and came home and started telling people, I started bringing people to Calvary Chapel of Costa Mesa. My friends, I want you to hear the gospel. That's what happened. But I didn't know very much. All I knew was I was once blind and now I see. I was walking in sin and now I've been saved. That's all I knew. Little children, your sins are forgiven you. You know the Father. That's what happens when you're first saved. But then he speaks of the others or other categories and I'm going to take it out of order because he speaks of young men and he speaks of the young man and he says you are warriors. You fight the good fight. You're overcoming the wicked one. Your strength comes from knowing God's word and you apply it. So the young man is a warrior. He's a person who has passed from being an infant who's drinking milk and now he's taking it, applying it and he's using it in spiritual combat. He's a warrior. He's grown and God is moving in him and that's what God has called us to be by the way. There's no conscientious objectors in Christianity. We don't sit on the sidelines. We're part of the battle. That's what we're called to do and we speak the truth. We speak it in love. We stand up for Jesus's sake. That's what we do and we're called warriors, young men. He speaks concerning them. That would apply to young women also. You fight the good fight. You've overcome the wicked one. Then he speaks of fathers and this is interesting. He had started very simply by speaking to the little children. You know your sins are forgiven. You've known the father, but then he speaks to the fathers and he simply says you've known him who's from the beginning. You went through those stages. You were a young child. You knew that you were forgiven and you've come to know God.   You've taken the word of God. You've lived it, applied it. You've given it to other people. You've had spiritual battle after spiritual battle. War after war, battle after battle. Now fathers, you know him. And that's how your maturity occurs by the way. You want to be strong in things of the Lord. You start out as a little child. Then you earn some experience. You gain some experience by sharing your faith. I began sharing my faith as a little child. I became a warrior. But I shared my faith as a little child. I'd go to college class, not Christian college, secular college. And I would sit in there and I'd wait for an opportunity to open my mouth and talk about Jesus. And no, it wasn't popular to do that. No, I wasn't cool for doing that. I was just wanting to do that. Why? Why did you care?  Because all of these students think that their education is going to make their life better for them. And it's not. It may provide some things for them that other things may not, but they don't know God. So I went to secular college with a mindset that we're in war. It's a time of war. I was suited up. I'll be honest with you. I see myself in every young man and woman. I was suited up. I was geared up. I went in, took that sword, had that helmet put on that breastplate. I had my loins girded with truth. I had my feet shot with the preparation of the gospel of peace. I held my shield and I went to battle. I went to battle when I went to school. That's what you do because there are a lot of ideas. See, the battle is not always physical. The battle is a battle of ideas. It's a battle for the mind. You know, the carnal mind is enmity towards God. It's a warfare against God and the ideas of God. So we cast down imagination and we bring every thought into captivity to the obedience of Christ. And Paul already spoke about that. So it's a battle for your mind. It's a battle. The battlefield is your mind.   They hate those who believe it. And I've had that experience and I've had professors say, I feel sorry for you Christians. I've had a professor, cultural anthropology, Cal State Fullerton. I had a professor there who said, he said, what are the, what are the universals? So you start speaking about in culture, what are universals? Well, music is a universal. Every culture has music. Oh yeah, that's right. Language. Every, every, everyone has a language or that's right. And so they were talking about the various universals, marriage and various things like that. They all have the same thing. And then somebody says a belief in God. And I still remember that professor saying, that's one, that's one that I hate. That's the one that I hate. Yeah, that's true. That's a universal though. I disagree. He, his bias was so out there.  So you can move on to get your degree, but you have somebody who's there, who's speaking to young people with the intent to overthrow your faith. It's not that they disagree with it. They hate it. They're at a battle and a battle with it. And that's why I went in armed and dangerous. That's why I memorized scripture. That's why I was prepared because I knew that there's going to be a battle. And that's what young men do. And when you get older, you've had a lot of battles and you have now battlefield experience and you know how to give the word and you know how to listen. You know how to answer. And so those are stages of growth. Some of us in this room right now are little children.  You know him and that's great. And some of us in here are warriors. Young men, as the scripture speaks of that and you enter into battle and it's not the belligerence, by the way. You're not there picking fights with everybody. You're just prepared and you've overcome the wicked one. And some of us are fathers. Some of us have been around a long time and we just know God is true. We have relationship and there's nobody who could argue me out of faith in God. Nobody, nobody. Not because I'm brilliant, but because I've had almost 50 years of walking with him and he's never failed me yet. Never as he failed me yet. And he's always proven himself to be faithful, always. And I can say that as a man now who's called a father in scripture and Psalm 71 verses 17 and 18, oh God, you have taught me from my youth. To this day I declare your wondrous works. Now also when I am old and gray-headed, oh God, do not forsake me until I declare your strength to this generation, your power to everyone who is to come. I think that unfortunately we're living in a time when people would prefer listening to the young men rather than the old. Well, the young men don't have battlefield experience like the old, they're just gaining it. Nowhere in scripture do I ever find where I as an old man am supposed to follow the wisdom of the younger. As an older man, I'm supposed to give wisdom. I gain it and I give it. That's what we're supposed to do and that's why the scriptures call us fathers. And so he's speaking concerning these things and then he goes on in verse 10 to say, therefore I write these things being absent. Let's be in present, I should use sharpness. My desire is to build you up, not to correct you. I would rather commend you than to correct you. He said in 2 Corinthians 2 verse 3, I wrote this very thing to you lest when I came, I'd have sorrow over those from whom I ought to have joy, having confidence in you all that my joy is the joy of you all. I want to commend you. I don't want to have to correct you. So that's where my heart is. And now he finally says, and getting to the conclusion of this letter verse 11, finally brethren, farewell. Become complete. Be of good comfort. Be of one mind. Live in peace. And the God of love and peace will be with you. Greet one another with a holy kiss. All the saints greet you. The grace of the Lord Jesus Christ, the love of God, and the communion of the Holy Spirit be with you all. Amen. He closes with four admonitions. If you take notes, we'll give you four admonitions. First, become complete. When he says become complete, aim for perfection. In other words, intentionally grow in the things of the Lord. And that's something you decide to do. Aim to be more than you are. You should aim. I've said it this way before. I like the way it applies. Aim for perfection and you will reach excellence. Don't give yourself to lesser things. Don't be easily satisfied in your spiritual walk. Intentionally grow. Pursue the Lord. Decide to do that. Maturity in the Lord is the result of faithfully applying his word to your life. It's knowing God's word and learning to do it. Again, it doesn't simply just happen on its own. It's carefully cultivated. As 2 Timothy 2.15, work hard so you can present yourself to God and receive his approval. Be a good worker, one who does not need to be ashamed and who correctly explains the word of truth. You see, there are going to be many who thought themselves to be Christians, but in fact they were not. In Luke 13 verses 23 through 27, someone asked him, Lord, are only a few people going to be saved? He said to them, make every effort to enter through the narrow door because many, I tell you, will try to enter and will not be able to. Once the owner of the house gets up and closes the door, you'll stand outside knocking and pleading, sir, open the door for us. But he'll answer, I don't know you or where you come from. Then you'll say, we ate and drank with you and you taught in our streets. But he'll reply, I don't know you or where you come from. Away from me, all you evildoers. There are going to be a lot of people who think that because they went to church, they went to weddings and churches. They went to Christmas in church. They went to Easter in church. If they had something that they had to fill out and it said religious preference, they wrote Christian. There are a lot of people like that. I meet them fairly frequently who believe themselves to be Christians because they went through certain rituals in their church or whatever. They believe that they're Christians because they're not a Muslim or because they're not a Hindu or whatever. And Jesus says, I don't know you and never did. We never had a relationship, you and I. And so that's why he said, make every effort to enter through the narrow door. Many I tell you will try to enter and not be able to. Are you born again? Have you received Christ as your Lord and Savior? Is there evidence that you've actually done that? Is somebody witnessing to you at school or on the job site or in the neighborhood? Witnessing to you? And you're having to say to them, oh, I'm a Christian already. Really? Because there are a lot of people that are being witness to and sometimes people get upset. They say, how come they don't know I'm a Christian? Well, the answer is because you don't live like one because as they look at you, you don't have the fruit of it. And this is not to say you have to be perfect. I should say this very quickly because God's grace is amazing. And no, I haven't always lived a good life by any means, by any means. And I have been witness to when I was a younger believer, I have been witnessed to by people who as they were looking at me for sure thought I couldn't possibly be saved. So no, what I'm trying to say is if that's happened to you, awaken and realize. Realize that there's something lacking and make every effort to enter into the kingdom of God. Press on in. It's by faith and through grace, but your life shows it. He says become complete. That's an exhortation because it's not automatic. Secondly, he says be of good comfort. Even though I've admonished you, don't be overwhelmed. Be encouraged. In Deuteronomy 8 verse 5, you should know in your heart that as a man chasens his son, so the Lord your God chasens you. In Hebrews 12 11, no discipline is enjoyable while it's happening. It's painful. But afterward, there will be a peaceful harvest of right living for those who are trained in this way. No discipline is enjoyable while it's occurring. So be of good comfort. Paul was bringing a word of correction. Be comforted and move forward. You see, God's desire for us is that we have hope and peace. In Romans 15 13, the God of hope, may the God of hope fill you with all joy and peace in believing that you may abound in hope through the power of the Holy Ghost. There's only one way to have hope in this world. This world is extremely hopeless, isn't it? It's extremely hopeless right now. I'm watching people losing hope every day. It's extremely hopeless. There is so much bad news that's being presented. So many negative things. You see a 24 seven. If you watch the news at all and depending on what channel you're watching, you get so many such a variety of negative things, such a variety of things that crush your spirit. And that's happening right now. We know that if you watch the news or read the newspaper and there's so many things that are being said that you begin to wonder, can that possibly be true? You know, that's why my hope is in God. That's why I put my trust in Him because, you know, again, there's an advantage to walking with the Lord for a long time. And I've said this before, but I have been asked what is the number one thing that you've learned in the years that you followed the Lord in the bottom line? The number one thing I've learned is it all works out in the end. God is always in control. God has always been faithful. He never fails. He never leaves you. He never forsakes you. He sees you through. He walks through that valley with you. He doesn't abandon you. He's with me always. And He gives me hope. And as I go through this life, I have a life that I'm waiting to experience fully and that's in heaven. So I'll close my eyes here and I'll open them up there.   You gave me so much, God. It was all worth it. There's no complaining in heaven. There's only rejoicing and that's what's going to take place when we see the Lord. And so we have hope. We have hope. And then third, be of one mind. Be united in the essentials. Unity demonstrates the fruit of the Spirit in contrast to the division of the flesh. So be of one mind. Be united in Philippians 1.27. Whatever happens, conduct yourselves in a manner worthy of the gospel of Christ. Then whether I come and see you or only hear about you in my absence, I will know that you stand firm in one Spirit contending as one man for the faith of the gospel. Be of one mind. Be careful not to be arguing over non-essentials. Be careful. I have a friend, all of us know Tony Clark from Virginia. Tony will post something and before you know it, the trolls are out. He gets trolled all the time. All the time. He can't write anything and I'll write him. Sometimes I'll just personal message him and I'll say, did it again, Tony. You did it again. And I just the other day I posted on his page and I said something and then I wrote, let the trolls unite. Because they just come out and they want to attack and they want to argue. And it's a lot of time. Guys, may I speak to you for a moment? Okay. I expect the world. I expect the world to say things in opposition to the gospel. Of course.  Remember that. He said, beware. He said, when all men speak well of you. So we're aware of that. You know, the world's going to oppose the gospel. I get it. But really what I use an old phrase from the 60s, what trips me out is the church. It's the church. Sometimes I'm saying this being silly, but sometimes I want to just reach through and slap somebody. Wake up, throw some water. Why? What? There's why do you have to argue about everything? Why? There are some people. I'll give you an example. Tony wrote this. He said something just a fact that the churches are closing down. You know that one source I was looking at the other day was pointing out that some 30,000 churches closed their doors. Let the number 30,000 hit you for a moment. 30,000 churches closed their doors. And so Tony was writing something and an encouragement for people to be faithful. And before you know it, you've got all the armchair theologians. You know the churches in a building. I want to slap you. And like, duh, I didn't know that. Really? And sometimes I will write things. And then before you know it, I have people telling me what I should say and what I shouldn't say. People find it easy to do that today, apparently. It's easy there. They type furiously. I'll let you know what's right and what's wrong. People who've never suited up, never been in a war, never been in a battle. They just know what you're supposed to do. No, we've got to stop this, guys. We've got to stop picking on each other and tearing each other up, devouring one another, consuming each other. We have to be careful. Be of one mind. I can have an honest disagreement and I do. But not to the point that I have to write it out on Facebook for all to see and then start a war. If I really have a disagreement, which I've had, I will personal message someone. And I'll say I read this and just want you to know that this is incorrect. And let me tell you why. Because of this, this, this and this. Let's have a dialogue. Let's converse. Let's speak about these things. Let's not be each other's enemy. See, the church is devouring itself. Wouldn't you say right now? The church is, if you say no, you're wrong. The church is devouring itself right now, arguing with each other, fighting over things. When we have a common enemy and it isn't my brother. It's the enemy called Satan and he's sowing seeds of discord and my flesh yields to that. And I have a tendency of going after my ally. We have to be very careful. We can disagree. But with the things we must agree on, they're called the essentials. We agree on the essentials and we're flexible on those that are non-essential. That's how it works and that's how it used to work. And that's what it's supposed to do. Philippians 2, 1 and 2, is there any encouragement from belonging to Christ? Any comfort from his love? Any fellowship together in the Spirit? Are your hearts tender and compassionate? Then make me happy by agreeing wholeheartedly with each other, loving one another, working together with one mind and purpose. And then he says, live in peace. A contentment that results in being right with God and one another. In rejecting the divisive false teachers, you will live at peace with one another. And this again is something they are to decide to do. In Romans 14, 19, let us therefore follow after the things which make for peace and things wherewith we may edify another. And finally he closes. Verse 12, greet one another with a holy kiss. All the saints greet you. The grace of the Lord Jesus Christ, the love of God, the communion of the Holy Spirit be with you all. Amen. When he says, greet one another with a holy kiss, I can see some guys right now saying, yeah, I'd like to do that. I used to think that meant that the guy would go out there and he is this beautiful little Jesus-free girl.  But in that day, the men would kiss the men. Now, there's some guys right now who don't have a problem with that. I was never big on kissing men. But what it is, it is a greeting. It's showing love for one another. Is there anything that we ought to have in a church if it's not love for each other? And that's what he's speaking about. What is the number one earmark of a Christian? The love of God. What did Jesus said, say is in response to what is the Great Commandment? And he said, what did he say? The love God with everything within you. Love your neighbor as yourself. And how do we love one another? He said, love one another as I have loved you. How did he love us? He laid his life down. That's how we can be at unity with one another is by putting others in front of us and learning to minister to them out of love. And so he says, greet one another. Love one another is what he's saying. Be externally loving to one another. It's evidence of the unity and it's evidence of love. That holy kiss is a demonstration of love. There was a writer who has gone to be with the Lord. His name is Francis Shaffer. And Francis Shaffer said, love and the unity it attests to is the mark Christ gave Christians to wear before the world. Only with this mark may the world know that Christians are indeed Christians and that Jesus was sent by the father. It's the love. And then he said, all the saints greet you. This is the church in Macedonia that he's speaking about. Probably Philippi and he's saying that that they are greeting you. They love you. This is a church revealing love for other believers. And then finally he says the grace of the Lord Jesus Christ. The love of God and the communion of the Holy Spirit be with you all. The grace of Jesus Christ banishes self-assertiveness. The love of God puts jealousy and anger to flight. And the fellowship of the Holy Spirit leaves no room for division or schism because the Holy Spirit empowers us and it is the Holy Spirit who unites us. The grace of the Lord Jesus Christ the love of God and the communion of the Holy Spirit be with you all. That's his last words. His last blessing and that's appropriate for us. May God's grace be to you. May God's love be with you. And may the fellowship of the Spirit be amongst us uniting us and things of Lord. May we together love and serve God walking in grace walking in love and walking in the power of the Holy Spirit.


My name is Charles, and Alex is with me on the stage right here. So I'm an ML Ops engineer moving good. We do a lot of things around ML Ops deploying application on Kubernetes, and we've been using Agil a lot in the last few months and years. So we're from Texas, so we do a lot of things around provision-escalable ML applications on cloud diagnostic infrastructure. We basically all pack customers, operationalize and deploy their models at scale, and we do a lot of things around data lake feature stores and model management. Yeah, so the agenda for today, what it takes to build enterprise machine learning platform, implementing cloud agnostic ML workflows on K8s, machine learning model data prep and feature engineering, event-driven ML model training, and with Argo workflow and events, and implementing model deployment and serving pipeline with KServe. So I'm going to take on the first few sections of the slide. What it takes to build a cloud agnostic ML infrastructure. So the goal of any production-grade ML machine learning project is to build a statistical model using the well-curated data sets. And the main artifacts, like we all know, is the data, the model, and the code. So the data will keep changing. Your code will be changing, and you keep producing model output artifacts. So a typical ML workflow looks like this, where you're acquiring the data. You're doing data prep. You're doing feature engineering. Then you run through multiple iterations of your model training, then onto your server model. And you still monitor the model for drift. So typically, a lot of ML projects start on cloud services like Google, AWS, Azure. We have some customers that do on-prem as well.  You go through the process of identifying the data you need, connecting to the data source, preparing the data. Then you go through multiple iterations of training the model onto your server. So there's a lot of moving back to this that makes it really difficult. And one thing that we've seen consultant in this space a lot is if you're trying to build an ML model, you want to make sure you can reproduce the entire pipeline, which is one thing we've been able to successfully do with DevOps process, where you have a process that you can reproduce. You have components that you want to make sure that you have components that you can reuse. So if a data scientist or ML engineer is working on a particular component, you want to be able to share with other team members and things like that. Then the other thing is manageability, being able to manage all the output artifacts for audio trades and things like that, then automating the whole process so that the process runs by itself and things like that. So to get started, a lot of companies use managed services on AWS, or you can do the same thing with Azure, or you can do the same thing with Google. You all manage services that will get you up and going and things like that. But in reality, what you're doing whenever you're trying to build any ML pipeline is the number one thing is you always need to solve the data you ingested. You do data prep, you do feature engineering, and you can now decide to run on any of these major cloud platforms, at least these three major ones. And now you train your model, you do model scoring to see if the model is good enough and you do your inferencing. So in an enterprise, it gets a little bit more complex, especially with a lot of enterprise trying to go with a multi-cloud strategy, where you have some people working on Google, some people working on Azure, or Amazon. So you're trying to basically, different teams work on different infrastructures, and sometimes it's a lot more difficult to transfer the knowledge between teams, especially if a team is all baked into a particular cloud infrastructure provider. So one thing we've done is to basically identify the two main things that you do whenever you're trying to train a model. You have the storage pack, where you're basically ingesting all this data, you're curating the data for your model training, and you have the compute pack, which is where you have your GPUs or CPUs running on the cloud and things like that. So on the storage pack, we basically think about it as a feature store, where all the things you do to get the data ready for the ML engineer or the data scientist, we curate it and we have everything in a feature store. And everything that has to do with your compute, basically running your pipelines and your workflows, we basically abstract it as a containerized application that runs on Kubernetes. So because of this, we have a cloud agnostic layer that can run on any of the cloud providers as long as they're running on Kubernetes. So I'm gonna hand it over to Alex who's gonna talk about all this to the next slide. Yeah, so in order to basically create these feature stores, we use Argo workflows to basically do the data transformation and fill the feature store with the data that's necessary to train the models. But we wanna do this in a cloud agnostic way such that our customers don't need to worry about if they need to lift and shift from GCP to AWS. They're able to do so. So we deploy with Argo and Argo CD to give them flexibility and to basically bring customers up to speed. A lot of our customers are first-time Kubernetes users and we like to be able to introduce them in a way that's gonna be good for the long run. And we introduce all the Argo tools, workflows of NCD because it gives them basically a tool set that's gonna last for the long run. And it's very efficient. So some of the ways that we did this, we basically allow different teams to use Argo workflows to do whatever they need. Some teams are working on feature extraction, some teams are working on training, but they're all using the same common platform which is Argo and this has been very successful for us. So in general, like we need a data lake, feature store, all that good stuff and Argo's been basically our go-to for building these workflows and we've been using the DAGs for some of the more complicated pipelines that we build and it's worked very well for us. Some customers are using TensorFlow, some are using other machine learning frameworks but doesn't really matter as long as you can build an Argo workflow and they know how to build workflows, it works for them. So again, we use Argo CD workflows, events. Some of the ways that we use events are file drop and like a cron-based time triggers are very common and yeah, Argo CD is definitely how we've been selling Kubernetes to our customers. So being cloud agnostic has been very important to us. We make sure to stay open source and just not lock our customers into any sort of hosted solution other than just using open source Argo CD and this has been a great solution for us and with lots of help from the Argo community. So yeah, so basically some of the steps that we use to do this we provision on the cloud offering of their choice. We deploy node pools. We use Argo CD application sets to define basically the base of the cluster and the serving and event components of the cluster and then we deploy it. Here's an example of how we use application set. We kind of use it to define what's the base of a cluster for this client. In this particular use case we have all the namespaces, the role bindings, Argo CD managing itself and everything needed to have a machine learning platform. And here's kind of what our Argo CD dashboard looks like after being deployed. We have three application sets in this example. We got the base which gives all the necessary infrastructure to kind of deploy custom resources such as K-Serve or Argo events and this has worked very well for us and application set has been nice moving away from the app of apps pattern. Application set has been, it's a lot better. So yeah, again, here's a look at how we use application set to deploy all the namespaces needed. We keep our namespaces in one general application so that any of the apps that need to reuse these namespaces are easily able to use them without needing to worry about the namespaces created or not. Here's a look at what the baseline Argo CD dashboard looks like and yeah, I will hand it off to Charles now. Yeah, thanks Alex. So basically we use the Argo CD to provision all the things that we need in a cluster to get ML process started whenever we have a new project. So the next thing we do is a data preparation making sure we're curating the right dataset for data scientists to get started whenever they need to train a model and make it easy for them to do it in a very consistent and repeatable way. We wanna have an agile and efficient process so that once I've prepared the data I can share with multiple data scientists on the team and if we need more features in that datasets we can always recreate it without basically slowing down the existing data scientists or ML engineers working on this and at the end of the day we wanna be able to create a shareable feature set that you can basically authorize a user it seems to use so that it can use to train their model and things like that. So a typical ML workflow for a data scientist looks like this.  But the challenge with that is like if you're trying to basically do everything at scale it's not gonna work because you're not gonna easily transition from what you're doing on your local to a production environment. So in that case, for what we do and how we go about it we basically create kind of like a data lake where you can land all your raw data and we have an agile workflow pipeline that transforms the data into a feature store. So we have a feature store, we have a schema with all the feature vectors and all the attributes that you need to train your model and the agile city basically runs on the Kubernetes infrastructure and because we're trying to be cloud agnostic, any solution we build should be able to run on any of the major cloud providers. So from there, the data scientists can now go in and stop pulling all the data they need and start training their models. So just to zoom in on the data lake pack which is where we keep all the raw data. So every time we ingest data we have new delta so we need to keep ingesting the data. It could be streaming, it could be batch and once we ingest the data we trigger a workflow to basically convert it to the feature store requirements. So it looks, for the batch work stream it could be a data that we're landing on S3 bucket or Google storage or set. We have some customers that are on-prem they're not in the cloud so we basically use something like that and for the streaming data we have something like this. Now we have a pipeline that basically converts and transforms this into feature groups and that feature groups can now be used to train the model in the offline mode or you can have the online mode where we create a key value pair that maps to the greater detail, that maps to greater details about the data set that you can now use whenever you're serving the model. So basically in all these places we're leveraging the IGO workflow. So all the way from landing the data I think Alex talked about it earlier where we have the IGO events that whenever the file drops we trigger a workflow so but we're not gonna trigger for every file in the batch process so we have a way of basically having a trigger file that whenever that trigger file lands we just trigger a batch of the files and we process it and we curate the feature store. So this way the data scientists can always have new data they can always go back and retrain their model and if we notice any model drift we have a pipeline that goes back and retrain the model and basically checks what's going on. So we're using IGO workflow in a lot of all these use cases and these are some of the pipelines that we're working on I think Alex has some more details on that. Yeah, so we use batch workflows, streaming, feature store creation and online feature store and offline feature store all using IGO workflows to kind of build out these components. Here's an example of how we built a small data lake. We basically did data ingestion like once the message is fired off we consume the message, we do schema validation on it make sure the message looks like the correct shape and then we write it to the data store. Same example but like in a streaming situation we consume a message from Kafka, we transform the message and then we write to a feature store and here's the feature store creation where we read data and we transform it, create the key value pairs and then write to Silla. The benefits of having a feature store it makes it easier to migrate the workflows we're not tied to any particular cloud provider and in general it's just it gives a common data lake for any machine learning engineer to come in and build a model on Charles. Yeah, sure. So to basically operationalize all these things we need to react to events and event could be things like code change whenever you're coming to the Git repo, data change whenever there's a change in your data sets you want to trigger retraining if it's necessary and if you notice that your model is drifting basically you want to retrain the pipeline. So when we want to operationalize our workflow and production we're basically leveraging IGO events so IGO events is kind of like the list there for us to automatically trigger all these workflows based on code change, feature updates or model drift everyone updates our pipeline and things like that. We also trigger these events based on Kubernetes resource deployment basically monitoring the state of a resource especially with KSAV Alex is gonna talk about that in a little bit. So a typical workflow looks like this where you have the data engineer or ML engineer working on the patch class stuff you check it in if you're using Git it triggers a Git action and we build a container and we push it to the container registry then we have IGO CD checking to see if there's a new container that needs to be deployed if you need to retrain the pipeline then it basically retrains and deploy the models and creates a fashion tag for it. So once the model training is done we basically create another event we have a metrics table where we're basically storing all the metrics it could be the accuracy or the precision of the model and we save the model output artifacts the frozen model in the container registry so once the model drops in this container in this sorry in this bucket we can trigger another workflow as well but before we deploy the workflow the pipeline we wanna check to see if the metrics if there's any improvement in the model so the IGO event workflow process will check to see if there's any significant improvement in the model that we trained and determine if we need to redeploy or not and the same thing with the feature store every time we curate a new data set to the feature store we have a listener that basically triggers an event a workflow event for us to retrain the model and things like that. So some other sensor IGO event sensors that we're building on that we've used things like file drops in the bucket basically if there's a file drop or any change in the bucket due to dropping adding new files or new data sets we can trigger a workflow based on that we check our message cues to see if there's any new message for streaming data and for Kubernetes resources as well we can basically trigger a workflow if there's a new event in the Kubernetes cluster basically sending a notification whenever we're training a model if the model training was successful or not and we use webbooks to connect back to something like Slack so that someone geeky like Alex can retrain a model from his Slack message. So some of the workflows that we're currently working on is the feature stock creation workflow the model training status justification workflow the metrics and the model drop workflow and the model deployment workflow so I think Alex you have an example you want to show? Yeah, so here's an example of the bucket drop where you drop basically this allows us to drop files into a cloud storage bucket after a certain number of files have been reached the threshold is met and a Argo event is triggered that basically spins up a workflow that will take all the files from the input directory and move them over to the training location so what that looks like and make sure that there's the correct number of files needed to move to train and if not it'll wait till another event is fired to do the counting we have this is one way to do it and sometimes we use a file trigger but this is just one of the more basic ways to get it done once the threshold is met the train is the training data set is created and we archive it we zip it up so that it can be used for a new model version yeah and so now once the training zip is created we need to do training and serve the new model if the model's accuracy and precision is meets the correct score that we want to see we do this with the Argo workflow that basically looks at the feature store sees if the metrics value for the current model that got trained meets our threshold if it is we use kserve to deploy a new version kserve uses these inference services you basically just point it to a location S3 or GCS bucket with TensorFlow serving type of model and we have this DAG that we created where we do the validation looking into the metric store if the metrics meet our threshold we'll deploy the new model and we'll send a notification on Slack saying that a new model is being deployed for a little toy example we did we use the cars data set to basically just run a kserve and deploy a model that can determine if the given car is of a certain type here's what the inference service looks like we use Argo CD to ensure that we point everything to the right location in GCS here's what the inference service kind of fans out to and Argo CD gives you a nice view into that once that's done we check the status of the inference service we see that it's available at our URL we can check the metadata on the inference service we see that it's ready to go and then we fire off a sample request with a shell script to confirm that we're able to predict accurately yeah Charles so in conclusion leveraging Argo for our MR projects we've been able to improve our team delivery efficiency so it's easy to ramp up new team members because everybody's working on the same environment once you would strap the resource with Argo CD on your local if you're running Minikube or if you're running on the Kubernetes cluster in the cloud you can get going we have a blueprint and a template so if you want to create a new workflow we're not starting from scratch we're just leveraging the existing template that we have and let's talk I mean cloud is not cheap so we're set up we're able to reduce the cost for our customers in terms of the amount of money that's spent on cloud and things like that so that's it thanks everyone for coming I have a question from the virtual audience what technology are you using for the feature store? yeah so for the feature store for the online feature store we're using SilaDB which is basically kind of like a sand grab no sequel but it allows us to the memory footprint is very low so we can easily use that and for the offline feature store we're basically, we use story buckets and in some cases we're using traditional databases that's the only question I have from the virtual audience is there anybody else with a question? sure what do you use Argos CD for like I didn't quite understand that part how is that helpful when you're managing these workflows that you're running? yeah so, oh you want to take that? yeah so we just use Argos CD to essentially stand up the cluster for our customers a lot of them are first time Kubernetes users and we want to introduce them to K8s in a repetitive or repeatable manner I feel like Argos CD is a good way to kind of introduce them to K8s and keep them organized and it enables us to deploy like new inference services and different type of Argo events so we can create new sensors and have them deployed in a nice manner where you can visually see what's going on it's nice to see the fan out of when you create a sensor basically the pods that get spun up from that sensor and just to add to that it's easier for us to manage the deployment the manifest for all the components that we're running so every time there's a new release of let's say TensorFlow operator or KSAP we can manage the release through GitHub's process so basically Argos CD helps us do that easily thank you everyone thank you


Okay, welcome to space arena ultimate python turtle graphics game tutorial part 3 in this part I'm going to talk about how to make the sprites move and how to up use the update method which we're going to add to our Sprite class And so basically when you're playing a game or when you're programming a game I should say is probably better You're gonna be doing you're gonna have something called a main loop Go ahead and put that in here main loop And usually what we do is we do something like while true Or we could have make a variable called while running and we'll probably add that later But for now, let's just use while true and so here's the basic structure of our while true loop So I'm gonna go ahead and put clear the screen and So to do that I want to do pen dot clear again This is specific to the Python turtle module if you were using pygame You'd have to do something different, but the principle is basically the same and then in Here I'm gonna do my I'm gonna call it say do game stuff and I sure will help us to put it do game stuff and Then finally, I'm gonna actually do I'm actually gonna update the screen and to do that you use win dot update Oops, and I almost forgot to also you also have to do something up here called win dot tracer Zero and what that does is it shuts off the screen updates Until you actually decide that you want it updated. This is what's gonna speed up your program a lot So just trust me on that one. Now you get now if you get a question Let's just trace or do try just commenting it This is this is a good practice comment that out and see what happens and see if it makes any changes for you It might it might not but it probably will okay, so Now you notice this is a while true so it means this is going to run forever So this point I don't need this code You know now if you're using something like pie charm and you don't delete that you're gonna get an error It says unreachable code because you can never actually get to that line So it's good. Yeah. Goodbye. Good riddance. You could comment it out if you want to keep it So in here, this is where we want our game to actually do some stuff so the first thing we want to happen is We want to actually render all of our sprites Okay, so I'm gonna go ahead and put render sprites Because now if I run this watch what happens You don't see anything and that's because what happened is we rendered the sprite here and then as soon as we got here We cleared it. So we've got to put this part in the main loop So you can see how now we're separating out the creation part of it from the rendering and the activity part of it or the running part of it Okay, so we've created some sprites here and now down here. We're gonna render them each time through the loops Let's go ahead and run that make sure it works Okay, and there's our there are our sprites now This loop is running a certain number of times per second Okay, I don't know what that that number is again if you're using something like pie game You can actually just set that in pie game pie game takes care of all that for you Which is great One of the reasons I like to use the turtle module is because you can learn the real kind of a bit more low-level type stuff in game design where the The module or the library isn't doing all of the work for you. It's only doing some of it So I think this is a good learning experience, but once you get more experience You just want to go use an engine it didn't make your life a lot a lot easier. Okay So the next thing I'm gonna do is we don't want our stuff to just sit there We want it to actually move around so what I'm gonna do is I'm gonna create a new method of my sprite class and I'm gonna call it update Okay, and again You got to use self here because I want to update the player By itself. I want to update the enemy by itself and update the power up by itself But note what I'm doing so far is that they all have the same exact Methods there's no difference between the way they function yet, but we'll get to that later in a future video So how I'm going to move stuff is I want to create something called DX I'm gonna set it equal to zero and I use dy and set that equal to zero and D is just like I don't know if it's scientific terminology, but means Delta X and Delta Y Delta means change It's like it's from the Greek letters So if your Delta X and your Delta Y are zero, you're not gonna go anywhere You're gonna be sitting there exactly as you are okay, so What I need to do is in here and say self dot X plus equals self dot DX Self dot Y plus equals self dot dy So this is my Horizontal left and right speed. This is my vertical speed up and down So if DX is positive, I'm gonna move to the right if DX is negative. I'll move to the left Okay, if dy is positive I move up and if dy is negative I move down So what I'll do here is I'm gonna go ahead with the player. I'm gonna say player dot DX equals one I'll go ahead and say enemy dot DX equals negative one and I'll go ahead and make the power up power up dot D1 to dy equals plus equals plus one Now what I need to do But you're gonna run it and you'll see that nothing's gonna happen Okay, because I haven't called the update method Yeah, I have to call that down here. So I'm gonna go ahead and make this update Sprints, so I say player dot update and Notice here. I just have self Okay, so I don't have to put anything in here self comes from here for player. I'll say enemy dot update I'm gonna do power up Update, okay, let's go ahead and run that and let's see how they move. Okay, so you can see how DX it's gonna go off the screen And bye-bye, okay now we can of course there's no reason why we couldn't have player dot dy equals 0.5 and enemy dot dy equals negative 0.3 You can have and literally any number you want there power up dot DX equals 0.1 just make it move just a little bit Okay, so this is how we're gonna get our our objects to move around the screen So you notice we have right now a main game loop that is running It updates each sprite And then it renders each sprite So notice that the updating and the rendering are separate actions Okay, this is a really hard concept for beginners to wrap their heads around Updating it At this point, you know, the sprite is just a mathematical object It has numbers that represent its state. So it's color. It's XY coordinate. It's DX. It's dy They represent the current state of the object and until we render it We don't have to render it. We only render it so human beings can see it The rendering is a separate process Now you can see here how my my code is gonna start getting longer Let's say I have 10 power-ups and 27 enemies. I don't want to do it this way So let's go ahead and just shorten this up a little bit. So I'm gonna make a list sprites list and I'm gonna say sprites equals That's I'm gonna make an empty list Excuse me, and I'm gonna say sprites dot append Player sprites dot append enemy. I see what I did there And I'm gonna say sprites dot append Power up and then down here what I'll do I'm gonna say for sprites in sprites Sprite dot update now again, this is not a beginner tutorial So I expect that you understand what this structure does and how it works if you don't You shouldn't be watching this video yet Go and watch one of my other tutorials. They explained it very well for sprites in sprites I'm gonna say sprites dot render Okay, so that'll that'll iterate through that entire loop and it will render every sprite that is in it Now some of you are probably saying well, couldn't I just combine these two processes? And the answer is yes, you could but for now, let's just keep them separate I think you'll find that might help you later. We might need to make some changes Okay, so you can see how it's still working exactly as it was working before Okay, so yeah, I think that's about it for this particular one So what we did was we added the update method to the sprite class We added dx and dy to control the x speed and the y speed The update method just adds dx and dy to the the x and the y coordinates And then we also created a little sprites list so we can keep our code just a little bit shorter and cleaner And that is that stay tuned for more


welcome folks so in the previous session we understood that if a ray stands on line then the sum of the adjacent angle so formed is 180 degrees so we learned in the previous session that if there is a line and a ray stands over it let's say this ray let's say the names are o and let's say this is a b and c right so we learned that angle a o c plus angle c o b c o b is equal to 180 degrees okay this is what we learned now we have to prove the converse of it converse is that if the sum of two adjacent angle is 180 degrees now that it is given let's say this is given then you have to prove that the non-common arms are two opposite rays okay so we will be using something called method of contradiction here okay the method is called method of contradiction contradiction what does this method mean let's say for anything to have only two possibilities let's say if if a statement is there let's say if a statement is there now the statement can either be true or it is false okay so somehow if you prove that it is not false okay let us or you start with let's say the statement is false and somehow you prove that logically that our assumption was wrong let's say if the statement cannot be false then automatically the statement becomes true okay this is what is the logic behind method of contradiction so here they are saying that if the adjacent sum of the adjacent angles is 180 then their non-common arms are two opposite rays so we'll start with the assertion that let the non-common arms non-common arms not be the opposite arms okay that means now they're not opposite so let us start with you know a diagram so let's say this was given okay so again we'll take O A B and C now this was given and it was given that angle A O C plus angle C O B is 180 degrees okay this is given so we had to prove that we had to prove that O A and O B are opposite rays opposite rays so we are saying we are we are saying that let they are they be not opposite that means if O A and O B are not opposite then then what happens if they are not opposite there must be some some ray which is opposite to it to to each one of them then let us say O D is opposite to let us say O D is opposite to O A okay and let me draw it now so let us say I'm saying this D right so don't go by the figure you know so that's what we are going to prove that you know it is appearing also not to be opposite but then just to prove for the argument sake we are saying let's say if you are saying OB is not opposite to O A then there must exist another ray O D which is opposite to O A right so OD is opposite to O A that means A O D A O and D all these three points lie lie on a straight line on a straight line okay this is what we can we can say why because now O A and O D are opposite now in the previous theorem we learned that if a ray stand on a straight line okay so now we are saying on a straight so that means A O D is a straight line is a straight line should be a straight line since we are claiming OD to be opposite to O A now O C stands on stands on A O D line A O D okay this implies therefore what is what is implied by that means angle A O C plus angle C O D must be equal to 180 degree by the previous theorem right so let me call this as 1 and this as 2 so hence I can say from 1 and 2 since both are equal to 180 degrees I can equate them so what can I say I can say angle A O C plus angle C O B is equal to angle A O C plus angle C O B okay both are equal to 180 degrees now clearly A O C and A O C gets cancelled this implies angle C O B is equal to angle C O D okay now two angles are equal two angles angles are equal right with common with C O as the common arm common arm and O B and O D on the same side of C O same side of C O if you see in this figure OD and OB OD and OB both are on the same side of O C and the way you are saying both the angles are equal how can that be possible this means it is possible it is possible only when D coincides with B right only when this D point D is on B only then the two angles will be equal that means that means this means that D and B are same point same point isn't it and you had you had said that OD was opposite and since OD was or is opposite to OA therefore OB is opposite to OA why because now D and B are the same point so understood this is what is the proof of the converse of this or this particular theorem which says that if the sum of two edges angle is 180 degrees then their non common arms are two opposite rays we just proved that and we used what method of contradiction so please keep this method in mind