Welcome back, we have discussed monotone convergence theorem, which says that if you have sequence of functions converging almost everywhere monotonically, then you can exchange limit and integration right integral of limit is same as limit of integration. Today we will discuss dominated convergence theorem, which gives another sufficient condition for you to interchange limit and integration. So, for the dominated convergence theorem essentially says that if you have a sequence of functions, which converges to another function not necessarily monotonically, but suppose that the sequence of functions is bounded above by another function, which has a finite integral, then you can interchange limit and integration.  In particular if you have a sequence of bounded functions, you can always interchange limit and integration. Before the dominated convergence theorem can be derived as a consequence of monotone, it is like a corollary of the monotone convergence theorem. So, in some sense the MCT is all there is to it and this Fatou's lemma is also corollary of monotone convergence theorem. In fact, the way you do it is from MCT, you can prove Fatou's lemma and from Fatou's lemma you can prove dominated convergence theorem. So, this dominated convergence theorem is practically very useful. So, and Fatou's lemma it is a little bit more technical. So, I will discuss it, but I will not hold you responsible for it, I will not consider it a part of your syllabus. A dominated convergence theorem is very useful and important. So, let us discuss Fatou's lemma first. So, before let me just motivate like this note that if you have if x comma y are random variables. So, we always have expectation of min of x y is less than or equal to min of expectation of x expectation of y. So, this is always true you see y it is true. So, this is actually an element. So, expectation of the minimum is less than or equal to minimum of the two expectations. So, the reason this is true is you can see it fairly easily. This is because minimum of x comma y is less than or equal to x and minimum of x comma y is less than or equal to is also less than or equal to y. So, if you take expectations you have. So, this is not equal to that. So, if I put expectation here I should get that and similarly for this if I put expectation of all that I should get. So, this is both these statements are true. So, expectation of min of x y must be less than or equal to the smaller of these two right both of these are true. So, this should be. So, if you take this is true also for n random variables right this is same argument exchange for n random variables you put x 1 through x n as random variables. The expectation of the minimum is less than or equal to minimum of the expectations always true for finite number of random variables this is true. See this Fatu Slema is in the same spirit except it considers an infinite it is considered a sequence of random variables it is not a finite collection of random variables x 1 through x n, but it considers a sequence of random variables. Now, if you have a sequence of random variables x 1 through x 1 x 2 dot dot dot there is no notion of minimum right. If you have infinite collection of numbers you cannot you cannot necessarily talk about the minimum right because the minimum may not be attained right. You have to talk about infimum right. So, that is what Fatu Slema does it is a very analogous result it is a very trivial result for the case of finite number of random variables, but Fatu Slema generalizes it to a sequence of random variables. So, Fatu Slema x n be a sequence of random variables such that x n is greater than or equal to y for all n and expectation of absolute y is this then infinity. So, I am just stating it for the case of random variables you can stated for functions also there is no big difference I will state both Fatu Slema and dominated convergence theorem for just random variables. Then expectation of lim n f x n is less than or equal to lim n f expectation of x n and if you replace x n by minus x n if you have x n is a sequence of random variables such that d dot d tau d tau d tau d tau x n less than or equal to y for all n and. So, there are expectation of y less than infinity then expectation of lim soup x n is greater than or equal to lim soup expectation of x n. So, this part is I mean this is not a separate statement this is say a statement number 2 is same as statement number 1 with x n replace with minus x n and y replace with minus y. So, if you prove this you would approve this after all lim n f of minus x n is same as lim minus lim soup of x n. So, recall what so do you remember what lim n f is before we go on and prove this. So, recall what is lim n f n tending to infinity of a n some sequence a n what is this defined as equal this is says this is limit n tending to infinity infimum m greater than or equal to n a m. This is the definition of lim n. So, I think we said this in the very first lecture. So, I think I gave a little bit of an overview of limits and all. So, this so you look at. So, you look at the sequence for m greater than or equal to n a n a n plus 1 and so on and you look at that infimum and then you send n to infinity. So, since you are looking at m greater than or equal to n you are looking at a n a n plus 1 and so on this you can show to be an increasing non decreasing sequence in n. So, this limit always exist. So, lim n f is always well defined the limit may not exist, but the lim n f always exist lim soup is defined the same thing same way with supremum. So, now what is lim n f n tending to infinity of x n for each omega you consider x n of omega and x n of omega will be a sequence of real numbers like that and lim n f of x n is simply for every omega you consider lim n f of x n of omega which is defined exactly like this. So, this you can show in fact to be a random variable lim n f of a sequence of random variable is always a random variable lim n f lim soup limit they are all random variables you can prove it. So, if you take the expectation of the lim n f random variable you always get something that is smaller than or equal to first taking the expectations and then taking the lim n f of that sequence first you are taking lim n f of the random variable sequence then taking expectations this is not equal to taking the expectation first and then taking lim n f. So, exactly like this except now you have this infinite sequence. So, you cannot talk about minimum you have to talk about infimum and. So, this limit and this is a limit infimum. So, it is the smallest limit point of the sequence. So, the statement clear with me the proof is as follows. So, if I prove 1 I would prove 2. So, I will let me just prove 1. So, fix n and then we have infimum k greater than or equal to n x k minus y I am going to consider that x k minus y is less than or equal to x m minus y for all m greater than or equal to n. So, this y see this y is a random variable with finite mean which has which is like a lower bound on all these x n's. So, often this for 2 slimmers applied for non negative random variables in which case you simply have y equal to 0 for example. So, if you have a sequence of non negative random variables x n is bigger than or equal to 0 and you can apply that is a particular case of for 2 slimmers that is often how it is applied or any lower bound. So, this y is acting like a lower bound y has finite mean. So, you have this statement. So, you are looking at this sequence for n n plus 1 and so on and you looking at the infimum. So, that must be smaller than x n minus y for any m greater than or equal to n. This is very clear from the definition of the infimum. So, you take expectations. So, you have expectation of infimum k greater than or equal to n x k minus y is less than or equal to expectation of x m minus y for all m greater than or equal to n. I am essentially doing this kind of a step I am doing expectation on both sides. So, this is true for all m greater than or equal to n. So, now I am going to make the equivalent of this step. So, I am going to take infimum over all m greater than or equal to n. See, this side there is no m correct this side there is an m and this is true for all m greater than or equal to n. So, if I put an infimum here. See, if I put an infimum over m here nothing will happen there is no m here I can put an infimum. So, I get. So, basically all that is less than or equal to infimum over m greater than or equal to n expectation of x m minus y. So, now I take. So, now I will send n to infinity. So, I am going to. So, this is. So, I have taken infimum here. So, now I am going to send n to infinity this guy to infinity. So, if I send n to infinity what happens to this side it will be what limit. So, it will become limit. So, this if you look at this box if I put limit n tending to infinity in m greater than or equal to n I will have. So, look at that whole thing as a m this will become limit of expectation of x n minus y correct. Now, so take limit n going to infinity. So, let me continue over there I have. So, I will have limit n tending to infinity expectation of inf k greater than or equal to n x k minus y is less than or equal to right hand side will become limit. Limit of expectation of x n minus y correct. See if you are getting bothered by this y think of y as 0. I mean mostly for 2 lemmas applied with y as a constant random variable in particular equal to 0. It does not have to be, but that is how usually it is applied. If you are bothered by y just forget this y. Assume that it does not exist I am going to write it, but pretend that it does not exist. If you are just because it is hard little bit of hard work keeping track of all these infimums. So, it at first site may be want ignore the y. So, here I have. So, on this side I have what I want if you forget this y for the moment I actually have what I want on the right hand side correct. On the left hand side I have something a little bit different. So, ideally what would I like to do. So, if this limit were to jump inside the expectation what would I have I will have what I want. So, if I would have established for 2 lemma if I can jump the limit inside the expectation. Now, is that allowed we know so far we know only one result under which that is allowed monotone convergence theorem. So, I have to see if let us say if you look at that whole thing as some z n. So, this is be index by n is not it this is index by n because I am taking infimum k greater than or equal to n. Now, this z n will be increasing or decreasing z n is non decreasing. First of all z n is non zero well non negative because x n is greater than or equal to y. So, this whole thing is non negative. So, infimum of a non negative sequence. So, z n is definitely non negative correct for all n and you are taking infimum k greater than or equal to n. So, if you take if you increase n by 1 you are taking infimum over a smaller set in which means it should be bigger is not it. So, z n and so and z n is non decreasing. So, note so this guy is z n and note z n is non negative and z n is non decreasing. So, that much is a very easy argument. Now, what is so and limit so z n is a non decreasing non negative sequence of random variables. So, limit n tending to infinity z n which will simply be limit of what x n minus y. So, limit n tending to infinity of z n will be limit of x n minus y correct by definition of limit. So, now so I have a sequence of random variables which monotonically converges to that random variable. So, this is some other random variable called this some z or something. So, by m c t I can take the limit inside. So, m c t gives the required result. So, m you have to apply m c t on the left side because z n is monotonic and it converges to some z. So, I can always take the limit inside and what you will have inside is z which is this guy right. So, I will have. So, I mean it will give the required result assuming y equal to 0 right. So, if y is not 0 you will have something like m c t gives let me write down it will have expectation of limit x n minus y it is not equal to limit expectation of x n minus y. Now, if this y were 0 no problem if y is some random variable which has a finite mean. Then I can invoke linearity of expectations right then expectation of that minus that will be you know it will be like expectation of this bit minus expectation of y and similarly, this expectation will go inside and that is where you use this fact right where expectation of y is something finite all right. So, you can take the expectation inside and cancel the expectation of y. But if this were not true then you cannot this may not be well defined right. So, you may have some infinity minus infinity form. So, if this were not true then it does not work. So, then linearity will help you prove it and the second part will follow if you apply the first part to the sequence minus x n and minus y. So, this is not a distinct statement it is like the same thing with x n replace with minus x n and y replace with minus y because limit of x n will be minus limb soup of minus x n right any questions. So, for 2 slimmer is the corollary of monotone convergence theorem see the only non trivial step see everywhere I have just been applying the definition of limit and the only non trivial step was in applying monotone in realizing that monotone convergence theorem can be used to take this limit inside right that was only non trivial step. So, one of the main use of for 2 slimmer is in proving dominated convergence theorem it may also be of independent use in some circumstances. But the dominated convergence theorem follows very easily from for 2 slimmer that is probably why for 2 slimmer is called a lemma probably it is the lemma for d c t right. You often wonder there are these lemmas in mathematics you often wonder what it is a lemma for right there are many of these fundamental results even borel cantile lemma right I do not I do not quite know why it is called a lemma it is probably because it helps to the strong law of large numbers it. So, that is why it is called a lemma I think it is dominated convergence theorem we will use for 2 slimmer as the lemma for it we will use for 2 slimmer to prove it. Consider a sequence x n of random variables I will state it for random variables you can stated for functions also. Consider a sequence of random variables such that x n converges to x almost surely which means on a set of probability 1 this happens. Suppose there exists a random variable y such that x n is less than or equal to y well absolute value of x n is less than or equal to y almost surely. And y has a finite expectation then limit n tending to infinity of x n is equal to expectation of x. So, you have a sequence of random variables which x n such that x n converges to x almost surely, but this convergence need not be monotonic it can be non monotonic also you can have x n bigger x n plus 1 smaller you can have oscillations no problem. But so, if that is all you had it is not true that you can interchange limit an expectation right you know that if x n converges takes almost surely it is not necessarily the case that the sequence of expectations will converge to expect that is not the case. So, here you have a situation where x n are dominated by another random variable y. So, absolute value of x n is less than or equal to y and y is a random variable with some finite mean finite expectation then you can interchange limit an expectation. So, limit of the expectation is equal to expectation of the limiting random variable. And dominated convergence theorem often you apply it for bounded random variables. So, if y often you if you can find some bound on that if the x n of for example, uniform random variables or something with which is bounded almost surely. So, you have a sequence of random variables converging almost surely to some other random variable, but these random variables are almost surely bounded above by some random variable y which has finite mean then you can interchange limit an expectation. So, let us prove this since minus y is less than or equal to x n is less than or equal to y for all n we can invoke both sides of Fatou's lemma. See one side of the side of the side I proved says x n is bigger than or equal to some random variable with the finite mean. The other side the supremum side says it is bounded above by some random variable. Now, since I have assumed that absolute x n is bounded above then I necessarily have that. So, I can invoke both sides of Fatou's lemma. So, what you do is the following it is actually very simple proof. So, you have expectation of x. So, expectation of x is equal to the expectation of limit of x n. Why is this true? See because limit of x n is see the almost sure limit of x n is x. Since, the almost sure limit of x n exists then limit for lim super equal. So, limit of x n is same as limit of x n. We know that the limit exists almost sure convergence happens. So, you have this. Now, so as soon as you see this what you do? Invoke Fatou. Fatou says this is less than or equal to limit expectation of x n does. So, limit expectation of x n always exists. So, this is well defined. Now, but lim is less than or equal to lim soup always. So, I have to bring the other side of Fatou next. So, I have to I will do this. This is less than or equal to lim soup. So, this is because of Fatou. This is because of Fatou's part 1 and then this is limit lim soup and tending to infinity. This is simply because of the fact that lim soup is less than or equal to lim. Now, you can invoke the other side of Fatou saying that this is less than or equal to expectation of lim soup of x n. This is because of Fatou number 2 part 2 of Fatou's lim. Now, what is that equal to? This is just expectation of x again. Because lim soup x n is equal to limit of x n almost your limit. And because there is expectation outside almost sure is I mean on a set of probability 0 nothing matters. So, this is equal to expectation of x. So, I only prove that expectation of x is equal to expectation of x. Actually, I have proved that expectation of x is less than or equal to expectation of x which I already knew. I have proved this is less than or equal to the same thing which is always true. So, why am I doing all this? Have I proved anything non-trivial here? See if you just look at this and this it looks like I have proved a tautology proved a very trivial statement. But I have proved something non-trivial. I have proved that all these inequalities must be equalities. If any of these. So, there are how many inequalities here 1 2 3 inequalities. If any of these inequalities were a strict inequality then I will get a contradiction saying expectation of x is strictly less than expectation of x that is not true. So, all these inequalities must be equalities. So, in particular what is the non-trivial inequality here? So, this equality this lim n phi equal to lim soup is of consequence which means the limit exists limit expectation of n x n exists. Also limit expectation of x n will be equal to yeah. So, this implies. So, all inequalities all inequalities above must be met with equality. Thus lim n phi of expectation of x n is equal to lim soup expectation of x n equal to expectation of x. And since lim n phi equal to lim soup limit of a expectation of x n equal to expectation of x. Therefore, this is actually I mean there is something non-trivial here it is not you just look at this and this you look it looks like you have not proven anything. But it actually proves that this and this must be equal which means the limit has to exist and the limit must be equal to expectation of x expectation of x. So, this this dominating random variable y just helps you to invoke for 2 slimmer from both directions that is the only job of this y. So, as long as you find some random variable y which dominates absolute x n and as long as. So, it should have finite mean of course, because then for 2 itself will not hold if this is not true then you can always interchange limit and expectation. And if you want to state d c t for functions what would you how would you state it if I want to state dominated convergence theorem for any functions and integrals.   So, corollary of dominated convergence theorem well rather the most common application of the dominated convergence theorem is when y is some constant m. So, if you have a sequence of random variables which are all dominated by a constant if they are all bounded random variables for example, then you can always interchange limit and integration some people call that corollary bounded convergence theorem. So, now you have at least 2 situations where you can interchange limited integration m c t and d c t. And if you think about it now that you have seen the proof d c t is simply a corollary of m c t I mean it is not really a distinct theorem it is stated as a separate theorem because it is very practically very useful. So, the m c t is all there is there is only one major theorem in convergence of integrals that is m c t right any questions no it is it is different right it is different because you need for 2 see for 2 slimmer need this kind of a situation right. So, you need x n to be. So, the for 2 slimmer part 1 said x n is greater than or equal to y part 2 said x n is less than or equal to some y right. So, without this you cannot invoke for 2 slimmer any other question. You cannot say that right because even in the example we gave. So, actually we gave this example if you remember right the function was equal to. So, if this is my omega. So, 0 1 was my sample space and my x n of omega was. So, in this case I think. So, this was n and 1 over n remember this example. So, in this case expectation of x n is always 1 right, but you cannot interchange expectation and limit. In this particular case the sequence of random variables x n expectation of x n is finite for all n, but the x n are themselves not dominated. Because they are getting bigger and bigger right there is no random variable y which dominates x n such that expectation of y is finite. Because if that were the case this I mean you will not have this as a counter example right then you will be able to interchange limit and expectation correct. So, this example neither monotonicity nor dominatedness holds if because either of them holds you will have convergence of integrals, convergence of expectation right. That example I will stop


Maybe you've been abandoned by people. Maybe you've been rejected. Maybe your whole life has just been a series of rejections and a series of abandonments and a series of heartaches. And it's very difficult for you to trust people and maybe somewhere deep down in the back of your mind, deep within your heart, you believe that there's just something so broken in you that nobody wants you around, that nobody likes when you're near, that nobody wants to accept you. Maybe you believe something like that.  I do want you. I've not rejected you. You are mine.


OK, so I think we could start. And if other people join, I hope they will not miss the fun part of the story. So I have a confession. I'm addicted to elite statuses. This is a partial list of the statuses that I hold. And one of the most valuable statuses for me is Hertz President's Circle. And the reason for that is selection airports in the US. You can rent a compact car and then get whatever you want from a lot. And if you have luck, so you can get a nice Porsche or whatever it is. The way to get President's Circle is do 15 rentals a year or spend $3,000. I am in the US for five times a year. So you probably ask yourself, how did you get the President's Circle? And the answer is broken access control. There is a way to get the status. So if you have a Amix Platinum card, there is a promotion of Enterprise Currentall that you can sign up and get their elite status. And then there is a website for freaks like me called statusmatch.com that tell you which companies match status to which one. And then I saw that they match to Hertz. And I match my status to Hertz. But I don't have Amix Platinum. Because Enterprise is not validating the Amix number that you enter. So you can enter whatever Amix number you want at Enterprise website and get the status. Right. And broken access control is actually everywhere. If you look at the top 10 OWASP vulnerable list, you can see that from the beginning day of 2003, broken authentication was there. And then the broken authentication became broken access control because we kind of got control on how authentication works. So the authentication wall today in application, even it used federated identity. So when I'm logged in to my organization resources, I'm using my Google identity. And yet I can't get there. Because with the world of cloud and services, there is a lot of authentication services that let you securely authenticate. And then the broken access control now is on the authorization part, the step after authentication. And this is why if you speak with every startup founder or developer that start, develop a new product, they will tell you, we will do RBAC later. This is a center that I heard from a lot of friends and colleagues in the industry. We will do RBAC. RBAC is role-based access control. And the reason for that is they prefer to stay in the comfort zone of authentication. Because it's easy to know that the user is who declares who is, right? I can use password, which is not that safe, but I can use it. I can use biometrics. I can use MFA. I have a very easy way to verify who the user is. And this is the comfort zone of auth. But when I need to know what a user can do or cannot in the application, it certainly became complex. And we can see it from this sentence. So people say, we will add RBAC later. Why RBAC? Why later? Why couldn't you now just create something that will let you know what your users can or cannot do in your application? And the stories always start the same. The ticket with this title is a generic ticket. You can find it in many, many ticket system, no matter what ticket system it is. The title is always something like add RBAC to application. And I can tell you, it always ends the same, right? And today, I'm here to try to make you better. And you probably ask yourself, why you? Why you will tell me how to do authorization better? So short about myself, my name is Gabriel. Now I am the director of DevRel of Permit.io. Permit is a startup that does authentication in application level. We have a cloud service that provides developers a very easy way with single lines of code to implement the rich permission models into their application. But I actually already surviving authorization for eight years. I started work at Cisco in 2015 on a product called Identi Service Engine. This is actually a server that let network user authorize themselves to the network. So authorization is everywhere around us, right? So we authorize itself at physical doors. We authorize itself at the computer, right? I can do or cannot do something in my laptop. We authorize the self and networks. And we authorize the self at the application. And I made all the journey. I work after at Palo Alto Network in a SOC operations, security operations, control rooms operations. And then most of the incidents was about access control and then people asking how could I automate the process that make sure people authorize and getting to where they should get and not getting to reasons that they shouldn't get into. And now I'm working with Permit. So I know a bit about authorization. And I want to tell you a story about Jesse. Jesse is the most generic developer around here. And he's just a junior developer and he got this ticket, right? Please, Jesse, our back to our application. And Jesse is very enthusiastic to clean code and he'd create like a framework in their generic application, but look this way. Look like this, right? So here we can see a middleware. Middleware is the function where every endpoint will pass by. And for every endpoint, the developer should add authorization with the word admin or whatever role is it. The middleware is pretty simple, right? Took for Jesse less than a sprint to get RBAC working in the system. Everyone was happy, but then and your requirement came. Okay, and then Jesse need to support multiple roles. Not only one role for endpoint, there are endpoints that need to get access to admin and another role to it. That's a small fix, right? So another two day in the next sprint and he just bring a better RBAC framework to the team. But then another feature came, right? The PM like love to get features and then they asked them to authorize people, authorize the user, but their attribute GDPR GDPR came to the place and then some of the endpoint is accessible or not accessible for user who are based in US, in the EU, right? And then Jesse take the middleware, think a bit more and then implement something that's similar to what we see on the screen. It check if the arguments is role or the argument is attribute and their value and this is how he authorized user. Okay, and then another feature came because this is how things looks like in software. Now Jesse got required to support also inspection into resources. So not all documents makes the same, right? There are documents that belong to someone but there are other documents that belong to someone else and with the traditional middleware it became really hard to support it because the middleware is always inspecting on the users themselves but Jesse is actually creative. So what he does, he create like a new service and now even got promoted because he developed the RBAC layer of the product and this service knows how to detect the attributes in the endpoint and allow or not allow the application user getting into resources. But as you can see it's problematic, right? We can see that the code is not clean anymore. Everything is mixed around. It's hard to test. It's hard to detect where access control is broken. And the first mistake that Jesse does is implement RBAC to application. The way we need to think about authorization is not RBAC anymore. RBAC is something of the past. We need to think of enforced permissions in applications because permission is much more than RBAC. Every permission statements start with three principles. User, action and the resource. See user can be just a username but that could be a huge set of attributes, right? Our users today, for me, user in my application, I have them data on Stripe to know which paid tier they are. I have the data on my CRM. I have the data on my database and my database is distributed, is decentralized. The data about user and about resources is decentralized today. We cannot think of the traditional implementation details of role and resource. We need to think on the principle of what we want to check and this is actually the three principles we want to check. And then the check itself looks like this. Does a user is allowed to perform an action on a resource or does a man can allow to eat a banana? And again, a user could be a huge set of resources for many, many systems. And to know how to do better, let's take a look on how permissions model looks like. So there are four known permissions model in the application level. ACL, RBAC, ABAC, and REBAC. And we will look at each one of them in details. ACL, I call it end-of-life model. It's driven from IT authorization. It was in firewall, so I want to configure which user at access to the network. And it's like holding a huge list that's titled with the resource and then who is the user can get to it. The problem with ACL is that is completely not scalable because you cannot manage relationship between resources and principles. And second, you're probably really hard to scale into actions, right? So if you want to do different actions, you need different lists. And in my perspective, it's not useful for application. The other one is the default, is RBAC, World-Based Access Control. We are assigning roles to users, right? And then we are deciding to which resources they have access for which particular operations. This is very easy to use and it's also very easy to audit. So if you want, for example, know why authorization decision happened, it's very easy to implement a code, to check which role was to the user and why he got this decision. The most advanced one compared to RBAC is ABAC, Attribute-Based Access Control. So we understand that user has attributes, could be a very deep tree of attributes and the resources attributes. And we want to correlate condition between attribute resources and the action between and decide stuff, right? So it's really small here, it's hard to look here, but we can see here that we decide that Joe can drive a car because he has a driving license and he owned that car, right? So ABAC is the most comprehensive permission model, but it's hard to implement it. The reason it's hard to implement is, first, you need to orchestrate. Second, you need to streamline. You don't want to do like a mess like we saw that Jesse does in the code that lot of if statement. We need to find a way to implement ABAC better and we'll talk about it later. The other one is very common in consumer application, consider RBAC, Relationship-Based Access Control. So for example, if I'm now a Twitter, I can see my tweets, I can see tweets of people that I am following and I can see tweets of people that are public, right? And it's all based on relationship. When you need to be at scale, this is actually the only one that work because if you, for example, need to travel a slot of attribute per users, it's hard to traverse. So in the RBAC, we are kind of storing the relationship between users and resources and get the best decision we can get. Well, let's back to Jesse because you now understand that he needs ABAC, but then he implements something as we can see here and then a bug came. A user get access to somewhere he shouldn't get access to. And Jesse just tried to debug it and then he find this code and he find a very smart developer, decide that the framework is not enough for him and he decided to create, mix the policy inside the code. And this is actually the second problem in home-brewed authorization. You should separate the policy from the code because you need one way to track your policy config. You need one way to track the audit log. I want to know why a user get now a decision. So we need to find a way to centralize the policies in decentralized system. And this is another problem when you develop it yourself because it's hard to be decentralized without spending tons of hours of developers work on it. And also Jesse have now a new stack because the DevOps need their own authorization because they are now deploying automatically setups and some of the setups has access for particular tenants and other setups has access for different tenants. And also the front end developer want to show and hide some features for different developer because there are, for example, similar paid tiers in the application. And there is the database guide that need their data to have that separation for user can access to it. And it just so and so forth a new service could be in a language that Jesse don't know. So we need to find a way also that it will be easy in the modern world that we are all developing application in a very different stack how to implement better authorization in our applications. And also it has another skill set because now the authorization service is lacking performance and then you need like user management screen. So you need to develop where I configured all these policy screens. You also need an operation, et cetera, et cetera. And also it's got like kind of headache because they got compliance need and then you need to create a lot of reports around what a user does. And also they need to create a policy posture which is important for a particular set of authorization decisions. So looking at that problem, we are looking now for application level authorization system that has these five principles or best practices. First, it should be agnostic to the permission model. We want authorization system that will be agnostic if we do RBAC or ABAC or REBAC. We want it to work with everything as much as it can. And we also want to separate the policy from code because we want the decision itself being very generic. And we want to support the whole stack. We don't want that if, for example, now we have a service in Rust or Python, we need to develop the whole solution again. And we need it to be performance aware, right? Because if, for example, we have API endpoint, we cannot stack the response because we need to get now a policy decision. So a policy decision need to made in like sub 10 milliseconds, okay? And we want also the policy management to be unified, okay? And this is where we're trying to look today, how to build a better authorization systems for our applications. And the first thing is looking on contracts. So to create better relationship, we need to create contracts, right? And this is the way it work in software. If you look on the most popular software, they are popular because they define very well how do you write software? We look on the popularity of software, of programming languages for the last year. So personally, I really love GoLang because I feel it define the contract that they have with the software. It doesn't have thousand of ways to do stuff. I mean, it has, you potentially can, but when you look at the code, you understand how you could look like. And in a policy world, what we want to do with contract is having programming languages for policy. So today we are going to talk about three contracts for policy. The first one is Open Policy Agent, which is now the most popular one that you may know. And then we are talking about a new language that AWS released as open source just yesterday called Cedar. And then we will also talk about Google Zanzibar. Google Zanzibar is actually like a protocol, it's not an implementation, but we will also show an implementation of Google Zanzibar and how it work. So let's dive into the contract of Open Policy Agent. Here we can see a declaration of policy as code. It's pretty complex and I explain soon why, but what you can see here is like, the first one is like importing, et cetera. And then we say the default is allow false. Okay, we declaring that no one should access anywhere. And then we are declaring a user is admin, which is like if admin is in the user role. And then we can also see the role themselves and then give a grant if a user include a particular role. And we can see a pretty complex A-buck on the left side of the screen, right? This language called Rigo, this is actually the language that Open Policy Agent use. Open Policy Agent is around from 2016, I guess, and it's very mature in the cloud native world. But Open Policy Agent also has cons. The first one, in my opinion, is also it's big bra. Rigo is a complex language. It's not easy to archive stuff and it's designed for to be the multi-purpose as it can. And as well, you can see that a lot of people use Rigo for admissions. What is admissions? Like which service can access work? Where are we deploying our services? When you get to do application authorization with Rigo, it got hard. And the worst thing about getting hard with Rigo is writing an efficient Rigo because now you're writing software. And when you write software, you get bug. And bug mean latent performance. And then it's very easy for developer that we meet that they say we started to write Rigo but we don't have a way to analyze it against our application because it's so multi-purpose. So we don't understand how to create better application level authorization with Rigo. Yet it is very popular. I mean, I'm living the OPA landscape for the last, again, eight years and I can understand why people like it. One of the benefit of being that all is the ecosystem. So you have plug-in for everything in Rigo. So you want to control access on databases. You want to control access on Kubernetes. You want to control access in GraphQL, whatever it is you already have a plug-in that you can plug-in play. Yet it's hard to maintain and hard to get authorization decision on applications with it. AWS Cedar, and for me, this is one of the exciting announcement in the last year, is the first policy language that designed for application needs. So what AWS came and said, we saw that in the yam area, in the cloud declaration area, people are using policy as declaration and we believe that application developer should declare policy too, right? Should write policy in contract. And if you look here and you remember the principles of application level authorization, you can see that every authorization sentence start with the principles. So first is the principle, they probably the user, and then you have the action and the resource. And then you declare very easy, how do you identify the permission that you want to give now? So for example, here we can see only permit sentences, but we statement, but we can also have like deny statement which do the opposite. And we can have forbid statement which is like a DEF CON policy. No one can do anything even if they are permit. And in my opinion, the way that AWS come and say, we believe that application developer should start declare policy instead of just coding in imperative in the code is a start of a new era, a new era where applications get much better access control because policies manage right. Okay, and then we can talk about Google Zanzibar. Zanzibar is a paper created by Google that describe an efficient way to manage graph-based authorization. So remember Reebok relationship-based access control, Google has billions of users. Billions of tenants and billions of relationships, right. So for example, if I'm looking in my organizational Google Apps user, I want to get access to everything related to my company, everything related to my team and everything related to me. And if Google want to give a really fast decision why I should go for example to all the documents that are related to my main organization, they need to store this graph somewhere. So Zanzibar is also a contract definition but also a database definition. One of the most famous implementation that I particularly like, there are a couple of other implementation of Zanzibar but in my personal opinion, there is a project called OpenFGA. And the reason why I like OpenFGA is first it has a language. It's not that easy language, it has a very complex schema to declare the relationship in other hand. But in one hand, but in the other end, after you're declaring it and deploy the databases, the graph databases of OpenFGA, you can have a very nice decentralized Reeback relationship-based access control decision-making. But there is also a problem with OpenFGA. First, it's very hard to implement RBAC and ABAC and particularly in business application. The best permission models are RBAC and ABAC because traditionally this is what developers know and also the usual workflow in business application is do role-based and attribute-based. But it has also reverse indices support. So as I mentioned, I can look in my parent of my parent of my parent and find a relationship for my user to the resource. So this is a huge benefit. It's backed by Octa. And another problem in my opinion is that it's stateful. You need a database. Indeed, databases grow very easy. So if you just start and you have a lot of users, you need to deploy more and more and more instances of this graph DB and this graph DB should be decentralized. We always like to, we have like internal jug that Google can allow themselves to do Zanzibar because they hold the internet. But for anyone which is not cloud provider, there is no reason to do Zanzibar. It's not that true because sometimes you really need in a relationship-based access control but important to know. So now we understand three types of contracts which are popularized today. Let's go to the next step, right? Architecture, how should look authorization system for application level looks like today. So this is the building blocks of a modern authorization system. Actually, it's not that new, right? When we develop network authorization, we use the same building blocks. The first one, and I'll go from apps there, is the policy enforcement point. Policy enforcement point is everywhere now in your application when you want to enforce policy, right? You have like API endpoint, you have even a screen and there is a place that you want to get one question. Is this user allowed to continue or not? This is the enforcement point and one of the most we'll get after to each one to the list of each one, what they can and what cannot do but for me the most important part of the enforcement point is shouldn't know what the policy is. Enforcement should know what is the decision, know why it's get, know what the decision is and this is the only way to keep the enforcement point clean and let the authorization system to scale. The second is the decision point. This is actually like decision engine, get a request with the three principles, user action and resource and return a decision, allowed or not allowed. Sometime you will want to have like non binary answer like a string or something but usually for most of the purpose of application level authorization is true or false. Then you have policy retrieval point. Since we are writing our policy as code, we need to get this code from somewhere, right? And we also have the policy enforcement information point. So when you get policy decision, the decision got a limited set of user attributes. For example, if we using JWT, JSON web token to authorize a user, we get a very limited set of user fields but we need to know more about this user, right? We need to know which page they are, we need to know where they live, we need to know if maybe fraud detection, whatever it is, we need to have more and more sources to know stuff about our user and resources. This is what is the policy information point and to connect all these pieces together, we need also policy administration point. Policy administration point is the point that make sure that all these three pieces got together, the policy engine, the decision maker, the information point and the retrieval point. As we said, policy enforcement point and I'll say it again and again should be a very clean abstract way, right? To check policies. In Reback specifically, we will want also to have a list endpoint, an endpoint that we send the user and get the list of the resources and the reason is because Reback is actually stateful, we can hold in the graph DB a traverse of what this user can get to. Decision point, so if you're familiar already with, let's say policy, with Open Policy Agent or CIDR, is actually the agent itself. That's a piece of very efficient software that know to maybe cache data or just look at the policy configuration and get a decision for you, okay? And we want it to be in low latency, we always wanted to leave inside our application or not application code, but inside the deployment or something because we don't want the latency where we go to get the decision. Then we have the retrieval point, usually Git repository. The reason that we are like to use Git is all the GitOps methodologies that we see is the way to make sure that we always as the most reliable policy configuration in our policy engine. And then we have the policy information point. So in my opinion, in a modern world of authorization, we don't want one point because one point cost us cost deployment, cost maintenance, cost cloud code, right? So policy information point today is more abstract way or declaration way to declare where I need to data to get fetched into policy decision point. And the policy administration point is again the one that connect all the three pieces together and potentially it also has like the operation part of the PDPs. So for example, we have like PDP for each application. We want the administration point to make sure it auto scale them and that they are always keep updated with the data of the policy and the decision point itself. And we want to do open source. This is an example of architecture of open source modern authorization system. So first, we have like, we'll start from up there, right? An application decision getting being. And then we have like APL code. So the enforcement point is usually just one API called to the decision point. Decision point is a CDER engine and we also in permitile develop an open source project called CDER agent, which let you deploy it as a container, auto scale it and also has a nice memcached component inside that help you to catch your data. For the application, for the administration level, there is a tool called OPAL, open policy administration layer, also created by us and maintained by us. And open policy administration layer, it's actually a server client architecture where the server that you can see on the left side is make sure that it always synced in a GitOps flow from the Git repository where you hold the policies and it also deployed together with a client. The client has two main component. The first one is the data fetcher. Data fetcher is like, we already got contribution for a lot kind of data fetcher, like data fetcher from past grass, data fetcher from stripe, data fetcher for whatever you need data on your user. And the other part is policy agent themselves, right? The PDP. In this way you get with only, so OPAL is actually deployed as containers, so you only need to declare your configuration for OPAL. So when you run OPAL, you tell them where the policy sits, what is the Git repository. You tell them where and what one to deploy from the policy decision point. And which one? In this architecture we see that we're deploying, we can deploy either Cedar or Open Policy Agent and we also trying to develop support in more policy engines. You can configure the data fetchers. It's just like environment variable. And then the application itself has a very nice generic API to OPAL. So the thing today, you have like different protocols when you do authorization call from Open Policy Agent or from Cedar, you need to do different API call, which mean dirt your application code with a different code. So OPAL is also exposed like an API layer on top of all the policy engines and let you give you a very easy way to make the calls to the policy engines themselves. Then we also need to understand the policy enforcement points, right? So we describe like we have like backend APIs that just call another API and ask for a decision. And we also have like in persistent layer we can see a lot of DB plugins that came into place and you can just plug and play. So you plug this plugin of the enforcement point and they know how to make all the connection with the authorization part that you need to get decision based on. And the admissions, this is a very mature landscape. You have like the admission control of Kubernetes. You have like the Terraform provider or also whatever cloud provider that you're using to deploy your deployments. You usually have how to make sure that everything is right from authorization. What about front end, right? So we mentioned front end developer wants to to get a better authorization decision. There is a protocol called CASL and it actually define how could you actually download policy configuration and then in a declaration inside your application code made only the enforcement part, right? So it also has supporting react and view and Angular and for almost every modern language. You use CASL, you do the API request whatever you want to the policy decision point or to your backend and use it for like more feature toggling, et cetera. Another tool that worth to mention is up toggles. This is another open source that we are maintaining. Up toggles is actually synced between feature toggling products like LaunchDarkly and policy configuration. So you can like connect it into your you can connect it into your open policy agent deployment and make sure that you always synced with the data there to what you show and what you not show to our user. We're probably late of time and I want to left time for questions. So I skip the demo. It's not that interesting and we have a booth you can come to see it here. So thank you. And we always love to get stars on Gita that your way to support open source and I really appreciate it. Questions? So you're saying Rego is to can be too complex. Mm-hmm. As track back complexity, you also mentioned the Google and do this complex. Yeah. How are you extracting that complexity? So this is not actually the open source part. This is our product, commercial product part. So we are like a auto generator code that actually generate from our permission model UI generate a policy code with, right? So if for example, you are advanced user that you already write some Rego code and you want to start to use permit IO as your authorization for application, we are giving you like best practices how to write your Rego code and then we can represent your Rego code in our UI in our product. So we have like auto generation of policy code from UI configuration. It is the main commercial product because all the opal and the way we are orchestrating policy engines this is open source. Yeah. So that's actually a great question. I'm speaking about policy as code for two years now, right? And usually I use Rego because that the fact of the language that everyone use and for every talk I got this question. Don't you think Rego is just cost too much cost too much to maintain cost too much to write with? And that's correct. And the reason for that is we Rego is not built for again for application level security. It's built for more admission, more multi-purpose. And then you have the people because the people that declaring Terraform, that's fine. They're also declaring Rego. This is in my personal view, this is why I'm so enthusiastic of Cedar because Cedar is simple to application developer. It think on the same way that application developer think. Zanzibar on the other end, it required skill and Google not try to lie on us. I mean, even open FGA, they say don't start with it if we need just a small application. It will cost you. Sometimes you need it, but again, I think it's better that you have like a chaos of authorization small portion everywhere, right? So it's a thing of balancing between you know, you want your software posture, you want software secure, and you want in the other end to the not have it cost. In general in software, what I believe when speaking about the cost of developing, so that's correct that we are developing much more software today, but we also bring much more functionality, right? Because if you look 10 years back, yes, we wrote much less good. We had much less developer, but we not develop that much software. And when we're looking about cost, and me as a company, right, I'm a software company, I'm selling software to developers, I don't want them to pay me more like I don't want to mention names of some observability companies. I want them to pay me more to deliver more software. I want them to be more efficient, right? And I believe the balance between the time you waste for detecting access control and the cost that a broken access control could cost and understanding of another kind of language, right? Because it's not a real language. It's declarative, it's not imperative. The balance is right, right? So JWT is actually has claims somewhere you need to do the checks against that claims, right? And there is two ways to do it. The first one is imperative code in your application, the do if statement, if this claim to something right, even if you have a nice, like we saw a nice decorator framework, at the end, there is an if statement to check something. And if some of the claims are not fit for your decision, a developer will come and write this hell if statement, right?  So for example, when we're speaking about check, right? So most of Pyramid IO users, they are sending the JWT, right? The same JWT and our opal know how to parse it and get the particular attribute from it. And JWT also has some more problems. So JWT has a limit, character limit, right? And you cannot just put all your data in one JWT and sometimes the data is just from other system and then you need to connect a lot of system each other just for the JWT to be huge and hold more claims, right? So JWT is great for, let's say, federated identification, right? So for example, we are letting you set up your JWT case, right, the way you verify JWT and then you can send us your JWT without verifying it and we will verify it for you, right? So JWT is here and it's must stay here, including their claims. But again, if you want to be in authorization, the scale, there is a JWT is very limited. Generally speaking, yes. So when speaking of rule engine, I believe like engines that have streak for something, right? And they are not built usually for application level, right? They're built more for IT level of stuff and stuff like that. And we are speaking more about applications of developers that need to embed it. In my opinion, using external service for authorization is simpler than try to adopt the rule engine style in Torio application development. But again, I mean, there are solutions for everything. The way that we build authorization, that five step, right? Enforcement, decision, administration, retrieval and information is keep each of them clean and able to scale and also separate the concern between configuration, between data plane, between enforcement, et cetera. So we are also the maintainers of fast API, WebSocket, PubSub library. Yeah, so you can choose between TRPC or WebSocket, PubSub. Thank you.


you feel like you could use a little bit of help as you age? Do you feel like your skin might be duller, your eyes might be redder, your teeth might be yellowing, all of those things that we get as we get older? Well, I'm going to share with you my secrets and my tips for how I address all of those concerns and we're gonna do it in this video right now. So one of the things I get asked all the time in almost every video is how I get my teeth so white. And I had approximately 25 years ago, I hadn't really noticed how yellow my teeth were getting, but I had a girlfriend come over to my house and her teeth were white and I'm like, whoa, what are you doing? What is the dentist done to your teeth? And she says it's nothing like that. It's plain old everyday crest white strips. And I was just in shock at that and her teeth were so pretty. And so I immediately went out and bought me some and I've been using them for over 20 years now. I don't have my teeth whitened at the dentist. I don't use a tray with the gel or anything like that. I use plain old everyday crest white strips. Open up the little packet and on the top has your top one that you can put on your top teeth. And on the bottom, it has the one that you put on your bottom teeth. Now the gel helps them to adhere. You wear them for approximately 30 minutes. It helps them to adhere to your teeth. And I do a crooked teeth over here on my teeth that are right next to the front ones. So I'll take my fingernail and I'll just push down this plastic and I'll mold it to them. And then you just kind of round it around the back and then they stay on there for the 30 minutes. Don't drink or eat anything obviously while you're doing that. Now I will tell you that if you do have sensitivity, because when I started this out, I had sensitivity really bad. So you will want to skip a day or two if you develop that sensitivity. Make sure you do a whole box and you'll achieve the most white that your teeth can get. If you just do once or twice, you're really not going to notice much. But if you do the whole box, you'll notice. And I think there's either, it just depends on which one you buy. There's either seven or 14 of them in there. And then once you get to that day 14, you're going to see how white your teeth really are. And I was just shocked and so pleased at how well it took care of all of the stains. And I had years of stains on my teeth. So I really do love these. They're ones that I will continue to use forever, continue to repurchase them. Now as a maintenance, I do one of these every other week to keep my teeth white now that they're the whitest they can be. So not too expensive once you get over that first box. All right. How about if you have very red eyes when you wake up in the morning? What if your eyes just look bloodshot?  You want to look your best maybe on a zoom call or maybe you have to go into the office or maybe you just want to look your very best. Go into the grocery store. What I do when I see that my eyes are that bloodshot looking bad is I will go in with my Lumify drops. Now, when I bought these, I was so cynical because this little bottle is like, I don't know, between $15 and $20. So it seems like a lot for that. But I could not believe that within minutes, it really whitened up my eyes. And you can see how white the whites of my eyes are right now. And I've used that this morning, especially if I don't get enough sleep. My eyes are so bloodshot. Or if I've had some irritation maybe from something with my skincare or makeup product, it happens and you get that irritation. Now, I will say that I don't use these every day because I feel like your eyes need a rest. So I use it occasionally maybe two to three times a week, probably more like two times a week. And the other thing is I do wear contacts. So I will put these in in the morning. I'll wait 15 to 20 minutes and then put my contacts in. So that's just a little heads up on that. I believe that's a little disclaimer on the bottle. But I love Lumify drops and I've used them for a very, very long time. Now, when we talk about our skin being bright, there are so many products out there that it could be so confusing as to if you have a dull complexion or you have a lot of redness or you're just not feeling like you look your best, how can I brighten my skin and make it look its best? The number one product that you can use is Tranexamic Acid. This bottle right here is from the inky list. Let me see how much is in here. This is one fluid ounce. So that's the normal. And you can use this strategically if you have places where it's very, very dark. I have not found that this helps my dark circles, FYI, just because they're inherited and that skin right there is very thin. But Tranexamic Acid, it actually blocks the melanin that makes your skin have dark spots and whatnot. So if you want to, you can take it on Q-tip, put it on age spots, put it on redness, scarring spots that are darker that you wanted to. This is really the gold standard. Now, what I also feel like is really important is vitamin C. We hear about vitamin C being brightening. Personally, when I use just a regular vitamin C treatment, it is a little bit irritating on my skin. But I did find this one from the ordinary and it's Ethylated Ascorbic Acid 15% Solution. This is a very stable form of vitamin C and it is a very gentle form of vitamin C because it is in oil. You use it towards the end of your skincare regimen. I will sometimes put a few drops into my moisturizer at the very end at night. I don't wear this in the daytime because it is an oil and it's a little bit too greasy for my makeup and what I want my makeup to look like throughout the day. But this is a fantastic vitamin C product that will brighten your skin. I noticed a huge difference in the brightness of my skin when I started using this. And lastly, I beat a dead horse when I talk about this over and over again. This is Cranacell Bifida Complex Serum. This is a brightening serum as well. This has Bifida galactomyces and vitamin C in it. And what is so great about Bifida and galactomyces is they are both fermentation processes that really do help your skin and protect it like antioxidants do. Or vitamin C is an antioxidant too. So I use this every single day. I love my Bifida serum. This is the same serum that is in Launcombe Genifique and Estee Lauder Night Repair. Same exact serum and definitely is one that has a higher potency of the Bifida. This has something like 60% of the Bifida and those other two that are from the department store Estee Lauder and Launcombe. They only have 10 to 15%. And you're getting the galactomyces. Let me tell you how they found out and I've said this a million times. If you've been with me any amount of time, you're going to hear this over and over again. They found galactomyces by noticing that the workers that worked in a beer factory, their hands were starting to look younger and younger because they were working in that fermentation process and it definitely helped with the crepiness. It helped with the dark spots. It just brightened and lightened that skin and it was so nice. Okay, so that's skincare. But what if you want something where you just want that area to look bright? I'm going to do a little demo for you of something that I learned actually from Painted by Spencer. This is the COSIS Revealer Concealer. This is the lightest color that they make. And I'm just going to take a dot of this and I'm going to put it right there on both sides of my face. Then I'm going to take a Beauty Blender, dampened Beauty Blender and I'm just going to work this straight down in this area right here and towards my nose and up towards the eye. That's where we have that line right there, that sunken in line right there. That's where we have the most darkness. Now, what you're going to see is that that will immediately brighten that up. Now, I normally would never put the concealer on top of powder because I do have powder on already. But for this demonstration, I really wanted you to see what this is going to do as far as brightness. Look at how that brightened up that whole area. It just really lightened it. You can put it up here on your forehead, put it down there on your chin. Then you have this kind of halo effect right here of lightness. Now, if you find that you kind of feel washed out after that, go ahead and do your blush, put a little bit more of your blush on and it will brighten that up. But now you have that extreme light area right there and it just works so well. Don't forget to set that, but make sure you set it with a powder that is brightening too. One of my favorites is from ELF and it's the Halo Glow. That has just a little bit of that brightness with the pink, by the way. This is pink. And then it also has that halo or the glow. I hesitate to say that that's a glow because I don't feel like it is a glow, but it does have a little bit of brightening effect in it. So make sure you set that down really lightly.  This is the Shaking Glow Dumist. I'm fairly dewy already. Let me see if I can get some of this taken down a little bit. I'm pretty dewy because I just did my makeup and my highlighters. So let's just take that down a little bit and then I'm just going to spray this a tiny bit. I'm going to prime that because I don't want it to squirt on me. And then I'm just going to put a little bit of that on. You can take something like that. It will brighten it up as well, but I really feel like that concealer right here in this part is a huge brightening effect. Lastly, for your hair. Is your hair dull? Does it not have any shine to it? That is what this product does for me. This is the Kenra Platinum Blow Dry Spray and it's an advanced dry thermal protectant. Now why I say that this helps to give my hair a little bit of luster. This is a kind of an oily product. So don't use a lot of this. As a matter of fact, when I use it, I sprayed into my hand like that and then I'll rub my hands together and then I'll put it in my hair. But you can tell just by that right there, look at what this does. It really makes your hair shiny because it is that little bit of a dry oil product and it's going to stay. It smells divine by the way. So if you don't like fragrance in your hair care or any of your products, you're probably not going to like this. But even my hands, you can see how shiny it made my hands. That's what it does. It has that shine in it and it is beautiful. I just think that that is so different. So I can go and I can put this in my hair right now if I want to. Or you can do like what it says to do and it helps your hair dry quicker. I actually use it both ways. So I really love it. It's one of those products that I've had around for a long time and a little tiny bit goes a long way. I have had this bottle for probably too long. If you have really fine limp hair, be very, very sparing with it. If you have more coarse and thick hair, you're probably going to really love it because it really does help with the thermal protectant and conditioning your hair. So those are the products I wanted to share with you for brighter, wider and lighter and helping you to feel and look your very best. I hope that you did enjoy seeing these products.  Please let me know in the comment section if you have any products that you'd like to share with any of us that help us always to look our very best and might be in this category of brightening. I would love to hear that from you. I hope that you're all doing very well. I love you very much. Let's get back together here on my channel in my very next video. I'll see you very, very soon. Goodbye, my friends.


Hey guys, welcome to SSURitech, so we will decide and today we are going to see a scenario inside the Power BI. So basically how could we change the column names dynamically in the Power BI. So here for example we can see in the top side we are having this slicer and in the bottom table we are having the data. So if we select the city on the slicer then columns will be changed according to selection of that. So here we can see all the city's data is in column, now let me switch to country. So once we select the country then we can see all the information which is related to the country names are in the column. Now we change the customer ID then we can see all the customer IDs after that we can see the product names, so these are the product names available on the columns. So it is changing according to our selection, so dynamically it would be changed. So how could we create this for that, go to on the next file. So here I have already loaded the data, so if you want this source data then you can drop the email on the comment box, so I will provide the source file. Now go to on the transform data, first thing what we want to do, we want to create one more column that will have only those columns which we want to see in the slicer. All we want to see the change values dynamically for those columns. So here first of all I would suggest to create one more column that will be the index column, so go to on the add column and here you can see the index column. So if you want to create the index from 0 or 1 you can do that, so I am very happy to use from 1 and this is index. Now you can create the duplicate, so right click on the query and create a duplicate for that. And here you can rename this, so I am going to rename as master and here as I told you we want to keep only those columns which is related to the dynamically changing columns. So first is customer ID, so we can select that one, now go to on the right side and here the second column that will be the product name, so we can select that one, now go to on the right side and here we can see the city, so we can select that city and the last column that will be the country name, so these four columns will be changing by selecting the values, the last column that is index we should keep that as well. Now go to on the home and here you can see the remove other columns, so other columns will be removed and it keep only these five columns. The second thing that I would suggest to do the unpivot by using these four columns, so we can select these four and go to on the transform and here you can see the option for unpivot, so we can click on that. Here you can see the attribute, so these are the columns by which we want to do the change, so we can rename this and these are the values, so I am very happy as of now and we can load this into PowerGlade desktop, so close and apply and we need to wait few seconds it will be loaded in the PowerGlade desktop, now it is loaded successfully, now next thing go to on the relationship, so here as you can see it is already created the relationship, if it is not created on dual then you can delete and here it might be like this, so you can go on the index and try to drag this index and drop in the master, now it is created, now go to on the report view, so inside the report view first thing I would suggest to use the matrix, so this is the matrix and you can increase the size as you want and here go to on the master file and here you can see these are the columns and these are the index and the value, so this value should go inside the columns and next thing go to on the sales detail and here I would suggest to use the sales order id on the row, so you can scroll down little bit and here these are the sales order id, so you can drag this and drop in the rows, in the values we want to see the sum of order quantity, so this is the order quantity we can drag and drop in the value and here we can check this is the sum, so that is good, so here we can see we are having all the values like the country, the customer id and everything that we have on these 4 columns, so next thing that will be slicer, so we can select the slicer and you can decrease the size and here go to on the master table and drag this column and drop on the field, so we can see all these, now go to on the format and here you can see the selection control and select single, so here it is selected city now, now let me switch to country, so we can see all these countries, now switch to customer id, so it will show the customer id on the columns, now switch to product name, so these are the product names and you can do the formatting as you want, so this is very simple as I have explained step by step, if you have still any doubt you can drop the comment and I will try to response on your comment, thank you so much for watching this video and please subscribe our channel to get many more videos, please share this video to your friends, thank you so much guys.


Minnesota's 2018 race for governor is already underway as the first Democratic candidate is launching a bid. Representative Erin Murphy announced Thursday she filed the run for governor. Murphy is a six-term Democrat from Saint Paul who served as House majority leader in 2013 and 2014. She says health care and education are at the heart of her campaign for governor. There is a long list of possible candidates from both parties who are aiming to take Governor Mark Dayton's spot. Dayton has said his second term will be his last at the Capitol. The early campaign formation allows Murphy to start raising money for a costly endorsement battle and the general election. If you've enjoyed this segment of Lakeland News, please consider making a tax-deductible contribution to Lakeland Public Television.


Okay, Python on hardware this week in the newsletter, um, we are celebrating, um, micro Python, new release and, and, and, and I think, um, yeah, I think the browser is like, I completely filled like it's just like, I'm just not going to cooperate. So, um, there's a new version and then of course, um, happy birthday, we're going to talk about that in just a second. But this is the new version. We'll, you know, be doing our part to, uh, grab the things that are, um, added so we can keep up with all the changes. Um, and then I think the Raspberry Pi Pico W is now supported with Wi-Fi. That's kind of officially supported. And then there's a new lightweight, um, wireless manager. So like the Pico W is a great example where you can download, uh, library files that you need through the internet. Um, they don't have drag and drop file support. They don't do mass storage what we do. So it's extra useful for, um, what's great is you can pick depending on what you want to do. And, uh, that brings us to, um, so MicroPython, we're one of the financial supporters, we'd support it with code. This is where CircuitPython came from. Um, MicroPython is celebrating its 10th year, its birthday. So we'll get the noise out about that. We're a sponsor on, uh, GitHub. And so if you use MicroPython, check out the GitHub sponsors and toss them a buck or two. It keeps the development going. It definitely helps. It's what we build our core off of and as they celebrate their, uh, latest year, um, they have one of these cool, um, here's all the pull requests. Yeah, you can visualize it, um, which is, which is really neat. So you can see like kind of what's happened over the last decade, but this year they had a really neat poster and, uh, you can download it. We linked to it, but, um, let's just go through this here. They go from the early days, 2013, that's when we all ran into it. The Kickstarter. Yeah. Yeah. The Kickstarter, um, then they had MicroPython Pied Boards for everyone. They did two talks at Python, uh, UK in 2015, MicroPython went to space. So they had, uh, MicroPython on embedded systems that were in rockets, that were in, um, satellites. And then, um, other news, and this is where we come in, um, 2017. Yeah. That's where Python's starting. So, um, we've been, you know, keeping, keeping up with the changes and then also, uh, making MicroPython work for our hardware and lots of different hardware. And 2018, they announced the Pied Board D. Um, it, uh, I think at some type, MicroPython got some type of space qualification. Yeah, it's cool. They did a modular, uh, system with, um, their boards to make it easier. Yeah, you could plug in little, like, like there's LED add-ons and wireless add-ons. And then, um, we did, um, and then 2020, hybrics, 2021. That's when some of the RB2040 stuff came along. And then kind of big news, uh, for folks who, uh, play along. In 2023, apparently there's going to be another platform supported. Ambic. Yeah. Who does Bluetooth, very low-powered Bluetooth. Very interesting. They picked that platform. We've never done stuff with Ambic. You know, we use Nordic for Bluetooth and ESP32 and RB2040. But you know what? It's great to have more chips supported. Yeah. And then we'll see what we, uh, do and add to MicroPython with that. It's all part of Aderford Daily Newsletter. It's delivered to you every single week. AderfordDilly.com. We do not do anything with your email address when we don't spam. You have a completely separate site just to make sure. Correct. It's super clear. We don't like spam even more than you don't like spam.


Hey everyone, Nathanne Nurempel-Jance here. A little different today. Obviously, I am in my kitchen dining area recording from the laptop with my portable setup here. So sorry if the video quality is not as good, the audio quality is not as good. I have some things, though, that I want to talk about. And that is in particular to the PlayStation 5 and the Xbox Series X in terms of the pricing. So first off, let's get into the pricing on the PlayStation 5. So there was an Amazon France rumor about the PlayStation 5 that has come out. That kind of debunks the original Play Asia listing. There was a 699 Play Asia listing that is clearly not legit and not real. But what does seem to be legit is an Amazon France listing that has the 4K Blu-ray version at $499 or I guess 499 euros, about 556 USD or whatever. And then obviously the all digital version is 100 euros less at 399 euros. Now, we assume that this will probably translate to like 499 USD, 399 USD, because that's kind of how the euro transition from their pricing to our pricing ends up working for game systems.  But that appears to be what the PlayStation 5 pricing is likely going to be. And that's fine, actually. To me, that doesn't even sound that bad. That sounds reasonable based on what we've seen of the system, based on what we've seen of the games, based on what we know about the SSD and all of the various tech in it. That's still a really good price and you're not gonna be able to build a comparable gaming PC that can perform as well as the PlayStation 5 at that level. And this is in addition to the fact that games will be fully customized for this hardware, which is something you don't get on PCs, since games on PCs have to consider a wide range of hardware from $200 budget laptops all the way up to $3,000 plus super rigs. So that is really, really great and I think an excellent price point for the PlayStation 5. But there's one problem with that and that's a report coming from WCCF Tech and actually coming from the Beyond 3D forums from the guy named Eastman, who has proven in the past to have inside information from Microsoft. And this is where the competition between Xbox Series X and PlayStation 5 are gonna be extremely fierce and Microsoft is gonna do something very daring this time around. So speaking on the Beyond 3D forums, Eastman who has proven in the past to have access to Microsoft inside our information, again this all comes from WCCF Tech, revealed that the Xbox Series S, the system they haven't talked about yet, will be half the price of the Series X and it will come in a small form factor that will be an all digital console. The insider doesn't know the final pricing of the Xbox Series S and thus the pricing of the Series X. But he has heard that Microsoft is prepared to drop a $400, so a $399 Xbox Series X. Now we know what we're gonna be hearing about the Xbox Series X and the big Xbox blowout next year. But from what he has heard from all of his sources, July isn't just about Sony. July is about the industry and what they want it to be in terms of a night of mic drops.   So expect a series of mic drop moments followed by the price being the key and all this. So it'll kind of drop in that price at the end of everything. That's why I think Lockhart is a key device in the strategy. It's a low cost gateway that they can control to make sure the hardware can handle the new compression techniques they all employ you with XCloud, which is again, their digital game service. The plan for Lockhart is to get into a price category where they were never able to hit before and I will be based on listening between the lines and they expect Lockhart at some point to make it into a fire TV size. Also the size of the first Lockhart is gonna surprise everyone. Probably like a Mac mini. You guys have never seen a Mac mini. I'm thinking something like that. To me, this is incredibly interesting to me that we're even talking about these kind of price points because Microsoft has the ability to drop a low cost system as it were. They have the ability to do that. And I'm pretty thrilled that Microsoft's even considering such a thing because they are the company that doesn't need the income. They don't need their systems to be profitable. So that being said, I really want to know what your guys' thoughts are on all of this. This is kind of an interesting perspective for me because I think PlayStation 5 is a great value at 499. But it's hard to argue when Xbox Series X is dropping at 399 and every Xbox Series X has a 4K Blu-ray player. Only if you buy the budget system do you get an all digital thing and that's not even the same system as an Xbox Series X. So this is crazy to me and obviously the big thing is the games. PlayStation has always knocked it out of the park game after game after game after game after game. What's going to happen this time around? I don't know. But I'm very curious to see because Microsoft bought a bunch of studios and we have yet to see what most of those studies are working on. Anyways, I am Nathan Robledance from The Tanner Prime. Thank you guys so much for tuning in. Let me know your thoughts on this pricing trader down in the comments below and I'll catch you in the next video.