Shall we begin? So last term, we discussed the dynamics of a harmonic oscillator, which is a one-dimensional system where the particle is bound by a potential v is a half kx squared. And we found a number of important results. Most obviously, there was quantization of the energy, so discreteness of the energy levels. And very importantly, there was the phenomenon of zero point energy that even when something was in its ground state, it had the uncertainty principle applied to have non-negligible kinetic energy and potential energy indeed. So what we're going to do now is study a number of very simple one-dimensional potentials, motion in a number of very simple one-dimensional potentials, which are themselves very artificial. These are step potentials, so they change discontinuously at some values of x from one value to another value. So they're very artificial, but the merit of them is that we can solve the governing, well, the key equation, the time-independent Schrodinger equation and obtain the states of well-defined energy from which we can, as we saw with the harmonic oscillator, recover the dynamics of the system. We can solve this equation, this important equation, simply for these rather artificial potentials. And we'll discuss at the end which of our results is artificial reflects the artificiality of the potentials and which are generic and are ones that we can believe in. So this is what we're going to start with is the square potential well, which is this structure. This is potential energy being plotted vertically, position being plotted horizontally. Here is the origin. This is going to be a distance a. It's going to be symmetrical. This is going to be a potential level v0. And this is going to be a potential level nothing. So we set the zero as a potential energy to be at the bottom of the well. And then there's when you're more than distance a from the origin, you have some potential energy v0, which is a constant. So this is highly artificial, but let's see what quantum mechanics has to say about motion in here. And in particular, what we're going to look for stationary states. That is to say states of well-defined energy, which we write like that. So these are states of well-defined energy. We're interested in these because they enable us to solve the time-dependent Schrodinger equation trivially. Once we know what all these things are, we can write down. And once we know what all these things are, and we know how to, then we can express any arbitrary initial condition as a linear combination of these things. And we can time evolve it in a simple way as we saw last term. So we're going to find these things. And they're going to have wave functions, which we'll call u of x. So this is x e is the wave function. Now this potential is symmetrical. It's an even function of x. So we have that v of minus x is equal to v of x. So it's an even function. The consequence of that is that we introduced the parity operator last term. We had that p, if you remember, x, p is an operator, the parity operator, which makes out of a state of psi, the state that you would get, which has amplitude to be at minus x, well, what is this? This is the amplitude to be at x when you're in the state that p makes out of psi. And this was defined to be minus x of psi. In other words, it was defined to be the amplitude to be at minus x when you're in the state of psi. So the parity operator makes a state which is the same as the state you first thought of, except if every point is reflected through the origin. We discussed this operator. And because b is an even function of x, we have that pvx pv of psi is going to be equal to minus x v of psi, which because v is a function of position. It's a function of the position operator. This is going to be v of x, x of psi. In other words, it's going to be simply v of x. Sorry, sorry, sorry, sorry. I need a minus x and a minus x. So it's going to be v of minus x times of psi of minus x. Because v is an even function of x, so v of minus x is the same as v of x, this is equal to this is this, and this could be written as p. So what does this mean? This means that because v is an even function of x, it commutes with the operator p. In other words, pv equals 0. Because this is rather a rigmarole, I have to admit, p commutes with v because v is an even function, which is a way of saying that the potential is symmetric about the origin. This is the bottom line. If you have a potential which is symmetric about the origin as an even function of x, then it commutes with the parity operator. The consequence of that is, so the Hamiltonian is, of course, is, as ever, p squared over 2m plus v of x. p squared is an even function. If you write this in the position representation, it's minus h bar squared d2 by dx squared. So this is an even function of x. So this commutes with the parity operator. We've just figured that this commutes with the parity operator. So we have that p comma h. So this implies that p comma h is 0. So the parity operator commutes with a Hamiltonian whose stationary states we would like to find, whose eigenstates, that is to say, the stationary states we would like to find. So what does that imply? When two operators commute, remember the fundamental rigmarole is that this implies there's a complete set of mutual eigenstates of p and h. That is to say, we can, if we wish, look for eigenstates of h, which are states of well-defined parity. And the wave functions of these states of well-defined parity will either be even functions of x if the parity is even, or there will be odd functions of x if the parity is odd. So what this means is we can insist or we can look for. So we can look for stationary states with wave functions u of x, meaning, of course, x, e, that are either even functions ux equals u of minus x, or odd functions, i.e. u of x, is minus u of minus x. And this observation, knowing that you're looking for an even function, say, makes it much easier to find that function than if you don't know whether it's even or it's odd. This is a general observation, and we'll just find a concrete example of it in a moment. So here is our potential again, a minus a. What do we have? We have here what is the time-independent Schrodinger equation, that is to say, what is that? That is the equation which says that h of psi is equal to e of psi. In the position representation, what does this important equation look like here? Well, at this point here where the potential is 0, h is p squared over 2m. So at this location here, this becomes p squared over 2m, which is minus h bar squared over 2m d2u by the x squared. So this is, I suppose I should change this, sorry, in this context to u, probably, let's leave it with e. That's what we were calling it, the state e. So this left-hand part now reduces to just this in the position representation, because we only have the kinetic energy at this location. There is no potential energy. And on the right-hand side, of course, we simply have e times u. So we're trying to solve this equation, and we know all about the solutions of this equation. This is just a simple harmonic motion equation of classical physics, essentially. It tells us, so we know that u is cos kx, or u is sine kx, provides solutions of this equation. Cos kx is an even function, so that must be the solution belonging to an even parity state. And sine kx is an odd function of x, so it's an odd parity thing. So this has solutions u of x is equal to either cos kx or sine kx, depending on parity. And we have that k. So when you double differentiate this, you're going to get minus k squared cos kx. So the minus sign deals with that. We're going to have that minus k squared e is equal to this stuff here. In other words, we're going to have that k is equal to, no, this is wrong. Sorry, sorry, I've got this the wrong way up. What am I doing? Sorry, the double derivative is here. So when we double differentiate, we'll get minus h bar squared k squared over 2m. We'll get a minus coming from the differentiation, which will cancel this. And we will have that k squared is equal to 2me over h bar squared square root, well, k is that. So we have determined what the wave functions are of the stationary states in that interval from minus a to a in terms of the energy. What we now need to do is think about the state of affairs here. So this stuff is all true for mod x less than a. What about the case when mod x is greater than a? So another picture. In this zone here, what does the time independent Schrodinger equation look like? It still has kinetic energy minus h bar squared over 2m d2u by the x squared. But now we have potential energy, how much? v0, so v0 times u. So this is the Hamiltonian operator operating on u. And that's equal to e u. And let's now say we're looking for bound states. That's to say states where the energy e is less than the potential energy out here, so that the classically the particle will be confined inside here. So we're going to look for bound states. There are other states too, but let's focus on the bound states. That means that e is less than v0. So the particle classically is not allowed to get out of the well. What happens then? Well then, this equation becomes d2u by the x squared is equal to, if we put this onto this side, since v0 is by hypothesis bigger than u, we have a negative right hand side. And we can cancel the minus signs on the two sides. So if we write it as we have 2m v0 minus the energy over h bar squared times u. So again, we have a double derivative is equal to some constant times the function. But the difference is now that we don't have a minus sign here. So instead of having sinusoidal solutions, we have exponential style solutions. So the solution to this equation is that u is equal to a constant times e to the plus or minus k times x, where big k is the square root of this stuff here. What about this sine ambiguity here? There is a sine ambiguity here because it's the double derivative, which has to be equal to a constant times u. If we go for the minus sign in taking the double derivative, two derivatives, we get down to minus signs. We get a plus obviously. So that's why there's this ambiguity. What do we do about that ambiguity? Well, when x is greater than 0, we want the wave function to decrease as we head off to infinity as x becomes larger and larger. Well, in fact, because we would like to be able to normalize the wave function, we'd like to have the wave function mod squared integrated over all space comes to 1. And that's not going to be possible if we have an exponential divergence. So the consequence of that is that in this zone here, we take that u is proportional to e to the minus kx because x is positive over there, and that means the bigger x gets, the more we move over here, the smaller the wave function becomes. If we're on this left side here where x is negative, then we want to take u goes like either plus or minus e to the plus kx because x is negative in this zone here, and the negativity of x gives the exponent of the exponential negativity so that the bigger that x becomes in modulus, the more we move over here, the smaller the wave function becomes. And whether we want to take a plus sign, if we're looking for a state of even parity, then we want to take this plus sign. So the wave function over here has the same numerical value as the wave function at the corresponding point over there. If we're looking for a state of odd parity, we take this minus sign so the wave function at negative x becomes minus the wave function at the corresponding point at positive x. So that's where we are so far. What we now need to do, so we've now solved, what have we done? We've solved the time independent Schrodinger equation everywhere except at x equals a and x equals minus a. But we haven't solved it at those points because at those points, if you go a bit to the, for example, at the point x equals a, if you go to the bit to the left of that point, then the wave function is supposed to be cos or sine kx. And if you go a bit to the right, it's going to be this exponential function. But at that point, we must still have the time independent Schrodinger equation satisfied. So what does that require? Well, for the time independent Schrodinger equation to mean anything even, the second derivative of the wave function has to be well-defined at that point because the time independent Schrodinger equation equates the second derivative to some stuff. So what we can say is that at x equals plus or minus a, we need that d2u by dx squared is defined. Or we can't solve the tizy there, satisfy the tizy there. Well, the rate of change, this is the rate of change of the gradient that is certainly not going to be defined if the gradient isn't continuous. So that implies that du by dx is continuous. And that's a non-trivial requirement because at the moment we've got the wave function in pieces and there's no obvious reason, unless we do some engineering on our pieces, why the gradient is defined by one piece on one side of the barrier of the transition should equal the gradient from a completely different function on the other side. So the gradient has to be continuous. The gradient is certainly not going to be even, is not even going to be defined unless the wave function itself is continuous. So we also require same similar reasons that u is continuous at these points.  And we have to insist that du by dx evaluated at a minus a tiny bit is equal to du by dx evaluated at a plus a tiny bit called epsilon. That's what we've got to insist on. What does that amount to? That amounts to here, if we're just to the left of a, we have for the even parity solution, we have that u is equal to cos k x. And x is a minus epsilon, but epsilon's as small as we like. So let's just make it equal to cos k a. That's got to equal the wave function on the right-hand side, which is some constant.  Let's forget about the tiny bit because this is a continuous function. So we require that. That's the continuity of u of x. Similarly, the gradient just to the left of x equals a is given by the derivative of cos k x. So we're looking at minus k sine k a. And that's got to be equal to the gradient of a e to the minus k x just evaluated at x equals a. So that's minus big k a e to the minus k a. And that's the continuity of du by dx. And we also have to satisfy these continuity conditions at x equals minus a. But the nice thing about deciding that you're going to look for a wave function of well-defined parity, either an even function or an odd function, is that it's easy to persuade yourselves. You probably want to sit down quietly and do this afterwards. That if you satisfy these conditions on the right-hand side at x equals plus a of the origin, then you've also satisfied these conditions on the to the left of the origin. These equations suffice to fix up the arrangements on both of the discontinuities. And you don't have to deal with them separately. That's the great advantage of choosing wave functions of well-defined parity. So what do we have here? We have a pair of equations, and we have a number of unknowns. As it stands, we do not know what little k is or big k is. And we do not know what a is, big a is, right? Those are all unknowns. We've two equations, and we need, fundamentally, to determine these unknowns. Most important is to determine little k and big k, because they are related to the energy by formulae, which are there's little k right at the top there is the square root of 2m e over h bar squared.  So little k and big k are both related to the energy. And once we found the energy, we'll know what both big k and little k are, and it's the energy we're fundamentally after. So that's what we want to focus on. Big a is of less interest. So let's get rid of big a by dividing this equation through by this equation. Then we will find, so we divide equation 2, basically, by equation 1. And that leads to the conclusion that minus, let's do it down here, minus k tan k a from sine over cosine is equal to minus big k. Nothing, everything else goes because we have an a e to the minus big k a in both equations. And let's ask what this is. Let's try and relate this. So big k and little k are both related to the energy from which it follows that I could express big k as a function of little k. So let's do that. This is minus the square root of 2m v0 minus e over h bar squared, which is equal to minus square root. Now, 2m e over h bar squared is actually from, we maybe just lost it, unfortunately. Let's bring it back into focus right at the top there. It's 2m e over h bar squared is in fact k squared. So 2m e over h bar squared is k squared. So what we want to do is write this as 2m v0 over h bar squared minus k squared. So here we have an equation now that this equals this, which has only one unknown, namely k. So the left side is a function of k. The right side is a function of k. Any values of k for which these two sides are equal are provide solutions to our time-independent Schrodinger equation and provide wave functions for stationary states, for states of well-defined energy. To solve this equation, the way to go is to divide through by this, well, obviously cancel the minus signs, divide through by k, both sides. And this then becomes tan kA is equal to the square root of 2m v0 over h bar squared k squared minus 1. And it's good now to multiply the top and the bottom of this by a squared and write this as the square root of w over kA squared minus 1, where w is 2m v0 a squared over h bar squared. Why do I want to do that? kA is obviously dimensionless because this is a wave number. The wave function was sine kx. The argument of sine must always be dimensionless. So this is dimensionless. That's obviously dimensionless. Therefore, this must be dimensionless. You can explicitly check that this is dimensionless. So the reason I've defined w is that this thing is dimensionless. It's a dimensionless measure of the depth and width of the potential well. It depends on the depth of the potential well. It depends on the width of the potential well. And it's the dimensionless, the mathematics is telling us that this is how you quantify, how you know what kind of potential well you've got. You've got a very deep one or a very shallow one. So how are we going to solve this equation here? Well, the way to go is to plot both sides of the equation graphically. So the tangent is to plot both sides of the equation graphically and see what you get, see at what points they meet. So if this is a plot, this is kA being plotted this way, then if I plot tan kA, it starts off at 0 and rises like this. And when kA becomes equal to pi over 2, it zooms off to infinity. That's what tangents do. And down here it goes symmetrically. What does this thing do? When kA is nothing, that thing is obviously infinity because it becomes w over nothing. Square-rooted. So this is the left-hand side. I better write that down. So this here is the left-hand side. It's tan kA. The right-hand side is coming down from infinity. And it's going to go to 0 when kA is equal to, or k squared is equal to w. So this right-hand side is cruising down from infinity. And it's going to go to 0 when kA is equal to w. 0 when kA is root w. And from this we see, it's obvious now, that no matter what the value of w is, so as you change the width and depth of the potential, you move this point to the right or the left. But no matter where you put it from nowhere to infinity, it will cross. There will be this intersection here. These two curves always cross. And where they cross gives you a value of kA, and therefore a value of k, which is a solution to the time-independent Schrodinger equation. So what we've just learned is that this well always has a bound state. It doesn't matter how shallow the well is or how narrow the well is, it always has a bound state. Because these two curves always cross. This tangent on the left has other branches. There's also a branch. So tangent comes along here, goes off to plus infinity. And then somewhere down here, when kA is equal to pi upon 2 plus a bit, it becomes minus infinity, or it comes in from minus infinity and repeats itself. So this is the LHS second branch. And this second branch may or may not cut this curve of the right-hand side again. So if we made kA smaller than here, this is where kA, this is the place pi, if we would make this less than that, we wouldn't get a second solution. But if we have kA bigger than this, we do get a second solution. So it may have other even parity stationary states. So depending on the depth of the potential, we have 1, 2, 3, 4, et cetera, stationary states of even parity. We've only dealt with even parity case. If we want to look at the odd parity states, let's just begin to do this. But this is basically an exercise for the problems. Then our conditions are a wave function for the odd parity state. We've lost it somewhere, but it's a wave function for the odd parity states is the sine kx right up there. So in the middle, it's sine kx. At the edge, it's still a e to the minus kx. So our continuity conditions become that sine kA is equal to a e to the minus kA. And that's the continuity of the wave function itself at x equals a. The derivative of this is going to give me k cos kA is equal to minus big kA e to the minus kA. If we divide this equation by this equation analogously to what we did before, we are going to get k cotangent of kA is equal to minus big k. So now we have only one minus sign. Previously, we had a pair of minus signs, which cancelled. Now we have only one minus sign because we differentiated a sine. We didn't differentiate a cosine. And correspondingly, we have a cotangent instead of a tangent. So this equation can be graphically solved. That's the exercise. And we find that we may get 0, 1, 2 solutions for k. And for every solution, we have an odd parity. We have an odd parity stationary state. Let's have a look at the uncertainty principle in this example. Just to remind you, last term, quite early on, we showed we considered the case. So this is last, this is a summary, last term. We considered the case where psi of x is proportional to e to the minus x squared over 4 sigma squared. So we considered a wave function whose spatial form was a Gaussian such that when you mod squared this, in order to get the probability distribution, you found that it was a Gaussian with dispersion sigma. So this thing here is the expectation of x squared. That's what sigma squared is from that formula. And what did we find? We found, fundamentally by doing a Fourier transform, that if that's what the wave function looks like, then the probability, well, the amplitude to find, so this is x of psi, the wave function looks like that, then the amplitude to get a certain momentum, if you would make a momentum measurement, was looking like e to the minus p squared over 4 sigma p squared, where this thing becomes the expectation value of p squared, so the variance. The expectation value of the momentum in this state is 0. The expectation of the square of the momentum is going to be this sigma p squared. And what we found was that sigma times sigma p is equal to h bar on 2. This was a concrete example of the uncertainty principle, where the smaller the uncertainty in x is, the bigger the uncertainty in the momentum. And correspondingly, the smaller the momentum in p is, the bigger the uncertainty in x has to be because the product is always the same in this particular Gaussian example. So we have some idea that the uncertainty in x times the uncertainty in p, we say to ourselves, is inherently never smaller than this number h bar upon 2. It may be bigger than h bar upon 2 easily. It often is bigger than h bar. It usually is bigger than h bar on 2. But this is kind of as small as it gets. So that was what we did last term. So let's have a look at it in this particular case. So let's look at the ground state. Remember, oh yeah, another point to remind you is that the ground state wave function of the harmonic oscillator. So the ground state of a harmonic oscillator actually has a wave function, which is this Gaussian. At the time that we did this calculation, this Gaussian was just picked out of the air. But for the ground state of the harmonic oscillator, actually does have this thing here. This fits this example. So let's have a look at the wave function of the ground state of this that we have here. What you might argue to yourself, you might say, OK, so what we can say is that p is less than or on the order of, well, p squared over 2m, the energy, is less than v0. Because it's a bound. So it's less than v0. So what we can say is that p squared is less than 2m v0. Yeah, sorry, that's meant to be a less than. Seems reasonable, doesn't it? The particle can't have any more kinetic energy than the energy it requires to escape, because we know it's bound. The next thing you might say is, well, so what's x squared? What's the uncertainty in x? Well, you might say to yourself, well, look, this particle is trapped in this potential well that goes from plus a to minus a. So what's the uncertainty in x squared? Well, this must be on the order of a squared. Seems reasonable, doesn't it? Less than on the order of. I'll put in a factor 2 or 4, or just to be sure that the less than is holding. Because the thing is trapped by a potential well that extends only from plus a to minus a. So it has a range of 2a that it can run in. So we say x squared is definitely less than 2a squared. It's almost certainly, it's clearly less than that. Significantly less than that. So what does that give me? Oh, and this square of the momentum is, so we have that x squared, p squared, I mean, I can put expectation values around that too, I think, is less than on the order of, whatever it is, 8m v0a squared. But that is w, isn't it? Somewhere, yeah, look, w, this is basically w because that was 2m v0. So this v0a squared is something like 4m v0a squared is h bar squared. If I've done this right, because I'm getting an answer, which I'm times w, yes, exactly. That's right, times the dimensionless number w, right. The point is that w could be made as small as you like. We've agreed, and you still have a bound state. So this naive argument suggests that we're going to violate the uncertainty principle and we can make this as small as we like. So what's the problem? This argument's bogus. What's bogus about it? It's not all in the well. As you make w smaller and smaller, let's draw what the wave function looks like. So if we have, let's have a nice big value of w. A big value of w means a nice spacey well with right high walls. And then we will have a ground state wave function, which is a cosine and some little bits like this. And indeed, the probability to find the particle outside the well outside plus or minus a will be not very much. But as you make this smaller and smaller and smaller, you bring this in, making a smaller, and or you lower these, making this curvature smaller. So that curvature of that wave function is a reflection of the kinetic energy, which is a reflection of phi naught. We come to that. We have a nice, we have a narrow, a titchy-witchy thing like this. Then you have barely a, you have an almost a straight line across here. I can't draw it well. Almost a straight line across here. And then enormous, long, exponential decays. And the particle is almost certain not to be in the potential well. That's a very remarkable conclusion to come to, right? That you can trap a particle with a potential well, which it's almost, it has very little probability of actually being in. But that's what the theory says. Something else we can show is we can say, we can argue as follows. Supposing we've given some other potential well, right? Here is some other potential well. Sorry, it's meant to be an even function of x, right? So it's meant to be the same on both sides, symmetrical. And somebody asks you, so does this potential well have a bound state? Then your reason as follows. Let us inscribe a nice square potential well. There are many square potential wells you can inscribe into it, right? But there's one. Then you can argue that this potential well is narrower and shallower than the one you were given. So less likely to trap a particle. But this potential well has a bound state. So this well is shallower, narrower, but it has a bound state. At least one bound state, because it's a square well and we understand about square wells. So your reason that this wider and deeper well also has a bound state. So we're making an inference from this very special, rather artificial, square well potential about all one-dimensional square wells. What happens now, let's conclude with a special case, an important special case, which is the infinitely deep well. Whoops. So now we let v0 become arbitrarily large and we have a well that looks like this. It just goes up and up and up and up and up and up and up and up. What happens then? Well, let's go to our graphical solution. What have we done? We've left a constant. I mean, we've left a at some values. And we've allowed v0 to become arbitrarily large, which means we've made w arbitrarily large. What's the implication of that for our solution of this equation? So we're solving this equation for w arbitrarily large. So we're saying that the roots are going to become where tan kA, the even parity roots, are going to be where tan kA equals infinity. And we know what that means. We know that kA must be pi upon 2, 3 pi upon 2, et cetera. So we've made w goes to infinity, which implies that the governing equation, the equation that determines k, becomes tan kA equals infinity, which implies that kA is equal to either pi upon 2 or 3 pi upon 2, et cetera, et cetera, et cetera. And all of these values are going to be OK. Graphically, what's happening is that this curve, right? This was the curve of the right-hand side for finite w, is going to just become a line along here at infinity. And it's going to cross these various branches of the tangent at infinity, which means that these pi upon 2, 3 pi upon 2 points. And it's going to cross every single one of them all the way out. So we're going to have an infinite number of even parity stationary states. And they're going to have those values of kA. And when you study the corresponding problem for the odd parity states, which we just vaguely discussed here, it's going to be the same deal. We're going to be solving an equation which says that cot kA is going to be infinite. And that means that kA is going to be pi, 2 pi, 3 pi, so on. So these are going to be the even parity states. And then we will find that kA is equal to pi, 2 pi, 3 pi, et cetera, for the odd parity states. So the infinitely deep well will have an infinite number of solutions. And what do the wave functions look like? Well, the wave functions are going to be cos kx, where kA is equal to some number of odd pi by 2s. So the wave function of the even parity states is going to vanish. This is going to be cos kx. And the wave function is going to vanish here and here by virtue of these conditions there. And the same thing will happen for the odd parity states. For example, the first odd parity state is going to have a wave function which looks like this. It's going to be sine kx, need a better piece of chalk. It's going to be sine kx, where kA is equal to a number of pi's, and therefore the sine vanishes. So it's going to vanish. So this is a concrete example, but it leads to the general, it inspires the general principle that a wave function vanishes adjacent to a region of infinite potential. Physically, what's happened is that this big k has grown bigger and bigger and bigger and bigger and bigger. And therefore this exponential has grown deeper. The curvature of it has grown larger and larger and larger and larger. So as we raise the walls, the transition at the edge of the well goes from being sort of nice and easy with a small value of k through a bigger value of k to ultimately an infinite value of k, which allows it to discontinuously go from a finite slope right around to no slope. And that's why it's a general property of these solutions of the time-independent Schrodinger equation that as you approach the edge of an infinite, a region of infinite potential, the wave function vanishes in anticipation of that infinity. So another strange aspect, another physically strange thing that the theory is telling us is that the wave function, the particle has negligible probability of being found in the neighborhood of this region where it's strictly forbidden. It anticipates the fact that it's going to be forbidden. You won't find it even near this dangerous place. OK, it's time to stop.


I'm gonna already show you how to make some of the best salmon you ever had in your life. Check out how I did it. First thing we're gonna do is pick our little pin bones out of our salmon. A lot of times people just cook it with the bones in, but you can totally pull them right out. All right, now I know a lot of people don't do this. If you want the extra crispy skin, I like to get rid of the scales. Not everybody does that. So to get you a knife and go against the grain, against these scales. Now that we got all our scales removed, look at how pretty that skin looks. Now you need a super sharp knife and we're going to score our skin. Should look like that. Now I'm going to take a little bit of maple smoked sea salt and sprinkle the skin. We're just kind of going to rub that in down into the cracks. Take our salmon and we're going to set it to the side. Now let's make our mango salsa. Start out by dicing our mango. Mango hack, that was easy. Little avocado. Don't do that. Do this. Carefully dice the avocado. Little red onion. That should be about all we need. Couple jalapenos. I know they're old, but they still work. Some cilantro. And don't forget about the stems. That's the best part. Add your cilantro in and the juice of four limes. Give them a squeeze. Now it's time for the last step. We're going in with a little pre-mold because it's got a lot of black pepper and some dino spicy. That's the red top because there's nothing like it in some salsa. Now we simply stir it up. Now you're going to need yourself a stainless steel pan. We're going to preheat it to a medium high temperature. Now our pan is preheated. Add in some avocado oil. And now we lay in our salmon skin side down. Now it's time to season the other side. Now it's time to season the other side. We're grabbing the blue top. That's the dino's seasoning. Sprinkle generously, my friends. Look at those ingredients.  FYI, I did turn down the heat a little bit. All right, it's been about two minutes. And as you can see, we're about halfway cooked. So we're going to carefully attempt to give it a flip without making a mess. Add two tablespoons of butter. Turn our temperature off. Skin's crispy. All right, let's attempt to extract this. Look at that. How did I do? It looks pretty dang good. Look at the beautiful color of the seasoning. That's what I really love about it. And look at that perfect sear on both sides. Crispy skin. Now let's get a bite. All right, now it's time to plate this bad boy up.  So it's time, my friends. It's time to get a bite. Look at that. Perfectly cooked once again. Let's just get a try of this delicious seasoning. Did you hear the crunch? Let's get some of this mango salsa right there. So clean and refreshing. Now it's time for the most important part, my friends. Let's get to that skin. I'm going to go right down here. Look at that. Just cut right through it with a fork. Yeah. Holy cow. That is a winner for dinner. That is a 10 out of 10. Something I'd definitely do again. Take the little extra time.  Sear it just like that. You can thank me later. Yum, yum, get you some. Hope you all enjoyed the video. We'll see you next time. Keep sprinkling, my friends.


Kun tutkittavuutta on tullut tullut data-analysisen, se on tullut tullut tullut tullut varavallisissa. Tämä on tullut siksi. Mutta ei ole mitään, joka tarvitaan tullut tullut tullut tullut tullut varavallisissa. Mennään koko, mitä on tullut, kun tullut tullut tullut varavallisissa. Joten tullut tullut tullut tullut tullut, on X1, X2 ja X3, jotka tullut tullut varavallisissa, on käytännössä eri perustastuksia tarvi. Täällä on kolme esitellä, X11 on ensimmäinen esitellä, tämä esite on ensimmäinen esitellä, X12 on tullut tullut saman esitellään. Tällä erityksen tullut tullut, X13 on tullut saman esitellä, tämä mennä tällä eri tullut. Nykyään, mitä on pitänyt mitis vastauksia langitunnelilä-analysisille. Sitten tihe intendellä rapaajasta. Tämä on två eritylipuolio. Se, että noussimme sen, when we do longitudinal modeling of latent variables. The first thing is that we need to understand what these error terms are about. So error terms typically, they capture unreliability, but they also capture item uniqueness. So there might be something in X11 that is or the first indicator that is persistent over time that is different from the second indicator. So quite often we want to say that the first indicator's uniqueness correlates over time. So we have these correlations over time of these measurement errors. So that is the first special thing that you need to consider when you do longitudinal analysis of latent variables. Another thing is measurement environments. Measurement environments briefly means that your measurement model works the same way or the measurement process works the same way between X1 and X2 and X2 and X3. This is important because it is possible that the skeptic to our argument says that there is actually no correlation between X1 and X2, rather this is a measurement defect. Or if we are looking at levels, one could say that X2 has a higher mean than X1, not because there are attributes of interest as evolved over time, but simply because our measurement process works differently between the first and second time point. We need to consider measurement invariance, which I explain in more detail in another video, to address this concern. Let's take a look at two examples of what a longitudinal latent variable model would look like. So this is a crosslock model without random intercepts. We can see that we have positive effect, negative effect. There is the correlation between error terms in the same time. We have the autoregressive terms here, the paths here and the crosslock paths here. And we can see that the errors are all to be correlated, so that the first indicator correlates always with the first indicator at different time points. So all the first indicator observations are allowed to be freely correlated, all the second indicator observations are allowed to be freely correlated, and all the third indicator observations are allowed to be freely correlated. So this is the correlation over time. The same thing can be seen also in this latent change model. So instead of having observed variables here, we have latent variables and we have means, which are typically of interest when we want to model change over time, and we have these correlated error terms that allow the uniqueness to persist over time.


Hi everyone Sean with jaspys case breaks calm here doing a 2020 tops luminaries baseball three box break number nine random box Hit or we're gonna open up three boxes See all the hits and randomize the hits with the three names involved in this one being Wes and Patrick with two spots in this and then see how the names and the hits match up These are gonna be coming from loose boxes, so we have seven loose boxes here So instead of obviously a dice only has six spots on it So what we're gonna do is we're gonna actually go back and just to show you it's gonna be one through seven from left to right So one here two three four five six and seven We're gonna go back to the randomizer And I've got one set up right here with one through seven And we're gonna do a dice roll here to see how many times we're gonna randomize that and the top three numbers After three times are gonna be the three boxes that we do in this break so Three times on the randomizer one and two one two and third and final time We're doing boxes five two and six So we'll go back over to the breaking camera to see So box five one two three four five right here box two one two box one two three four five six So those other four boxes I believe will potentially be for Box break number ten But in the meantime Back to our boxes We're gonna rip these and keep the Hits in order put in the randomizer Good luck everyone. Let's hope for something crazy release day tops luminaries It's been incredible so far See if we can keep it going So we've got I think we're upside down I saw the word home runs on there I'm assuming we're not talking about a pitcher in this case. I'm actually sideways Atlanta Braves. Oh Ronald Acuna, Jr. And that's numbered three out of five Nice start. This is honoring his ten home runs In the first 14 August games of 2019 Yeah, Ronald Acuna, Jr. on card out of Three out of five Let's see what else you still here Pat There you go So that'll be number one on the randomizer first spot second hit. I think we're sideways again, maybe Yeah This one is Chicago Cubs Any guesses we're going Sammy Sosa Patch auto seven out of ten Beautiful auto there Pen stripe Look at the autograph to another good one. Yeah, right? Well Sammy Sosa. I Know after that documentary his values went up a lot Third and final box. Good luck. It looks like another single card. No booklet in here So maybe the next one 260 Brandon 260 spot we open three boxes and three people are involved so Each person gets a hit one sideways. So we're going this way Look like I saw pinstraps It's a white sock. It's out of ten Who is it? big hurt Frank Thomas Patch and auto so we got out of five and out of ten and out of ten You got the North Siders the South Siders and Ronald Acuna, Jr. Very nice Very nice, okay, let's go back over to the randomizer insert in the Hits yeah, very solid foot group Patrick So let's enter these hits into a randomizer starting with the Ronald Acuna, Jr. out of five Sammy Sosa out of ten and Frank Thomas out of ten He talked about maybe talk about some like perennial all-time hitters Sammy Sosa Frank Thomas and then Who eventually will probably go down as one of the best hitters there is? Ronald Acuna, Jr. Say that's a hell of a hell of a little group right there Brandon I'll check and see yeah, right? Well, I mean legitimately like not like hyped up potential But he has the potential to do it. So I mean that's a solid three three all-time hitters right there potentially Two of them already guaranteed So let's do a dice roll here to see how many times we're gonna randomize both lists a four and a three seven times Good luck Weston Pat one two three four five Six and seventh and final time It's two Patrick Wesley and Patrick stays Now let's see how this is gonna pair up with the hits seven times on the hits one two three four five six Seventh and final time. Good luck Ronald Acuna Sammy Sosa Frank Thomas so Patrick Cologne Ronald Acuna, Jr. Out of five Wesley Thomas Sammy Sosa out of ten and Patrick Cologne Frank Thomas out of five Very nice Not a bad hit in this group Congratulations Patrick. You might have missed out on the personals, but uh This break definitely showed you something good Ronald Acuna, Jr. on card auto out of five Sammy Sosa patch and auto out of ten and Frank Thomas patch and auto out of ten Very nice cards there. Congratulations to both of you and that was 2020 tops luminaries baseball three box break number nine Random box guarantee to hit. I'm Sean with jaspyscasebreaks.com and we'll see you next time


Welcome! The following video will demonstrate how to insert and replace the batteries for a 2GB passive infrared motion detector. Begin by removing the screw from the PIR case bottom, then remove the back plate using a bottom-to-top lifting motion. Remove and dispose of the old batteries according to the battery manufacturer instructions and your local regulations. Then insert the new battery. Always make sure you match the plus sign on the battery with the flat side of the compartment and the minus side on the battery with the spring side. Warning! Failure to follow these warnings and instructions can lead to heat generation, rupture, leakage, explosion, fire, or other injury or damage. Do not insert the battery into the compartment in the wrong direction. Always replace the battery with the same or equivalent type. Never recharge or disassemble the battery. Never place the battery in fire or water. Always keep batteries away from small children and if batteries are swallowed, promptly see a doctor. Once you finish inserting the battery, reattach the motion detector to its back plate. Then reinsert the screw at the bottom of the PIR case. The 2GB passive infrared motion detector batteries have now been replaced. Make sure to subscribe to our YouTube page and click the Show More tab underneath the video where you can view valuable links pertaining to this product, similar how-to videos, and our low-cost, no-contract alarm monitoring services.


Last year we held a special spread the health fundraiser to provide free copies of our evidence-based eating guide to healthcare practitioners across the United States. Thanks to your support, we're able to send out 12,000 copies to those who cancel individuals on healthy eating to distribute to their clients and patients. Now we want to make it out to even more people with your help. Please consider helping us send even more copies of this important resource to healthcare practitioners in 2023. With increased publishing and shipping costs, we're more grateful for your help getting them directly in the hands of practitioners. Just 20 bucks allows us to print and ship about 16 copies of our evidence-based eating guide to doctors' offices and hospitals and health clinics. Please consider making a donation today to help us spread the health. Thank you for your support.


handle somewhere on the slide you can find it you can tackle me via Twitter and it's remarkable just how full this room is it's a Python conference and we're talking about types and we know that types and Python don't mix so I can only assume the reason why you're all here is because you hate Python. Why do you hate Python? Haskell person. Stop that. So I'm here to talk to you about the type hitting stuff that is about to happen in Python and to do that we need to start with a bit of history. It's been a long time coming for Python to start getting some degree of static typing. Now Python started off using this thing called duck typing where you can pass in arbitrary objects in the hope that they have the methods and properties that you care about and that are used by the function that you're going to pass it to and this is generally a pretty good thing and we went with this for about the first 17 odd years of the existence of Python and this made pretty much everyone happy about it you know our code generally tends to work hasn't been a problem that we haven't had types but when Python 3 came around they introduced this thing called function annotations and this is basically you specify annotations to arguments on by putting a colon on the argument and then putting something after it and then return annotations by putting an arrow at the end of your argument list and putting something on the right of that arrow. These were introduced as part of the Python 3 spec and landed in Python version 3.0. Now these function annotations were interesting in that they didn't actually specify what they were going to be used for. They did not need to actually be type annotations of any sort they could be anything so for example if you wanted to automatically generate some documentation you can make some a toolchain that would take the annotations that were strings and use that to produce documentation for each of your your arguments and your return. You could put anything you'd liked inside those inside those annotations and basically what this meant was that because they didn't really specify what the point of these annotations were nobody really did anything with them for the first few years of Python 3's existence. Type checking was in that PEP4 type annotations but there was not really any good way of doing type checking so the feature just sat unused for about five years. So PEP484 which was released this year finally proposes using these annotations to do type checking. These annotations they show a function that takes a string as an argument and returns a string. So PEP484's approach is to use these annotations and provides a bunch of hint objects defined in a module called typing in the standard lib and it provides a type checker to provide basically type hinting functionality and all of this type hinting functionality that's introduced in PEP484 has been implemented without making any changes to the language itself. Now for those of you who aren't terribly familiar with how Python adopts new features it has this process. It's a three-stage process officially. First a PEP gets proposed on a mailing list and discussed. Stage two is that the PEP gets adopted and stage three is that the feature gets added to the next Python release. Now what actually happens is the most important step. Basically everybody needs to forget the thing was ever proposed for the first few years of its existence and basically this means that by the time people are using a thing in Python it's mature and somebody in core Python has figured out how to properly use it and because there are people out there who know how it's meant to be used properly nobody really questions the feature as it's as it's adopted. There's a slight problem with this process this year in that a PyCon 2015 in Montreal, Guido came up and gave a keynote about how type hints were going to be adopted in Python which meant that this really really important phase of the Python feature adoption process did not happen. Everybody at that keynote saw this feature before there was an implementation and came up with terrible ideas about what it means. So even though the PEP itself says you know it should be emphasized the authors are not going to ever make type hints mandatory you get grumpy people like Jack Dedrick who say that this PEP hides Python 4. It's going to completely fundamentally change how Python is ever going to work and the discussions around PEP 484 have basically been this tarpid because people don't know what type hints are about they assume it's going to be something terrible like Java because that's the only other language they've seen which is statically typed and Java's static typing is frankly terrible and I guess the only way to solve this problem for you to get an understanding of how this works is to go out and use the type hinting stuff that PEP 484 proposes. Unfortunately there is a slight problem with this and that's that there is no stable release of Python with this type hinting stuff in there and even if there was nobody is using it yet which means you can't actually go out and use this stuff. So what I'm going to do instead is take a look at it in a language that hopefully you already know and that language I'm going to look at is JavaScript. Perhaps unfortunately I reckon the majority of people in this room have done some level of development with JavaScript even though this is a Python conference you kind of have to use it if you're doing web front-end stuff. Now TypeScript is a Microsoft technology you might notice somewhat uncharacteristically I'm wearing a college shirt this is a contractual obligation it is an open source project and it's been out since 2012 it's relatively stable it's basically just a type hinted version of JavaScript give you an idea of what of how similar it is here is your standard hello world in JavaScript you'll notice the console dot log and the string in there and this is hello world in TypeScript are there any questions TypeScript is just JavaScript in its simplest form if you want to start writing more complicated if you want to start seeing the differences you have to write more complicated code so here is a slightly more interesting function that's referring to another conference I'm sorry about that it takes a string parameter and it returns a string this is the version of that in TypeScript as you can see there's a type hint on the input parameters and there is a type hint for the output both of those say that it is a string if we call this function with something that is not a string it will break and if we try to assign the output of of that function to something that isn't a string or isn't expecting a string that will also fail now TypeScript it basically runs through a compiler which does a type erasure pass on your code and it will emit something that looks remarkably similar to actual JavaScript and the actual JavaScript you probably would have written anyway under the hood it's exactly the same the compiler just verifies that your types are consistent and then gets rid of all the type annotations it runs in exactly the same way as your JavaScript would have have now because in this one our variable a is a string and to uppercase returns a string we can make another variable b without saying what its type is and the typechecker will know that it is a string and we can validly pass it into that hello function this is type inference it means that you don't need to manually hint every single function and every single variable you have sometimes the compiler can figure out what is going on for you so this code even though it looks basically the same as the code on the last slide we have a function that returns a number therefore we can't pass the variable d into that function that expects a string the compiler knows that d is a number therefore the types are inconsistent and so what this means is that you if you write code that only interfaces with type checked functions and you don't define your own type hints in anything you write you still get the benefits of type checking for free so another thing that can be done in type script is that if every return point of a function is of a given type then you get type checking for free on that function so this thing clearly returns a number even though we say that it doesn't so type inference can pick that up for us which is pretty cool here is a function that can only return a string here and passing that into something that expects a number will not work so thanks to type inference even if you don't care to annotate your own functions rather just consume a type hinted api you will benefit from testing your own code against constraints that have been provided by third party library developers so this is great you get some sanity checking on your code effectively for free so this type checking stuff it's pretty good but how is it useful if not everyone else is out there writing javascript code or is out there writing javascript code rather than writing type script code fundamental things that you're probably going to use if you write javascript code like jQuery for example that's written in raw javascript doesn't use type script so do you get type checking on that well you get this thing in type script called gradual typing now gradual typing refers to type systems that do not require every function do not require every variable to participate in the type system gradual typing means that only some of the code has to participate in the type system and that's the stuff that will get type checked it's completely opt-in there's two ways to do that the first is to explicitly declare a type so i've got a variable here i say it's a string therefore it is a string in the type check and knows that it is a string alternatively you could ignore writing your own hints and see if the compiler can go and make a guess itself so i'm not declaring a type on that variable there we've got a function that returns a number therefore the compiler knows that the variable is a number pretty simple and now javascript has type coercion behaviour as a python developer i don't like that but you know there's a lot of javascript stuff out there that expects type coercion to be a thing you do for example like taking text inputs and treating them as numbers for example if you want to opt out of the type system you can this is invalid type script uh because i've got a string that looks like the number 42 if this wasn't type script it would be valid javascript um you can declare a type or sorry a variable to be of type any when you declare a thing to be of type any it means it does not participate in the type system it could be any type of value um you can use it anywhere so any is basically the opposite of the object type if you're familiar with languages with type hierarchies for example python for example java if you declare something as object it means you can only call methods that are defined on the interface for object so even though we can tell that this variable here is a string i can't call to uppercase on it the compiler will reject that because i've said it is an object even though we can see that is a string if you declare a thing to be of type any it means you can call whatever you want on the object and we rely on the standard javascript runtime verification behavior to see whether or not we've done the right thing but this means that the onus is on us as a developer uh to make sure that what we're doing is correct so this will pass the type script compiler even though bacon eggs and spam is not a thing that's defined on string it just means it behaves like a plain old javascript object um so you don't really lose anything so any is the thing that makes type scripts type system actually work well everything is assumed to be of type any that is there are no type constraints at all until the compiler is absolutely certain that type constraints can apply for you and this is a big difference between gradual typing and static typing you don't need to introduce any type constraints until you the developer are ready to have your code meet type constraints they're not compulsory and they don't take effect until the code is ready so the most important aspect of any though is that you can cast from anything to any specific type so here i have a string it's known to be a number um so i've put it into a variable called any i can then say this thing that wasn't any is in fact a number and then go off and use that like a number and then the type checker will just check to see whether or not all the uses of that variable is consistent with uses of numbers so basically type constraints can be broken if you need them to be broken and this means that type script can if you need to keep the flavor of javascript's weak typing uh if you need that and this means that this anything is is the most powerful and liberating aspect of type script let's take a look at why so say you have some definition of an interface um i'm going to for no reason at all call it jQuery um and you know once you get an object from plain old javascript you can cast it to meet any uh interface you've defined so i'm going to take a variable call it dollars and say that meets this that this is of type jQuery and i'm going to take a plain old javascript object which is an any which means i can pass it into a variable of any interface i say it matches from now on every call to that dollar's variable will be matched against the interface that i've passed into it jQuery's authors did not need to define the spec i wrote the spec but the type system is fully happy with that that means the onus is on us for developers to get the interface declaration right but if we have got it right then the type checker in the compiler will make sure that everything matches the interfaces that we provide and taking advantage of such an interface in your code is easy you just need to point out a reference file this is very similar to doing an import in python very similar to doing an include in c or c plus plus and their entire communities out there that are making repositories of type script interfaces for popular javascript libraries the biggest one is called definitely typed it has interfaces for several hundred of the most popular javascript libraries libraries including node.js including jQuery so this means that you can use type script right now for non trivial code because of these interface declarations any code that anyone has written in vanilla javascript can take advantage of type scripts type hintings you just need to have one of these interface declarations so this means that basically any javascript library you care to use will work so this being a python conference we need to talk a bit about python otherwise i don't think you'd be getting your money's worth back to pet 484 it has been implemented and it is available in the betas of python 3.5 starting at number one all of the type hinting features are implemented within the existing language the only concrete addition is a file that defines type hinting primitives and a type checker this implementation is different to type script type script is a language extension it needs a preprocessor to go and remove the type hints before you can run it in your browser so pet 484 is a relatively non-invasive way of doing this gradual typing thing that type script does in python so if you got python 3 code it will still work as python 3 code code which uses type annotations in a different way will still work if you don't throw them at the type checker and code will benefit from type annotations as type annotations become available for the libraries and modules that you use if you don't want to pollute the main body of your code with type hints you don't have to you can put type hints in a separate .pyi file provided it matches the external structure of the py file that it corresponds to so if you have a function called spam in your python file it means you need a matching stub function in the .pyi file called spam likewise if you have classes you need to have a stub class of the same structure as the actual concrete class in the .py file this means that your if your code base is already python 2 and 3 compatible it won't stop running on python 2 in order to take advantage of type hinting in python 3 it also if you do your unit testing in such a way that your tests in the same directory as your main code base your test structure is going to be the same as your type hinting structure um basically the behavior is identical to sort of having c headers for example or um or in typescript those typescript declaration files so it's no worse than other languages you can put the type hints in the same file if you want but you don't have to once you run your code in python the type hints are effectively ignored um so from the point of view of running code it's like type erasure it doesn't affect the runtime um this is because doing type checking at runtime in python is would be terribly slow um but if you wanted to instrument your code such that you were verifying that everything that goes into every function everything that comes out is correct that might be a thing that you could do in the future once you have comprehensively type hinted code and i expect that this thing will happen in a few years so why should you care about type hinting in python this is not a thing that you've done for the last however long you have been developing python um why should you care about it now okay uh final audience participation time who here writes unit tests okay the rest of you don't put your hands up you can put your hands up because it's embarrassing if you don't unit test um who here who actually does unit test uh verifies that the that their code behaves absolutely correctly with every single wrong type of variable that goes into it you're lying um no i just use haskell have don't heckle during talks please especially not to say you use haskell that's even more embarrassing than not unit testing um so type hinting is an easy way to get comprehensive tests that make sure that everything that goes into your code and comes out of your code is behaving correctly you'll get more comprehensive test coverage for type matching from just writing a few type annotations and you'll ever write unit tests for if you use pylint this is just another linting phase before you do your commits um it's just another sanity check just like making sure your code is formatting compliant um has correct spelling and alphabetization and stuff like that um you no longer need to write separate documentation about what your parameters um what your parameters your function takes what they return uh you can automatically generate uh type verification documentation and you can test that that documentation is up to date if your documentation is wrong your tests will be failing at the same time perhaps most importantly if you are a person who uses an IDE um and Guido said this in his keynote um if you are expecting to get auto yeah autocomplete behavior uh out of your IDE you probably will not get it in python um they reckon that only about 50 to 60 percent of python statements can accurately have their type return types and parameter types inferred that means that if you're starting out with python 40 to 50 percent of the stuff that you write will not have accurate autocomplete in your IDE and if you're an IDE user coming from java or coming from dot net that is super important and you can't do that without in python at the moment type printing is going to get that up above 80 percent of of return statements so we're going to complete this talk with a discussion of duck typing python is very famous for it um writing in a duck type language means you can write code that feels completely natural but is very difficult to express formally using a type system um a good example of this in practice is the requests project and the developers of requests are on the record as saying that the stuff that is available in python three fives type printing will never be sufficient for requests um requests relies really heavily on on duck typing on sort of natural type checking so you're humans making sense of things rather than um automated type checking to verify that things are correct um in requests there's a parameter called files which lets you specify file names or content blobs or actual file like handles for things uh as well as htdp headers it may let you provide a single item it may let you provide a sequence of items it may let you take a dictionary mapping of items it gives you all of these options so that you don't have to do preprocessing on your data before you pass it into requests this type hint here is the shortest way of describing um that parameter in python in the python type hinting um format uh cori benfield who's in the audience wrote this um this is disgusting like there's there's no if if you read that you would not learn anything you could read the documentation and you would understand more than that would describe to you so they'll just use any and say go look at the documentation to get the right behavior and that is a completely valid thing to do projects like requests will be full of type hints like this one so you should not bother doing type assertions for those there's excellent documentation in requests the behavior of requests is opaque enough uh that those type hints would never be particularly useful to you so any is actually a really good type assertion because it says to the developer go look at the documentation now request itself makes no guarantees about what comes out of it but we as developers know the behavior of the apis we're consuming for example so we can make assertions ourselves about these libraries with weaker type constraints so here we have a uh an api we're going to hit an api that we know returns some sort of json thing um so we're going to say response.json out of the requests uh api and we happen to know that this looks like a dictionary so we're going to assert ourselves that this is going to come out as a dictionary then everything that uses our wrapper function will get type hints uh will get type checking so we're providing an extra assertion of the return type that's coming out of requests there um we we know that we can make this assertion therefore we make it and the rest of our code base gets that assertion so type hints aren't about making everything super specific and verifiable like java that's never going to fly in python because there's so much python code out there that just is not going to ever be type hinted that well but you can use type hints where they will help your code be more verifiable and i reckon you'll enjoy using them i've enjoyed using them with type script so it's not the end of the world stop being alarmist about it you don't have to use it if you don't want to it is not python 4 embedded in a single pep that's ridiculous and there are benefits to using it so if you want to get a feel for that in some code that you might already be writing type script is available it's open source at typescriptlang.org it's also available via npm and that is the end of this talk i think we have some time for questions one or two if anyone wants to not heckle is there any way to do this in python 2 is there a way to do this in python 2 um i understand that there is but it is not built into the language um the project that this is based on is called mypi and i have a sneaking suspicion that they are doing python 2 stuff with this but i am not entirely certain about that okay uh we have a response in the audience that says yes it works pretty easily with python 2 i think it's just done not using python features uh we have one over here can you provide those type interface definitions for third party code does it have to be in the same directory or no it does not you can provide your own um your own declarations i i i imagine it's pretty much the same as how it behaves as in typescript are there any other questions well in that case i hope you are far less confused about um type hints than you were when we started um thank you all for coming along


Hey, you! You're in Europe, or the UK, or Scandinavia, aren't you? I'm coming on tour! I have to do this dot-show. I'm coming on tour in Europe, in the UK, in May. This is the last leg of tour, so if you don't see it now, you're not seeing it ever. My dear boy Justin, the wonderful editor of the channel. Look at this wealth of comedy!  Okay, that was on my birthday. But Justin sent me a bunch of TikToks, and he said, Look at these. Bitch. And then he spat on me. And I said, All right, sorry, Justin.  I love this video. I know, you're not gonna see it at all. It's not a bane. You're not even a Nemo, it's only a scratch. You can get involved. It wasn't a zombie, frankly, I think. Frankly, I think just a real one. Yeah, okay. Little bit, baby. We all saw it, dude. I don't think I'm gonna transform. We saw it happen. This is absolutely how Donald Trump would react. It's not a bide. It's not a bide. I swear it's not a bide. I'm doing well. I'm doing ver- I'm doing the most well, actually. I can literally see you. I can literally see you in here. That's actually well embarrassing. I can see you f- I'm gonna- I'm not for ages. I'm boring. Boring. I'm so tired. I'm done for ages. I'm boring. Oh, no, I can't f-ck it up. What? I'm boring. I'm boring. Budget-friendly holiday. Gift guide for men under 30. That's me. I'm under 30. Forbes. Are you listening? Forbes. Forbes. I'm 30. You can choose 30 people a year to put in your little f-cking list. Why am I not on the list, Forbes? I'm under 30.  Let's go. Under $200 category. First up we have a big key.  Dude, I would be so excited if someone gave me a big key. There's two parts to this gift. One, you get a big key. Two, you get something that the big key unlocks. That's a bonus thing. And then you can say, There's a thing that the big key unlocks. Why don't you go find it? Over the th-over $3,000. From under $202,000, over $3,000. Next up, over the th-over $3,000. A creature. It's like a friend that you can hit.  Those are basically the only two things you- A friend you can hit. The creature. A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A This is me in that f-cking video where we tried to do construction. Been running because of Creator Clash. And sometimes I'll be running at night. A lot of times when I run, I also have shadowbox, and I'm just like trying to work on my breathing and stuff like that.  I'll be more tired So I'll be working harder, so it'll be more like a scream. I'll be like ah It's not good I should stop. Oh, no, is this like a raggedy and all what what is this?  Can you remember what game this is from?  I'm about to make the biggest decision of my life guys. I'm getting a new nickname I've never had one before and I think I finally picked a name that represents who I really am new year new me. Here it is Spike nice to meet you No bones for Foxy got some beef. I didn't use I just seen a little guy didn't you see where that went? Come on Preston.  He said We spent it would do that. All he does is when you pick him up.   That wasn't normal That was sick. Look at him Look at him. Well, those were some wonderful tiktoks that we saw. Thank you Justin for the tiktoks I appreciate the tiktoks. Thank you for the content. Hey, thank you guys so much for watching Let me know who's living in my ceilings Thanks


Hey what's up folks! In this project we're making 3D-printed heel clips for the Nike acronym Blazer Low's sneakers. We designed custom parts to fit new pixel LEDs in Adafruit Circuit Playground. These shoes have threaded inserts so you can easily attach 3D-printed props and accessories. Our rocket-inspired boosters are motion-activated so they'll light up and animate when you jump up or take a step. You can easily program LED animations using Microsoft's Mate Code. This is a block-based programming editor that we think is great for folks who are just getting started. The hardware simulator lets you test your code so you can write programs with just the Google Chrome browser. You can connect your board and upload your code over USB. Mate Code is free and supports other hardware so be sure to check it out. We think it's great for folks who are teaching in educational settings and workshops. You can get the parts to build this project, links are in the description. The parts are 3D-printed using PLA filament. The wires are routed through the boosters and attached to the heel clip using machine screws. Be sure to check out the learn guide for a full step-by-step tutorial on building this project. The NeoPixels are pressed fitted into covers that are screwed into the boosters making this a modular design. The Circuit Playground is fitted into a clear case and gets attached to the heel clip with the tripod screw adapter. Alligator clips make it easy to connect the NeoPixels to the large pads on the Circuit Playground. The battery is fitted into a protected case that is secured to the heel clip with additional machine screws. A JST extension cable makes it easy to plug directly into the Circuit Playground. The heel clip assembly is fitted over the sneaker with the mounting holes nicely lined up. Thumb screws make it nice and easy to secure them without having to use a screwdriver. We think it's really cool that Nike made shoes for 3D printing and they're a really cool platform for the DIY Maker community. We hope this inspires you to check out Adafruit's Circuit Playground with MakeCode. Thanks for watching and be sure to subscribe for more projects from Adafruit.


Hello and welcome to the Queensland Police Service Recruiting Seminar. My name is Constable Letitia Waylon. And I'm Senior Constable Ben Wilson. We're here today to take you through the steps of a police recruiting journey. The examples that we will give you today and the videos you will see are of personal experiences of real police officers. The information is given as a guide and everyone's recruiting story is always unique. The Queensland Police Service is committed to recruiting members of the community who can help us achieve our vision of Queensland, the safer state. The purpose of the service is that together we prevent, disrupt, respond and investigate. Hi, my name is Alicia Finnegan. I'm a Sergeant of Police. I currently work as a fingerprint expert for the Gold Coast Region. I joined the Queensland Police Service in 2006. I was 31 years old at the time. I did three years at Surfers Paradise and then I got on the since current course, which took about three to four months. Once that's finished, I became a senior crime officer on probation for 12 months. While attending most of the scenes, I'm working in conjunction with other specialized areas such as ballistic, scientific, I became really interested in fingerprints and the science behind fingerprints. I put in an application when I saw that they were asking for applicants that took about eight or nine months before I got shortlisted. We do four years of intense course and on-the-job training as well as knowledge-based and book-based training. That incorporated attending major scenes. In the lab, you do things such as chemical enhancements using different chemicals on different surfaces. You do physical enhancement using powders and different methods. You also do use what we call the superglue chamber using the superglue to enhance certain materials. All that is also part of our knowledge base, so you also taught that information and how different chemicals react with different expressions from our bodies. We are also trained in court processes and how to give evidence as an expert. I get asked all the time, how can I become a police officer? And I usually say, speak to a police officer about it, what is required, the knowledge base that's required, the fitness base that's required and see whether or not it's something that you want to do and you're capable of doing because once you become a police officer, it doesn't just stop there. It is important you understand their values. Being a police officer means you uphold those values at all times. Upholding the law and providing assistance to the community, particularly in times of emergency, disaster and crisis. The four core values at the service are integrity, professionalism, community and respect and fairness. And to be successful police recruit candidate, you must reflect all these values and all your actions. Integrity is in everything we do. To be successful as a Queensland Police Service Officer, you must be honest, trustworthy and hold yourself and each other to a high standard. Although duties and jobs are challenging, you must remain professional in everything you do. You must support one another and lend a hand to your community to ensure the service responds to their needs as well as the needs of our policing community. And lastly, respect and fairness. You must treat one another and your community members as you would like to be treated with fairness, dignity and respect. There are multiple attributes that the policing recruiting panel look for during the recruiting process. It is important that you know that no one attribute, skill or experience will guarantee your success as a police recruit. Instead, the panel will be looking at your overall suitability for the role. Firstly, you must have the ability to communicate with authority and confidence. Give clear and concise information for different audiences and members of the community. Employ active listening skills and have the ability to produce well-structured written communication. Proficient communication skills as a police officer can not only be helpful, they can be vital. Given the wide variety of jobs you attend as an officer, you must have the ability to exercise your sound judgment, to analyse information, to identify problems and use your knowledge and skills to devise solutions to extremely difficult and time-crucial tasks. You must be client-focused, be able to quickly and appropriately respond to requests and be able to readily identify solutions to a problem. You must be able to demonstrate an understanding of your role, have the ability to work closely with your peers and offer help and advice when needed to achieve a common goal. To demonstrate personal responsibility, you must actively display initiative, motivation and commitment to your role as a member of the QPS and make sound decisions based upon ethical considerations and organisational integrity. You must use your skills and equipment appropriately, respond to operational situations and confidently justify your use of force and the decisions you make. To demonstrate resilience, you must maintain self-discipline, remain focused, controlled and confident and respond logically and decisively in difficult and operational situations. Finally, you must uphold the Queensland community's high expectations of the QPS by treating all members of the community with dignity and respect at all times. Much of a police officer's work requires the ability to relate to those going through incredible hardships and showing compassion while still remaining professional. You'll find yourself inserted into the most tragic and chaotic moments of people's lives. Their worlds will be turned upside down and you will need to be a compassionate, strong, authority figure. If you have set your sights on joining the service, it is important for you to evaluate your specific traits and challenges and ensure you will be suitable for the role. Now more than ever, we need people who care about the job and their community. I've been policing for eight years now. I started off my career in Logan. However, I did transfer to the Gold Coast, which I worked in Surface Paradise Police Station. I then worked on getting a position in a community-based role, which is what I'm doing now. I currently work for Project Booyah, which is a police mentoring program for disengaged kids. I'm the police Gold Coast coordinator. I became really passionate about that when I became a mother. I have two children. I feel like every day that I go to work, I make a change and I challenge those kids to see the world in a different point of view. These kids just need communication. They need relationship. They need connection. And that's something because a police officer, I'm proud to give them. Community policing is something that I feel like I'm fill my cup every day. I go to work and I'm happy to be there. And the kids, they just love being a part of Project Booyah. It is important to remember when applying that you're applying to become a Queensland police service officer, not a Brisbane officer, a Mackay officer or a Cairns officer. You must be willing to serve anywhere across the state. This includes metropolitan or large or small cities, coastal areas, rural towns and remote communities. Queensland police officers protect and serve approximately five million people with 12,000 officers covering the entire state. I myself am in my sixth year of service at the moment. So far in my first year I went to Mackay so I experienced a bit of regional policing there. I then transferred up north to Kerwin Station in Townsville. So I spent about five years at Townsville substantially but during that period of time I've relieved at Greenvale Station, which is a one-man station in a very remote area, about two and a half hours from any kind of backup. The closest station to there is Charterstown Station. So in this role as a Queensland police service officer, you may be sent anywhere across the state for a multitude of reasons. The service obviously needs to react to anything that may be occurring in a community. So at any time you may be directed or deployed to areas across the entire state of Queensland. I've also been sent out to Manizer where I performed a couple of week service out there in response to some unrest a couple of years ago. I've also served in our criminal investigation branch for a short period of time. Our state intelligence branch is all kinds of sections of the service that you may find yourself working in, which is what makes this job so great in my opinion but you must be willing to serve anywhere that the service directs you to. So now let's look at the story of Senior Constable Chris Cronan working in the Mount Isa Criminal Investigation Branch. My name is Plain Clay Senior Constable Christopher Cronan from the Mount Isa Criminal Investigation Branch. I joined the police in 2010 as a general duties police officer. Took me approximately three years to get a appointed position as an investigator in the Criminal Investigation Branch. It's something that took a lot of work and I dedicated a lot of hours to. It wasn't something that just fell in my lap. Things that I look forward to in Mount Isa is obviously helping people and dealing with people and some of the ways that I do that is by removing narcotics and illicit substances off the street. That in turn has a massive community effect. Even the smallest amount of drugs that we are able to seize and remove can have a turn on the whole town for how it would be for that weekend. Mount Isa is one of the busiest, most exciting places I've ever worked. I thought Brisbane was busy and I was completely wrong. The opportunities that have been available to me up here in Mount Isa have been fantastic. You make friends for life out here. You're really jealous of family. As far as I've experienced, the communities are willing to work with us and it's very rewarding at the end of the day when you're able to help them with an issue and get them on their way. Difficult things obviously is being away from your family and getting back there can be testing, especially if there's a lot of things going on in the community.  The benefits are obviously they have the rural incentive payment. There's like Cadillia allowances as well. You can recruit your PDOs, have extra time off, extra leave. Because Mount Isa District covers at least 23% of Queensland, sometimes you go to work by plane or by boat, which is something that's very unique to the northern region. Joining the Queensland Police Service would provide someone with the opportunity of a lifetime to experience various parts of Queensland that not very many other people would get to go to. However, those opportunities don't just come freely. They need to be worked for. And my advice to anyone would be to just put your head down and keep working for it until you get it and take on the criticisms that you receive. Before you apply to become a police officer, have you checked that you meet all of our pre-entry requirements? To be eligible to apply to join the service, you must be at least 18 years old. You must have successfully completed year 12 or equivalent or have three years full-time paid employment or part-time equivalent. You must hold an open driver's license or a provisional driver's license with 12 months driving experience, automatic or manual. You must be an Australian citizen, hold permanent residency status or be a New Zealand citizen, holding a special category visa under the Migration Act 1958 in order to apply. You must be ready and able to demonstrate a reasonable degree of aerobic fitness and physical strength and be psychologically fit. And finally, you must have a very high standard of past behaviour and conduct, including traffic and or criminal history. We understand you may have had issues or prior offences in your past, which you may think will impact your application. If you do have a traffic or criminal history, you must disclose this information as a part of your integrity assessment for the recruiting panel to make a thorough assessment.  The recruiting process for police officers is very simple. There are eight stages to the recruiting process, and applicants must successfully complete each assessment to progress through to the next stage of the selection process. You are competing against other applicants, so the better that you perform in each criteria, the stronger your chances will be of selection. The first step is completing the Queensland Police Service Entrance Assessment. This assessment is delivered by the Australian Council for Educational Research on behalf of the QPS. This assessment is made up of five online separate components including literacy, numeracy, abstract reasoning, written assessment and digital literacy. You can prepare for this test by using the sample questions in your QPS candidate information booklet or purchase an online practice test when you book your assessment in. Your result will generally be available within two weeks of the exam date, and you will be notified via email once the results are released. From here, you can progress to the next step of the recruiting application process, or you may be required to reset the assessment. If you have any queries about this assessment, please visit qps.acer.org. If you successfully complete this assessment, you will progress to step two, and you will be invited to submit your online application. The third step is integrity vetting. As a service, we are committed to being an employer of choice by selecting people who display the attributes of integrity, fairness, equality, professionalism and accountability. The systematic integrity screening of police recruit applications is an important mechanism for the QPS to maintain and advance its organizational integrity. Step number four involves your written psychological assessment, panel interview and recruit entry fitness assessment. The psychological assessment process may include testing, an interview and further assessment. The purpose of this assessment is to evaluate whether the applicant has the necessary psychological traits to perform the inherent occupational requirements of a police officer. Interviews are conducted by a panel consisting of a police officer and a representative of the community. The interview is structured and you will be asked a series of questions based on the selection criteria to ensure a consistent form of assessment. The panel interview will provide you with an opportunity to demonstrate your merit for each selection criteria using your level of life experience, employment skills, community involvement, communication and interpersonal skills and overall your personal suitability for a policing career. You will also be required to complete a beat test around this time. As a police officer, it is imperative applicants maintain a healthy level of fitness. As part of step four, you will be required to undertake fitness tests designed to test your level of cardio fitness and physical strength. The physical components of recruit training and policing are very demanding and you will be expected to be in peak physical condition to commence the recruit selection process. You must be able to successfully complete the beat test to demonstrate you have the reasonable degree of aerobic fitness to complete the physical training associated with recruit training. There are several helpful websites or apps that can help you train for this test prior to applying to join the service. Step number five is your medical assessment. The QPS places a significant emphasis on physical competency due to the high level of physical demands placed on police officers in operational duties. You will be required to complete a full medical examination with a QPS-approved pre-employment medical service provider to progress through to the next step in an application process. There is no generalised blanket ban on any particular medical condition, physical disability or impairment. Each case is considered on its merits. Where necessary, advice from relevant medical specialists will be sought before an assessment is made about a candidate's ability to perform the operational duties of a police officer. If required, you may also need a face-to-face psychological interview around this time. Next, the QPS will do its background and reference checks to ensure you are a suitable candidate. And finally, if successful, you'll be invited to commence your police recruit training at two of our academies, based in Brisbane or Townsville. To ensure that your application process runs smoothly, please respond to all calls and emails from police recruiting and return all paperwork in a timely manner. The QPS conducts ongoing recruiting and accepts applicants throughout the whole year. We do not recruit for a particular intake. Once you start your training at the academy, you will spend eight months preparing to become a first-year constable. Recruits are equipped with knowledge of the law and learn the practical skills to professionally and confidently handle the range of policing duties during these eight months. For the 12 months following the academy, you will join the first-year constable program. This training pairs you with an experienced officer and under their guidance, you will gather knowledge and skills to become a professional and competent police officer. You will then commence general duties for three years and be on the front line of the QPS. Here, you will attend the same incidents as experienced officers. You'll perform all duties required of a police officer, including shift work, handovers, paperwork, and interviewing suspects. After these three years, you will be eligible to apply for promotions and specialist roles within the service. Securing a promotion or spot in our specialist units can be competitive. You must continue to work hard and prove yourself in the role to be a successful candidate for the roles you are aiming for. Our most popular roles you may consider are working towards R, child abuse investigator, covert and surveillance roles, dog squad handler, fingerprint specialist, homicide detective, prosecutor, or join our specialist emergency response team. If successful, we will provide you with the necessary training. Let's look at Senior Constable Jay Lilly's story, who, after a few knockbacks, made it into the dog squad. I'm Senior Constable Jay Lilly. I'm a dog handler for the Queensland Police and I'm attached to Brisbane Dog Squad. I joined the Queensland Police in 2009. I was 26 years old when I joined. My first six months on the road as a first year I spent at Petrie Police Station, I was then sent to Sandgate for my second six months. And from there I got my permanent posting at Stafford Police Station where I spent six years. I knew fairly early on in the job after my training that the dog squad is where I wanted to go, but I did know that it was a very competitive area. I had to put in a lot of hard work, you know, directing my career towards that. It took me six years. Then I finally got shortlisted and got an interview and missed out. About 12 months later, I had another interview where I succeeded. From there, I then had to go and compare psychometric testing and then you have to go on a 14 week dog course which is very physical and it looks a lot easier than actually what it is, I guess. Choosing the dog squad is a lifestyle choice. We have our dogs with us 24-7. They live at home with us. They become part of your family. The dog relies on you and we rely on the dog for the results. You've just got to learn to work your family life and your work life together. Then sometimes it works out really well and other times it can be really difficult. My family understand that I love my job and they've known right from the beginning that shift work may take me away at times, but they've also seen the good side of it, of what I do. Of a daytime, if I'm normally assist investigators with search warrants, where we're helping them to try to locate drugs that are hidden through good concealment methods. So we search houses, we search vehicles, we search nightclubs, we search people. Pretty much anywhere where you think a drug could be concealed, a drug dog will search. It's a great job. You get to experience many challenges and you also get to test yourself and really push yourself and conquer things I guess that you never thought that you would do. You've got to be motivated. Like I said, you've got to be willing to push yourself. You've got to go that extra mile and if you're motivated and you really want it, then you'll get there. In addition to an exciting policing career, the QPS also offers a generous salary, including during the recruit training program. We offer stable employment with a large variety of work and six weeks of recreational leave per year. We offer a 38-hour working week, paid overtime, the opportunity to access flexible working arrangements and paid parental and maternity leave. You will also have access to leave for the Australian Defence Force reserves, study and sporting commitments, have education, advancement opportunities, receive financial incentives for working remote areas and have many opportunities for career progression. Before applying to join the service, you need to ensure you are ready to commit to the Queensland Police Service in its entirety. That means you have prepared yourself emotionally, physically and mentally. The service expects your full-time commitment during the recruit program and a further 12 months as a first-year constable. We expect you adhere to the uniform guidelines and safe practices for the use of maintenance and accouchments and police equipment. You must be confident in carrying and using a range of tactical use force options to perform your duties and be willing to perform your duties in various and diverse locations throughout the state. You'll be required to undertake shift work and potentially attend dramatic incidents such as traffic crash fatalities or child abuse situations. We ask that you maintain your physical and emotional health and provide continuous dedication to fostering a positive organisational image of the service in the community. I hope you are considering the Queensland Police Service for your potential career. Although challenging, it is a very exciting and rewarding career choice which requires dedication, commitment and understanding. Thank you for taking the time today to listen. There's more information available on our website. Good luck. We look forward to seeing you soon.