In this video, I'm going to introduce you to the programming language called Python. Now there's the term language in there. It's much much like a spoken or written human language. Now you don't learn a new language by picking up a dictionary and memorizing all the words in the dictionary. You start using it and the same applies to Python. You've got to start using it. And we're going to start using it not too long from now. But there are a few basic concepts that you have to know about. So I'm going to take roughly about an hour and just introduce you to some of it. Now don't run away. Some of it's going to look difficult and some is a bit odd and strange and unfamiliar. You don't have to memorize anything and you don't have to understand everything in this hour. Look at some of the concepts. Try and just familiarize yourself with them. It actually is quite easy and it's quite a bit of fun. Open that Google Collab notebook and let's get started. And we are back here in Google Collab and Python in a few minutes. As you can see is the name of my notebook there. Remember you can just click on there and the name at least on the left side of this dot for the IP YNB file. You can just hop over there, change it whatever you like. It's clinical research. You see there the three logos. Don't worry. I'll show you how to do those logos before this course is over. But it's brought to you by myself, my research group at the University of Cape Town. Although this is for everyone it does follow the same chapters as we have in the Coursera course on understanding clinical research. So Python in a few minutes. Can it be done? So remember this is not learning the whole language. We're not sitting with a dictionary when we try to learn a new human spoken language and just learn all the words from the dictionary and then we can speak the language. No, we're going to start using it. And as we start using it, everything becomes clear and really relatively easy. But there are a few basic concepts that we have to understand I think before we go. So this is going to be very simple, simple introduction, but it's going to give you enough so that we can just start doing our statistical analysis once we get going. So let's just start with a simple arithmetic. Now we see on the right top side there my Python 3 Google Compute Engine back end is already running. We see the RAM and the disk size there versus what is available to us. So it's already running. So I've done a new code cell here, remember. So I'm just going to hover there and hit the code cell and we're going to start entering some text. And what I've done here is two space plus space two. I've seen this before two plus two. We know that it's four. Now remember our little hashtag symbol here when we write a line of code, that means tells Python everything after this, please ignore that. So we can write it here at the end of our code because the two plus two is still going to be seen by Python, it's still going to be executed, but everything after this hashtag is going to, both things are going to ignore that. So hold shift and enter as you can see there on a PC and Linux machine or return on a Mac to execute that cell. Remember we can also just hit this little play button. So we're going to play it and get sent to Google. Google's massive computers executes that for me and sends me the answer back in displays right here in my browser and the answer is four. And of course we needn't just stop with just the two numbers.  And of course the answer is going to be 14 subtraction just as easy. That's the minus symbol on a keyboard. And if I shift into that shift return that or hit the play button seven minus four three. We have looked at this before. Remember there is no multiplication symbol on a keyboard. Most keyboards that I'm aware of anyway. So we use the star symbol that shift and eight on most keyboards that we shift and eight on my keyboard. So if I want to do multiplication three times four, that is going to be 12 division is the fourth slash key again. There's no division symbol at least not the one that you learned about at school with a line in the dot on top of him in the bottom. There's nothing like that on the keyboard. So we use the forward slash key. So if I want to divide three into 14 and otherwise 14 divided by three 14 is the numerator above the line. So three is the denominator below the line 14 divide by three. And we're going to get this numeric representation of the solution. This is just a representation of the solution. This is not an exact solution. The exact solution is 14 over three. If you keep it in that fraction, that's the exact solution. But we get this numerical approximation. So it's going to truncate this long string of sixes with a seven, which means it's four and two thirds. And that if we would write 14 and two thirds, that would be the exact solution. But here we get this numerical approximation. We also get integer division. Remember, that's the whole number that you want to have. So that's that four that we can see there. So for that, I'm going to use two forward slash symbols. That means three goes into 14 four whole times. And there's going to be a bit of a remainder to get from three times force 12 to get to 14. There's a remainder of two and to get to that remainder. If you're interested, I'm just showing you some of these mathematical symbols. And that's the percentage. If we just use the percent symbol there, that's the remainder. So three times force 12 plus another two is 14. And there you get this whole whole concept of division right here inside of Python. Powers, sometimes we want to take something to the power again. There's no specific way to write powers. You know, the small little superscript there. So we just use in Python two asterisks, two little star symbols. So three star star two means three to the power two. And of course three times three is nine. And so if we execute that, we should see a nine. And indeed we see a nine. The order of execution, that is something that you must remember from school. Remember, some of these operators should be done before others. So multiplication and division come, they come before addition and subtraction. So if I were to write three plus four times two, it's not going to go from left to right. So it's not going to say three plus four, seven and seven times two is 14. That would not be right. Multiplication comes before addition here. So it's going to say four times two, which is eight. And if we add three to that, we should get 11. Let's see. And indeed we get 11. If my intention was to do the addition first, I just use as you did at school. We use the parentheses. So I'm saying the parentheses come before multiplication in that order of execution. So it's going to be three plus four, seven times two is 14. And I'm going to get the desired 14, which might have been my original intention. So here's a little exercise for you. Six plus four times two divided by 10. And my intention is to do the addition first. So if you want to pause the video, just do this little solution. If not, just I'm going to show it to you right now. So there's our solution. Remember, if I double click on that, it's three little hashtag symbols, meaning it's the third small from the larger size three down to down to get to the third one. And our hidden cells there, I can just toggle on that and it hides that for me and it opens it for me again. And there's the solution six plus four. I put that inside of a set of parentheses. So that gives me 10, then it's going to multiply by the two. But all of that is inside of another set of parentheses so that I can do this whole numerator first. And then I divide by the denominator, which is 10, and that should give me two. And it's a 2.0. So that's a floating point number. So in basic terms, that is the mathematics that would be on any calculator. Now, let's just, I'm going to say a quick word on functions. Most of what we do in Python is based on functions, these keywords that are built into the language. And if we import other modules or libraries, we get even more. And that's fantastic, that ecosystem. And that's how we're going to do our statistics, by the way. But everything is based on these functions. A function is something, it's a keyword is protected. So you can't use it to do anything else. You shouldn't, you can, but you shouldn't. It's built into that. And you're going to pass this function something, and it's going to do something with this input that you gave it. And remember, we call these inputs arguments, some other languages call them parameters. The in Python, we call them arguments. Suppose you can call them parameters if you wanted to. But we pass this to the function, the function knows, based on what you give it, the type of thing that you give it, and it'll do something to it. So here we have the print function, just as the single example, just to belabor the point and to tell you about these definitions like arguments. It's going to take an argument, and remember those arguments are always going to go inside of a set of parentheses. And in this case, this argument that I'm giving it as a certain type, and the print function likes that we give it a specific type.  We've heard this before. So I put that, this is easy, full stop, and I put that in single quotes. So that makes it a string. The type of that thing that I'm passing to print, the type of the argument is a string, and print likes those type of arguments, and it can do something. And the thing that it's going to do, it's going to print whatever I pass it to the screen. So there we can see this is easy. You see it's stripped away my quotation mark, my single quotes there. So it's just printing that string, that sentence back to the screen. So that's a function and an argument. So anyone I'm going to show you because, as I said, this is not reading the dictionary. You're going to hear the word dictionary again, by the way. But let's hang on before we get there. You're not reading a dictionary to learn the new language. I'm just telling you these are the concepts and we're going to see plenty of functions as we go. So I mentioned this thing that we passed this argument as a certain type of thing. It is a string. And certainly there are many data types inside of Python. And Python is fantastic in this way. It has many data types and it knows what to do with certain data types. And it is all about this thing. And we're going to call it a thing for now, this kind of thing that we're passing. And we have this function called type. And if we pass something to this function type, it's going to tell us what type this thing is that we passed to it. So this thing is an int, short for integer, a whole number. And if I write 3.0 and I take the type of that, for us human beings 3 and 3.0 is exactly the same thing, but for computers, now that's a floating point number, which is just another term for a decimal, a decimal, a value with decimal points. So 3.0, that's a floating point number. And remember I said something like put inside of quotation marks that is a string. Let's see what that's called str. That's the type of it. So if you're ever stuck in something that's not working for you because perhaps it is the wrong kind of type that you are passing, just look at the type function. Remember the type function is very quickly going to tell you what type of thing you are dealing with in this instance. We're dealing with a string because it's inside of these quotation marks. Now I mentioned before very quickly we're talking about libraries and modules, and that's a way for Python to extend itself. So the base of Python, we're standing at the three series of Python and 3.8 is out. When I recorded this, it contains a bunch of functions. But we want to do more than what is system-based Python, and so there's this whole community around Python that just develops extra libraries and that just adds a bunch of new functionality including functions to base Python. But we've got to import them first. By the way, as Python is an open source, it's free of charge, and people work on a free of charge. So people take some of the free time and develop these modules. Some people do work for companies that do support them in the development of these, but this is a fantastic community. Let's carry on. The math is a module or a library that we can add to Python and we add it by this import function. So you're going to see import quite a bit. So import math. Math is the name of the library.  So we just say import math. And when we do that, we have access to everything that's built inside of math. So one of the first things to look at is those weird and wonderful irrational numbers. The first one is Pi. You can see the beautiful Pi symbol there. If you want to know how I got that Pi symbol there, let me just lift the veil on that. It's a text cell and you see these little dollar symbols on either side. That is something called LaTeX. LaTeX, but call it LaTeX. And that is a type of code. And it is for type setting and very useful for mathematical type setting. So if we want to write mathematics on a document, if you want to send it for publication and you want nice mathematical symbols and formulas and equations and expressions in there, use LaTeX. So inside of Python, in the notebook here, we use these dollar symbols to indicate that we are going to now pass some LaTeX code. And Pi is a specific symbol inside of LaTeX. And these specific symbols have forward slashes in front of them. That's going to be forward slash Pi Pi. And if I execute that, we just get Pi. So that's not part of Python. I'm just showing you that that is possible. What we are interested in, of course, is the value of Python itself. So there's a Pi keyword inside of the math. And to get to these extra ones, because they're not part of Python itself, we have to reference the library or module from which it came. So we have to say math and then a dot. And then this new functionality that we want that is built inside of this library or module. So math dot Pi, I can't just say Pi. There's a way just to say Pi, but we won't get there yet. So I'm going to say math dot Pi. And there I see the value for Pi, at least to a couple of decimal places. Oilers number E, you might know it off, math dot E. None of these absolutely phenomenal irrational numbers, just like Pi, absolutely incredible values these. I just have to say math dot E and I get the representation of math dot E. Now we can also use the exponent function. EXP, you'll see that a lot more than you'll see the dot E there. Exponent is EXP. Exponent is the E itself. Oilers number and we're just raising it to the power one, because any number of mathematics that you raise to the number one just stays that number. So we're just saying exponent one E to the power one as I've written for you there. Let me just lift the veil on this little one because LaTeX is sometimes it's fun as E.  And that carrot means write a little superscript in LaTeX. So I get this very beautiful E to the power one there. If I say math dot EXP and I pass the argument one, I get exactly the same thing, the Oilers number. Trigonometric functions. We're not going to use them inside of data analysis much, but it's just math dot sine. S-I-N, the mathematical abbreviation that we always use for the sine function. And I want to do, as you can see here, sine of Pi over two. Let me just open that for you can see how that happens. So that's backslash S-I-N that tells LaTeX it's sine. And then I have the set of curly braces on the outside because I'm going to do something after the sine function and the forward slash means fractions. And then two sets of curly braces, the numerator and the denominator and the numerator. I'm putting a Pi in the denominator. I'm putting a two. This is all just fun. It's not part of Python, but I just want to show you it's fun. So it's math dot Pi for the Python. Remember division is the forward slash so Pi divided by two. And if I take the sine of that, of course, the sine of a half Pi is just one. These are done in radians, by the way, if you remember that from school, not in degrees. So cosine is math dot cos. And you see a very funny looking answer here, 6.123e negative 17. So that's 6.123 times 10 to the power negative 17. If you remember anything from scientific notation, that is all the zero comma all these zeros until the 17th place, we have a 6. So 0.00000. This is rounding errors that are made for very specific reasons and within very specific constraints. And because of these constraints, that we have this representation and you can just think of it 0.00000. That's basically zero. That's what Python is just trying to tell us there. It's just zero. That number is just zero. And Sydney, the cosine of 90 degrees Pi over 2 is just zero. Logarithms, don't worry about those too much. Sydney, those kind of round off errors never going to bother us in our statistical analysis. At least not what we're going to do here. So if I want to take the natural logarithm, if you remember what logarithms are, sometimes some schools dropped the teaching of logarithms at school. Some still have it. You might know what logarithms are. We certainly can deal with logarithms inside of statistics. It's much better, I suppose, today to use what we call nonparametric tests instead of these transformations, log transformations. If I'm talking weird words here, don't worry, we'll get to that. But I can take the natural logarithm of E and, of course, the logarithm just says whatever the base is, I'm dealing with a base of E here. It asks e to the power what gives me 1. Well, or gives me the natural logarithm E is just 1. e to the power 1. If I want the natural logarithm base 10, it's asking there, 10 to the power what gives me a thousand? Well, 10 to the power 3 gives me a thousand. So log base 10 of a thousand should be 3. Let's see. Oh, 3. It is indeed. Square root, just as simple. It's the sqrt function. So math.sqrt, and I pass a value of 256. So what's the square root of 256? It's 16.  Maybe it's also time for you to go get something to drink or whatever. This is going to be a slightly long video. I want the tangent of pi over 4. Okay. Let's have a look at the solution. I can just pull that down. And yes, I'm sure you would have guessed this is math.tan tan. And I'm doing math.pi divided by 4. And let's see what the tangent is of pi over 4. And you again see this numerical representation 0.9999. That's 1. Python is just trying to tell you that it's 1. Later on, we'll have a look at how to do a round off. So if I were to round that to two decimal places, of course, the answer was going to be 1. Good. Let's move on to something very, very important. So we've done with a basic calculator that you have on your phone and used to have in physical form. I still have a very fancy calculator in physical form. I just love the thing. I still love to use it. Computer algebra system calculator. Really still fun to use. Anyway, a computer variable. Now a computer variable, you can describe this in different ways. The way I want you to think about it is this name that you give to a space in your computer's memory.  You're going to give it a name. And you give it a name because then it sort of gets locked down and you can start putting stuff into it. Meaning you can assign things to live inside that piece of memory so that you can use it over and over again. And I've been using the term things all along. That is a bit cringe-worthy. What we actually put inside of that piece of memory is called an object. Everything is basically an object. Even these arguments that we pass as an object and what we get back as an object and these objects have types and we've looked at the types before. So the type of just three was integer. But that three was an object. More correctly, it was an instance of a class, of a certain class but not to worry about that. It's an object. And I place this object inside of this piece of physical memory in my computer and I give it a name. And that's much easier for us to do than writing the whole physical address in all sorts of weird and wonderful code in real computer speak. I just give it a name and that makes things very easy. Now there are some constraints to these names that you can give and it's best to start off a name with a lower case letter. No numbers, no uppercase letters, etc. You can use underscores, etc. But just start with a lower case number, stick to the basics. They make it very descriptive. You're going to view your code later on. So you want to give a variable name something that's descriptive. So just looking at the variable name tells you what you stored inside of it.  So my computer variable name is my variable name and you see I put underscores there because spaces would be illegal characters. We can't use illegal characters. Space and Python mean something very different or can mean something very different. So I have to concatenate my words together but my variable name is very descriptive to me. So if I say mean of group one and I just put these underscores in between that that's easy for me to, when I look at the code or give it to someone else, mean of group one or group A or mean of placebo group. If you name your variable something like that everyone knows what you're talking about. Now that's called snake case because we're just trading this little snake of words and then the less popular is camel case. We also teach languages like the Wolfram language which I also teach is uses camel case and that is where we put the words right up bunched up against each other. We save some typing by not having to put the underscores. We start with a lower case but every subsequent word is uppercase just so that when you look at it as a human being you can still kind of see that these are different words. So you would write my new variable like that but sitting in Python it's much more common to use the snake case and please, please don't use the Python functions the built-in things don't call your don't call your variable print or type. That is a reserved keyword a reserved function inside of Python so don't do that. So let's get a few done. Here I have my value my underscore value and I'm using this equal sign now the equal sign you have got to get used to that's called the assignment operator that's not the equal sign from school or from math definitely not and we're going to say my value equals 3 that actually reads create a piece of memory just allocate a piece of memory call it my underscore value and assign an object to it so I'm actually just putting this inside that bucket I'm physically assigning what is on the right-hand side to what is on the left-hand side of that assignment operator that's what it is an assignment operator so I'm saying pass this object 3.0 this object is of a certain type remember it is a float I'm going to pass this assign this float to this piece of my memory and I'm going to call this memory my underscore value and that my underscore value that is what we refer to as the computer as a computer variable to some name so let's assign that there we go and now there's a little piece of the memory inside Google's computer not mine that has this an instance of integer object and this object has a value 3.0 not integer I should say float and it lives inside of this piece of memory now I can just recall it by just using the name so if I just type my value it's going to go look in a piece of memory and whatever object is stored in there it's just going to give back to me and we can look at the type of my value just as we looked at the type of 3.0 and it says my value that computer variable is storing a float object lovely stuff now one more thing about this assignment operator that you must be aware of which is one of these quintessential things let's say that is what this video is all about I'm just showing you these basics we are attempting just to read some words in the dictionary but later on we're just going to use it and these things will really become second nature because they're really easy I'm going to create this computer variable just called I and I'm free to do that because that's not part of Python it's not nothing that is kept by Python I equals 0 so I'm using the term equal but that's not what it says it says assign whatever is on the right-hand side of me to what's on the left-hand side of me to the right-hand side of me is this integer 0 and this is a computer variable name so I'm assigning the 0 to I and I can just on the new line type I that's just recalling it and this is going to print 0 that's what is inside of it now I want to give I another value but it's kind of an update value and if you read that sentence I equals I plus 1 that line of code there this one here let me highlight it I equals I plus 1 this is increase the size I think it's a face size that makes no sense because in algebra if I take the I to the left-hand side that becomes I minus I and that's 0 equals 1 and that's nothing not true because remember as I said this is not an equal sign this is an assignment operator so what is on the right-hand side on the right-hand side is I plus 1 what is inside of I at the moment while the value 0 and if I add 1 to 0 I get 1 so on the right-hand side I actually have 1 and now I assign it to what's on the left-hand side on the left-hand side is the computer variable I it already holds something but that's not cast in stone in your computer you can rewrite over stuff over you can delete something and store another document delete a document create another document it's not there it's not chiseled in stone inside of the silicone no we can just write over it so remember on the right-hand side I now have 0 plus 1 that's 1 I'm assigning that new value that new object I'm assigning to the computer variable on the left-hand side which is I now I equals 1 okay so that's a beautiful example of this not being an equal sign and just to show you people are lazy and there's all these little shortcuts instead of writing I equals I plus 1 we also just write I plus equals 1 that's just short-handed you'll see it everywhere and I just wanted to show it to you in case you saw it somewhere and didn't know what it meant now that I plus equals 1 is the same as I equals I plus 1 I at the moment is holding a value 1 I add another 1 to that's 2 and now I'm reassigning that to I so I is now 2 as simple as that so another little exercise time for a break but you can certainly attempt this pause come back to the video whatever you want to do before we move on to list objects which is another one of those important things so we're going to create a computer I want you to create a computer available to hold the string this is easy recall the computer available and confirm that the computer available indeed holds an object that is a string off you go so here's the solution simple to all that open you could have given it any name you want I called it my underscore string that's descriptive enough for me and I'm assigning to it what is on the right hand side here and that is a string and it says this is easy full stop and so I now have that if I want to recall it I'll just use the variable name and it's going to return to me whatever is in there see now the quotation marks are still there I'm not using it inside of a print function although I could also now have said print parentheses my underscore string then I would have gotten back this is easy full stop and the type of my string if we were to do that it's just the string it's a string object STR now let's move on to objects collections and we first we're going to look at is list objects there so a list object is this something that we can do to store more than one element before we've just used single values 3 3.0 one single string this is easy full stop now we're passing more than one thing and we the first of the most common thing we have in Python is called a list and we indicate the fact there were more than one way to do it but the common way is just to use square brackets square brackets 1, 2, 3, 4, 5 so I'm passing 5 elements creating 5 elements I should say inside of these set of square brackets and that is just a list and there we go we have a list and if I just type it in like that this is going to return that list is not saved in memory under in a computer variable nothing it's just that now I needn't just stick to a bunch of integers there yeah I'm mixing to an integer a string and a floating point value all in the same and if I asked what is the type of this thing and I'm still using the square brackets there so what is the type of this whole thing not what's inside of it but the type of the whole thing it's a list object as simple as that so let's get a list object but this time around we're going to store it in a computer variable and very descriptive there very original I'm calling it my underscore list and I'm parsing these four I have these four elements inside of this list that I create and I assign that to the computer variable my list and let's recall my list and it's just that list object that we get back with elements 1 2 3 4 now another useful function is just the len function len and that's short for length so it'll tell me how many elements is inside of my object my object is a list the length knows what to do it's actually short-hand for something a bit deeper but that's not what we're interested in here it's a function len we passed it an argument that argument is this object and it's called my list and it counts there are four elements in the beautiful now we're going to get something called properties or attributes and methods so if we've created an object an object will have certain things about it and things you can do with it it's built into this object that you created or an instance of this class and one of them is a method and we get to that method by the dot notation so first I'm going to use my computer variable my list which now contains this list object and then I say dot count and count is now called a method but it looks very much like a function because it is really just a function behind the scenes so it's my underscore list dot count and because it's a function but we now call it a method because we're using the dot notation after an object we pass an argument to a day which is three and the count function is going to look at my list and it's just going to count how many times whatever I pass to it occurs in my list so I'm asking there how many times does the value three occur in my list and it just occurred once because remember the elements were one two three four so three just occurred once great stuff so that is a method and we're going to see a bunch of methods most of what we're going to do are going to be methods but just think of them as functions that you put at the end instead of at the front we'll see some attributes later or properties an attribute just tells you something about that object it's not it doesn't have a lot of parentheses and you don't pass arguments to it it's just some property that we can elicit and we'll have a look at some of those a bit later so let's create another one that's a bit more complex I'm creating my other list very original there and it's a list object and I have these three elements in it and two are integers and one is a string if we look at the types though it's going to look at the whole thing and just tell me that it is a list slightly more complex again lists as elements of a list and that's called a nested list so I've got this outside set of square brackets but inside I have two sets of square brackets and each of those are lists so this is a nested list I've got list inside of a list and that's completely allowed no problem there whatsoever if I now do pass my nested list which my computer variable that I created by the way if I pass that to the length function what are we going to get to because it takes it from the outside and it's seeing those nested lists inside of it as a single element so I've got these two nested lists inside of there are ways that you can drill down and we'll get to that now we can certainly add to a list remember my list was just one two three four if I want to add to the end of it I use the dot append and what is that append it is a method so it's like a function and I can pass an argument to it so I'm just saying append which is good English for saying just add something so I'm going to add a five to the end of it and if I now look at my list lo and behold the five is now going to be added to it just a fun little function is the pop function and the pop function is going to pop off an element and it's going to pop off the last element and when I just do it like this it is going to show me the element that is popping off removing it's the five because if I now look at my list again I am only back to the one two three four excellent now we come to indexing and slicing indexing is a very important part of python and if you can think of we have a large data set full of health care information we only want to extract certain patients or certain data we don't want all the data when we analyze it we are after making groups analyzing subgroups etc so slicing or indexing let's use the term indexing very important so let's just recall what is held in my other list and we see it was one two three one two three but the two was a string and the thing about a list is that every element inside of a list has an address just like you have an address and we can reference those addresses if we want to get to those values those the values of those elements one of the things about python that you must learn is that python starts counting at zero zero based so the first element is actually the zero with element it has an address of zero the second one has an address of one the third one has an address of two and it's all a bit of fun so the three addresses there would be address zero address one and address two for those three elements and we use addressing by square brackets as well this is nothing to do with a list to this now square brackets means something completely different because I write the computer variable there my other list there we go square bracket zero it says give me the value that is an address number zero and because python starts counting at one that's going to be the first element inside of my other list and that is the one so if we want that element I have to pass the address one and that is the string two beautiful now instead of listing all the ones that I want I can also create this little range and this range says give me values from zero to two now we've got to be very careful here see the colon symbol there that indicates to python that we are asking for a whole range of values and from the zero value the value there is exclusive that's one way to look at it so it's going to go up to address number two but it's not going to give me address number two the other way to look at it well let's just stick to this I think that's the easiest way to have a look at it so it's actually going to be zero and one the two is not included the zero and one the zero element and the first element in our little list my other list it was the one and the string two so you can ask for this range I don't want you to try and memorize this now I just want for you to be aware of the fact that this exists and as we start using it you'll see how much sense it makes and actually how easy it is to use there's a little short hand that I want you to know about and that's the minus one that just indicates give me the minus one means the end element now it's easy to see here because we've only got three elements here but if you have an enormous data set you just want the last value it's very easy not to have to then know what its address is just type minus one and that's going to give you the last one inside of the list now remember my nested list it had two nested elements in it and so we can use these two sets of square brackets so the first one says give me the first the first element one with an address of one that means it was the second nested list and then give me the first value or the zero with the value in that so if I scroll back up to my nested list well what we can do let's just recall it here so I'm going to insert a new code cell I'm going to leave myself a comment to say recall recall my nested list and then just type my nested list there we go and if we recall it was a nested list of two so the first one the one two three was the zero and the first was the three four five so I'm saying give me that second one the three four five and in that the first element which was the three as simple as that now we can also use indexing to change the values so I'm saying the last one change it to four please remember I said it's not chiseled in silicone stone we can change the values and now the last one is one two four dot oh and you see I passed a little dot there I don't have to put the zero in python I can just say four dot it's exactly the same thing but now I've changed that value one other thing I want you to be aware of is the double colons and that just says up to number two but two again is excluded so let's say start at the beginning and give me up to two but exclude two so that's the the one the one in the four as we've rewritten my other list now for the other way around one till so that's going to give me the second element till the last element the two and the four great stuff an exercise that I want you to do is the following create a list with ten elements from zero to nine if you can look it up there's a very easy way to do that you don't have to type all the numbers but for now we're going to type all those numbers use indexing to print the first five elements of the list and use anything to print every second element now that I haven't shown you but maybe you can figure it out let's have a look at the solution so there's the solution my list and I've had to type all of them there as I said there's an easier way how to do that if I want the first five that's going to be zero to six remember because the six was excluded and the one I didn't show you if you wanted to look it up you would know how to do this but here's the solution you can use another colon and that colon is going to be two in this instance because it says start at zero and skip give me every second one and that's as simple as that now I'm going to get the zero the two the four the six and the eight now that was lists I've introduced you to lists and we are going to see lists again let's move on to tuples or tuples which way you want to pronounce it perhaps tuple because two sounds like tuple and it sounds like two but tuples are actually n tuples in where n stands for any number you want you get a three tuple and a four tuple that will be four elements anyway here we are creating a three tuple or then a tuple and what we tell python that it is a tuple or tuple by putting it inside of parentheses so here we have three five and the string two and there we go three five and two now these certainly have addresses but the beautiful thing about tuple is the fact that I can give each of those elements a name a computer variable name so I'm going to say one comma two comma three because I'm just separating those three computer variables assign my tuple to those so every element inside there is now going to have this very descriptive computer variable name so if I were to type one it's going to give me back that first element which was three and the same for two was going to give me back the five and three was going to give me back the string two so I can name tuples now I can also pass tuples to the length and that's going to give me the length of three I can use the same indexing one thing I'm not showing you there but I really want to tell you about it tuples are cast in stone they are what we call immutable whereas lists are mutable we can change the values of the elements tuples are immutable you cannot change them when you've created them here that value is going to stay the way that it is and there's good reason to have this functionality now we're going to move on to dictionaries now dictionaries are going to become very useful to us we're going to use them in a slightly different way it's actually just going to be what underlies what we're going to use but it's good to know just what a dictionary is and where we had square brackets for lists we had these parentheses for tuples we have curly braces for dictionaries and dictionaries are just pairs of values the first one of the pair is the key or the name of it and the second one is the value so these are key value pairs and we separate the key and the value by this colon symbol so on the left is the key on the right is the value so my key is language and it's a string key and my value is python and it's also a string value comma is the next one my next key is version and it's a string and my value is 3 which is an integer then I have another string as a key and another string as a value and you can mix these up of any types or almost any types so there's my underscore dict for my dictionary and I can get to the keys by using the keys method remember the method is like a function so I'm just saying my dict my underscore dict dot keys and it's going to give me back the 3 keys that I had the language, the version and the environment if I want the values I use the dot values method and then I see the 3 if I want the whole item back I just get dict dot items and I get language python version 3 environment notebook as this list I mean that makes it a list and this makes it little tuples so key value pair actually little tuples now if I just want to get the value back of one of the keys so the value of the version key was 3 so I just have to save my underscore dict dot get and I'm going to get that back there is the alternative syntax remember I said right in the beginning there are other ways to create lists instead of using square brackets it was just short hand notation and certainly here you see with dictionaries that those curly braces were just short hand notation it underlies or it will behind the scenes convert it to this format dict function so everything is going to go inside of sort of parentheses open and closing parentheses there you can see them and what we are passing to dict is a list and it's a list of tuples and the tuples are the key value pair so that's actually what's happening behind the scenes just if you're interested in that and there we can see what we've created next up by the way remember you can always hit pause and come back this is a long video and I said it's just a few minutes in the end it's going to be a long few minutes but still it is just a few minutes sometimes we want to iterate over code just repeat the execution of that code a couple of times that becomes very useful and the two ways to loop through things are these two concepts that I'm going to show you in Python the for loop and the while loop so let's start with the for loop it really reads like English I'm going to use this little loop to loop and it reads 0 to 9 now inside of it let's just break it down a little bit before we get to the proper structure there's this range function it's a function inside of Python and I'm just passing one single value to it if I pass a single value to it it's going to start at 0 and go up in steps of 1 so it's going to be 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 it's going to stop at 9 it's not going to include 10 but if you think of it as 0 you are getting 10 elements back so that's the other way to think about this that indexing I said before but let's look at the whole for loop so it's a for i in a range 10 print i now for means we're going to loop through this i is just some placeholder I'm using now that's got nothing to do this is internal to the for loop so it's just a placeholder saying for i in range 10 and remember range 10 is going to create this list for me which is 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 it's going to loop over each of them and then print that one to the screen let me show you what it looks like it'll make more sense and then we get the 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 everyone is printed as we loop through those 10 elements so another way to make it very useful if I say my underscore other underscore list remember that was 1, 2 and 4 I'm going to loop through these elements in my other list and print them so for element now element is this some word I came up with is this some placeholder inside of this for loop outside of this for loop nothing is this this placeholder I could have put i there as well or some other word I'm saying for element in my other list print element I'm going to show you what it looks like before we get deeper into the construction of this for loop and there you see it's just going to loop through print element and each element is just a separate one as I say that element word has got nothing to do with it I could use any other word in there the loop counter basically but look at the structure of the for loop I'm saying for and in those are very important so I've got to have the for and I've got to have the in I've got to have some counter name just some name that you choose and then the thing that you that contains many things inside of it so my other list contains three it's a list and contains three things in it then I've got to put a colon and if you put that colon and hit enter you're going to get this white space here see that white space the P is not under the F that's very important in Python this is set by default the number of spaces it puts there in other IDEs that's development environments programs in which you can write the code you can set how many spaces are in white space this is all done by default here in our Google colab but it really means something to Python that white space I can't delete that white space then things are not going to work for us okay something else I could loop over are the keys in a dictionary that is something that has elements in it and I can always loop over elements so for key again that's just a word I chose for key in my the keys that's going to be the three keys print the key so that would be another way just to get back those three keys okay the while loop is going to execute something while something while something holds some constraint holds so I'm going to create a computer variable called I remember that has nothing to do with that name that I choose to loop over the I there so I'm going to create a computer variable I and I'm going to assign to it the integer 0 then I'm going to use the while loop and then some condition because I want to I'm going to keep on doing this loop until until this condition is no longer met so while I is less than 5 print I and then I equals I plus 1 so let me just show you what it looks like so 0 1 2 3 4 so at the beginning at 0 is 0 less than 5 yes it is again the colon and see the white space it will be created automatically for you print that I at that moment I is 0 so I'm printing 0 and then increment I by 1 so I is 0 add 1 2 it is 1 reassign it to I now I is 2 now we loop back is 2 less than 5 yes it is I can continue with this loop until I get to 5 is 5 less than 5 no it's not Python is going to execute that while loop and it's done it's done so here's your exercise I want you to loop over the following create a computer called my string and assign the string object this is easy full stop to it and then I want you to loop over each character in the string and print it to the screen but I want to give you some tips remember the range function we just said range 10 and then gave us 1 2 3 4 0 1 2 3 4 5 6 7 8 9 10 if I say put 2 numbers in there it's going to go from the 0 to the 5 but remember the 5 is not included so it's going to be 0 1 2 3 4 so if I pass that to the type function see that it's a range object but I can loop over this range object just as we did with the 10 so for n in range 0 to 5 print n that's going to print for me the 0 1 2 3 4 that's 5 elements but it you know it excludes that 5 because it starts counting at 0 so that's one tip for you the other tip for you is remember if I were to write the word Python inside of quotation marks it makes it a string I can index that string and so I can say give me the last one back that's just the n so the solution I want you to come up with must include these tips please so let's have a look at the solution so I'm going to create this string object my string let the computer variable my string pass to it assign to it whatever is on the right hand side on the right hand side is the string this is easy full stop we're able to hold the length the length of that so this is easy let's do this let's just type my string length as well so we can just see how much how many it counted my string length so if I do that I'm going to get 13 there's 13 characters inside of that string so now I can just loop over each of those remember when I showed you the negative 1 it means each of those characters outside of the string actually has its own little address so I can say for char char is just the word I came up with you can have used i again you could have said for i in range and that's 0 to my string length and remember that's 13 so it's going to go 0, 1, 2, 3, 4, 5, 6, 7, 8 12 up to 12 the 13 is excluded but if you start counting at 0 that's the 13 and then I want you to print my string and then address each of the characters so if you print that out we're going to say this is easy full stop with the spaces in between all of them great stuff now in the while loop we used conditional so I just want to show you something about conditionals and these are if and else is the one that I want to show you again this is just to show you that this exists if any of this lecture is just too strange for you don't worry about it as we start using it it's going to be easy if you learn a new language and I just take some random value or word I should say from the dictionary it doesn't make sense and until you've used it a couple of times it's difficult so this is just introducing you to some concepts so I'm going to create a computer variable called i and I'm going to assign the integer 23 to it and now I have this if else concept going on here so the if i is less than 20 colon because if I hit enter I'm going to get this white space it means something to python so it's going to look at this conditional is i less than 23 what is i it's 23 is 23 less than 20 no it's not under those circumstances what comes here will be ignored and then it'll jump to the else statement and this else if I hit enter here I'm going to get that white space so I can't start typing else there you physically have to remove that white space because the E and the I the E and the I the E of else and the I of if have to be they have to be right under each other so if i is less than 20 print smaller than 20 else colon so that there's white space very important to look at the structure come back to it and look at it often print equal to or greater than 20 so indeed that is what is going to happen equal to or greater than 20 that smaller than 20 was not going to execute because the conditional was false 23 is not less than 20 now you can keep on with these you can add more conditionals as you go and in between we put in this L if it's short for other languages which use the full else if but in python it's just L if so let's make a equal to 2 assign 2 to the computer variable a we assign 1 to the computer variable b now I'm going to say if b is greater than a colon print b is greater than a do you think that's going to happen is one greater than 2 no L if a equal equal b now that's a new conditional we've never seen that one before so the double equal symbol there that is a conditional it says is what is on the right hand side to me equal to what is on the left hand side of me and it returns a true or false all these conditionals return Boolean values we haven't discussed those but it says true or false so is on whatever is on the left of me 2 equal to what's on the right of me 1 says 2 no it's not but if it was is what's going to print a and b I equal and then in the end of all of these things fail you know do something else and that is print a is greater than b is 2 greater than 1 yes it is I guess which one is going to be printed to the screen a is greater than b and it's a beautiful very simple example for you to figure out how if L if an L statements work so an exercise for you it's a computer and I've put in example exercise there for you because these last two things I just want to make some something fun it's a famous computer task and if people go for interviews they might be asked just to create this just to check if they understand the language and but it's a fun little thing so it's a task we're going to say take the numbers 0 through 21 in this case and for each number if it is divisible by the integer say 3 and divisible means there's no remainder it'll go into it completely then print the word foo f o o and if it's if it's not if there's a remainder print bar and this is the way one way to go about it I'm just showing you one way to go about it for I in range 22 so that's going to be 0 1 2 3 4 5 up till 21 which is exactly what we want if I percentage 3 equals equals 0 so remember the percentage means that I just want to just want a remainder and then something is divisible by the remainder is going to be 0 so it's going to start at 0 and it's going to say is 0 divided by 3 does that have a remainder of 0 if so print I that number that we are at the moment and and then print foo now you've seen something new with a print function here as well I can concatenate stuff inside of the print function so here I'm printing the value that's an I at the moment it'll start at 0 then go to 2 then go to 3 then go to 4 and then a comma and then a string so I can with commas I can concatenate lots of things in a string and I'm concatenating it by a little space a colon symbol another space and foo just so the prints nicely to the screen and if the remainder is not 0 so if it's not divisible print the value and then print bar so it's going to run down all of those and just do the foo bar thing for us so foo remember we said if it has a remainder of 0 and otherwise bar so 0 1 or 2 won't be 3 is divisible by 3 with a remainder of 0 6 is divisible by 3 9 is divisible by 3 so simple as that the last little fun thing I just want to show you something called list comprehension and list comprehension is like a little foo loop but we put it inside our square brackets this is the sum advanced stuff just some fun for you to have if you're interested in it my underscore set equals i for i in range 51 so i for i in range 51 inside of square brackets that's going to be a list object for me and I'm just going to print those first 5 elements 0 1 2 3 and 4 I could say i for i in my set if i percentage 3 equals equals 0 now I'm getting the same sort of thing in a much shorter sentence now if you look at that that is a bit advanced that is like some hectic syntax or grammar inside of spoken human language but I want you to look at and see if you can dissect what is going on there and as I'm just showing you this for for a bit of fun and let's do the following print the square of the number if it is divisible by 5 so i squared for i in my set if i percentage 5 equals equals 0 that's how I would construct that so now it's going to print it's going to first select only the values that are divisible by 5 and then it's going to square each of them I hope you find that as interesting as I find it but as it's not part of this course I just want to show you some of the power of Python and how you can construct something very complex basically so take all these values see if they are divisible by 5 print them to the screen but square them at the same time that's a short line of code and once you get the hang of it it's actually quite easy so that's my couple of minutes introduction to Python again maybe I have thrown the dictionary at you but that's not the idea you don't have to remember any of this because it's only when we start using it that it starts making sense that it'll get into your head and you'll see just how easy it was for me just to write this little notebook it's from a long time of usage not from looking at it for the first time so don't despair all of this is easy and as we start using it to do what we actually here to do and let's do some statistical analysis on healthcare data you'll see just how easy all of this really is


Is that really a Katerina ban? I'm tilted right now dude. And this is bad too! Boys, what do I play? Boys, lads. Dude, I'm gonna play some Zerath, yes. Or some Zed. I'm a pretty decent Zed. Or Twisted Fate. Twisted Fate, yeah. I'm feeling some Twisted Fate right now. Let's go. I missed it. Ooh, look at the damage coming out from noticed. Okay. Whoa, dude. This note is getting so aggressive.  I'm flexing. Let's go. Get out of here. Yeah, that was all calculated. Whoa, dude. We can do this. Get him, boys. Are you kidding me? I'm so tilted. We got him, we got him, we got him. Oh. Maybe a triple, okay. Don't worry, I'm coming over. Just kidding, I'm not coming over. It's actually a good thing I did not go over because I would have died. Oh, wait.  Troll. Oh, rip. I messed up my flash. I'm bad. I'm so bad at this game. Get him, Sayon! Go, go, go. Wait team, hello. Oh my god, so low. Oh, I got it. Let's go. Get out. This is my chance. Get him, Vayne. Oh my, the tilt. The tilt. Oh, I'm dead. Oh my god, that came out of nowhere.  Holy crap, Jax is doing it pretty well this game. Gotta save this tower. Oh my god, the damage. Let's go. I can't even buy... Nuked her.  Yeah, definitely a TF, man, after that one. That is TF, main, worthy.  This champ is not balanced, guys.  We did it, boys. We did it, boys. Run, Lee Sin. Run, oh. We did it, boys. This Lee Sin is so sick. Oh man. What was that Nami damage? Hello? Get out of here. Hello? Hello? I missed it for real, though. I keep missing it. We did it, boys. Oh my god, I'm living. Oh my god. Get him, boys.  Oh my god, that one shot.  Do you see this damage? Oh my god. Dude, TF is actually insane. Vayne, why are you frontlining? What is my team doing?  Oh my... Oh my god, is that him? Holy, that's him, boys. The TF main.  We have 20 seconds. We gotta kill Ivern. Kill him. Nice, got the assist. Let's go. That was such a good game. Do you have to... Think I should put you in the vid and call me a god? Oh man. Couldn't only be one god in this game. And that is TF.


What's going on everyone? Sam here with late in sports cards. We are ripping 2020-21 Panini Prison Basketball multi-packed cello four box break number 30 random team style. Just looking at your random results as always. You can find these under the results tab on the website as well as the link that's in chat. Rockies are raised. There you go. Good luck here guys. Let's do it. The cello packs first. Knock those out. Jonathan, you did pretty solid on the what's it called as well. Pretty solid on the NT break as well if I remember. I think you have the what the twins and the Rangers. So there's like a Joe Ryan RPA in there. A couple of Rangers hits. Glenn Otto true RPA, which is pretty solid. So not bad overall. Yeah, I was gonna say five out of the 32 hits isn't bad. But yeah, Flawless Acunia Soto was very cool. Very cool. Very in on that card as a whole. That's true. What'd you get yesterday with Matt? I remember you talking about something. I just forget what the card was. But I know I remember you saying you did really well in baseball yesterday. Oh, valiant, valiant. Nice. The valiant's cool dude. The patches they put in valiant's kind of wild. Silver Caliubre, green clay. Nice one there for the Warriors. Lamello Instant Impact. Touchdown Orlando. Let's go Mike. Money Mike. Making tens of cents back on the Orlando XFL team. Yeah, I got you, Jonathan. Silver Kobe White, green from all Murray. Silver, Charles Barkley. Daniel Churu. Niko Mannion Rookie. Silver is Nerlin's Noelle. And Patrick Williams, green rookie. Nice one there. Luis Matos Black. It's not bad actually. First one-on-one slab. Nice. Jalen Smith. Josh Green and Patrick Williams, base rookie for the... I would say there's a... like since it's a multi-year mixer, there's a couple of really good teams. Like the Magic are really good. Magic would probably be the top team you're hoping for. In terms of last year's stuff, there's a Silver Zeke Najee. A green, Joe Harris. Tyrell Terry. In terms of last year, the 21 stuff you're looking for, the Pistons, the Raptors, the Magic, the Thunder, the Cavaliers, and the Rockets. This year's stuff, you're looking for the Magic, the Thunder, the Rockets. You are looking for the Jazz, I would say, really good this year. The Kings are really good. Jamal Murray-Silver. Green, McCall Bridges. Sophomore Kobe White. Xavier Tillman and Peyton Prichard Rookie. A few other teams here and there as well. Yeah, Pacers are good. Pacers are very good. You have good call on that one. Yeah, Rockets and Magic, I would say, because they're really good in both years. I mean, the Pistons are really good in both years too, with Durenne, Ivy, and Kade, obviously. Duncan Robinson, Kevin Durant, Jemise Ramsey, and Lamello Rookie, nice one there. Yeah, not only that, Vaughn, but you also have Duarte last year too. Yeah, it's a very... two very good classes. Very good classes. Like very full-star heavy and very solid mid-tier guys as well, who could be studs in the future. Silver, Robert Woodard Rookie. Green, Dignio Galanari. Siddique Bay, Rodney Hood. Patrick Johnson. Yeah, very good rookie batches in both years for sure, Scott. There's a couple of really good ones. There's 10 or 15 really good teams too. That's a thing. On there we go. Bay, Taylor Maladon, DeMarco Carroll. Silver Alonzo. Green, Kobe White. Emergent, Green, Onyaka Okangu. Big zero, big double zero. Jayden McDaniels, Jayden Smith. A couple of rookies on the back as well. Stop flooding the chat with XFL banter. If it wasn't All-Star Saturday for Basketball and Mike, we would have the XFL on right now. That's the scary thing. Green, D-Wade. Yeah, I know this is brutal. This is the worst part. Like we just said, we have to get through the skills competition. Tennis Rodman. Green, Ibaka. There's an Ant-Man Rookie. So the Timberwolves. Jordan N'Wara. Good box dude. There's a really good box. Silver, AI. Green, Bam out of bio. Oh, for basketball. There's Tyrese Halber in. Nice one there. Dude, it's so weird that the unapollos are over. Doesn't that strange to you? It feels like it literally just started. It felt like we're literally feels like we're just drafting our fantasy teams here. I literally like distinctly remember everybody here doing the draft, you know. There's Jayden McDaniels, Red, White, and Blue for the Timberwolves. Who was last place? Rich, I think so, yeah. Rich and Donnie were just the bottom of the barrel. Oh, be Toppin' Rookie. Shocking. We tied, yeah, it's true. It's true. Very good point, you know. Kenyon Martin Jr., Red, White, and Blue Rookie for the Rockets. Dunk contest participants. Kenyon Martin Jr., that is. There's Daniel Turu for the Clips. Red, White, and Blue. Tyrese Halber in. How a god. Nice one there. The Kings. I have one of those. I might create it in our sub. Red, White, and Blue Halber. Series one. I gotta go for like Walmart or something tomorrow. Just get series one retail if they have it. No, I'm okay with those two. It's not a terrible dunk contest. There's just like no stars. Nico Manion. You know what I mean? There's no like superstar. It's not like Aaron Gordon, Zach Levine going at it again, you know. Gosh, it's Winston, Red, White, and Blue for the Wizards. I'll do it for box number one of the multi-sello and after this one. But I'm really excited for Mackinaclone too. I think Mackinaclone's gonna be super exciting in this. The interested to see, he is definitely someone who is gonna rock a throwback jersey. I'm interested to see who it would be as well. Team Jazz when the skills come. God, that's over. Yeah, that's why the Jazz were one of the teams. They did it last year. It was like the Cavs. Like it was Team Giannis, Team Rooks, and Team Cavs. They did the same thing. It was like last year, it was like Kade, Jalen Green, and Barnes I think were the rookies. I remember correctly. It's pretty solid overall, but... Yeah. Oh yeah, she might have been at the show today with Blaine. Potentially, I don't know if she was there too.  Do you mean for us a lot? Dame Silver, nice green IQ. Zeke Nashe. Yeah, Shade and Sharp would have been fun. He would have been fun to have in the contest too. It's too bad on that one. So, there's Lebron Colby Tribute, Jordan Nora Silver, Green Dilo, Harry Talbot, Cancer, Vernon Carey, and Cole Anthony Rookie. That's awesome though. Stockton was dude. That assist record might never get broken. James Wiseman. Oh yeah, IQ Rookie. Oh yeah. Lebron Colby Tribute again. The Karusho. Impossible to go through these without peeling them. Silver, Troy Brown, Green, Nico, Mannion Rookie, Jokic, Levine. Yeah, I miss the individual skills challenge. That's the only one that I'm not really a fan of is the skills challenge now. Carole, Badanovich, IQ, Ramsey, and there's a Lamello Rookie. I agree with that, Espen. I miss the the East versus West. I don't mind as much. I don't really, neck still hurts from Mark Eaton. RIP Mark Eaton, dude. That was a tragic story. Skyler Maze, Manuel Quickly on the Rookie as well. That's a base.  Do you remember that really tall guy on the Jazz? Like led the, I think he still might have the record for blocks per game in a year. Yeah, I was like five blocks a game or something. He like went on a bike ride and they just found them days later dead. It was wild. It was horrible. I don't know. I don't remember what happened. I just remember it being crazy, dude. It was like a bike accident. Unreal. Green Vernon Kerry. Yeah, I know. I don't remember the last time there was a Reggie Miller in a product. Might have been Revolution from 2016. Might have had a Reggie Miller at one point, but yeah, there's been like no, no Reggie autos and anything. He was good. He was, dude.  Love it. Little mellow, instant impact. Reggie was great. Reggie was awesome. He stole that Indon Pass and made a green choke. Oh yeah. Choked out. Spike Lee. Spike Lee. God. Iconic, dude. Green Isaiah Stewart. Oh yeah. I remember watching his, that 30 for 30 on him is awesome. Winning time. It's so good. His sister is not a man. Probably would have been better than him. Yeah. A mellow ball. There's a Devon Vasell emergent rookie for the Spurs. Red, white, blues. Nico Manion. Yeah, I kind of agree on that. Like the dunk contest, the three-point contest should be last. Yeah. Red, white, blue, tail, mellowed on. Always said that. Yeah. Especially now too with like how mad the dunk contest had become over the last, like five years. All right, Carol. What's up, Chris? There's a red, white, and blue Jada McDaniels. Battle rips and 21 contenders. Good luck, dude. Good luck. Let's know how you do. Yeah, Tatum's in it. Hero's in it. Daniel Atiru. Buddy Heald. Like some really good shooters in this. Kevin Herter. Markinin. Cassius Winston. Maurice. Got Halliburton's in it too. Julie's Randall. Like your boy. Not my boy. He is your boy. Not my boy. Watch, he's going to win it. Yep. All right, guys, on two bucks, number three. Got no recap on this unless we get an auto. Just so you guys do know, the little handheld vacuum. That actually would be not a bad idea for the foam dust. It's got like a little mini Roomba just going around all the time. Damer Buddy. Buddy Heald is always a good one. I'm going to go Kevin Herter. Former Hawke Kevin Herter. Red Velvet. That's what I want. To win the three point. Where are you going to take it? Out of here. Good lord. Get out. Silver Covington. Marquis Chris. Tiger's Halliburton Emergent. See, Randy's copying me. Randy copied my pick. Randy heard me say it. He's like, oh, former Hawke, he's got to win it. That's what Randy said. Yeah, Randy. Chris Lachua. And Obi-Toppin. Ain't no stopping. Obi-Toppin. Ain't no stopping. Obi-Toppin. Someone saved me. Shake Mil and Red, not Red. Green, Desmond Bain. Oh, yeah, those are close. Close colors, man. Come on. Patrick Williams. Silver, a nice one there for the bowls. Really, it's Randall Green. Green, it's the impact on the Yucca Oconwoo. Big double O. So it sounds like Aaron Rodgers is definitely not coming back to it. Yeah, probably not. Yeah, that looks like that too. It'll be shocked. Looks like that. That's all the way up. Allen Iverson, Silver. Lian Hayes, Rookie. Dames a good bet on that too, as always. Dames always in these, too. What do I like about them? There's a LeBron. Plus, that's been a Trailblazers fan. So that's true. It's got our Mays Green. It's the Impact Zion, second year. And Denny Abia. Slim Dunks, tomorrow. No, good on you. Tomorrow's the all-star game. There's Devon Vaselle, Rookie. Why are you seeing it tomorrow? What did it say? Saturday? Desmond said tomorrow at five. It's a slam dunk contest? Did they just cancel the slam dunk contest? I don't know that. I'm losing it over here. I'm gonna call Anthony Rookie. I don't think it's on Monday. I don't think it's on Monday. I think it's tomorrow. Sean Weil and now, Sean just said the slam dunks tomorrow. Sean Weil and now, are we losing Sean? Is that what that is all about? It could easily be happening. Green CJ LB for the Blazers. What this guy's talking about? This guy is on his own planet, apparently. Yeah, the famous day after slam dunk contest, Silver Josh Green. That's the classic format as they do it the day after. What? Yeah, Sean is trash at knowing when all-star weekend events happen. That shows you how exciting the- Well, quickly, Rookie. There's James Wiseman, red, white, and blue playoffs. Yeah, the end. I love watching playoffs. Playoff basketball is falling down. Is that a really out of force in the race? Yeah, sure. You're not like a huge fan of any team. There's Peyton Prichard, red, white, and blue. Like in Magic. Why are you not a heat fan?  I was like- Players? Jordan. Like, yeah, true, true. That's true. That's a good point.  Carolers Jr., Rookie. It's not like the Dolphins for you. Dolphins are the Red Sox. The Red Sox. The Red Sox. Really? Put the Red Sox over the- Right now, would you put the Red Sox as your favorite sports team? Over the Dolphins, or would you put the Dolphins? No, the Red Sox. Really? I did not know. I would have bet you were the Dolphins with the number one. I did not know that. You're pretty damn close, but I would say in here, because I love baseball, playin' baseball, I love baseball, playin' baseball. Right, that's true. CJ Alibi, red, white, and blue. I'll be self-pomped if her wins, dude. Oh, no, Tayden missed his money ball. Kyle Kuzma. There's a Onyaka Akangwu, red, white, and blue. There's RJ Hampton for the Nuggets. I'm one of the first to react. I'm watching the restrooms. This is your franchise guy, Vaughn? Yeah, those last couple of shots were big for Tayden. Big time shots for the N there. Not lucky enough to write 100%. That's your first, you mentioned your first whole rack. Yeah, I can't do that. I know. Please hit the money ball. Read. Stop, John. John. Let's go, Tayden. Yay. Let's do it, dude. I wouldn't hate if they N won. I don't know. There's nobody I'm really rooting in. Julius Randall, I wouldn't love to see you N, but I don't really care. Not that big of a deal. Then he won a skills comp once. The natural fetch-from-homes. Yeah, not bad, actually. Was it a hobby, or was it... I mean, most inconsistency you're possible for those first three racks. Do you rip hobby or retail, Chris? Silver Kauai, green Blake, Alvern's heating up right now. Big makes from the top of the key. Oh, retail singles, nice. Richard and Van Bleet. I know it's too much pressure knowing he's going against former hawk Kevin Herter. That really, I think that really rattled Tatum is knowing that former hawk, former Atlanta hawk legend. There's Tyrese Maxey. He didn't even know that he was in the NBA. James Wiseman. Kevin Herter, red velvet? Here's a big part of the reason the hawks made the Eastern Conference finals a few years ago. What's up, Sin? Sin. I think I got Kong Wu Emergent. Ace. I think it's U.E. I think you have it right, John. I think it's U.E. And there's a Tyrese Maxey base rookie. T-Book, Elijah Hughes. That was kind of a master class. Ringe, Maes Ramsey. Rookie for the game. Siddiq Bay Rookie. Jeez, Isaac Acura. Holy cow. That was plus 800 too. Here's a wicked good shooter. Buddy healed. Show these kids up, bird. Doka has a bouquet. Oh, I would love that. The Reebok took that last call and you walked away with it. Didn't even get in yet. Mergent Desmond Bain. Kearler's Jr. Like 10 parlays with Albertan. RJ Hampton Rookie. Somehow he's another two to four years older again. It genuinely feels like Buddy healed is like 45 years old, dude. He's not been in the NBA for that long. Who's the number one pick? Yeah, it's like sixth or something like that. The only reason he didn't go sooner is because he was a senior when he came out of college. He played at Oklahoma and he had a really good tournament. And then he was part of the DeMarcus Cousins trade. He gets drafted by the Pelicans and then traded halfway through his rookie year for DeMarcus Cousins. Green Lamello. Nice one there, Hornets. Congrats on that, Charlotte. Green Lamello. Take that. Nice little surprise in this last box here. What do you do? Especially with you.  Yeah. And then they give you- Green Carolous.  Oh, like the- Like in the middle of the- Yeah, it's like a four point shot or whatever. He comes your guy. He lit it up, dude. Full rack wherever you pick. Yeah, that's one of three. Yeah. Silver, Aaron Nessment. Green Oledipo. That's when Bane base. Three points for those starry shots. Gotcha. Yeesh. Missed everything from the corner. Kenyan Martin Jr. There we go. Now he's picking it up. He's lightening it up. Let's go get this ball. Yes. That's big. Obi Toppin on the red, white, and blue rookie. Yes, another big ball to hit. Oh, you hit the green one? Yeah. Oh, that's going to be me on Kenji right there. Oh, drain-o. Siyaka with the handheld camcorder. That's awesome. Payton Prichard. He didn't make one. So he won six, 18. Xavier Tillman. What a pick by Sean right there. Man, he can't come back to Miami no more. Zeke Najee, red, white, and blue. Like that. Justin Fields, rookie supernatural. That's not bad, though.  This is a red, white, and blue Robert Woodard rookie. Patrick Johnson. And last pack, base. That'll do it for the break, guys. Got no recap, no hits. So thank you again for filling this on up. Next up, we got our optic mixer.


Good morning. Welcome to the world of livestock systems and environment. I'm really pleased to have this opportunity to talk to you very briefly about why I love the livestock systems and environment program so much and why I want all of you to be as excited as I and the rest of the team are. So, why does it need the livestock systems and environment program? Basically, livestock and environment interactions are two way. Yeah, so we spend a lot of time with inalien understanding the quote-unquote environmental bads that livestock have on the environment. But we also need to understand that there's quite a lot of environmental change going on out in the world and that has implications back on livestock systems as well. Climate change being one of the most extreme examples. So, the mission of livestock systems and environment are three-fold. One is to provide good solid evidence on the environmental impact, both good and bad of livestock. Two is to place the environmental impacts in a context that recognizes the tremendous benefits of livestock. Three is to mitigate the impact of future global environmental change on livestock. Success for LSC, then, is the uptake of strategies for sustainable intensification of livestock production. In terms of the ill-resigned strategy, we are most relevant to the area of sustainable livestock systems and the goal of improving natural resource management and ecosystem services, but a systems approach is relevant to all five areas. What are the strengths of LSC? We have four themes, two of which are very strong and two of which offer opportunities for improvement. Adaptation and resilience is our first theme and I've just highlighted here some of our real successes. Iblee, the work on it from the technical consortium and the newest area exploring the governance dimensions of both adaptation and climate change and ongoing resilience. Second strong area is the environmental footprint of livestock. We really started to move this out of the world of models and into impact on the ground, both through the Mozangira Lab and efforts to use those models to really target opportunities to reduce the environmental footprint of livestock. This leads me to our third theme, enhancing ecosystem services and improving natural resource management. This is a new agenda that we've really been trying to grow. It's a very complex set of issues and I think you'll feel that we need to move beyond just mapping where there are ecosystem services to really identifying with stakeholders how to explicitly manage livestock systems to enhance the provision of beneficial ecosystem services. Our fourth area then is systems analysis for intensification. I have two images here which show that we do this both at the aggregate scale with livestock systems analysis and mapping and the household sale scale with targeting options for different households. But we run the risk here of doing lots of beautiful analysis that doesn't get used to take interventions to scale. So my last slide looks at prospects for collaboration. So one, I think that we need to do a better job of linking the analysis around ecosystem services to productivity concerns. We're starting to do this with understanding how improving productivity of livestock can lead to mitigation of greenhouse gas emissions but I think we need to broaden this and look at other kinds of ecosystem services as well. For example, provision of feed and fodder. Second, as I've just mentioned, we need to use the systems analysis to scale out for impact. Third, and perhaps I'm being provocative here, there's a lot of passion within the LSE program for working in dryland systems with extensive livestock production. I don't see that passion shared across the rest of Illry but there's a huge opportunity for growth. And then fourthly is to continue what I would call some nascent collaborations, particularly with animal biosciences and food safety and zoonoses, on really designing strategies to adapt livestock systems to climate change. But again, I would argue to be provocative and stimulate some comments that a lot of this passion remains within livestock systems and environment. So thank you very much for your attention and enjoy the rest of the IPM.


Hey everyone, welcome back to Las Vegas. This is theCUBE's live coverage of day one of Snowflake Summit 22, fourth annual. We're very happy to be here. A lot of people here, Lisa Martin with Dave Vellante. Dave, it's always great to be at these events with you, but man, this one is shot out of the cannon from day one. Data, data, data, data, data. That's what you heard of here first. We have two guests joining us next. Please welcome Matthew Scullion, who's an alumni of theCUBE, CEO and founder of Matillion, and Harbir Singh, chief data architect and global head of data engineering from Western Union. Welcome gentlemen. Thank you. Great to be here. We're going to unpack the Western Union story in a second, I love that. But Matthew, I wanted to start with you. Give the audience who might not be familiar with Matillion an overview, your vision, your differentiators, your joint value statement with Snowflake. Of course, well, first of all, thank you for having me on theCUBE again. Matillion's mission is to make the world's data useful. And we do that by providing a technology platform that allows our customers to load, transform, synchronize and orchestrate data on the Snowflake data cloud and on the cloud in general. We've been doing that for a number of years. We co-headquartered in the UK and the US, hence my daft accents. And we work with all sorts of companies, commercial scale, large enterprises, particularly including, of course, I'm delighted to say our friends at Western Union. So that's why we're here today. And we're going to talk about that in a second, but I want to understand what's new with the data integration platform from Matillion's perspective, lots of stuff coming out. Give us an overview. Yeah, of course, it's been a really busy year and it's great to be here at Snowflake Summit to be able to share some of what we've been working on. You know, the Matillion platform is all about making our customers as productive as possible in terms of time to value, insights on that, analytics, data science, AI projects, like get you to value faster. And so the more technology we can put in the platform and the easier we can make it to use, the better we can achieve that goal. So this year, we've shipped a product that we call MDL2.0, that's enterprise-focused, exquisitely easy to use, batch data pipelines so customers can load data even more simply into the Snowflake data cloud. Very excitingly, we've also launched Matillion CDC and so this is an industry-first cloud native right ahead log-based change data capture. I haven't come up with a shorter way of saying that but enterprise customers need this technology and it's been around for years but mostly pre-cloud technology that's been repurposed for the cloud and so Matillion has rebuilt that concept for the cloud and we launched that earlier this year. And of course, we've continued to build out the core Matillion ETL platform but today over 1,000 joint Snowflake Matillion customers use including Western Union, of course, we've been adding features that are such as universal connectivity and so a challenge that all data integration vendors have is having the right connectors for their source systems. Universal connectivity allows you to connect to any source system without writing code, point and click, we ship that as well so it's been a busy year. Exquisitely simple, sorry, I love that he said that and it also sounded great with your accent. I don't mind the accent. Thank you, excellent. Javier, talk about your role at Western Union and what you've seen in terms of the evolution of the data stack.  Driving an interesting synergy from what Matillion says, when data moves, money moves, that's what we do. When he moves the data, we move the money. That's the synergy between us and the organization that support us from data movement perspective. So what I've seen in the last few years is obviously a shift towards the cloud but within the cloud itself, obviously there's a lot of players as well and we as customers have always been wishing to have a smaller footprint of data so that the movement becomes a little lesser. Interestingly enough, in this conference, I've heard some very interesting stuff which kind of helping me to bring that footprint down to a manageable number, to be more governed, to be more effective in terms of delivering more end results for my customers as well. So Matillion has been a great partner for us from our cloud adoption perspective.  We have retail stores as well as our digital presence but people just couldn't go to the retail stores. So we had to find ways to accelerate our adoption, make sure our systems are scaling and making sure that we are delivering the same experience to our customers and that's where tools like Matillion came in and really, really partnered up with us to kind of bring it up to the level. So talk specifically about the stack evolution because I have this sort of theory that everybody talks about injecting data and machine intelligence and AI and machine learning into apps but the application development stack is like totally separate from the data analytics and the data pipeline stack and the database is somewhere over here as well. How is that evolving? Are those worlds coming together? Some part of those worlds are coming together but where I still see the difference is your heavy lifting will still happen on the data stack. You cannot have that heavy lifting on the app because once the app becomes heavy, you'll have trouble communicating with the organizations. You need to be as lean as possible in the front end and make sure things are curated, things are available on demand as soon as possible and that's why you see all these API-driven applications are doing really, really well because they are delivering those results back to the leaner applications much faster. So I'm a big proponent of, yes, it can be hybrid but majority of the heavy lifting still needs to happen down at the data layer which is where I think Snowflake plays a really good role as well. In APIs or the connective tissue? APIs connective, yes. Also I think in terms of the data stack there's another parallel that you can draw from applications, right? So technologies when they're new we tend to do things in a granular way. We write a lot of code, we do a lot of sticking of things together with plasters and sticky tape and it's the purview of high-end engineers and people enthusiastic about that to get started. Then the business starts to see the value in this stuff and we need to move a lot faster and technology solutions come in and this is what the data cloud is all about, right? The technology getting out of the way and allowing people to focus on higher order problems of innovating around analytics, data applications, AI, machine learning. You know, that's also where Matillion sits as well as other companies in this modern enterprise data stack as technology vendors are coming in allowing organizations to move faster and have higher levels of productivity. So I think that's a good parallel to application development. And just follow up on that. When you think about data prep and all the focus on data quality you've got a data team in the data pipeline, very specialized, maybe even hyper-specialized, data engineers, quality engineers, data quality engineers, data analysts, data scientists, but they serve a lot of different business lines. They don't necessarily have the business, they don't have the business context, typically. So it's kind of this back and forth. Do you see that changing in your organization or are the lines of business taking more responsibility for the data and addressing that problem?  That's the kind of thing. Because if I say it's good to be federated, it comes with its own flaws, but if I say if it's good to be decentralized, then I'm the guy to choke, right? And in my role, I'm the guy to choke. So I have selectively tried to be a pseudo-federated organization where I do have folks reporting into our organization where they sit close to the line of business because the business understands data better. We are working with them hand in glove. We have dedicated teams that support them. And our problem is we are also regional. We are in 200 countries, so the regional needs are very different than our US needs. The majority of the organizations that you probably end up talking to have a very US-focused, more than 50% of revenue is international. So we are dealing with people who are international. Their needs for data, their needs for quality, and their needs for the delivery of those analytics, and the data is completely different. And so we have to be a little bit more closer to the business than traditionally some organizations feel that they need to. Is there need for the underlying infrastructure and the operational details as diverse, or is that something that you bring standardizations to? So the best part about the cloud that happened to us is exactly that because at one point of time I had infrastructure in one country. I had another infrastructure sitting in another country. Regional teams making different decisions of bringing in different tools. Now I can standardize. I'll say, Machillion is our standard for doing ETL work if this is the use case. But then it gets deployed across the geographies because the cloud helps us, or the cloud platform helps us to manage it, sitting down here. I have three centers around the world, you know, Costa Rica, India and the US. I can manage 24-7 sitting here, no problem. So the underlying infrastructure is global, but the data needs are dealt with locally. Yep. One of the part of your question, I was just thinking, Harvey has super well positioned funds for you, which is around that business domain knowledge versus technical expertise. Because again, early in technology journeys, things tend to be very technical and therefore only high-end engineers can do it. But high-end engineers are scarce, right? And also, I mean, we survey hundreds of large enterprise customers and they tell us they spend two-thirds of their time doing stuff they don't really want to do, like reinventing the wheel, basic data movement and low-order staff. And so if you can make those people more productive and allow them to focus on higher value problems, but also bring pseudo-technical people into it, overall the business can go a lot faster and the way you do that is by making it easier. That's why Machillions are low-code, no-code platform. But Harvey and Western Union are doing this, right? I can't compete with AWS and Google to hire people. So I need to find people who are smart to figure the products that we have to make them work. I don't want them to spend time on infrastructure. I don't want them to spend time on trying to manage platforms. I want them to deliver the data, deliver the results to the business so that they can build and serve their customers better. So it's a little bit of a different approach, different mindset. I used to be in consulting for 17 years. I thought I knew it all, but it changed overnight when I owned all of these systems and I'm like, I need to be a little bit more smarter than this, I need to be more proactive and figure out what my business needs rather than what just from a technology needs. It's more what the business needs and how I can deliver that needs to them. So simple analogy, you know, I can build the best architecture in the world. It's going to cost me an arm and leg, but I can't drive it because the pipeline is not there. So I can have a Ferrari, but I can't drive it. It's still capped at 80 miles an hour. So rather than spending, rather than building one Ferrari, let me have 10 Toyota's or 10 Prius's which will go further along and do better for my customers. So how do you see this all? We heard about the data cloud. We hear about the marketplace, data products, now application development inside the data cloud. How do you see that affecting not so much the productivity of the data teams? I don't want to necessarily say, but the product, the value that customers like you can get out of data. So data is moving closer to the business. That's the value I see because you are injecting the business and you're injecting the application much more closer to the data because in the past, it was days and days of churning the data to actually deliver results. Now the data has moved much, much closer. So I have a much faster turnaround time. The business can adapt and actually react much, much faster. It took us like 16 to 30 days to deliver data for a marketing. Now I can turn it down in four hours. If I see something happening, I'll give you an example. The war in Ukraine happened. Let us shut down operations in Russia. Ukraine is cash swamp. There's no cash in Ukraine. We have cash. We rolled out campaign $0 money transfer to Ukraine within four hours of the war going on. That's the impact that we have. Massive impact. Especially with such a macro challenge going on in the world. Thank you so much for sharing the Matillion-Snowflake partnership story, how it's helping Western Union really transform into a data company. We love hearing stories of organizations that are 170 years old that have always really been technology focused but to see it come to life so quickly is pretty powerful guys. Thank you so much for your time. Thank you guys. Thank you. For Dave Vellante and our guests, I'm Lisa Martin. You're watching theCUBE's live coverage of Snowflake Summit 22, live from Las Vegas. Stick around, we'll be back after a short break.