Amen. So keep your place in Leviticus chapter 16. We're going to do a little bit of a Bible study on this chapter before we get started here. Leviticus chapter 16 is again, this sermon tonight is going to complement this morning's sermon because of, you know, just the incredible detail that we see in Leviticus chapter 16. So Leviticus chapter 16 is talking about the details of the sacrifices that happen in the day of atonement. That's what's happening here in Leviticus chapter 16 if you look down there. So basically once a year the high priest would go into the holy place and do all these things. And there's a lot of detail here. There's a lot of things that he should do in a certain very specific way. As a matter of fact, the predecessor to this story happening was, I don't know why I'm holding a pen, but anyway the predecessor to this story happening was actually Aaron's sons actually not doing things the right way. And they had just died. So basically before this Aaron's sons had been killed by the Lord.  They basically came in and they wanted to just do things their own way. And as we saw this morning, you know, there's a very specific way that God wanted the priests to look at very specific things that God wanted the priests to wear. And here we see very specific things that the priest is to do. So look down at Leviticus chapter 16. Now the high priest would go into the holy place, which was inside the tabernacle, which was a special place, a special room where the Ark of the Covenant was that had the mercy seat on top of it. He would go into this holy place and this holy place was separated from the other parts of the tabernacle by a veil. Okay, now in verse number three, the Bible says, Thus shall Aaron come into the holy place with a young bullock for a sin offering and a ram for a burnt offering. And he shall put on the linen coat and he shall have the linen breeches upon his flesh and he shall be girded with a linen girdle and the linen miter shall he be attired. These are holy garments. Therefore shall he wash his flesh and water and so put them on. So look back at verse number two. I missed this but the Bible says here in verse number two, the Lord said unto Moses, Speak unto Aaron thy brother that he come not at all times into the holy place. So this was a once a year thing. So the Bible was saying here that you can't just, look, you don't just walk into this holy place. Okay, this is once a year you will go into this holy place beyond this veil and you will do it in this very specific way or basically you're going to die. Okay, he said, so you don't die do it this way.  Okay, those are the two things that he's going to kill. Now the bull was for the priests sins, it was for his sacrifice and then there were two goats. Okay, turn to Matthew chapter 27. There were two goats, one goat is let go and that's called the scape goat. You know if you ever heard of the saying, the scape goat, oh he was the scape goat. Well that was one goat was let go and one was sacrificed in this ceremony. Now look, these two goats are also seen in the New Testament. Okay, there's a picture of this in the New Testament. This is a picture of things to come. There's many things that this could be a picture of but in Matthew 27, look at verse 17. The Bible says therefore when they were gathered together, this is at the crucifixion or the trial of Jesus Christ. They were gathered together, Pilate said unto them, whom will ye that I release unto you? Barabbas or Jesus which is called Christ. For he knew that envy they had delivered him. For he knew that for envy they had delivered him. So when he was sat down at the judgment seat, his wife said unto him, this is Pilate's wife, saying have thou nothing to do with this just man, for I have suffered many things this day in a dream because of him. But the chief priests and the elders persuaded the multitude that they should ask Barabbas and destroy Jesus. The governor answered and said unto them, whether of these twain, so here was two men, one was to be let go and one was to be sacrificed, whether of these twain will ye that I release unto you? They said Barabbas. Pilate said unto them, what should I do then with Jesus which is called Christ? They say unto him, let him be crucified. And the governor said, why? What evil hath he done? But they cried out to the more saying, let him be crucified. When Pilate saw that he could prevail nothing, but rather that atomalt was made, he took water and washed his hands before the multitude saying, I am innocent of the blood of this just person. See ye to it. Then answered all the people and said, his blood be on us and on our children. So we see a picture of this in the Old Testament with the two goats. So we see the high priest coming into the holy place beyond the veil, the rituals of washing and sacrificing, the wearing of holy garments which we talked about a little bit this morning. But I want to tell you this evening that all these rituals that we're looking at here this evening, they're all done away with. Turned back to Matthew chapter 27. And now you say they're done away with, what do you mean? You know, look, things were not changed that they were done away with. Things were fulfilled that they were done away with. Everything that we see in the Old Testament just like I read for you in Matthew 27 is a picture of things to come. Look at Matthew 27 and verse number 50. Now all these things are done away with these rituals, the priests, the temples, the sacrifices. They're done away with because of the fulfillment that happened when Jesus Christ came. A physical example of this is in Matthew 27 verse 50 where the Bible says, Jesus, when he had cried out again with a loud voice, yielded up the ghost. He died. And behold, the veil of the temple was rent entwined from the top to the bottom and the earth did quake and the rocks rent and the graves were opened and many bodies of the saints which slept arose. Look, the veil was torn in two. After Jesus died, immediately the veil of the temple, this was the actual temple at this point, that cut off that place that, you know, the holy place that the high priest would go to, that veil was torn in half when Jesus died on the cross, signifying that the time for the veil was over. That's why God tore that veil in half. The priesthood, the separation that the veil signifies, that the veil actually was, the intercession of the high priest going beyond the veil is no longer needed, is what the Bible teaches. Why? Why is that? Why is that priesthood those sacrifices? I mean, why are we not, it's in the Bible, right? Why am I not up here once a year killing a goat? Why are we not doing these sacrifices? Why does no one do this? Because the Bible teaches that this is no longer needed, it's over, it's fulfilled, it's fulfilled. So tonight, we're going to talk about continuing the Baptist Basics series. We're going to talk about the priesthood of the believer tonight. The Bible teaches, turn to 1 Peter 2, or look at the front of your bulletin. There's a reason it's the verse of the week. The Bible teaches that we are the priesthood now, that the believer is the priesthood. And that's why we believe it, because that's what the Bible teaches. Look at 1 Peter 2, and look at verse number 9. It's our verse of the week. The Bible says, but ye are a chosen generation. This is talking about saved believers.   No, I'm just kidding. A peculiar people that ye should show forth the praises of him who have called you out. When Brother Matt smoked everybody at Ping Pong, that was peculiar. I'm like, what in the world is happening here? No, I'm just kidding. I'm just kidding. Okay, back to the sermon. I'm just kidding. Brother, you're good at Ping Pong, okay? All right. A peculiar people that ye should show forth the praises of him who have called you out of darkness into his marvelous light. Turn to Revelation chapter 1. It says we're a royal priesthood. We are a royal priesthood. What does that mean? I mean, it sounds like when you read what the priests were doing in the Old Testament, it seems like there's a lot of responsibility there. It seems like there's a lot of detail on the things that they're doing there. There's a lot of responsibility. Turn to Revelation chapter 1. Look at verse number 5. And the Bible says, And from Jesus Christ, Who is the faithful witness and the first begotten of the dead, and the prince of the kings of the earth, unto him that loved us and washed us from our sins in his own blood, and hath made us kings and priests unto God and his father. So it says Jesus Christ, the faithful witness. So when Jesus came, he made us those that believed on him, those that are saved through Jesus Christ. He made us kings and priests. So we are kings and priests. So tonight we're going to talk about what that means. Because the priests in the Old Testament, they had a lot of responsibility. There's a lot of detail that God was putting on them. I mean, look, if I have that kind of responsibility, I want to know what it is. I don't want to get it wrong. So he made us kings and priests unto God and his father. So we're priests unto God and the Father. And to him be glory and dominion forever and ever. Amen. So look, the veil, the veil was a big deal. Turn back to Leviticus chapter 16. Leviticus chapter 16. And look back at verse number two. Look back at verse number two. The veil was a huge deal in the tabernacle and in the temple. So much so that God said, the Lord said unto Moses, speak unto Aaron thy brother, that he come not at all times into the holy place within the veil.  It's once a year in this specific fashion. You can pass this veil. The veil was a big deal. You couldn't just walk into this place. Nadab and Abihu had just died because they didn't follow this. Because they had done wrong, according to this detail, that God wanted. Turn to Exodus chapter 34. You see another picture of the veil being a separation between God and the people. Look at Exodus chapter 34. When Moses, he received the law and then he came down off the mountain after spending so much time with God, the Bible says that his face shone so much that he wore a veil. So much that he wore a veil. Look at Exodus 34 and verse 30. The Bible says, and when Aaron and the children of Israel saw Moses, behold, the skin of his face shone and they were afraid to come nigh him.  I mean, that would be something that's supernatural. That would make people take a step back. Moses came down from the mountain and his face was glowing, was shining. And Moses called unto them and Aaron and all the rulers of the congregation returned unto him and Moses talked with them. And afterward, all the children of Israel came nigh, they came near, and he gave them in commandment all that the Lord had spoken with him in Mount Sinai. Until Moses had done speaking with them, he put a veil on his face. So what Moses did when he was giving the law and telling the people the law, when his face was shining like this, he wore a veil over his face. This signifies, you know, this separation once again. By a veil. This is a picture of that. But when Moses went in before the Lord to speak with him, he took the veil off. So when it was just Moses to the Lord, when it was the mediator to the Lord, there is no need for a veil. But when it was from the Lord to the mediator to the people, you had to have a veil there. You see the significance of the separation that God is showing here that needs to happen and the priest. The high priest was the mediator in Leviticus chapter 16. In this case, it's Moses is the mediator. Again, signified, you know, that veil is that separation. And the children of Israel saw the face of Moses, that the skin of Moses' face is shown. And Moses put the veil upon his face again until he went to speak with him. So this is a pre-temple picture, folks, of this separation from God and thus the need for a mediator. In this case, Moses and Leviticus, the high priest. But now, what about now? What about today? Turn to 1 Timothy chapter 2. So we see that the veil was split. The veil was split, no longer needed. But what about a mediator? What about a need for a Moses or for a high priest? Look what the Bible says in 1 Timothy chapter 2 in verse number 5. The Bible says, for there is one God. Do we need a priest? Do we need a priest? The Catholic Church has a priest. That's what the Catholic Church's model is. That priest mediates between you and God. That's what the priest does. That's why you confess your sins to the Catholic priest. That's why they do it. Here's the problem with that. Look at 1 Timothy chapter 2 in verse number 5. The Bible says, for there is one God and one mediator between God and man. Who is it? I want to know who it is.  The man Christ Jesus. That is who the mediator is. Who gave himself a ransom for all to be testified. We have no need for any other mediator. There is no need for any other mediator. Jesus and Jesus Christ is the mediator. Meaning you can go straight to Jesus. That is your mediator. First of all, do not take this for granted that Jesus Christ is your mediator. That you have access directly to Jesus. Look at the detail and the seriousness of approaching God in Leviticus chapter 16. Look at how serious God is about how the high priest was supposed to approach the Lord and go through the veil. That should give you pause. It is a great benefit to be able to just approach Jesus in prayer. But it should give you great pause in how you approach Jesus. Do you approach Jesus with respect? When you talk to the Lord in prayer do you set time apart to speak to the Lord in prayer? Or are you saying some two second prayer in between traffic signals or something?  You should set aside specific time every single day to deal with your mediator, with Jesus Christ. You have that access but you have access to God Himself is what you have access to and you should take it seriously. You should take it seriously. It will help you appreciate the fact that you have access directly to God. You don't have to go through a man you don't have to go through anybody. You can go straight to Jesus. You can go straight to the Lord. You say what about the sacrifices though? What about the bulls and the goats? Turn to Hebrews chapter 10. If I'm a priest do I have to start a goat farm? I mean what do I have to do? Do I have to raise goats? Anybody that eats goat must not have any beef. That's all I have to say. People raise goats to eat them. It's weird but what do I know? Hebrews chapter 10 lamb is good. Okay goat? I don't know. But anyway, what about the sacrifices? Back to the sermon. Hebrews chapter 10 verse number one. Look what the Bible says. For the law having a shadow of good things to come and not the very image of the things can never with those sacrifices which they offered year by year. This is what it's talking about is talking about the sacrifices offered in the day of atonement year by year continually in the summers there on two perfect. It said these sacrifices couldn't make them perfect. For then would they not have seized to be offered? That's a good thought right there because that the worship once purged should have no more conscience of sin. But in those sacrifices there is a remembrance again made of sins every year. For it is not possible that the blood of bulls and goats should take away sin. So what in the world? We just read Leviticus chapter 16 it says offerings for sins one for the bull for the priest and the goats for the people. But look it says that the blood of bulls and goats should not take away it couldn't take away their sins. It couldn't take away their sins. And it says right here again it's a deeper explanation of eternal security by the way but it's saying look if it could take away their sins and if the sacrifice was there to cleanse them from sin they wouldn't have to do it every year. It says in verse number one it says it was a shadow of good things to come it was just a picture it was a picture of the coming Messiah it was a picture of the one sacrifice. Look at verse number 10 it didn't take away their sins by the by the which we were sanctified through the offering of the body of Jesus Christ once for all. So the difference between the bulls and the goats and the sacrifice of Jesus is that Jesus' sacrifice was one time for all sin. And every priest every priest stand at daily ministering and offering often times the same sacrifices which can never take away sins so it's saying these sacrifices could never take away sins but this man after he had offered one sacrifice for sins forever sat down on the right hand of God on the sacrifices because this one the bodily sacrifice of Jesus Christ was it it did take away sins it was the one sacrifice that all the other sacrifices were just picturing they were just showing they were forecasting they were showing a future it was a future example of what the real thing was to be verse 26 and then verse 26 there's a lot of heresy that's taught out of verse 26 here but the Bible says for if we sin willfully after that we receive the knowledge of the truth there remain no more sacrifice for sins so a lot of people will teach that this means you can lose your salvation because there's no more sacrifice for sins but what this is saying is that you can't lose your salvation because there's no more sacrifice for sins the one sacrifice was all that was needed that's it once for all it doesn't say once for some it says once for all there's no more need for sacrifices so what does this mean what does all this mean the priesthood is us the sacrifices I mean they were just a picture of Jesus to come you know we're the priests the veil torn no longer needed turn back to first Peter chapter 2 what does this mean for us we're priests what are our responsibilities if we're a priest what's my responsibility as a priest today I mean the Bible clearly says that I am now the priest you are now the priesthood I mean you as a church are the priesthood you as an individual are the priest look at first Peter chapter 2 let's start back at verse number 5 the Bible says this it says you also as lively stones are built up a spiritual house and holy priesthood 2 now it's going to tell you what to do now it's going to tell you what to do now this is where we need to listen you're like ok I'm a priest what do I do it's going to tell you it says 2 offer up spiritual sacrifices acceptable to God by Jesus Christ wherefore it is also contained in the scripture behold I lay in sign where unto them which he is disobedient the stone which the builders disallowed the same is made the head of the corner and the stone assembling and a rock of offense even to them which stumble at the word being disobedient where unto they were appointed but ye again are a chosen generation a royal priesthood and holy nation a peculiar people that ye should show forth the precious and that he that believeth on him shall not be confounded a peculiar people that ye should show forth the praises of him who hath called you out of darkness into his marvelous light turn to Isaiah chapter 61 so there's some things that we're supposed to do here ok so first of all let's look at the priest's clothing in the Old Testament and I just wanted to just give you where's my clothing as a priest you know where's my clothing as a priest turn to Isaiah chapter 61 and look at verse number 10 the bible has an answer for that as well I will rejoice I will greatly rejoice in the Lord the bible says my soul shall be joyful in my God for he hath clothed me with the garments of salvation he hath covered me with the robe of righteousness as a bride groomed Ecketh himself with ornaments and as a bride adorned herself with her jewels your clothing as a priest is your salvation you're covered in the salvation of the Lord the bible talks about this being clothed in Christ in Romans chapter 13 Galatians chapter 3 look this is figurative the bible still talks about your clothing like we talked about this morning your actual literal clothing but how about our temple where's your temple turn to 1 Corinthians chapter 6 you're a priest you need a temple where's your temple turn to 1 Corinthians chapter 6 look what the bible says so our clothing we're clothed in righteousness we're clothed in righteousness as priests the temple look at 1 Corinthians chapter 6 and verse 19 you have a temple the bible says in verse 19 1 Corinthians 6 what know ye not that your body is a temple of the holy ghost which is in you which ye have of God and ye are not your own for ye were bought with a price therefore glorify God in your body and in your spirit which are gods look when you got saved the bible says you were bought you were paid for your body is now like weren't you indwelled weren't you sealed with the holy spirit didn't God put a down payment on you with the holy spirit what the holy spirit is in you if you're saved and your body is a temple of that holy spirit therefore hey glorify your God in your body your body is the temple you are the priest and your body is the temple you should live a holy life with your body turn to Deuteronomy chapter 17 the bible says in Revelation chapter 1 and verse number 6 that were kings and priests you're also a king you're a king and you're a priest your body is a temple of the holy ghost you should be living a holy life and the bible gives very specific direction to kings by the way look at Deuteronomy chapter 17 on what they should do and what they shouldn't look at Deuteronomy chapter 17 and verse number 15 the bible says there's your separation as a king right there you should be separated you should not be influenced from the unsaved you should not be unequally yoked with the unsaved same as the advice for the king look at verse 16 talking about he shouldn't just be gathering you know stuff to himself look that's the same with you you shouldn't be caught up in you know this idea of possessions in the thorns of this world as a king and as a priest in verse 17 it says look here's the thing about the multiple wife thing in the old testament we think about it like god told them not to do it and they did it anyway but what happened every single time that they did it and the same thing would happen if men would multiply wives to themselves today the same thing would happen to the lord you say that's a weird thing that's what happens that's what happened in the bible again and again king saw them in a perfect example multiply wives to yourself you turn away from the lord so look the bible here is saying be separated from the unsaved don't get caught up in the thorns of this world in the cares of this world and stay focused on god that is what the bible is telling you as a king and as a priest and it shall be when he sitteth upon the throne of his kingdom so here he is he's got these basic instructions that he shall write him a copy of this law and a book out of that which is before the priest and the Levites he's like get a copy of the bible and it shall be with him and it shall read therein all the days of his life that it may learn to fear the lord as god to keep all the words of this law and these statutes to do them he says look he's like you know love the lord don't get caught up in the things of this world he's like don't you know be separated from the unsaved and then he's like learn teach and live a godly life according to god's word is what the bible is saying here so look we see there's very specific direction for kings and priests but that's not the big one that's not the big one turn back to first Peter chapter 2 turn back to first Peter chapter 2 the priesthood your priesthood is a huge responsibility and we see that there's very specific things you're to know the bible you are to not get caught up in things of this world but the bible says in first Peter chapter 2 it says this again let me read verse 5 to you as lively stones are built up a spiritual house and holy priesthood to offer up spiritual sacrifices acceptable to god by Jesus Christ let me ask you a question you have to offer up these spiritual sacrifices you're not to sacrifice goats and bulls you don't have to get a farm or whatever but you have to offer spiritual sacrifices as a priest now let me ask you something are all sacrifices acceptable to god I mean why does it add that last part that says you know you're to offer up spiritual sacrifices that are acceptable to god look I mean there are sacrifices that weren't acceptable to god you can't just make up whatever you want as sacrifices so the first thing is you know we kind of talked about a holy life you know a holy life a holy body taking care of your temple a personal life that is not dishonoring the temple that is in you that's not littered with sin a priest had to wash himself before entering into the holy place that is a picture of a holy life your body is that temple is it clean is the question because god is there god is there how about outward sacrifices we're talking about spiritual sacrifices how about outward sacrifices how about this one how about raising godly children how's that for a spiritual sacrifice how about bearing spiritual fruit how about going out soul winning and actually getting people saved with your life how's that for a spiritual sacrifice that's acceptable to god now here's the thing I was writing this sermon and I just kind of got to thinking about spiritual sacrifices and you know what that means and just kind of what satan would like you know to stop in your life here's a philosophy for your life turn to 2nd Corinthians chapter 5 turn to 2nd Corinthians chapter 5 we're talking about spiritual sacrifices and we're talking about sacrifices that would be accepted of the lord right look at 1st Corinthians chapter 5 I'm sorry 2nd Corinthians chapter 5 in verse number 9 I'll just give you some thoughts on this the bible says in 2nd Corinthians 5 9 wherefore we labor that means we work that whether present or absent we may be accepted of him for we must all appear before the judgment seat of Christ that everyone may receive the things done in his body his temple according to that he had done whether it be good or bad look this is the time when you go over the sacrifices that you brought in your body with Jesus this is the moment right here there will be a time when you go over those sacrifices with Jesus and some of those sacrifices will be acceptable and some of them will be not look it says wherefore we labor will your labor will your work will your work be accepted of Christ or or did you do nothing or did you do nothing or did you labor for worthless things like oh man I worked hard but it was all worthless things here's a thought for you Satan can't take away your salvation man what's he gonna do what's he gonna do he can't get you to go to hell he can't get to your salvation he can't get to your salvation I mean look there's all look but you know what he can do he could probably get you to labor for nothing if Satan look what if Satan could convince a Christian to do nothing what if Satan could convince a Bible believing saved Christian to do nothing you're like it's not possible because a Bible believing saved Christian reads the Bible and they're like you know what the Bible tells me I need to go soul winning the Bible tells me I need to be in church the Bible tells me I need to be living a godly life I need to be reading the Bible learning the Bible it's like it's not possible it wouldn't be possible for Satan to convince a saved Bible believing Christian to do nothing with his life but what but what if look what if see here's a thing 5 again see God here's a thing folks we're going to go back to verse number 1 God there's all sorts of deceptions out there today there's all sorts of deceptions out there today I want you to recognize him because people are getting snagged into him big time if Satan could get you to do nothing in your life look that's the best he can do because he can't take away your salvation but he can make you worthless and have no profit to anybody else but you're like no way that could happen like no way look at verse number 1 of 2nd Corinthians chapter 5 here's the funny thing about God and about Paul especially writing the words of God they took very little care for their lives like Paul like no care I mean have you read what Paul did look at what the Bible says in verse number 1 of 2nd Corinthians 5 what's the tabernacle what's the temple we're dissolved we have a building of God a house not made with hands eternal in the heavens for in this we groan in our bodies we groan earnestly desiring to be clothed upon our house which is from heaven if so be being clothed we shall not be found naked in this tabernacle do groan being burdened Paul was burdened as he was beaten as he was put in prison as he was almost killed several times not that for we would be on clothed but clothed upon that mortality might be swallowed up of life now we that wrought for us the self same thing as God who also has given us the earnest of the spirit therefore we are always confident knowing that while we are at home in the body we are absent from the Lord he's like hey well I'm here and I'm groaning in this body he's like you know what it's just pausing me from getting to heaven that's why he didn't care because he's like you know what if I'm destroyed and my body is destroyed and they finally kill me this time as they've tried to kill me all these other times he's like oh now I'm in heaven got me he's like well I'm in this body there was times where Paul was just saying I'm torn he's like I'm hurting I'm in pain he's like I'm only staying here for you guys because I could just go home with Christ right now at any time they didn't care Paul didn't care I thank God that Paul didn't care as he carried the gospel with the you know he took I mean even Jesus said take no thought for your life I mean hello here's a thought imagine if Satan could convince Christians to stop bearing spiritual fruit to stop worshiping him and convince them that they're doing it to help others that'd be a good one wouldn't it to convince saved Christians to not bear spiritual fruit to not worship the Lord anymore to protect other people that's a good one you know what didn't get shut down this year you know what didn't get shut down people dying and going to hell you know that didn't get shut down you know that continued no matter how worried and scared people got I mean more people died didn't they no matter how worried and scared people got people went to hell rules didn't change that God didn't put the Bible on hold for whatever is going on here do you know that if somebody that doesn't believe on the Lord Jesus Christ dies they go to hell that didn't get put on pause but you know what did happen is Satan played a good game Satan played a good game here's another thought for you here's another thought for you you know the only thought I really take for my life is this look I don't want to die I don't want to die I think I think about it a little bit different than some people here's all I think about it I want to give God a reason to keep me around there's tragedy everywhere every single day there's tragedy there's a terrible tragedy downtown here last week there's tragedy every day in this very city there's tragedy all around us I mean I could literally be afraid I mean anyone could literally have good reason to be afraid walking around in this world because I mean tragedy is just all around us look I want to be look I don't know I mean I want to be bringing spiritual sacrifices daily I want to be bringing spiritual sacrifices daily that if my life would intersect there's a tragedy that you know what God says you know what that guy's productive that guy's productive I'm going to intervene here I mean there's the thinking I'm going to keep this guy around I'm going to keep this lady around this lady's killing it this lady if she stays on this earth for another 10 years there will be hundreds of people saved I'm keeping her around I'm making some moves who's on the throne God's on the throne give them a reason give them a reason to intervene it's just like work it's just like a company they've got to cut people we've got to cut 10 people we're going to cut this guy they're just making us all the money no they're going to cut the worthless people I mean that's the way it works I mean you're going to sit down as a business owner and you're going to find out who's producing and who's not is what you're going to do I want to bring so many sacrifices that I stand out and you know what that takes go back to 2nd Corinthians 5 you don't go back there I'll just read it for you you know what that takes it says wherefore we what therefore we hang out and sit and do nothing we labor therefore we work labor means work I mean look I mean sometimes spiritual sacrifices and going out and doing the things that you're going to do is going to feel like work I mean look there's not a lot of times I mean I have fun most of them but I mean there's sometimes where it feels like work but the Bible says it's work look you need to get to yourself look in general you need to get to yourself to the point where you like to work if you don't like to work you can have all kinds of problems everywhere in your life men and women you need to get yourself to the point where you enjoy working and then you can work for those spiritual things you'll labor to bring those spiritual sacrifices and you know what it feels good to work you know what even when you're laboring for the Lord there is joy there and maybe that's why it doesn't it never really gets to me because there's always that joy when it's a hundred and five hundred and seven degrees outside and you're out there and you get somebody say look there's still joy there it's sweaty and it's hot but look the joy is all the same but look wherefore we labor we labor because because people go into hell doesn't stop right when you gave a sermon one time you broke it down into like how many people die and go to hell every second or something it's insane look we have we've got to bring those spiritual sacrifices bring those spiritual sacrifices and then you can be a proper priest then now you're in the priesthood that's what you're supposed to do as a priest look it takes labor but there's joy there there's joy there I'm sure the priest in the Old Testament when he went into the holy place and he sacrificed for the people and he was doing all this labor look I mean can you imagine slaughtering all these animals and all the work that the priest said to do in Leviticus that's a lot of labor I'm sure there was joy and the importance of what they were doing there is no more important thing to be doing in your life then carrying out your priesthood in the proper way that the Bible says that you should you're a priest and we're to bring spiritual sacrifices let's bow our heads and have a word of prayer


This section is going to be a short one, but it's going to be a little more complex than what we're used to. We're going to talk about compression. Compression is a massive topic that can take, well, a long time to explain, but really what we're doing is we're taking some information and reducing its size through special algorithms. So we're going to include Qt to Bug. Now unfortunately Qt does not have a whole lot of compression built into it, but it does have two functions, Q-Compress and Q-Uncompress, which can make our life a little bit easier. We'll say QbyteArray. So we're going to make a function that's just going to return a QbyteArray, and we'll call this data. So we're just going to loop a thousand times, and we're going to say data.append. I'm going to convert that number to a string and then just add a carriage return line feed to this. So really we're just printing out a number a thousand times. And let's go ahead and do a QbyteArray. Make our data. I'm going to call this compressed and we're going to call Q-Compress. Notice how we didn't have to include anything. It's just baked right into the core libraries. I'm going to call Q-Uncompress, not decompress. There we go. And let's just print out some statistics here so we can see that it actually did work. So there's our original and let's actually put some tags out here so we can see what's going on. And through the magic of copy and paste here. There we go. So really all we're doing is we're making some data. We're calling Q-Compress on that data, which in turn will call a external library that's kind of baked into Qt. I shouldn't call an external library because it's actually inside of Qt. It will call an algorithm and take that data and look at the individual bytes and determine what can be compressed. Now compression is a art and a science in itself, but basically let's say take the word tool, for example. Notice how right off the bat in the word tool, there's two O's. Wouldn't it be nice if we could take those two O's and turn them to a special character, for example a one or a zero? What have we done? Well, we've just saved one byte. That's really what compression is under the hood. I'm sure you probably know what compression is. The algorithms themselves get insanely complex. Some of them even include encryption and they get kind of out there. All right, let's go ahead and save this. Let's run this. And you can see our original is 4890 compressed. It is 1882 and then decompressed. It is the exact same size. So that is Q-Compress and Q-Uncompress. In the next video, we're going to look at how we can actually compress a file. I hope you enjoyed this video. It's part of a video series I have out on udemy.com. This particular video is a follow-on in the intermediate course, but you can start in QtCore for beginners. And if we just kind of crack this open, it's got a lot of content that'll take you from an absolute beginner that just knows absolutely nothing from Hello World all the way up to what are templates, generics, air handling and classes. This specific video is part of the QtCore intermediate class. This picks right up where the beginners course left off and we do things like memory management, collections, working with settings, the file system, a lot of file system, compression, serialization, and much much more.


Yeah, thanks for staying with us on the Sports Mag Zone. Skopje Football Action in Jamaica is nearing fee-for-pitch with both the Dacosta and Manning Cup competitions currently at the quarter-final stage in the Dacosta Cup. All eight teams played their first of three group games on Wednesday. Let's have a look. Clarenin College beating Cristiana by four goals to nail. Glenmure 2-0 over Manchester. Garver-Maceo impressive as well. Four-nil over BB Cocoa had gone through the round of 16 on beaten and Dintill Technical beating Cornwell College by two goals to nail. Group one of the quarter-final on Clarenin College and Glenmure on three points. The high-end Cristiana have it all to do and then in group two Garver-Maceo and Dintill Technical they are top of the group on three points each. Cornwell College and BB Cocoa have a lot of work to do if they aren't to make progress to the next round of the competition which is the semi-final round. Over in the Manning Cup only one set of quarter-final games remain with the final four to be confirmed by Saturday. The latest set of matches were played on Tuesday. Jamaica College beating Tivoli Gardens to one Kingston College. A big win over San Andro-Technical one-nil. St. Catherine staying in contention with that 1-0 draw against Mona and St. George's College drawing with Heidel by a goal to nail meaning that those two will go into their final matches needing only a draw to advance. Shall we have a look at the matches to come on Friday and Saturday? Now first up the group standings Kingston College on four points ahead of San Andro-Technical on three points, Mona on two and St. Catherine on one. All four teams in this group still have a mathematical chance of making it to the semi-finals and then in group two St. George's College lead on four points alongside Heidel with Jamaica College on three. Tivoli Gardens the only team in this group who cannot advance to the semi-finals of the Manning Cops are seven of the eight teams still in semi-final contention with one set of group matches to come. Those games will be played on Friday on Saturday on Friday. San Andro-Technical player Mona that game will be live on Sports Max 2 with a pre-game show beginning at 2.30 p.m. 3.30 ECT only one of those teams can advance. So it will either be stats or Mona St. Catherine will play Kingston College again only one of those teams that can advance and the Kingston College only need a draw St. Catherine have to win by two or more goals. Then on Saturday Jamaica College versus St. George's College St. George's College only need a draw to advance and then Heidel versus Tivoli Heidel only need a draw to make it to the semi-finals and the St. George's Jamaica College game a massive game will be live on Sports Max Plus so ensure that you download the Sports Max app. Yeah Lance this football season is coming to a cracking conclusion in both the Manning and the Costa Cop competitions but because we're further ahead in the Manning Cup and we could have a look at that. At the start of the season teams I think we all looked at Jamaica College St. Andrew technical Mona as tighter contenders and as it is now at least two of them could be on the outside looking in when the semifinalists are decided. And names have been added to that list as genuine title contenders as well like like Heidel and even Kingston College who certainly at the start of the tournament based on their performances hadn't looked like genuine title contenders but you know what they say about Kingston College they may fall but never yield. Yeah and you have to give Vaso Reynolds a lot of credit because Kingston College lost a number of players from last season and they were in the group of death. Well that's what it was referred to with the likes of Heidel and Calabar and Camperdon and Charlie Smith all good teams who have done well and gone deep in competitions over the years and for them to come through that group by winning it and we see Heidel doing well in the latter stages of the competition as well so it speaks a lot about the quality that was in that group A that Kingston College top and Heidel also came through. Yeah you know you started the segment by saying that the two competitions both at Acosta Cup and the Manning Cup schoolboy football in Jamaica is nearing fee I'm not sure if you said fee for pitch or fee for pitch. What did you say because it sounds as if if you were saying fee for you would be suggesting that it's near world class level. What did you say fee for fee for. The excitement is near world class level and the excitement is near world class level and I just cannot wait for Friday because first Mona versus Sanandro technical just to think that one of these teams will exit the competition at the end of that game. I don't know who you think is not going to make it lands. Do you think stats will get the better of Mona or do you think Mona will find a way. It's it's hard. It's hard to say. It's hard to see Mona exiting though. That's that's the best answer I could give you. That's the best answer. Yeah Mona it's hard to see Mona exiting. How about Jamaica College St. George's College on Saturday. J.C. have to win St. George's College need only a draw. Hard to see Jamaica College exiting. You know I expected Lance to say everything that he just said. He's such a safe man. Let's take a break on the Sportsman zone interactive coming up next day with us.


Hi everybody, my name is Ravel. I'm a software engineer at Smarkets and today I'm going to talk about the ETL pipeline that we built to generate the accounting reports. I'm going to focus on the tech stack and the reasoning behind the technologies that we chose. Smarkets is an online betting exchange where people can place bets on different events, mainly sports, but we also support other kinds of events such as political elections. In the exchange, many money-related transactions are generated. Those include deposits, withdrawals, orders to place a bet, cancel a bet and so on. All of these transactions need to be processed to generate the accounting reports which include accounting statistics such as the total amount of money that somebody can have placed in bets over a month, the total amount of deposits we throw out and so on. These reports serve two main purposes. The first one is that they allow us to have control over the money that comes to Smarkets. And secondly, they provide documentation for the relevant regulators so that they can know how we handle money at Smarkets. The previous accounting pipeline was designed back in 2013 and at that point, the number of transactions that it needed to handle, it was below 190,000. The massive business growth at Smarkets during the last four years made this number of transactions increase over an order of magnitude. And now the number of transactions that the pipeline needs to process is more than 0.8 million. The previous pipeline was not able to handle this number of transactions. The main problem of the pipeline was that it was a collection of scripts without any formal dependency definition between them. And this was creating two issues. First, it was difficult to identify errors. And secondly, even if you managed to identify where the error was coming from, it was difficult to know which steps of the pipeline need to be rerun in order to generate again the accounting reports. Apart from that, sorry, apart from that, the system was really slow. We are supposed to generate the accounting reports daily, and it was taking more than 24 hours to run. And finally, this pipeline was using as persistent storage a volume mounted into the host running the pipeline. This volume was quite expensive and it required maintenance in order to ensure that it was not low on disk. At this point, we decided that the best solution was to redesign the whole pipeline. This diagram represents the main tasks that this pipeline needs to do. First, we need to fetch the transactions from the exchange. And we need to generate transaction files with those transactions. Afterwards, we need to process these transaction files to compute the daily and monthly account statistics. And finally, using these account statistics, we need to generate the final accounting reports. The main requirements of the pipeline are fault tolerance and reliability. If something goes wrong, we need to be aware of it and we should fix it quickly by running those steps of the pipeline that are affected by the issue. In terms of storage, we need fast reads and writes, high availability, high durability, and the storage should be cheap. We also need good processing performance. It shouldn't take more than a couple of hours to generate the accounting reports. And finally, we need the pipeline to be scalable. The number of transactions at this market continues to grow and we don't want to have to redesign the whole pipeline anytime soon. In the rest of the presentation, I'm going to describe the design decisions that we made to meet these requirements and also the technologies that we chose. The accounting pipeline involves fairly long batch jobs and things can go wrong while they are running. In particular, in our case, the communication with the exchange to fetch the transactions may fail. In order to provide fault tolerance and reliability in this scenario, we made the following design decisions. We store the transactions per day and we also compute the financial stats per day. So if something goes wrong in a particular day, we just need to recompute the financial stats for that day and not for the whole month. Sometimes things go wrong in the exchange and this creates some problems and we get missing transactions or other sort of data corruption. In order to reduce the impact of these issues on the accounting pipeline, we always compute the stats for the last two days worth of transactions. And finally, we broke down the pipeline into modular Luigi tasks. Luigi is a Python library that allows you to define dependencies between tasks and it handles the dependency resolution for you. By breaking down the pipeline into Luigi tasks, it's really easy to identify when things go wrong and which steps of the pipeline are affected and only run those steps instead of the whole pipeline to generate again the accounting reports. This is a simplified version of a task that we have in the pipeline, which basically generates a human readable report with account statistics. A Luigi task is a Python class that in general defines three methods. The required method allows us to declare all the dependencies of the task. In this case, the generate human readable accounting report task depends on the output of another Luigi task that generates a file with account statistics, but in a binary format. The run method is where the processing takes place. In this case, reading the input file with the account statistics and generating the TSB file with those stats. And the output method allows us to define the target of the task. In this case, the report that we want to generate. This graph is a simplification of the dependency graph generated by the Luigi central scheduler. The node in the top represents the task that we trigger. In this case, will be the generate human readable accounting report. And below it, you can see all the levels of dependencies. So generate human readable accounting report depends on the output of generate accounting report, which in turn depends on the output of many generate accounting monthly stats tasks. The color of the nodes indicates the status of the task. Yellow means pending, blue means running, and green means completed. The next requirement that we wanted to achieve was efficient storage. In order to meet this requirement, we focused on two aspects. The format of the files generated by the pipeline and also where to store all these files. Regarding the format, instead of going for a conventional, sorry, instead of going for a conventional row-based format like a TSB or a CSB, we decided to use the columnar format parquet. The difference between a row-based and a columnar format is the way data is stored in disk. In a row-based format, the values of the rows are stored sequentially in disk. And this is a good idea if our access pattern consists of accessing the values of particular records. On the contrary, in a columnar format, the values of the columns are stored sequentially in the disk. And this offers a good performance for analytical tasks like the ones in this pipeline, since it allows us to fetch only those columns that need to be processed instead of having to load all the filing memory. And this minimizes the amount of IO. Apart from that, since data of the same type is stored together, type-specific encodings can be used. And also general compression algorithms work better, which maximizes the compression factor of this algorithm, of these files, and also minimizes the amount of IO. Parquet can be loaded into pandas data frames, and it's also supported by all the Hadoop environment. In terms of persistent storage, we decided to go with Amazon S3, since it provides all the requirements that we were looking for. It provides high durability. For regulation purposes, we need to keep the accounting reports for several years, so high durability is very important for us. High availability, we should be able to access the reports whenever we want. Low maintenance, we don't need to care about being low on disk or, yeah, doesn't really require much maintenance. Amazon S3 is quite cheap. It also allows us to decouple the processing from the storage, and what this means is that we can choose the instances of the pipeline based on our processing needs instead of having to worry about how these requirements, since all the data that we actually want to persist, can be stored in S3. It can be accessed from Python using the library's BOTO or BOTO3. And it comes with a nice web interface where you can check all the data that you've stored. The next requirement that we wanted to meet was good processing performance. We wanted fast data processing, and we also wanted an engine that was able to scale. That's why we decided to go with Spark. Spark is a general-purpose data processing engine, and what Spark does is it breaks down the processing jobs into tasks and identifies those tasks that can be run in parallel on different data partitions, and it builds its own execution plans. By doing so, Spark can do a lot of processing in parallel. Another feature that allows Spark to be really fast is that it keeps data in memory when possible instead of storing intermediate results in disk. And Spark comes with Python support through the PySpark library. At the core of Spark, we have the RDDs, which are the fundamental unit of data in Spark. RDDs are resilient because they are immutable and they are fault tolerant. They are also distributed because they are partitioned across multiple nodes in the Spark cluster, and they are a dataset because they hold data. There are two kinds of operations that can be applied on RDDs, transformations and actions. A transformation applies a function on the RDD and creates a new RDD. Examples of transformations are map, filter, aggregate, actions, on the other hand, return a final result or write data to an external storage. Transformations in Spark are lazy. They are not executed right after they are called. But the transformation itself is safe and a reference to the data that it modifies is also safe. And this is called the Spark lineage. And this allows Spark to be very efficient and also fault tolerant. These transformations are only executed when an action is triggered. In our accounting pipeline, in our data processing pipeline, we didn't use RDDs directly, but we decided to work with Spark data frames. Spark data frames are units of data organized in columns and built on top of RDDs. But their performance is better than the RDDs performance since optimizations are applied before the actual operations are executed. And also the data frames API is more user-friendly than the RDDs one. I'm going to explain how Spark application runs. Spark follows a master's life architecture with a central coordinator called the driver and several distributed workers called executors. The driver instantiates the Spark context, which is in charge of breaking down the processing job into tasks and creating the execution plans. Once Spark has these execution plans, the task scheduler within the Spark context is going to ask the cluster manager for executors to run these tasks. Spark has its own cluster manager, and it also supports other cluster managers such as Hadoop Yarn. Spark jobs can be triggered from Luigi. Luigi comes with the PySpark task that can be extended to create custom Spark jobs. In this case, all the Spark operations can be defined in the main method of the class. So in here, for example, in this task, we are creating a report with accounting statistics for a particular account by filtering out the rest of the account IDs. The final requirement that we wanted to achieve was scalability. In order to meet this requirement, instead of having Spark running on a single node together with the rest of the pipeline components, we wanted to configure Spark to run on a multi-node cluster. Instead of configuring our own cluster, we decided to use Spark on EMR. EMR provides fast deployments. It takes around 10 minutes to provision a cluster. It is quite easy to use. Once you know the types of instances that you want for your pipeline and your software requirements, doing the configuration is quite easy. It is really flexible. It allows you to choose among many different kinds of instances, frameworks to install, and you can even install external software. It comes with the EMR-5 system, which integrates with S3. So all the logs of the cluster, together with the data generated by the cluster, can be stored in S3. The cluster can be shut down once the processing job is done without any real data loss cause. All the data that you want to persist can be stored in S3. The cost of running the cluster is quite low, and you only pay while the cluster is running. And it comes with a nice web interface where you can check the configuration of the cluster, the task that you run in the cluster, the logs, and so on. I'm going to explain a little bit how Spark runs on EMR. EMR has two kinds of nodes. A master node and several slave nodes. The master node distributes the data and the tasks across the rest of the nodes, checks the status of the cluster and also the status of the tasks running on the cluster. And the slave nodes are in charge of running the tasks and also storing the data on the file system of the cluster. EMR uses Yarn as the resource manager to allocate resources to the tasks admitted to EMR, to the cluster to run. When we submit a Spark application to EMR, the first thing that is this application is going to be running on several Yarn containers in the slave nodes. The first thing that is going to happen is that the Spark driver is going to instantiate the Spark context. And this Spark context is going to create the execution plan. Once we have this execution plan, the Spark context is going to ask the Yarn resource manager for executors to run these tasks. The Spark executors, which are running on different Yarn containers, are going to register with the Spark context. And this Spark context can then start sending tasks for execution to the Spark executors. To finish, I'm going to summarize the main steps involved in the accounting pipeline. First, we use Jenkins to trigger the accounting job. The reason behind it is that Jenkins allows us to schedule the job so that it runs daily. And it's also a central place for us to have where we have most of our batch jobs, so it allows us to easily monitor if they are all fine. The first thing that this accounting job is going to do is creating the accounting container with the latest image from the registry. And once this container is up and running, the Luigi central scheduler will be started. Then Luigi tasks that has as requirements all the Luigi tasks that generate final reports is going to be triggered. The first Luigi task that needs Spark for processing is going to create the Spark cluster on EMR. And once this Spark cluster is up and running, all the Luigi tasks that needs Spark processing are going to submit Spark applications to EMR. Once the last Luigi task that needs Spark is done, the Spark cluster will be destroyed. Finally, all the data generated by the pipeline together with all the reports can be found in S3. This is the end of my talk. Thank you very much for coming. Thanks very much. Are there any questions from the audience? Thanks for the talk. You said you use Luigi. Did you do any comparison with the airflow? No, we don't use it. We use Luigi mainly at markets. I didn't use airflow before. Okay, but there is no like pros and cons? Not really. I've never used myself airflow before. Thank you. I don't know. So you said you started up an EMR cluster and ran multiple Luigi tasks on it and then shut it down at the end? It's not like that. We run the Luigi tasks within a node and then the Luigi tasks submit steps to the EMR cluster. We don't run the Luigi task on the cluster. I was wondering if you had a way for Luigi tasks running outside the cluster to submit jobs to the cluster? Yeah, so we had to create our own by Spark task. Okay, cool. I mean, I can show you. Is it open source? No, it's not open source. I mean, I can show you the code. It's not that hard. Okay, cool. Thanks. You mentioned that you save data in Parkett files, which are in S3. Yeah. And I don't know. Here was another great talk, which mentioned that they were also using Parkett files and saving them in Azure. And there was shown some wrapper which allows to access these Parkett files stored in Azure from local computer like any other file object. Is that even possible with S3? Can I work with that files in S3 from my laptop? So Parkett files are usually folders, right? They are not just a unique file. So when we are working in S3, since we are within the same file system, you can access them easily with Voto and like with pandas or with Spark. You don't have to do anything. You just read them with Spark. It comes out of the box. However, if you are in your local machine, then what we do when we want to test it is recursively download the folder so that we can then with Spark or with pandas read it. Thanks. Maybe if I get one more question? Yeah, sure. Go ahead. If you submit those legit jobs to which run in one cluster, and you mentioned that you started cluster and finished just for that run. Yeah. How do you manage that all those tasks run in that one cluster and the cluster shows up afterwards? That's a good question. So we create, so the first task that needs EMR is going to be the one in charge of creating the cluster.  We only killed it when the last task that needs EMR is done. And we do so using Luigi band handlers. So basically we check whether all the tasks that have been scheduled are done. Thanks. Anyone else? So usually the thing with Spark is that you have to be very careful about partitioning and out of memory errors and stuff like that. Do you have any insight on the subject or does that park it intermediate steps for you or something like that? Yeah, to be honest, we didn't get any sort of error like that. Maybe because we are not handling like huge amounts of data. Okay, thanks. How many rows? Yeah, in terms, okay, 8.8 million. Twice, twice that because we always retrieve the last two days. And those are just new transactions to generate the reports. We also have preprocessed data that we need to include in the reports. So draw transactions, new transactions that we need to generate stats from is around like, yeah, 19 million. Yeah, more or less. Thanks. Anyone else? No, can't see anyone. Okay. Well, can we thank Casper again? That's what you did.