this video will be about the Riemann mapping theorem. So what I'm going to do is state the theorem and then sketch the proof of it. So first of all state what it is. Suppose you take any complicated open subset D of the complex plane. The Riemann mapping theorem says that this is isomorphic to the open unit disk. So this is just the complex number z with z having absolute value less than 1. The only conditions are that D should be simply connected and open as I said. And next condition is that D should not be the whole of the complex plane. It fails for for this one case. So Riemann sort of gave an argument for it in his thesis in about 1851. However his argument was notoriously incomplete. It used something Riemann called the Dirichlet principle and it wasn't really clear under what circumstances this was true and it took about 50 years to sort out what was actually going on. So the first complete proofs of it were given about 50 or 60 years later by Osgood and Carotheodori and Coebi. So the theorem really ought to be named after them as well. Notice by the way that this open subset D can be pretty wild. So for example if I take an open square then I can remove bits of it looking like this. So I can just remove lines and you find that for the boundary of the square there's actually no arc connecting a point on this boundary to a point in here because it would have to oscillate up and down infinite distance. And moreover we can make it even weirder. So I can I can remove some sort of weird fractal like object so I can take some sort of infinitely branching fractal in some very complicated way. So this open set can really be extremely hairy and it's sort of amazing that you can always make an isomorphic to that. That means you should have a holomorphic function from F from D to the unit disk whose inverse is also holomorphic. Then we have this funny exception that D can't be the whole of C. This follows because of Leuville's theorem which says that there is no there any bounded map on the complex numbers must be constant. So if you've got a map from the whole complex numbers to the unit disk it must just be constant so it can't be an isomorphism. So now I'm going to sketch the main idea of the proof. So the proof comes in four steps. So the idea is we're going to look at maps from D to the open unit disk. Let's call this U. So here's going to be the map F and here we've got some funny set D. I'm going to choose a point in D so I'm going to choose a special point Z0 and I'm going to choose the point nought in the unit disk and I want the matter of the property that F of Z0 is 0. So it's going to take that point to that point and we're going to choose F so that it's holomorphic and injective and we want to maximize the derivative of F at Z0 and what we want to show is that there is we need to show there's a unique such function and it satisfies the conditions of Riemann's mapping theorem. So suppose let's call the space of all such maps F. So we need to show four things. First of all we need to show that F is non-empty rather obviously if there aren't any maps of if there aren't any injective maps at all we certainly can't find an isomorphism. Secondly we need to show that F prime of Z0 is bounded above and if it's bounded above then it's and and that there is at least one such F then these two maps together say that the values of F the derivative of F at Z0 have a supremum. Thirdly we want to show there exists sorry there exists F with F prime of Z0 maximal. This is a rather subtle point I mean we can find functions with F prime Z0 arbitrarily close to the maximum but it's not clear that we can really take a limit of them and this is actually something like this was the problem with Riemann's original proof he kind of assumed you could you could take a limit of functions and this is rather subtle problem sometimes you can and sometimes you can't and finally we've got to show that F is injective and surjective where where this F is the thing with the derivative as large as possible. So I'll go through these four steps first of all we want to find we need to find one F mapping D to the unit bore and we notice this actually fails for D the complex numbers as I mentioned before by Lieuville's theorem here I want F to be injective and holomorphic and this is obvious if the domain D is bounded because we can just translate it and multiply it by constant and that will put it inside the unit bore and so what we want to do is to reduce the case when D is bounded and because D is not equal to C so D omits some point and we may as well assume at this point is the origin because we can just translate it and D is simply connected and it omits zero and what this means is we can define the square root function on D so you know normally there's a bit of a problem defining the square root function because it is a branch point at the origin and so on but if we've got a simply connected region not containing zero then we can actually define the square root function and then we can check the image of D under the square root is not dense in the complex numbers notice that D might have been dense for instance it might be the complex numbers minus the minus the positive real axis or something like that but by by doing the square root trick we can make sure it's not dense so we can assume again if it's not dense we can translate and assume it omits a small disc with center at zero and then if we if we map D if we map it by taking z to one over z this will give us a bounded domain in the complex numbers because D omits a small disc around zero so we've reduced the bounded case so there's at least one such function f as I said this is the point at which we need to use the fact that D is not equal to the whole of the complex numbers next we're going to show that f prime c zero is bounded what this means is that no matter which injective f you take there's a universal upper bound for them and for this we recall the Schwartz lemma most difficult part of the Schwartz lemma is trying to remember that Schwartz doesn't have a t in it because there's a some Schwartz is with a t and some without it's kind of like Lorentz there are lots of physicists called Lorentz some with a t and some without a t anyway um the Schwartz lemma says that if you've got a map from the unit disc to the unit disc then f prime of zero has absolute value less than 1 and it's less than 1 unless um f is a rotation and we're going to use this later and this is quite easy to prove all you do is you look at fc over z and we can check this is bounded by 1 by by looking at its values on the circle very close to the unit circle and since this is bounded by 1 this easily implies the derivative is at most 1 at 0 and if this is equal to 1 at some point then f of z over z is constant which implies that f must actually be a rotation anyway um what this means is um we can now easily bound all these functions because we take our domain d and we're mapping it to the unit disc um well what we do is we um we take our point z zero and we take just take some small disc around z zero and a function f is bounded on this disc it maps this disc into this disc so by Schwartz is lemma we have a universal um upper bound on all such on the derivatives of all such functions at z zero um so um what we can find is we can find a sequence of functions f1 f2 and so on with fi of z zero the derivative of fi at z zero tends to m which is the maximum value of um um f of z zero prime not the maximum value we haven't shown the maximum exist so let's say it should be called the supremum because we've shown that there is such a finite value m and the problem is do these fi's converge to some limit f and this is in general this is a rather tricky problem um so if you've got a sequence of functions obviously you can't always that that doesn't necessarily converge but you can ask if the functions are bounded can we find a convergent subsequence and this sounds quite plausible because if you've got a convergent sequence of real numbers we can find a convergent subsequence if it's if it's bounded so sorry if we've got a bounded sequence of real numbers we can find a convergent subsequence and the answer is in general no for instance if we look at functions f from the unit interval to the unit interval we can find the sequence that has no convergent subsequence and the first one will sort of oscillate a little bit and the second one will oscillate more and the third one will oscillate even more and so on so we can have a sequence of bounded functions with no convergent subsequence um and the problem here is that the derivatives get large or if f isn't differentiable it's it's the differences between points get very large and there's a basic theorem called the ozala-ascoli theorem which says that we can find a convergent subsequence if um well the ozala theorem says we can find a convergent subsequence if the if the sequence is equicontinuous and the trouble with this is that no one ever quite remember what equicontinuous means but roughly what it means is that if we have a good bound or the derivatives of fi and what we mean by good bound i'm not going to worry about too much but the point is if we can bound derivatives of these functions then we can always find a convergent subsequence and the point is that if we're working with real functions there's no easy way to bound the derivatives if we're working with complex polymorphic functions then we've got a good bound so the derivative of a function at a is given by 1 over 2 pi i times the integral of f of z over z minus a squared dz and what you notice here is that if we have a bound on f of z then we get a bound on this integral here this is a we're integrating a little circle around a so we get a bound on the derivative there's one slight catch we need to be able to integrate around this little circle so if we have a bound of f on some region we get a bound on the derivative in a slightly smaller region and this turns out to be good enough to show that we get a convergent subsequence well you need to think about what convergence means and and it turns out to mean uniformly convergence on compact subsets and i'm not going to worry too much about what that means and the point is that if we've got a bounded sequence of holomorphic functions in the complex plane then there's this very general theorem saying you can nearly always find a nice convergent subsequence for some in some sense of the word convergent um by the way i can give an example of um some an example of why you need to be a bit careful what we're trying to do is we're trying to maximize um the derivative of a function at some point given some boundary conditions um like it has to take z zero to zero um if you try and maximize um the integral from zero to one of f of z dz given that f of z um is bounded by one and f of zero equals f of one equals zero then there's actually no solution to this um because we can find functions we can find a function like that or we could have another function that looks like this and so on so you can make the the the supremum of this is one but there's no function that actually takes the supremum so you've got to be a bit careful about um saying that if you've got a sequence of functions then you can find some function maximizing some value because it doesn't always hold um the point is the arsella ascoli theorem says we can actually find a function maximizing the derivative of of f prime of zero um but that's that that's because we can we've got a good bound for the derivative of these functions notice by the way that the derivatives here are getting very large so so as usual if if you can't bound the derivatives then you have a lot trouble showing that there's a convergent sum sequence um so now we come to point four we have found f um from d to u maximizing f prime of z zero um here where f is injective and holomorphic and now what we want to do is is we need to show f is injective and surjective and showing it's injective is fairly easy and showing it as surjective is kind of tricky um so so for showing it's injective it's not very hard to see this so suppose the limit isn't injective so suppose the um so as we've got d here and um under f it sort of maps to something that's not injective so so it might sort of overlap itself a bit there and then since the image of this is open you can see if if you deform it slightly it's still not injective um but since f is a limit of some sequence f1 f2 f3 and so where all these f i's are injective f must also be injective and this depends on the fact that d is open by the way if d is closed then the the limit of injective maps from d to something need not to be injective um so um we've got the the tricky part of the whole proof is proving this limit is is surjective so how do we do that um well let's first of all we we need to show um that if we've got some map f going from d to the unit disc taking um f take taking z0 to zero we've got to show that if f is not onto we can find a new um uh function g with g prime z0 strictly greater than f prime of z0 um and to do this I first need to quickly review mobius transformations so we recall that we've got some mobius transformations that go from the unit disc to the unit disc and these take z to a um um z minus a over 1 minus a bar z and here we can choose any a in in the unit disc and we can even multiply this by e to the i theta where where theta is some real number um and these form a group of holomorphic maps from the unit disc to itself and it acts transitively um that means it can take any point in the unit disc to any other point in the unit disc by by some some group element um furthermore it's you can easily check that the only elements of this group fixing mapping the mapping z the only elements of the group of all maps from the unit disc to itself mapping zero to zero are rotations that follows easily from Schwarz's lemma that I mentioned a bit earlier so so this is the full group of all maps from the unit disc to itself um so now let's try and construct this function g so let's think what we've got so we've got this domain d and we've got a map f of from d to the unit disc and it maps z zero to the point zero and we're going to suppose that it emits some point d so it emits some point that I'll write in blue so I think I'll write it in pink because blue doesn't seem to show up very well um so um if if we think of d as being some sort of purple region then we can its image in purple might be something like that and then what I'm going to do is I'm going to apply mobius transformation and move this points that it doesn't take move this special point to zero and put a blob in the middle so it looks the same um and this purple region will will end up looking something like that and not the image of the point zero will now be somewhere here so this is a mobius transformation and now I'm going to apply the square root and this will map the um point zero to itself and it will do something funny to the image of this purple region and map it to something else and finally I'm going to apply another mobius transformation in order to move this point back to zero so um things will now look like this um here I'll have this the image of d will look something like this and there will again be another pink point there and um what I'm going to do is I'm going to take this map my new map to be the composition of all these maps so this is my new map g and what we want to we need to show that g prime of z zero is absolute value greater than f prime of z zero um and and this will finish the proof um so how do we do that well um what we do is we look at this composition let's call it h um which goes from this purple region to this purple region here h isn't defined on the whole unit this because we kind of took a square root at this point and this this will follow from if we can show that um h prime of c zero is has absolute value less than one by the rule for composition of derivatives so we've just got to prove this and this in turn will follow from the fact that h um if we take the inverse of h and take its derivative at sorry that should be a zero not a z zero that zero then this is absolute value less than one by the taking the inverse of a derivative and there are two ways to do this first of all we could write down an explicit formula for h it's not too difficult it's a Mobius transformation followed by a square root followed by Mobius transformation and we could differentiate explicitly and after about a page of calculation we could show that it was actually an absolute value um greater than one so that should have been a greater than one um so uh um however there's an easy way to see it without any calculation which is to observe that h is a holomorphic map from the unit disc to the unit disc and now Schwarz's lemma implies that its derivative at zero is less than one if h is the minus one is not a rotation and it's not a rotation because we stuck a square root sign in there I mean I mean if we just had Mobius transformations it might have been a rotation um so this completes the proof of Riemann's mapping theorem notice by the way there's nothing particularly special about the square root sign here um all we need is that the inverse of this maps the unit disc to itself in a nice way so instead of taking square roots we could also use nth roots provided n is greater than or equal to two um we can't take n equals one because then we would run into this problem that this map might actually be a rotation


Please don't tell me you're looking up a joke.   Thank you to every sports of the patreon falls to the cons grab like button. They're coming just like your mom I Who's calling me? I've always got I Don't want to talk to you. I've always got a hospital. I'm always loaded ready to shoot Today, let me make sure that okay. The audio is still going sometimes when people call the final adi Baruch So you pronounce that I think so is it spelled. I'm not looking 80 h. I P Are you sh. Yes? I do purge. I really didn't with obviously Prabha's creedy syph A whole bunch of people obviously the Infamous, so this is the final trailer is the final trail. We will see okay, so I'm assuming last one was better I'm assuming this is it. You've done all you're gonna do. This is what we'll see on the screens right Anybody from the production? No in any way communicate t-series, of course No, I meant like I'm sure they have a whole lot of Animators yeah who work on the thing not that I maybe one is a stupid baby not that I saw But if you are obviously, please let us know please let us know once again weirdly though t-series decided not to drop subs with this one and Hey, noz came in a clutch again. Hey, noz. Hey Love you. Hey, noz You're awesome. What a name. Hey, noz is the goat man. Yeah, he is and so basically So we since hey noz speaks Hindi. We are reacting to the Hindi trailer. There's a Hindi and a Tolugu trail I believe this is primarily and I think It's primarily being Maybe it was filmed in both maybe who knows hmm. I don't know. I think it's more Tolugu trailer I don't have any idea film, but it might have been shot in both. Yeah, I My assumption was that it's gonna be done in both. Yeah, but I don't know you guys let us know Yeah, but we're doing the Hindi trailer because that's what and if y'all don't know go back and look at the very earliest OSR videos beginning in January from gully boy January 2019 Hey, noz has been both a constant supporter on patreon and a constant contributor of Subs hey noz is the old-school goat Stupid, baby with a capital S capital B of all time shout out the hey noz Like that Great start we get scythe the villain But he put heart on it so bad.  Yeah, I can't get her No, I don't get it. I'm gonna keep shawty. I'm a big guy. I'm a bug. I don't I'm a better son. Yeah, I'm a little kid. Yeah, I'm a little kid.  I like how like obviously it is an epic story obviously then spin around in Hindu mythology forever I guess and they've remade this many many times but the action wasn't in terms of the CGI it's actually not so because I think in the first one it's just a lot of likes even the close-ups looks looked weird and bad and I think they've kind of fixed that but now it's a lot of the action that just looks 2001 computer animation yeah vibes right yeah and even still on some of the close-ups in the action sequences and it's either I said this before on the last one I think it's either it's only one of two things one where these battles take place is an alternate reality comparable to say Narnia where when you go into that place it has a different look and it's intentionally done in this style of animation it's a particular style if the objective was to make this all simply look like real life it's a huge failure it does not look like real life at all yeah I don't know if they were going for real life first I don't know but if they were if the objective was to make this look like any other thing where you're using computer generated animation to replicate reality yeah it's far from what it ought to be it almost looks like a completely animated film sometimes right actually during the action part with the animation being a style choice yeah maybe for and if that's the case man it's fine I like like I love the score behind it all yeah very epic it was yeah it was really cool so I really enjoyed that I love the beginning with oh yeah he looked like a he plays a great villain as you guys know yeah we love a siphon a villain trickery obviously to capture her yeah and it's absolutely ridiculous I saw this thing not not to do with this but somebody on Twitter it was because she's playing hold on she's playing Janak Janaki but she's yes I think she playing like the mother of all Hindus that's the character right got it and so this person was playing mate obviously I don't know her off-screen but the character she plays I don't think the mother of all Hindus should be doing risque movements and so then they showed creedy in the end song in right whatever the film that we just watched was big it's with a beat yeah yeah yeah yeah and it was it was just a Varun holding her by the head and she was like this it wasn't risque right like in the slide right yes yeah anyway so that was just that was really weird I'm looking up anything I can see that talks about the visuals oh you'll probably only see negative stuff about the visuals honestly I don't know obviously it remains we seen obviously since it has a bunch of stars in it especially Prabha's it's your bunch people gonna go see it regardless right and it's a Hindu story that is just part of like that the crux of Hinduism I do believe right the story so yes correct me if I'm wrong there but it's it's a story all Hindus know most of Indians know and so it might have people there but it's facing an extremely up at one for the cost that it right the cost that right it's a heavily expensive and now all the negative stuff that you've had just in this amount of time right it's it's man I'm fearful of it because some elements that I'm like oh cool that looks cool I'm enjoying that but then also there's other elements that I'm like that looks like Shrek animation from 2000 that's accurate which for the time Shrek was amazing right like Shrek didn't come out in 2023 no and it wasn't marketed as a historic epic yeah so that's the thing if this is if this is marketed as a I mean the last big experience the divine power of yeah the last big Indian film that was released depicting anything related to Hindu gods with visual effects was Brahmastra yeah if this is competing with that in terms of it's the exact same kind of thing we're wanting you to believe the visuals are happening in real life it's it's that's what I would like to know it's really an important it's the important question so I believe it was just announced this morning that Ali and Ranbir are teaming up again for the story of Ramayana or Ramayana which I believe is this exact same story okay so it's this big epic tale right and Yash is also gonna be in that so that's gonna be you have rocking star Yash and he's playing I don't know he doesn't say what he's playing with this they're gonna start shooting apparently in December recording this article but apparently this is like I believe correct me if I'm wrong because I asked about this story and it's it's that that that this epic story Ramanya Ramayana Ramayana but I believe Ramayana is the same yeah but this big epic story and apparently they're going to also maybe not this exact I don't know you guys are playing differences to me because I thought it was the exact same story but that's that's a pretty big cast yeah and if they have if it is kind of the similar story they kind of know what not to do now yeah basically go for more even if the story is you're gonna have to have some VFX like Brahmastra but don't prematurely release it try not to make it all computer animated either well if you're gonna make it all computer animated make sure you have a budget yeah this isn't a fair comparison it really is not but if you're going to you need to come more Brahmastra is a better comparison I was gonna say Avatar but no one on earth can do with Cameron no one has his budget the team can't spend a billion dollars that's 90% of that film is not an exit it's just computer generated animation yeah so that's the that's the question of the day was the animation in this movie and this trailer a stylistic choice to make it look animated or were they going for reality and just fell really short that's the question of the day it is anyways let us know what you thought about the trailer are you excited for it you're gonna go see it please let us know down below


Happy Holidays! I'm Rear Admiral Margaret Kibben, Chief of Navy Chaplains. I want to take this moment to thank you for your selfless service and personal sacrifice to our great nation. For many of you, operating forward at sea, ashore, and in harms way, the holidays often mean time away from family, loved ones, and celebrated traditions. The holidays can also be a challenging time of balancing demands and expectations from your loved ones. I encourage each of you to find ways to keep and even keel this holiday season. Focus on things that are in your control, like starting new traditions with your military family and spending time reconnecting with what keeps you grounded spiritually. Our prayer is that you experience God's reassuring presence this holiday season and throughout the new year. Wherever you're celebrating and whatever your faith tradition, happy holidays. Happy Holidays, Merry Christmas, and a Happy New Year!


Hello, my name is Yvonne Brooker-Rotowski. I'm wondering, did you know that there is a special event that happens every four years in which deaf athletes from across the world come together to compete in sports? It's known as the Deaflympics. Worldwide, different countries send their deaf representatives to come together and to compete in a variety of games. There's both the Summer Olympics and Winter Olympics, but keep in mind it's for Deaf athletes only. In the Summer Games, they have volleyball, tennis, swimming, and other summer sports, whereas the Winter Games have cross-country skiing, ice hockey, snowboarding, and other Winter Games. And now you've been learning, researching, and gathering information online about the history of the Deaflympics, how it was founded, how many years it's been in existence, and learning about different countries. You may learn more about their records that they've set or star players, perhaps in hockey or other sports. Every four years, they host their events. Your job will be to create a brochure outlining the country where it was hosted and other information to interest people into going. Do you play sports? If so, what's your favorite sport? Do they have that in the Deaflympics? And are you interested in participating? I have to let you know it is a lot of work. You have to work hard, train, eat the correct nutrition, sleep well, and work out every day. And if so, you might be able to get into the Deaflympics some day. I hope to see you there, either the Summer Olympics, Winter Olympics, or maybe both.


Awesome. Hello everyone. Welcome to the last talk of the second day of Kiwi Picon. Are you all still awake? Excellent. I'd like you please to join me in giving a super enthusiastic welcome to Ben Shaw, who's going to talk to us about microservices. We're good, Sandman. Sweet.  So, this year microservices, as it says, is HTTP the only way.  So, what's a microservice? I'm sure there's an official definition for microservices out there, but for my purposes, I'm going to say that microservice is an application that reads some data, processes it, and then outputs the result. Now, I'm not defining where the results get output to. Maybe they go to a file, maybe to a database, maybe emailed somewhere. It doesn't matter. The applications should operate in only one domain. And what I mean by that is in terms of the users, this microservice should handle user authentication or this microservice should handle message storage or something like that. And the applications behavior should be simple and describable in just one sentence.  So what is a microservice not? I'm not including definitions that say a microservice needs to use only one database table. If necessary, you can have as many database tables as you want. I don't think that a microservice necessarily has to run on a different server. I don't think a microservice needs to be written in a different language. You can have your main service or a bunch of microservices all written in the same language. It could be easier for your DF team that way. And the last point, which is the whole point in this talk, I don't think it's necessary for a microservice to communicate over HTTP. In this talk, I'm not going to cover the pros and cons of using microservices. This is probably one of the consequences you have. GitHub gets paid for more private repos and finer replaces harder, but it needs to be up to you as to whether microservices are what you're going to need for your application. So to illustrate all this stuff, I needed an example application. And I've come up with something with these features. So it's just going to be a web app where users can publicly post messages. And it needs an authentication system so users can sign up and then log in. Users will be able to follow other users and receive notifications when that user posts. And the maximum message length is 141 characters. So this probably sounds quite similar to something you might have heard of with one important difference. So my service is called Uwta or Twitter plus one. And just to start off, I'll give you a couple of screenshots. So welcome to Uwta, post a message. Hello, Kiwi Picon. After I posted, well, you can see a list of messages. And then after I post, I get a message saying you eated. So if anyone here works with Twitter, please don't sue me in case I accidentally say Twitter or tweet in this talk, you know what I mean. So we start off with a monolithic application, which will then break down into microservices. Starting off, it's really simple. That's the architecture of it. We have a Django server, Django front end, sorry, and a database, a single database to store all the stuff. And there's three main tables that we're interested in in the monolith. There's a UI table, which will store the messages. There's a user profile table, which stores extra information about a user. In this case, all we're storing are the follower relationships, which user is following which other users. And finally, there's a user table, which will store user ID, username and a hash of the password. And the number of the URLs that we have and the views that we have are also quite simple. And we can break them up into three sort of categories. The first few there are all about viewing Uweets. We can view Uweets and post a new Uweet. You can search for a Uweet, which I chosen a different name because it's really hard to say. You can view all the Uweets for a username. And you can go to this user Uweets URL, which will show all the Uweets of the current user that's logged in. The next two URLs are for following and unfollowing. So if you post to follow username, you'll add that username as a follower of the logged in user. And likewise, if you hit unfollow, you will remove it. And then there's a couple of accounts, a couple of URLs dealing with accounts. So there's a register one and a login URL. So next we've got to take this monolith and somehow turn it into a set of microservices. So using those three sort of URL schemes is how we're going to look at, or the three ways the URLs are separated is how we're going to look at the monolith partitioning the monolith. So we'll start off by moving all the Uweeting stuff into its own service. So the Uweeting microservice, it's one sentence definition is that we need to store, retrieve, all or by user and search for Uweets. So that's pretty simple. We have a single database and a single message table in which we're storing the ID of the message, the user ID of whoever's posted that message, the message content and the date it's been posted. This table is pretty much the same as it was in the monolith. We've sort of just taken that table and moved it into its own separate database. Then to actually retrieve stuff from this database, I've created a single file with all the database API stuff in it. So this is just called db.py. At the top of it, it's just got a bunch of SQL, can we db connection stuff and ORM definition for the message. And then I expose four functions or four methods for retrieving messages. So the first one is actually for posting message. The second is for searching messages. It takes a search string and returns a list of messages. We can then list messages, which will retrieve all the messages in the system, or we can just list user messages, which we list messages for a specific user. So our architecture did look like this before and what we're going to do is separate it out into the message service, which is on the right, which is going to be, we're going to talk to over HTTP and use Flask for serving. So the HTTP API for that is fairly simple as well. It's a single file app, which is called app.py. It doesn't bother with authentication. It's rest-ish. I'm not going to get into semantics with that. And it talks JSON. And this is basically the URLs that we're exposing for the app.py. If you hit messages slash an integer, it'll get the user messages for that user ID. Messages search will hit that search messages function. Just going to slash messages will list all the messages. And if you post a message slash posts, it will post a message. So we take a look at the Django view that we actually have for getting the messages and rendering them. Then moving to a microservice because of the way this Django view is written, I haven't actually had to change this at all. I used a message facade, like a message service facade. And I can retrieve that just by calling this get message service function. And that just looks into the Django config. And depending on if you say use local messages or use a microservice, it'll pull back a different class. Then we just get all the Uweets with the all messages function. And just send them off to the Uweet list.html file to be rendered. So looking at this message facade a little bit more. The Django RRM1, which is the original is at the top. And we just get all the messages using the Django RRM. Getting the messages over HTTP is easy. I use the request library. We get that flask URL in JSON format and pull the messages out and then send it through to this transform raw dict function. So due to laziness, due to the demo simplicity, the transform raw dict function adds properties that the microservice return values are missing. So yeah, for simplicity, the microservice is just returning, for example, the user ID of the user that posted the message, but no other user information. And so this transform raw dict function is going out and retrieving the user from a local database. So in reality, what you'd probably do is have your message server return all the information that you need rather than just the minimal amount. And it also looks at a date string and converts it to a datetime object. So the advantages of talking to your microservice over HTTP is that it's well supported. There's so many libraries out there now and make it really easy just to create an HTTP interface for your app. I mean, my flask file is only a few dozen lines maybe. And it is the defective solution. So I was talking to a colleague of mine and I said, I want to do a talk at PyCon about microservices. And he said, what, do you use flasks to write your microservices? And I thought, well, it's interesting because people always just assume that you say microservice, you mean HTTP. And there's a reason for that. It's like defective solution. And you get security and authentication built in. So to secure a web app, you can chuck an SSL certificate on top of your web server and it's got SSL pretty much. You're probably not going to have any networking issues. So your firewall is probably open at your organization just because HTTP is so common. And if you need to do load balancing or proxying, that's a really well supported solution as well. And it's synchronous. And I view this as an advantage because you've got a synchronous request basically coming into your front end server. And then you're making another request, a synchronous request out again. So you've sort of got this whole thing that fits together really well. You're not having to make asynchronous calls synchronously and that kind of thing. There's some disadvantages of HTTP, though. There's overhead with sending headers. May or may not be an issue though. Load balancing is not magic. I mean, where there's if you have a load balance, so you need to tell it what servers it should be load balancing for. And it needs to have some way of knowing which those servers is busy and how it should be receiving messages. How it should be routing messages to those servers. That's all configuration. It's not magic in terms of picking the server that's the best for handling the resource at request at that time. And I think being synchronous can also be a disadvantage. And especially if you if you have a message that you can handle in an asynchronous way and you're forced to wait for a response from a server. So that's what I want to talk about next. So we go back to the partitioning. The next thing going to look at is partitioning this notification service. The one sentence definition for this is that when you use a post that you eat, we need to notify all their followers. I'm going to do this in this case by using a message queue. So message queue is a real simple. You put stuff on a queue, and then you have a number of workers who read messages from the queue. In this use case, the queue is a message sync. So a message is going into the queue and disappearing and then the front end can forget about it. We're not trying to read stuff back off the queue again. And I decided to use kombu as a message transport. You probably heard of celery and underneath celery. And it's also part of the celery project. But underneath celery, kombu is the message transport there. And it doesn't really matter. But in this case, I was using redis as the message broker. And I decided to use kombu instead of celery. It's because in theory, I haven't tested this, but in theory, this should allow us to be cross-platform. So you can have your microservice written in a different language to be able to read these messages. So this is how architecture is now. And this is what's going to be. So the way that the message sync works is that Django will generate a notification, send it off to the message queue. Message queue, the Notifier service will then read that notification from the message queue and then send it out somewhere. That notification is not being sent back up to the Django end. So using producing messages with kombu is pretty easy. I just created a producer base class, which will take a message that you give it and publish it onto a queue. And then I have subclass that just adds this Notifier post message, which is just a sort of helper function. But all it's doing is building a message from the poster follower and content arguments, and then calling put message. So this is on the front end on the Django side. So after a message gets posted in Django, we create a Notifier, which is an instance of the Notifier producer, and we tell it which connection and queue it should be using. And then for every follower in the profile, we just notify that follower that someone's posted. Then to actually do something with this message, this is on the in the microservice side. I've written this Notifier service file. And we can just import this consumer mix in from kombu. And we can just create a message consumer subclassing that. And we just need to implement this on message method. And every time a message gets read off the queue, this will do something with the message. In this case, we're printing I received a message. In reality, you'd probably want to email the user or something. And then you just need to make sure that you acknowledge that message at the end. Otherwise, the message will get back onto the queue and get used again. Second part of this file is to actually run that service. So I create a connection, create an exchange and a queue from that exchange. And then I just create an instance of that notify consumer and run it. And so every time I run one of those, it'll just sit there waiting for a message to come onto the queue. As soon as it's got a message, it'll pull it off, do whatever with the message, and then go back to waiting. If there's already another message on the queue, it'll just read it off straight away. So the advantages of a message sync, so not a back and forth message queue, but somewhere where we're putting a message in and it disappears from us, is it's basically said and forget. You can take your message, put it into the queue and just forget about it. And scaling up is kind of magic. By that, I mean, if you need more notifiers, you can just create more notifier processes. And when they're not busy, they'll be reading off the queue. And they won't be sort of forced to try and handle a message if they're not ready. And it's asynchronous, as I discussed before, you don't have to wait for a response to come back or anything, just fire it off. But there are some disadvantages to using a message sync. You need to have a message broker that you can communicate with. So if you've got firewalls in place or whatever, your consumer and your notifier both need to be able to talk to that message broker and it's not as ubiquitous as HTTP, so there might be some configuration issues there. And having this intermediary service, the broker, it does add a level of complexity for debugging. So you need some way of inspecting the broker and finding out what's going on in there if things aren't working as you expected. And a side effect of this is that it gives you a false sense of security because your application, it's your front end application, will receive confirmation that a message has gone into a queue, but there's no guarantee that there's actually a consumer on the other end reading off that queue. So what can we do about this last point? What can we do to make sure that we know that a message has been read and has been dealt with? So we'll talk about the third partition here, which is the authentication and how we're going to use a message queue but be able to go back and forth with messages. So the definition of the authentication microservices, microservice, is that it should store new user registrations and then authenticate them with a username and password. Again, we have a database with a single table that stores a user's ID, username and a password hash. And similarly to the messages service, we have a db.py file with the SQL economy stuff and then three methods as it exposes. A create user method, which will obviously create the user. We can authenticate the user with a username and password, which will return a user object. And we can get a user by ID, which again will return the user object. So our architecture looks like this. When we add the all service into its own microservice, it'll end up looking like this. That's kind of getting ugly. So what I didn't tell you that I did was that I also rewrote the messages service to be its own... Sorry. I rewrote the messages service to communicate with a message queue as well. It was using Flask. Now it's using the sorry, architecture looks like this. And it's quite nice because you sort of have...  So it's real nice. You sort of have one place we got to send off any messages you might have or any kind of communication is all done this one way. So just to talk about how the steps I needed to go through to get two-way communication working using this message queue. So normally we have a producer and a consumer on a queue. And the producer will say I'm putting messages on the queue and the consumer will say I'm reading messages from the queue. So if the consumer wants to send a message back to the producer it'll go something like this. Here's a response producer. Thanks for the message because it's just reading any message on the queue. So to get around that we need to have two queues like this. A queue for sending from the producer to the consumer and one for sending back from the consumer to the producer. That's not quite right because we have a producer and consumer at each end. So this is actually like Django to a service and then service back to Django. Right so time for some hacks. So making a message queue synchronous. As I said we need two queues. One for requests and one for responses. So there's an auth request queue and auth response queue with a producer and consumer at each end. So if we're going from the web front end across to a service this is easy. Putting into a queue a number of services reading it off. Going from a number of services back to a single web process is actually kind of difficult. We need some way of identifying which returning message belongs to which web request that's coming. That's easy. I've written a new method called message request which will just add a message ID to any message it's putting onto the queue. So it gets a request dictionary and then it just generates a UID for the message ID sticks it in the request dictionary before it puts it on the queue and then it will return back the message ID. So we have a message ID so we know which message we're waiting to get a response for but now we need some way of waiting for the response that we actually expect. So here's some more hacks. We're going to use some shared variables. So these are kind of like singletons I guess in a way. We have a received event that we use for letting any consumers know or any requests know that a new response has come in and then we have a single consumer that's going to consume the response and just hold on to them until they're ready for the request to pull it off. We then start the response consumer and run it in a different thread. So what this response consumer actually does is store new messages that come in. So when it gets a message it looks at the message ID and stores that in a received messages dictionary and then it sets and clears an event so that anything that's listening for that event will know to check and see if the message has arrived. So when a web request needs to wait for a message it uses a new synchronized message call function. So it'll go off and call whatever message function it's passed in which will give it back a message ID. Then while true you know that's going to be good. If the message ID is in the list of received messages or in the dictionary of received messages we'll get the response we'll pop it off that dict and then return that response. Otherwise we'll just sit there and wait for that event to be set and as I said it's this shared received event that we created before. So hopefully this should be sitting off some alarm bells because we've got global variables which are maybe singletons. This will only work if you have a single Python interpreter. It has cross thread data access so luckily we have the GIL. Everyone's been trashing it today but finally it comes through and there's probably a race condition in there as well. So yeah it turns out they're going from one service so what I've tested going from multiple services back to one web process that works okay. Going from multiple services back to multiple web processes that's probably going to be a terrible mess because we rely on a on a singleton being there to read the message. Unfortunately all of these are running would be reading from the same queue so you don't know if your web process is going to your web message is going to be consumed by the right web process that the request is at. So how could we make this work? Maybe a return queue per process maybe dynamically creating a return queue for each request maybe put the results in a database and read from them or maybe just use salary because this is what it's designed for but that is provided that you have Python code running at the other end. So advantages of message queue you get magical scaling in one direction but for it to work you need terrible code that works only with a single Python interpreter and you have to handle your own security you can just use salary. So another transport we could look at using is just raw sockets. So go back to our authentication architecture it looks like this we use again I wrote a flask front-end that I didn't tell you about but there's a flask front-end for authentication which we talked to over HTTP so all we're going to change in this example is that instead of talking to it over HTTP we're going to use a use the TCP socket. So writing a socket server is pretty easy this is basically the example code from the Python docs you create a socket you bind it to a port and you have it listen and again this is example Python code you create a socket you tell it to connect to a port you send it a message you receive a message back and you can close the socket. So all I'm doing here is sending JSON over TCP so if you've done any sort of raw TCP programming before you know that you need to have some kind of format to tell it how it should marshal your messages so all I'm doing is sending four bytes at the start which is the length of the message in ASCII so hopefully the message is less than nine nine nine characters long and in real life you'd come up with something better than this and then to receive that JSON just read in the message length again by reading in four bytes turning it back into an integer and then until you have that number of message and until you have that number of bytes just keep reading then to code the JSON and return your your message so raw TCP is actually has a really is actually really easy to use it has a low overhead like I said it's easy to code the python client if you want to do load balancing and you can use something like haproxy and it's synchronous so again it kind of fits into that HTTP synchronous workflow type thing there's some disadvantages though again firewall issues unless you're talking of a port 80 may have to open up firewalls and you've got a diy a lot of stuff there is a socket server library which does make it easier but you do have to sort of handle your own security and threading and it is synchronous which could be a disadvantage so I like to so that's TCP sockets um what about using UDP so if we look at the notification microservice again where they when notifying users when someone they're following has you eat it maybe that's like less critical so that the notifications that we're sending out they don't need a response they're just one way message sync type thing and if some users sometimes don't get notified of some posts maybe maybe that's not so bad so what about using UDP so before each um using Django to talk HTTP to flask let's change it Django send UDP uh packets to a service so writing the UDP listener is easy um I don't call it a UDP server because it's not really a server going back and forth it's just listening for stuff coming in uh the run server is slightly different we're creating a sock underscore D gram um server TCP socket so this is a UDP socket we bind it to a port as with the TCP one and just start the message loop so well to read a message from the socket and print it out and the received message received jcel messages um it's pretty simple just reads in a one or two full bytes again the first four is the length of the message uh it passes the rest of it as json and retransit the UDP sender is quite easy as well uh it's pretty much the same except that we're not binding to a socket we're we're just creating a UDP socket there um message sending is the same except we're not sending to a bound connection we're just firing out a UDP packet to a machine on a port so advantages of the UDP socket is that there's a little bit less over here than TCP um again it's it's easy to code that is pretty much python example code as well it's faster than UDP faster than TCP uh and it is asynchronous so when you want the asynchronous stuff good you can just dump stuff in there and forget about it some disadvantages of course as I mentioned UDP is unreliable and again you've got a DIY your uh your stuff socket server again can make it easier uh you need to enroll your own security but perhaps you could sign the message and then inspect that at the other end and make sure it was what you're expecting maybe that would be okay uh and you have to handle your own threading so just some other thoughts that I um things that I noticed while I was working on this project you sort of naturally tend towards using the facade pattern so I had a bunch of set methods for db access and I just switched out the transports for sort of interacting with that so my db.py file didn't have to change I just created for example an app.py file or a uh or a service file or whatever so that was cool and I noticed that I did a lot of code sharing or duplication so despite everything being the same git repo I treated all these services and stuff as separate projects and therefore I didn't want to have any cross project imports so the easiest thing for me to do was to copy and paste some code so for example the db creation code is is duplicated um the message sending and reading code is is duplicated and the socket uh json socket writing stuff is duplicated but in real life hopefully you would as I did notice that this was happening and split your base classes and libraries into separate projects as well and manage them separately with their own repos and and have proper libraries and stuff so to conclude is HTTP the only way no but it's definitely the easiest that's the end there's github link if you're interested in looking at this all my crazy flash gaps and stuff um yeah thanks so any questions we have time for a few excellent questions I don't want to put you all off but it better be a good question anyone okay it can be just an okay question up the back


Hi and welcome to the session. I am Priyanka and I am going to help you with the following question which says simplify. These are the four parts of the question which we need to simplify and we will be doing it one by one. The first part is to simplify 2 raised to the power 2 by 3 multiplied by 2 raised to the power 1 by 5. Now after seeing the question one of the properties of the base and exponent clicks in our mind that when the base is like a to the power p when gets multiplied to a to the power q we can write it as a to the power p plus q that means we can have a common base and we can add the exponent. Now here we have a common base that is 2 and p a is 2, p is 2 by 3 and q is 1 by 5. So we can just substitute the values in this identity and carry on with our solution. It says that 2 raised to the power 2 by 3 plus 1 by 5. Now this is a fraction which has been made over here and we need to simplify this fraction. We will take 15 as our LCM we have 10 plus 3. So we have 2 raised to the power 13 by 15. Since it can't be further simplified so that means 2 13 by 15 is our required answer of the first part. Proceeding on with the next part we are given 1 divided by 3 to the power 3 bracket. The exponent is 7. Now 1 by a to the power n can be written as a to the power minus n. So we can write 1 by 3 raised to the power 3 as 3 raised to the power minus 3 to the power 7 is already given to us and then one of the properties say a to the power n to the power m can be written as a to the power n gets multiplied by m. That means the exponents will get multiplied with each other. So using this property we can write 3 raised to the power minus 3 multiplied by 7 which will make it 3 raised to the power minus 21. So this is the answer of our second part. Proceeding on with the next part it is given 11 raised to the power 1 by 2 divided by 11 raised to the power 1 by 4. Now one of the properties of base and exponents says that a to the power n divided by a to the power m can be written as a to the power n minus m. That means the base will remain the same and the exponents will get subtracted. So on doing this we have 11 raised to the power 1 by 2 minus 1 by 4. We have subtracted the exponents and let us solve these two fractions. 4 is the LCM and we have 2 minus 1 which is equal to 11 to the power 1 by 4. So this is the answer to the third part. Proceeding on with the last and final part we have 7 to the power 1 by 2 getting multiplied by 8 to the power 1 by 2. Now here the bases are not same but the exponents are same. So we can write it as one of the properties say a to the power p gets multiplied by b to the power q. Then we can multiply the bases and then can have a common exponent as in the property we have a common exponent we can have a common exponent and the bases can get multiplied. So here we will multiply the bases and can have a same exponent. So it will be 56 raised to the power 1 by 2 and this will become the answer of the last and final part which was given to us. So I hope you enjoyed the session and will be well versed with all the kind of identities that you learnt in almost each and every part of the question. Try to do as many questions of these types which involves almost all the kind of properties of bases and exponents. Bye for now.


What's going on guys, it's your boy DPJ here today with another Pokemon Go video now. If you guys saw my last video, posted it last week, I said in that video how I was looking to buy a new V-Logging camera, so I can go outside and catch Pokemon live for you guys basically. I've brought a camera, I'm just waiting for it to come.  So when that camera comes I will do V-Logs of me catching Pokemon in the wild. Now I thought I would do another Pokemon video in the meantime just to keep you guys informed of what's going on in my game and just move it out of the way.  I am now a level 19 so I thought I'd do a little Pokemon Go video showing you guys my various Pokemon, what I've caught, what I've hatched and then show you guys my epic Pokemon card collection which I did promise on my last video which I'll show you guys at the end but let me just see what's quickly nearby because it's pissing down here but there's no water around me but once it's raining you get a lot of Pokemon dropping out of the sky it's all it seems and I've got a few things to see over there but yes I'll show you guys what I have caught. Now my various one, my most powerful one is the Lapras right there which I did hatch, yes I hatched that from a 10 kilometre egg but I have levelled it up a bit using that what's it called, yes Stardust so that's my most powerful, not bad whatsoever, CP 1500 and 3 which I'm happy with, Starmie I also hatched as well I believe, Calfabre I evolved and the rest of all I've just evolved. Now I have hatched a few and got terrible Pokemon out of it's just ridiculous. I got Onyx, not bad at all, I mean he's rare, I said I love CP but yeah he's quite rare and what else have I got, that's Lobo, oh that's Lobo, well it was me my girlfriend went to a park I think it was Weekend, my local park, remember it's my girlfriend's about three levels lower than me, this Lobo pops up for both of us, mine come out of CP 34, hers was CP 1036, how is that, how is that why do I get this shitty little CP 34, I mean like a CP what is all that about, what is all that about, I mean it's just ridiculous it really is and I'm trying to think of what else I caught and I know I've caught a couple of rare ones, that I can't even pronounce that, I'm an anti is that what that is and you get that from a 10 kilometre egg as well, you would have saw that on my last video, I'm still left to a Pikachu, I can't find a Pikachu anywhere, I mean like it's just ridiculous, Evies I am trying to catch four of, I need one more actually as well, if I catch one more I can evolve one, now I know you have to name them to evolve them into certain evolutions, where are my Evies right now, there you are I've got three, not high levels to be honest, a CP 467, well probably I don't know what that will evolve into to be honest but I don't know what you check, if you guys know the names of what you change them into, I mean I haven't really looked and I could probably find them, but if you guys want to tell me leave a comment down below in that comment section, I know I can evolve into Johtion, well Umbreon is one of the other ones isn't it, that's the black one, Johtion, Vaporeon and this Flareon is it, I can't remember, my Pokemon knowledge is because I've ignored this game for so many years but this this this apps got me back into Pokemon it really has, what eggs have I got hatching I've got, have I not got an incubator, I'm sure I've got three, yeah I have, what's that going on there, so that's 2.7 kilometers of wasted on that egg, as you can see I've got a 10 kilometer egg right there and I've got a 5 kilometer egg right there, Beedrill I evolved, what I do is to get a shit ton of XP and this is probably the best way you can do without all these hacks and glitches and shit that's going around, what you want to do is all these little ass Pokemon you're never going to use like Pidgeys, Caterpies, anything you can evolve basically what you want to use you just want to save as many as you can evolve I mean if you ain't really fussed about the evolutions of them as well and what they evolve into save as many as you can evolve I do like 15 at a time and what I'll do is then I will just pop one of the double XP eggs I don't think I've actually got any now to be honest, now I haven't actually got any but I'll show you what they are you guys should not already be honest let me see if you can buy them these lucky eggs I pop a lucky egg and then I just evolve absolutely everything but I do this where there's enough because there's a city centre in Birmingham there's a place called we call it Pigeon Park where there's literally 10 Pokestops in a space of 400 square foot probably a bit more and you can literally walk around in circles and keep popping these Pokestops all of them they've got the lures on them enough people are sitting in there catching Pokemon and I will just pop my double XP there and I'll just walk around in circles and you get so much XP and then you evolve 10 to 15 Pokemon you get so much XP it's unbelievable and especially if Pokemon you evolve and you haven't already got them in a Pokédex you get so much XP for that it's unbelievable and that's how God is such a high level because me and my girlfriend play it basically the same in fact actually she probably plays it a bit more but I save all my Pokemon to evolve and it works it does it's just a great way of getting XP now when my V-Logging camera does come I should be around level 20-22 hopefully the weather stays good a minute a minute it's absolutely pissing down I plan to go out today with my daughter because it's like seven weeks holidays here for kids in the UK so I plan to go out with my daughter and as humid as it is it's pissing down and I've just had some pop-up what's that a piggy I mean like I just don't need it not really it is little fuckers Zubats I hate Zubats everywhere but they're little fuckers they're so hard to catch they just start to avoid absolutely I knew it was gonna do that wasting my Pokéballs and this little fucking thing we have Zubats and Rataters all around here but the little bastards just I'm sure they're there to make you waste your Pokéballs and the incense as well to me they don't work that good whenever I pop an incense I always get shitty ass Pokemon spawning up my feet saying that saying that what a minute that fucking seals quite close um saying that I did pop an incense when there's that that park where I caught that slow bro last week or the weekend and I caught this bad boy where is he getting out of mystical order this beast I caught a water totally spawned out my feet I'm like no way and it took me so long to catch it's unbelievable it's unbelievable and I went um day before day first there could have been it wasn't what day today first day I think it could have been Monday I went to a park with my daughter as well while my girlfriend's at work and it popped up on my screen that there was Hitman Chan and there's like three of them on my screen like nearby and I walked around for literally about an hour looking for these fucking three they disappear off my screen then come back on I actually recorded a little bit of footage of me capturing it which I'll show you guys unscrewing now actually first I'll show you the park um this was the first part of the park it went it's absolutely humongous but I was walking around for ages and I'll show you the actual battle where I caught him but he's actually quite a rare Pokemon considering um a lot of people after it uh you can see on screen now me fighting a little bastard and capturing a little bastard um where is it I can't remember what cp it's where you guys are watching that let me see what's that about me a cp422 that's what it is so it's not it's not not great I mean I just wondering from a polka dex to be honest the rare the strong ones the high powered ones will come as they come so I ain't really fussed about capturing the rare's pokemon at the highest level I mean yes sure if they drop at a high level I'd be happy to capture that shit but yeah and what else have I hatched because I've hatched so many eggs um I'm sure I just saw one there the pony sir that's actually quite a high level as well 662 I want to evolve that into a rapid dash that's going to be a great pokemon I hatched that as well so yes happy with that what else I hatched that no the sea king I think I caught the 719 I think I caught that I'm not too sure I'm not too sure it's a little pro let's see about 40 more candies it's gonna be so long so I can evolve him um jigglypuff hunter and I'll try to throw off that yeah yeah yeah I evolved my last thing in that's what I did so like I said I just saved all the pokemon that can evolve I'll save them all I favorite them so what I'll do is I click on it favorite it another one I can evolve I click on it this is demonstration purposes obviously you can't evolve these so I click on it favorite it make sure I know that I'm going to evolve them and I just then when it comes to you over them I just put them in order of um favorites just click evolve back out click evolve back out click evolve back out and you get so much XP it's unbelievable but yeah um that's basically what I've got so far at level 19 I mean like I ain't got the highest level pokemon there's a kid by me who knows all the youtube he runs up to me every day he's because like a level 18 but he's got garydus he's got so many sick pokemon like it's just my orange and this game is the worst of what it is and destiny it really is now that's the only reason I think that's a seal it's a seal I can't think of it's like in there now I've caught the bastard already and that's what they need to fix that shit man they need to fix the footsteps I'm walking around in circles and footsteps aren't changing for shit footsteps ain't changing for shit but yes guys um that's basically an update on my pokemon go let me see the polka debt it's actually I've seen 74 quarts 77 um I haven't seen the pokemon have I seen these I do to be honest I ain't got a clue but I've seen what I ain't seen it's just crazy but yes guys um that's basically an update on my my my pokemon go and what I've done so far like I said vlog time it should come soon hopefully anyway and what I'll do now guys is I will pause this video and I'll get my pokemon cards out and show you guys exactly what I've got I think you might be impressed um but yes catch you guys back in a second okay guys so here's my pokemon card collection some of the guy went wild on quite probably about five or six years ago I thought yeah I got a little bit of extra money why not just invest him in something pretty badass and to me pokemon cards are pretty damn badass now where's the camera on this thing on this side because it's awkward holding my fucking phone because I'm using my phone for this um yes but I'll open it up and show you guys what I've got now you can see on my first page I've got all my Charizard's um all of these are in pristine condition I mean like they've come in them solid plastic cases and I've just left them in there and put them into this folder I haven't moved them haven't touched them Charizard EX there that was quite a rare one at the time I brought him not sure how rare it is now Blaine's Charizard there don't know what that one is I saw it for yes I'm having it we've got this one here which is a new version of the old school one which is like I don't know I don't even know and I've got this one here Charizard EX another Charizard there another Charizard there I mean like I ain't got a clue I mean like I just bought them because I bought I knew the Charizard was a badass pokemon a Japanese one here I think that was a Team Rocket collection um another one there I'm not sure that's a gym one but I'm not sure I like this shit's changed since I remember pokemon cards but when I started collecting these cards back back back in the day when I was like 15 or something and there was like only like two base sets there was jungle set not three there's fossil jungle and the standard base set now these shining ones I heard were pretty rare so I'll try to collect them all got shining Charizard I think that's a Japanese shining me but I'm not certain shining Mewtwo we've got shining Oryx shining Celebi I think that's Celebi Celebi shining Raichu Kibbutov's badass Magic Carp and Gyarados now is that first edition yeah it's the first edition I know the first edition was a bit more expensive and we've got another shining Magic Carp which isn't the first edition and shining Noctowl is that Noctowl yeah I think it is and Noctowl the fuck knows here we go oh my oh look I look I didn't keep them in order I've got like their base sets one two one hundred and fifty five I just kept them in like Pokemon order so here's Mewtwos and me like I could say that I ain't got a clue I just I just typed in Pokemon Mewtwo card perfect condition to pop up I'll buy it and a lot of these some of these cards I spent like all £400 on I think the Charizard EX one at the front I think I spent like 80 quid on that and I've got one that's really rare you know like you got gym leaders back in the day and it's like I can't remember the certain names what does Blaine's do as a few others I got Ash's Pikachu and it's in here somewhere yeah I got Ash's Pikachu I heard it was super super rare and I searched for months for it and actually got it in the end like all of these are in perfect conditions not a mark on them I remember this is what I think this one came out with the movie oh not long after the movie the first one Mew vs Mewtwo can't remember what it's called but it was Badass Dragon Knights see a lot of these now I just don't see these all like noose like I only remember like the first 250 after that I lost carrot I lost track and I stopped playing Pokemon all these shining surfing Pikachu's and shit I mean like crazy stuff I got some error cards as well I can't remember what the errors are now but when I brought them at the time there were error cards there it is that's Ash's Pikachu that one is super super rare so I was told so just fuck yep I'm having that bad boy I can't remember how much I paid for that my note is a lot of money happy birthday Pikachu shining and I'm shining I'm both of them are shining actually one of them's got like a weird mark on it but I'm not sure what that means um I think these two are error cards I'm not sure why or what and I got this one here which I was told was something to do the kid had made it and they had it actually officially printed it but this is real card it's a real pokemon card but I'm not sure about the story behind it at all Pikachu's that's got so much shit that's so many unbelievable and this fold is just completely full I mean like I ain't gonna go through slowly through every single one but like you guys will get the gist it's not a bit of a cold Garados misties Garados um can't remember his name Giovanni I think it was Giovanni look at that Garados there some badass looking one I mean like I said I just I just brought so many like see if you can just see that that focuses electrical buzz though I was driving the other day and he pops up my pokemon can have my pokemon go up open when I'm driving so I can like clock up them kilometers when I'm going under 20 miles now I think it's under 20 miles now it clocks up and it actually works quite well and one of these popped up on the screen like it was nearby I just couldn't stop to try and catch it and I was screwing it's the only time I've actually seen one pop up I haven't caught up electrical buzz yet Flareon that's the one Flareon Jolteon Espion but these are the new ones I think what are the newest ones Vileplume see a lot of these now like with my chump badass remember that that was old school that my chump was old school I think it only coming first edition I think it was really not first edition so many I actually love getting these out and having a look at them once in a while just reminds me of them good old pokemon card collection days a little laptop is that Lugia sorry Zaptus another bird in oh yeah here we go this is Zaptus Moltres Articuno is it Articuno not even I can't remember Lugia I know Lugia was pretty rare Huho or Hoho or Hoho or Huho or whatever so many I mean like it just got this world is just countless countless cards what was that one there in the top corner I don't even know like I said I know another thing as well as I'd buy other people's collections they got like a mom uh an ebay fan like it's a stone's pokemon card collection selling it for 10 pound you buy the whole thing and you there's some rare ones in there some real rare ones in there a lot of these are just going crazy man pokemon I don't even know that one coming out there put that in now after this video and after I've recorded this I don't know what the hell that is um I'll put this away for another few years and want to get it back out but this is only like one folder I've got a box full of like all the like basic and common ones upstairs needs a couple of spares here I've got as well what's your finger pretty rare but yeah that is basically my Articuno whoo I was right what was I Articuno is that you pronounce yeah I'm not even sure what the hell is all this I don't even know let me get these out shit I can't remember getting that that's a biggest card I remember this as well as the pokemon card in there which is unopened um these were there's a set of them they're actually in my folder but I've kept them there just in case I can't remember anything about the story behind it what's that there I ain't got a clue I ain't got a clue but they're there for good reason so to stay there yes yes yes but that is my guys that is my pokemon card collection um let me just put that sorry don't fucking fold there we go but yes guys that is my pokemon card collection um tell me what you think about it let me know down below in that comment section what you do you think about this card collection I think it's pretty damn epic well obviously I would but yes super super rare ones in there hope you enjoyed the video um like I said as soon as I get my v-logging camera I will do plenty of live well obviously it's gonna be live because they've relugged but relugged me running around parks catching them rare pokemon for you guys but stay tuned for them hope you enjoyed the video do drop a like I'd appreciate the support and I'll catch you on that next one peace out until next time bye


QuickBooks Online 2024, reversing entry related to loan payables, short-term and long-term portions. Get ready and some coffee because we're diving into it with Intuitz. QuickBooks Online 2024. Here we are in our Dick Ray Guitars 2024, QuickBooks Online sample company file we've set up in a prior presentation, opening up the reports on the left hand side. We're in the favorites, right-click it on that balance sheet to open it in a new tab, right-click the profit and loss to open in a new tab, right-click the trial balance to open in a new tab. Let's go to the tab to the right, close up that hamburger and change the range. We're going from 010124 to 033124 because it's the reversing entry. We're going to select the drop down months and run it and then we'll tab to the right, repeat the process, hamburger needs to be closed so we can eat it, 010124 tab, 033124 tab, selecting the drop down months and refresh the report tabbing to the right. Once again, hamburger closed and we want the range at 010124 tab, 033124 tab, month by month, side by side running it. Let's go back to the balance sheet, recap what we did last time which was an adjusting entry. The adjusting entries are entries that happen at the end of the period, typically month or year to make the accounting or financial statements as close to the accounting basis being used which is typically an accrual basis but could also be a cash basis or tax basis as possible as of that cutoff date. We talked about last time the loan payable. We had our loan payables down below and we talked about the fact that there's many different issues with the loan payable that you want to consider and a few different options on how you're going to deal with those issues. The main issue however for us here was breaking out the short term and long term portion of the loan. So the general concept, the general idea would be that I would suggest having a parent loan payable account, typically a current portion or current liability and then have your loans underneath it as subsidiary accounts possibly including the number, last four digits of the loan number as well as the institution where the loan is at so you can identify each loan then when you pay off the loans you can do so according to the amortization schedule which is what we did in our practice problem decrease in cash by the amount of the payment and properly allocating the loan interest and principal being able to then tie out to the current loan balance after each payment. So that's one method that we can do. Remember that you could use another method however because that method of recording each payment and breaking out the proper interest and principal makes it difficult to memorize transactions and simply use bank feeds to record the transactions because although the payment repeats and is the same the interest and the principal differ therefore if you want to make it easy you can say hey look all I'm going to do is record the decrease in the payment to the loan account it's respective loan account so I can automate that process with the bank feeds and then at the end of the period myself or my CPA, my tax preparer can create the amortization schedule and properly break out the interest at that point in time as part of the adjusting process as well as break out the short term and long term portion. So those are those are a couple options that that you could use no matter which option you use however I think it would be best to to basically have a parent account and then break out all of your loan accounts underneath it so that you can have you can look at each loan individually from an internal perspective while still being able to collapse the loans into a loan payable current portion for external reporting something like doing the tax return or presenting it to a bank then we have the breaking out of the short term and long term portion so once everything is in the short term or one loan one line item per loan on the balance sheet then some loans are going to have a current portion to them if they're like an installment loan for example that we pay monthly so we have to break out the short term and long term portion so we mirrored the same structure down here in the long term loan payable and only one of them had a long term portion to them so we then broke out the long term portion according to our amortization schedule so now we've got the short term which is going to be just the principal not the interest payments for the next year because that's what a current liability is what is due in the next year the interest is not due in the next year even though you're going to be paying it in the next year because the interest has not yet been incurred in a similar fashion as signing a lease today for an office building has committed you to pay for the office building but you haven't incurred the expense given the fact you haven't used the office building yet so you wouldn't record the expense at this point in time so we only have the principal payments as the current liability that we would pull in and then so we have the short term and long term portion that we broke out short term portion being these payments to long term being where we're currently at minus the short term which will be equivalent to 12 months down the line on the amortization table so 12 months later will make these payments will break out the interest and principal properly the balance will be going down by the principal amounts to get us to you know where we will be a year later which is equivalent to this to this short term portion here so that's going to be the idea I'm sorry where we're going to be at the end is going to be the 56769 which will be equivalent to the long term portion and the difference between the two points is the short term portion that's a couple different ways that you can look at it all right so we broke that out properly now what's the problem with that well now I don't want to leave it that way for the bookkeeper because this is great for financial reporting because now I can do my taxes or give it to the bank or give it to the investors whoever needs these financial statements properly breaking out the short term and long term portion but in the internal bookkeeping side of things now it's like okay well what happens next time do I make a payment do I make the payment to the current portion do I make the payment to the long term portion do I really have to break out the short term and long term portion every time I make a new payment because it's going to be tedious to do that because you would think I would make the payment out of the short term portion and then I would have to do this calculation again every time and do an adjusting entry for the long term portion that more added difficult


Hello, and welcome to this presentation of the STM32L4 series of ultra-low-power microcontrollers with a 32-bit ARM Cortex-M4 core. The STM32L4 series is part of ST's 10-year Product Longevity Commitment Program for STM32 and STM8 microcontrollers. Here are the four main advantages of STM32L4 ultra-low-power microcontrollers. ULP leader and performance booster. ST has built a new architecture to reach best-in-class ultra-low-power figures thanks to its high flexibility. Moreover, the performance of the STM32L4 series adds a new dimension to the ultra-low-power world. It delivers 100 DMIPS based on its ARM Cortex-M4 core with FPU and ST-art accelerator at 80 MHz. Innovation. To address a large market range, its architecture implements several innovations and embeds smart peripherals. Integration and safety. Up to 1 megabyte of flash memory and 320 kilobytes of SRAM with safety and security features, smart and numerous peripherals, advanced and low-power analog circuits in packages as small as 3.13 by 3.14 millimeters. Great investment. This new STM32 member benefits from the pin-to-pin compatibility of the STM32 family and the STM32 development ecosystem. The new STM32L4 architecture implements many innovations to reduce power consumption and increase flexibility. A new low-power mode has been added. Shutdown mode with consumption as low as 8 nanoamps. The real-time clock, RTC, is available in all power modes. A dedicated pin, called VBAT, can be connected to a backup battery. There is an automatic switch between the main power supply and this VBAT pin. And as soon as the battery goes low, an automatic switch maintains the power for the RTC and backup registers. No need to have a dedicated crystal oscillator for USB using the internal HSI 48 megahertz oscillator. An internal oscillator can be programmed from 100 kilohertz to 48 megahertz with a very high accuracy, better plus or minus 0.25 percent. All IO levels can be kept in low power modes as well as during wake-up phases. It optimizes the system consumption. The flexibility of sources is increased. A standby mode, down to 200 nanoamps with partial RAM retention, is available. Optimized active mode, thanks to an external SMPS to supply the core. Some IOs have a dedicated supply in order to avoid having to use an external level shifter. The STM32L4 offers best-in-class power consumption with full flexibility. The user can select the best operating mode depending on the wake-up time, state of retention, and the number of sources required. VBAT mode shows two nanoamps without RTC and 200 nanoamps with RTC running. Shutdown mode at 8 nanoamps without RTC and 200 nanoamps with RTC. From this mode, you can wake up from 5 IOs, the reset pin, or RTC. Standby mode with the possibility to keep 8 kilobytes of SRAM with more wake-up sources. Wake-up time is only 14 microseconds. There are two stop modes, stop one and stop two. In both modes, you can retain all the memory and all peripherals, and it takes less than 5 microseconds to fetch the next instruction. The difference between the two modes is that you can wake up from one UART and one I2C in stop two, while all I2Cs and UARTs can be used in stop one mode. There is also a sleep mode used to wake up from any event or interrupt. The STM32L4 also shows a very low-power consumption in active mode, down to 31 microamps per megahertz with external SMPS. The STM32L4 series shatters performance limits in the ultra-low-power world. It delivers 100 DMIPS based on its ARM Cortex M4 core with FPU and STs ART accelerator at 80 megahertz. Once woken up from stop mode, the internal clock is available in less than 5 microseconds running at 48 megahertz and up to 80 megahertz in less than 20 microseconds. STM32L4MCU scored 447 in the standardized EEMBC ULP mark CP tests that compare the efficiency of the peripherals. STM32L4 adds a new dimension to performance in the ultra-low-power world. Thanks to the ART accelerator, performance is linear with the frequency and there is no impact on flash states. The STM32L4 reaches 100 DMIPS or 273 core mark with the ARM Cortex M4 core with floating point unit and DSP instructions. It also embeds two DMA controllers and several high-speed peripherals. STM32L4 microcontrollers implement many innovative smart peripherals. To illustrate this, let's look at three application examples. The first one is metering. It is a very good fit, thanks to the segment LCD controller, the three tamper pins, communication interfaces for connecting wireless devices, a lot of IOs, a parallel interface for connecting external memory, hardware crypto and a true number generator for security, VBAT with RTC for battery backup and possibility to connect an external Sigma Delta modulator with the DF-SDM. The STM32L4 is also an excellent choice for fitness trackers with the possibility to connect a TFT display through the parallel or serial interface, USB, host or device, serial audio interfaces, a lot of embedded advanced analog IPs such as op-amps, digital to analog converters and analog to digital converters. It also provides a secured element connection via the SWP, numerous serial connections, a batch acquisition mode with the possibility to retrieve data from sensors while the MCU is in low power modes to reduce power consumption. The DF-SDM also supports the direct connection of a digital microphone, the filtering and data conversion are done in hardware and further improve the system's power efficiency. The third application example is an industrial sensor where power consumption constraints can be an issue. Its segment LCD controller, numerous serial interfaces and IOs as well as a flexible static memory controller for connecting an external memory and an ambient operating temperature range up to 125 degrees celsius makes the STM32L4 an excellent choice for industrial sensors. In addition, it embeds an encryption hardware accelerator and true random number generator, a CAN bus interface and motor control support with advanced timers and three analog to digital converters. The STM32L4 shows high integration with high memory size with up to 1 megabyte of dual bank flash memory and 320 kilobytes of SRAM. STM32L4 microcontrollers embed many peripherals including a total of 17 timers, up to 136 IOs and a touch sensing controller. These MCUs are available in small sizes down to 2.58 by 3.07 millimeters in the WLCSP49 package. The STM32L4 also embeds many safety features. For example, it includes a brownout reset that protects the device in all modes and the clock security system which automatically detects if a crystal oscillator is broken or disordered and takes action in order to ensure that the system can still run in a safe mode. An error correction code is available which warns the system if an error occurs and tries to correct it. As security is also important in many applications, the STM32L4 embeds a 256 bit AES and 256 bit SHA encryption hardware accelerator as well as anti-tamper detection, unique ID and software IP protection features. The STM32 portfolio offers an extraordinary variety of compatible microcontrollers based on ARM Cortex-M cores M0, M0 Plus, M3, M4, M33 and M7 giving developers flexibility to find the perfect STM32 MCU for their applications. The STM32L4 is a great investment and benefits from pin-to-pin compatibility across the STM32 family. The STM32L MCU series is the largest portfolio of ultra low power MCUs that exist today. This series is at the heart of your battery operated or energy sensitive application. The STM32L1 has a broad range of products and is the foundation of the STM32 ultra low power series. The STM32L0 is the cost-smart ultra low power champion microcontroller series and is based on the Cortex-M0 Plus core. The STM32L4 completes the ultra low power microcontroller series providing more best-in-class power consumption figures, higher performance, more advanced peripherals and more memory. The STM32L4 Plus series extends STM32L4 technology by offering higher performance, larger embedded and more advanced graphic features with no compromise on its ultra low power consumption capability. The STM32L5 adds more security with Cortex-M33 and its trust zone. Thanks to this new core and new STR accelerator, now also supporting external memory, the STM32L5 reaches 427 core mark. The STM32L4 portfolio is available in a wide choice of packages from QFN32 up to UFBGA169 and from 64 kilobytes up to 1 megabyte of flash memory size. The AES encryption hardware accelerator is optional. Developers will find a solution matching their exact application needs thanks to the STM32's exhaustive ecosystem. From a hardware tool perspective, developers can choose between fast prototyping using an STM32 Nucleo board which ensures an easy switch from one STM32 to another, a discovery kit that highlights specific features and full evaluation boards that demonstrate how to get the most out of the full range of peripherals and features for an STM32 MCU with a complete set of companionships. For software tools, the STM32L4 is a great investment because it uses the STM32 ecosystem. Using the STM32 CubeMX tool, users can intuitively select and configure an STM32 microcontroller that matches their required set of peripherals as well as program the required embedded software. Based on user choices, this tool can also generate initialization C code and estimate power consumption. The STM32 CubeMX relies on the STM32 Cube embedded software bricks to generate the peripheral initialization code. The first firmware layer of these embedded software bricks is made up of the low-level drivers. For example, the hardware abstraction layer, HAL, and the low-layer LL APIs. The HAL implements a high portability between STM32 series, while the LL APIs bring the performance aspect to the STM32 CubeL4 offer. The HAL abstracts the STM32 series from one another thanks to a highly portable set of APIs, thus ensuring an easy migration path from one series to another. The LL APIs are a lot closer to the machine and constitute a lightweight high-performance expert-oriented firmware stack for maximum dynamic reactivity and flexibility. Last but not least, these low-level drivers are distributed under the BSD license, one of the most permissive and business-friendly open-source licenses. For more convenience, the STM32 CubeL4 embedded firmware also comes with a set of middleware bricks. They are portable on any STM32 series that supports the required functionality. These middleware bricks also come for free, and most of them are based either on open-source de facto standards or ST deliverables with permissive and business-friendly license terms. In addition, numerous examples are provided to help the customer understand how to use the HAL, the LL APIs, and the middleware with the microcontroller. ST proposes high-quality low-level drivers, which have been thoroughly qualified using both standard and ST-specific validation tools and processes. For more information, you can refer to the presentation dedicated to the STM32 Cube embedded software qualification. It has never been so easy to select, download, watch tutorials, or get the latest news about STM32 products and solutions on a computer, tablet, or smartphone. The STMCU Finder app lets you quickly and easily select the devices of your choice on a tablet, smartphone, or desktop. Then, visit www.st.com-stmcu-finder. The ST forums on microcontrollers allow the STM32 developer community to discuss and share experiences. If you would like to know more about STM32 products and solutions in real time, join the growing STM32 community on Facebook and on Community. Learn more with our STM32L4 online training at www.st.com-stm32l4-online-training. For more information, please visit our website at www.st.com-stm32l4. Thank you for your attention.