Good morning everyone. So, what we covered yesterday was getting started with the interpreter, the basic language interpreter. We showed that there is a basic Python interpreter and the IPython interpreter. We showed you how to use both. Then we looked at the basic data types and operators that are available in Python. These are mainly numbers and sequences and the Boolean type. We looked at how we can use all of these and we also looked at certain common patterns in the sequence types. Then we moved on to strings. We did strings in some detail and then we did conditionals which is basically the if, if, else loop conditional. Then we looked at loops which are the while loop and the for loop. Then we looked at input output. We looked at the print statement. We looked at some string formatting. We looked at raw input and how you can get up, you can present a prompt to a user and get back what they type. Then we looked at input and output through files. How do you read a file? How do you write to a file? Then we looked at how to create functions. So, in term period we solved a little problem of parsing a data file which had about 40,000 records. Those were processed and run and used in order to calculate the average marks obtained in mathematics in region B. Then we went on to functions and did functions in some amount of detail and we stopped with doing functions. So, the next topic will be tuples, dictionaries and sets. We will try and finish that, try to finish that in the next session. So, the next topic is tuples. Tuples are very similar to lists. The only difference when you construct a tuple is that you give it a parenthesis rather than a square bracket. And just like lists tuples can contain heterogeneous elements. The elements do not have to be all of the same type. So, I can have integers, floating point numbers, strings, so on and so forth. You could have other tuples. You can have lists inside a tuple and other kind of objects as well. Note that when you are assigning this to a variable, it is not always necessary to use a parenthesis. So, if you say a equals 1, 2, 3, a will become a tuple. However, if you are writing code, it probably makes it more explicit to somebody else if you actually put it in brackets. So, that people know that you are actually using a tuple. Now, accessing or indexing through a tuple is the same as any other sequence. Remember that tuples are also sequence types. So, you can use the similar indexing notation. Indices start with 0 and give it positive indices or give it a negative index based on all the discussions we had yesterday. You should be able to clearly follow what it does. Similarly with slicing. So, if you slice it, you will get a fresh tuple which represents whatever tuple that you have asked for. The only issue is that you have to keep in mind is that tuples are immutable, which means I cannot once I have defined and created the tuple, I cannot go back and change the values inside that. So, if I have a tuple of say 1 comma 2, let us switch to the interpreter. If I say t is 1 comma 2, I cannot set t of 0 is equal to 3 for example. It will give me an error at this point. Now, there are some interesting things that you can do with python thanks to something called tuple unpacking. Now, supposing I have two variables, I am trying to swap two variables. I have a and b, I want to swap a and b. So, normally the code to do that would be temp equals a, a equals b, b equals temp. This is the usual swapping variable approach that you would use in say c or something, but in python it is possible to do it this way instead. You can say a comma b equals b comma a. So, a lot more convenient to do especially because you do not have to deal with this temporary variable. What is happening here is this is also true when I am doing things like if you look at the interpreter, I can do x comma y equals 1 comma 2. What is happening here is something called tuple expansion. If I print x, x is 1 and y is 2 type of x is integer. So, essentially what happens is in python, it looks at the left hand side and the right hand side. They are both looking like tuples. It tries to assign one to the other. Now, obviously you have to make sure that the number of elements on both sides is the same. If not, python will not know which one to set to what. So, for example, if I did x comma y equals 1 comma 2 comma 3, this is not going to work. Why? Because there are only two elements on the left, which two go where is not obvious. There is no unambiguous unique way of doing this. So, it will raise an error. It will set too many values to unpack. I do not know how to deal with three values because on the left hand side there is only two values. However, if I did this, what would happen? Is this legal or not legal? This is legal because now type of x would be a tuple. So, what you have to keep in mind is when you are doing tuple expansion, things like this a comma b is b comma a, you have to make sure that the same number of arguments are there on the left side and the right. Same number of elements are there on the left side and the right side. You have to make sure that that is done. Note that you do not have to make any considerations on what the variables are. So, if a is 2.5 and b is hello, this will continue to work. It does not matter what the quantities are. It just matters that they have the same number of elements here on this side and that side. So, for example, this is exactly what is happening here. It is called tuple unpacking and packing. So, tuples that is pretty much all there is to it. What you have to realize? One thing you have to remember is, so supposing I will do a little bit of advanced concepts, let us switch to the interpreter. So, let us say I say t is equal to 1 comma 2 comma 3. Now, I cannot change t. So, if I have to do something, I have to really create another tuple. So, let us create this little interesting tuple where I create an empty list. So, those of you who are trying to take the test now, please stop. Class is going on. That was an attempt. We had spent more than half an hour trying to test and unfortunately, there were many problems for many people. Many people it worked. So, just forget about taking the test right now. We will come back to doing the test later. Please pay attention to the class right now. We will come back to the test. Do not worry about your test scores. This is only a dummy test, so that we are able to test whether the software works. It took us a lot of time to make sure we are able to get something working. We know that it works. There are some issues which we will sort out. Please ignore the test and do not send any chat messages on test. This is not working because it is probable that the test has been actually disabled. So, if you take the tuple that I have just created, empty list 2 comma 3, you basically now are in a position where I have. So, what is the first element of this tuple? tf0 is a list. Now, I cannot say tf0 is some one or something, but can I add elements to that tf0? Can I do tf0 dot append 1? The answer is yes, you can because I am not changing the tuple, but I am changing what is contained inside the tuple. That is tuple cannot help you there. So, now we print t. You see it is one. However, I still cannot do tf0 is equal to some one or something. No, that would not work. So, if you contain, if the tuple contains mutable objects inside it, you can continue to mutate those objects that are, that it holds. You cannot change it directly. You cannot change the contents of that tuple. That is what the tuple contains. Those objects can by themselves be changed, but you cannot tell the tuple to contain different objects. The tuple contains one set of objects and only one set of objects cannot be changed once it is constructed. So, you cannot, there is no tuple methods of, you cannot sort a tuple. So, for example, let us see what the methods there are. You can only count an index. Notice there are only two methods without underscores count an index. Two more useful tricks that are again not explicitly in the slides. The first is how do I convert say a tuple to a list and vice versa. Turns out that if I want to convert a tuple to a list, it is pretty straight forward. So, what is t? t is this. I want to convert this to a list, let us say. I can say l is list of t, converted to a list. Now, I want to convert this list to a tuple for whatever reason. So, l1 is list of, sorry, t1. I want to convert the list that I, back to a tuple. I can say t1 is tuple of l. Remember that it is doing a value comparison. These two tuples are possibly different objects. But the, the essentially a tuple is, because it is a fixed immutable quantity. If these two quantities are equal, it means they contain the same objects. Finally, one more thing that I think is worth exploring and understanding. So, let me have an element a. I define a to be the list 1 comma 2, b to be say the list 3 comma 4. Now, let us say t is equal to a comma b, print t. Now, what do you think would happen if I did a dot append? So, now if I did a dot append 3, what do you think should happen? Obviously, not an error. A is now this. What do you think t should be? So, before we answer it, let us think about what is happening. t originally was set, was created as a comma b. a was 1 comma 2, b is 3 comma 4. Both are lists. I can now change a, because a is a list. I have access to it. I can say a dot append. I have now made a as 3. So, if you go back to the discussion I had in some detail yesterday about objects, names, namespaces. You will know that when I say t is equal to a comma b, it means that this t is essentially containing the first element is an object whose name currently is a. a is again a name of this object 1 comma 2, this list object. So, now that I have changed the list object itself by appending, the tuple should also change. Correct? Why? Because this name that I have assigned inside here refers to an object and that object has been changed. Therefore, if I print t, I should see the changed values. So, please keep this in mind. This is the same idea as we had yesterday. I am just trying to reinforce the concept by explaining it once again. The idea is essentially that of namespaces basically in python in every scope or many of the scopes, when you define a variable, that variable is essentially a binding or a connection or a mapping between an object and that name and that letter or the word or that variable name. This mapping is what is happening. So, when I say a, python looks to see whether there is a mapping for that name, finds the corresponding object and presents that. So, when I say t is equal to a plus a comma b, it looks for a, finds the object, sticks a reference to that object inside this tuple in the first place, sticks a reference to the object referred to by b in that place. So, now if I change a, independent of changing the tuple, instead of doing t of 0 dot append. So, if I did this for example, t of 0 dot append, obviously t will change, but so will a because they are both referring to the same object. So, this should clear many of your doubts if you have at some point saying, what is this doing? You should always think back and say, it is a name mapped to a object. So, with that done, let us move on to dictionaries, which are fundamental data structure that is available in Python, it is built in. So, so far we have dealt with sequences, which are strings and all of these had elements by which you can access sequentially the elements of that sequence. That is, I would start at 0, then I could say 1, 2, 3. I cannot have an element with just two numbers and be able to call. So, for example, if I say list containing 1 comma 2, so let us say a, a of 50 is meaningless. Neither can I get the value at a of 50 nor can I set the value, which basically means the way in which you access the indices, the access the quantities is very predetermined. If I have five elements, indices can only be between 0 to 4 or minus 1 through minus 4, correct? No or minus 5, no other is possible. However, very often you want to create something like a mapping, which says for this name or for this number, this is the value without the need to have something before it or something after it, without the need for a sequential kind of storage. This is how it is done using dictionaries. So, the way you create a dictionary, let us start with creating an empty dictionary. So, empty is open parent, open, let me clear the screen, open curly brace, close curly brace. Now, this creates an empty dictionary. Dictionaries are mutable, which means unlike tuples, I can change them. So, here is another example of a dictionary. It says, I do not know if the slide is readable, it says JPG, it is in quotes, it is a string colon jpeg image, py colon python script. So, let us try a simple example. So, in this line, I have not yet interpreted this line. The left hand side is the variable ext, this curly brace implies that I am starting to create a dictionary. Now, this is called a key. What is on the left of this colon? It is called a key. So, for the key jpeg, the value is image. For the key text, the value is text 5. So, once I create it, I close the curly bracket, hit return and now, let us print this and see what it is. So, it says txt text file jpg jpeg image. So, this is now, let us see what is the type of this. It is called a dict or a dictionary. Notice that there is no ordering of these keys. I entered the keys here as jpg first txt next, but when I print it, it comes out as text jpg. So, do not worry about any ordering with these keys. The point is, I now have a mechanism by which I can store keys with some values. So, how do I access these? So, let us look at this ext open bracket jpg close bracket. I will repeat this print ext open square bracket, give it the key name close square bracket and that is jpeg image. So, if you do not print it, you can actually see it is the jpeg image. So, essentially the syntax is dictionary open bracket key close bracket. This is how you access an element of this dictionary and notice that it does not have to be 0 minus 1. The name that you access it through is through the key name. So, for example, if I say ext of 0, it will say sorry key error. I do not know of any key called 0. So, if you want to create a key like that, you say we will come to that in a little while. So, is it clear ext of jpg is this, ext of txt is text file. How did I create this? That is how I created it. But now supposing I want to add a new element, how do I do it? Very easy. I can say ext of cpp is c plus plus 5. Now look at ext, cpp, jpg text file. Now, if I want to access the value of cpp, now let us say I want to change. I do not like this text file or I want to say I want to make it jpeg capital image or something like that. So, I say ext of jpg is equal to jpeg image. I just change the case of this i which is illustrating how you can change it. Now supposing I want to say in addition to these keys, I want to have 0, no problem. I will say ext of 0 equals a thing and now I can say ext of 0 that will also work. But ext of 1, no way that is not going to work because there is no key called 1. ext of jpeg continues to work, everything else continues to work as before. So, now I do not want this 0 because it is not an extension. I want to remove it. To remove it, you do del ext of 0 that is gone. So, you can basically create new keys, delete keys, key value pairs and you can assign to an existing key and that modifies the values. Now, the nice thing about dictionaries is I can check for container ship with respect to keys. So, I can say cpp in ext that is true. It will not check for values because it is basically going to look for keys not for values. When I say something is there something inside a dictionary, it is going to look for the keys and not the values. Just keep that in mind. Now, there are several methods. So, dict is an object. So, let us see what are the methods. So, you can see that there is this clear. Notice all the methods, there are several with these double underscores. Forget them. Consider all of these other ones here, ones below that clear. These are all the methods that we have access to that we can use. One is clear copy from keys get. Get is interesting. So, let us look at get.  So, idea is this. Supposing I want to get something from a dictionary. So, if I say ext of f77, what will this give me? What should this give me? ext of f77, sorry, key error. So, it should give me a key error because there is no key called ext dot ext of f77 because ext has only cpp, jpg and txt. But supposing I say if there is no error, if there is an error, I want you to give me some default and not give me some error like this. Get will do that. So, if I say get f77 and give it a default value of say it would not give me an error, but it will return give me the default value. So, this is a convenient method. Let us look at the rest. There is something called has key. Using this you can check container ship essentially. There is something called items, iter items, iter keys, iter values, keys, pop, update and values. Out of these, two very commonly used methods are ext dot keys. This will give me a list of all of the keys that are available and this will give me a list of all values that are available in the same order. So, supposing I want to iterate over this dictionary, you look at the slides, you will see that here is the syntax. You can say for each in extension dot keys print each direct arrow extensions of each. So, let us try this simple example for key in ext dot keys print key comma ext. How do I get the value? That is all the values. I want to get specific value. Given a key, how do I get the value of that key? I just did it. So, give the brackets to the key. So, I say ext of key or if you want it in the format that has been given in the slides. Is this clear? However, you can be lazy and not have to do this at all because if you just did for key in ext, it will still work. By default, if you iterate over a dictionary, it will give you the keys. Is this clear? So, let us do some more. Now, we will have to concentrate on the shell. Just pay attention to the terminal. So, now, we have our ext. I now want very often you will find that you want to iterate over the elements. I showed you a simple example saying for key in ext print key ext very nice. Very often, you will find that you want not just the key, but in one shot you want the key and the item and the value. To do that, you can do for key comma value. By the way, though this key and value can be any names you choose. They are just variables in ext dot iter items. This is a special thing. So, for key comma value in ext dot iter items, print key. So, iter items basically iterates over every key value pair and returns them as a pair. So, let us see what it does. Actually, this one what it does is essentially does what items does. Items now returns a list of tuples. One for each key value pair. So, at the first iteration level, it will get cpp comma c plus plus 5. Now, this is a tuple. This side is also a tuple. So, what is done is tuple expansion. It will set these two to those two and set the key to cpp, the value to c plus plus 5. So, essentially it is doing the tuple expansion in a very convenient form for us. Is this clear? Therefore, this code works very conveniently. I do not have to now do ext of key. None of that needs to be done. So, let us explore a little more on ext dot. There is one more called ext dot pop. What pop, what does pop do for a list? It will remove the last element if you do not specify index. If not, it will remove the value at the specified index. So, for example, if I have l equals to 3, l dot pop will remove 3 from the list. Or I can say l dot pop, the index 0, it will pop out the first fellow or whichever you specify. Similarly, ext dot pop say cpp, but it also has an optional argument saying if the key is not found, return the default element. So, for example, now what is ext? It is cpp is gone. So, now if I say ext dot pop, cpp, it will give me an error. It will say key error, cpp is not found. But if I say no, no, if it is not there, you give me some some some other string or some other value. It gives me not found without giving error. It is kind of like get. That is it returns the same default instead of giving you an error. That is essentially what it does. So there are some other methods like there is update, which is a little more complicated. Essentially you can give a dictionary and other dictionary and ask this dictionary to update its key value pairs using that other dictionary. So, I would suggest that you experiment with these various methods of a dictionary on your own. By the way, so if you want to only iterate over the values of a dictionary, easy for v in ext dot values print v. This is only the values. So, if you want the values, you should do that. There is of course keys, which I have already shown you. So, only give me the keys. So, basically dictionaries are an extremely powerful, you may not realize how powerful they are. But very often they are the perfect solution for many problems. For example, if you are trying to create some kind of a simple internal database or you are trying to create a simple mapping internally for whatever programming purpose you need, a dictionary would be an ideal object to use. So, there is one important thing you need to remember when you are using dictionaries is that the keys generally avoid using mutable objects as keys. You can use anything as a key by the way. So, for example, you can use almost anything. Most anything can be used. So, I can say ext of 1 equals 2 1 3, no problem. This works. ext of 3.14 1592 equals 5. So, you can, the keys can be pretty much anything you want. You can even do this ext of 1 comma 2 equals also works. But do not try something like this ext of some mutable object. So, let us say d equals ext of d equals, it will tell you that dicts are unhashable. Therefore, I cannot do a mapping between this unhashable object and something else. In general, it is a good idea to not use something that is mutable as a dictionary key and very seldom do you actually need it. Another thing you could try, for example, is this is our ext. Now, let me define a function ext of f equals, that works. Similarly, I can do the reverse also works. So, now, if I say ext of f, tell me some function. ext of some function is a function and which I can call. So, it prints one. So, the advantage is I can store, I can use this for various purposes. So, supposing I want to, for this function that is the document. For this, this is the thing or you want to dispatch. If when this function is called, call that function. So, you say you have a list of strings and a list of corresponding function. Instead of maintaining two lists, you store them in a dictionary. So, there are a lot of patterns where dictionaries are like the ideal tool for your job. So, it is a good idea to master how to use dictionaries and use them effectively. So, we will give you some assignments over the course of the day to make sure you are able to use these dictionaries. So, with this I am covering finishing the dictionary part. There is a question about namespaces and someone wanting me to explain namespaces. So, maybe what I will do is, I will take this white board and explain to you on the white board what the. So, in python there is. So, you can imagine it like this. So, there are these objects, all the objects. So, for example, if I have a list of one, let us say I have 1.125 other objects and then I have some dictionary, some function. So, each of these is an object. So, if I take say this object, if I have a namespace, now my, if I call this A, this name A is now mapped to this object and it is kind of a many to one mapping. So, if I were now to write some python code and I say B equals A, essentially what happens is a new name B is created which maps to the same object contain. So, every time a variable is created some x is equal to 1. For example, let us and now if I say x equals 1.125, what happens is a new name x is created, I have a new name x which is bound to this object 1.125. So, and now if I create say an empty dictionary, this thing is mapped to that or if I define a function f, this happens and now if I say some f equals funk, essentially this f is a new mapping for the same object that is here. So, now let us say I have another function, I have some def g which accept some function and I do something with that function here and now if I call g with funk, what happens is in my interpreter here, when I call g of funk, this funk there is now a new binding, there is a new namespace here that is local inside this scope and this fellow will define a function which again points to the same object. So, essentially names in a namespace are bound to objects or they are mapped to some particular object. Therefore, if I did something like B is some tuple of say A comma B, then what happens inside this entire namespace here, A is a list is pointing to this, B is a dictionary that is pointing to this empty dictionary here and so now if I do A dot append 4, what will happen is t is essentially referring to the same object and therefore, we will see all of the changes. So, this is a high level understanding of namespaces is essentially if you want to summarize it in one line, names are bound to objects that is all and this is a central theme in Python, everywhere you see there is namespace means name bound to object, name bound to object. So, whenever you do these variable assignments, if you are calling a function you are passing do not get confused with pointers, these are not pointers, you are not passing pointers, there are no pointers in Python, there are only names that are bound to objects and new names can be constructed at will. Now, the only thing you may want to sort of an additional fact you may want to recall is when I do del of A, what that means is this name binding is broken. So, that means when I do del of A, this connection is lost, that A is no longer bound to that object. So, what should happen now to t? Will t be gone? No, because t has nothing to do with the name A, t has something to do with the object that A is referring to. Therefore, if I do del A, print t will still print will still give me 1, 2, 3 comma t. Again, because names are bound to objects and underneath they are all they are all using the same object that name has no sanctity, name can come, name can go, name can change, you do not care. The one thing you have to remember is if no one has a name for that object, the object is dead and it will be garbage collected, it will be destroyed essentially. Somebody who is unknown, unnamed, anything can happen to somebody like that and nobody will know. So, in python again, so there is a name that is bound, if that name goes out of scope. So, for example, I create a temporary variable some function here, after this function is executed that function variable is gone, that name space no longer exists, because that function is finished evaluating, anything defined in that function those names are all gone, but name space is no longer needed and the garbage collector will consume those objects. So, that is a brief elaboration of name spaces. I will get back to answering some questions before we move on to sets. Why having more precision in round 2.32? I already explained this. So, let us take simple example. This also depends on your python version. Different python versions seem to print things differently. So, let me take this one 3.1457. Now, when I print x, when I print it, it is essentially saying all of those other decimal places are useless. I am only printing the valid ones. Internally, it is doing something. When I actually type the value of it, it actually gives me the full decimal expansion. It is a 64 bit floating point number. As a result, it stores, it has that many bits, it is translating all of those bits into an equivalent decimal representation. You have to understand that with floating point numbers, many numbers cannot be represented exactly. There is no, for example, if I have a 2 bit number system, 2 bit number system, how many numbers can I express? If I have 2 bits, how many numbers can I express? Anyone can answer? How many integers, positive integers? Let us not worry about negative and positive. Positive non-zero integers, how many can I express? 2 to the power 2, correct? Each bit can be 1 or 0, 2 bits. So, I have 0, 1, 0, 1, 0, 1, 0, 1. So, there are 4 possibilities. I can encode every number, 4 numbers with this, one of which is 0. So, 0, 0 will be 0. Then you can have 1, 2 and 3. So, I can represent only 3 numbers with this. Now, supposing I have 8 bits, I am only looking at positive integers. So, I can represent 0 to 255. That is 2 to the power 8. Each bit has 2 possibilities, 8 such bits. So, I can have 2 to the power 8, possibility, combination. So, I can express 256 numbers, 0 to 255, I can express. If I have 64, I can express 2 to the power 64, which will be that many. But that is all. Remember that many numbers and all of these are represented in binary. So, if I take 1 by 7, what is 1 by 7? It is a never-ending fraction. So, I will have some positive fraction, some truncation that I will have to do beyond the point I cannot represent. Similarly, remember all of these numbers are binary. So, even if I say all numbers are going to be stored as 1 point, something, something, something, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 64 bits like that with some exponent. There are only some finite number of numbers that I can represent. Some numbers will not be, there is no exact representation in binary for that particular number. And therefore, there will be some small difference that you will see. What you should realize is that this difference exists is real, is there in your number system and you cannot run away from it. And when you print the value of such a number, if I take 1.0, it is fine, because 1 can be exactly represented. Why? What is 1? The bit 1, bit 1 with exponent 0 is 1, right. But if there are some numbers, for example, half, any power of 2 will be exactly represented. So, if I take 1.0 divided by 256, it is exact. There is no trailing 0, 0, 0, 0, 2, something, none of that. But what about 1 by 3? Gone. In this case, it keeps going. So, the difficulty is many numbers, you cannot, many fractional numbers, you cannot quite express exactly in the binary representation. Even if you think, oh, it is only two places. So, 2.3223, the binary representation in the floating point number system may not have an exact representation. And therefore, it will print you the nearest possible that it can do. So, when you get the answer, the answer may not be exactly what you have, which is why when you talk of floating point numbers, never do an exact comparison. For example, if you are expecting some value to be 0.3, do not ever do x is equal to 0.3.  Actually, you do not need any case, I will just show a conditional. So, let us say x is, so you are doing some floating point calculation. For example, x is 0.1. So, I do for i in range 3, x plus equals 0.1. Even though I added 0.1 3 times to x, what was x? x was 0.1. I will repeat my calculations. x is 0.1. Now, I am simply doing for i in range 2, x plus equals 0.1. Correct? 3 times 0.1 should be what? 0.3. Now, is x equal to 0.3? No. So, as we will say in Tamil, yengio idikide. Something is wrong, something is not fitting. So, what do you do? The answer is you never compare. If I did this, what is a b s of x minus 0.3? It will be the absolute value of the difference. Look at the value, it is 10 to the minus 17. So, there is some small 1 last bit there which is 1 or some few bits towards the end of that 64 bit decimal place that is 1. So, when you do the difference, it is not 0. Therefore, it cannot be 0. When you do the 0.1, cannot exactly represented, neither is 0.3 exactly what represented. So, the difficulty is I cannot do a comparison. Therefore, if I say this is 1, this is less than minus 14, yes. So, if I am saying 0.3 to the other number, the difference is 10 to the minus 14, do I care that the difference is significant? No. Essentially, they are still pointed. Therefore, when you do numerical calculations, always be wary of any code that is doing something equals some value. Be very careful when you are doing something like that and always use something like this condition which again brings us back to answering your question of why is there more precision? There is no more precision. A floating point number in python is 64 bits. If you are looking for something called decimals where you are able to express them as a finite precision point that you control, there is a module in python called decimal which we will consider later on and we look at that later. The next question is how to perform addition of variable number of arguments with same function? I am sorry I do not understand the question. Are you saying sum of 1, 2 you cannot do? You must do make it a sum of 1, 2 in the bracket. It has to be a list or are you asking how do you create a function with variable number of arguments? Is that the question? Can VITV repeat their question on the chat session? Are you asking how do you create variable arguments? So, python allows for variable arguments. These are not quite in these slides, but I will show you the answer. So, supposing I define a function f, if I want a variable number of positional arguments, I can give it this function signature, def f star args colon. This star args essentially will take any additional positional parameters that you specify and store them in a sequence or a tuple called args. So, let us just try this. Let us just print args. Simple function. So, if I do f of 1, 2, what do you think args will be? Args will be a tuple 1, 2. What if I do 1, 2, so everything that is in this star args will be accepted.  So, notice that anything that was additional was simply stored as this tuple args. However, if I do not specify anything additional, that tuple will be empty and if I do not specify x or y, it will be an error saying at least two arguments should be there. Now, there is an extension to this variable keyword arguments that is also relatively straight forward. You can say star args if you want. If you do not want, forget it. Star star keyword args. Again, the name that keyword args is not anything sacrosanct. This name keyword args is up to you. It is just a variable. I forgot the colon. Print. So, what do you think keyword args will be? Any guesses? Args, when I guess star args, it was a tuple. What do you think keyword args will be? If I have to use some basic built-in Python data structure that allows you to say x is equal to 1, y is equal to 2, what would you use? So, think about my question and then I will get back to your answer. The next question is, I want to see whoever asks me that question, I want you to answer this question for me. When I do def f star star keyword args, what am I expecting? I am expecting that I can pass arbitrary keyword arguments. What is the keyword argument? Greed, name equals word. This is a keyword argument. I can call it as name equals Guido, greet equals hey. So, I am essentially using keyword argument. I am saying this is the name, that is the value. So, very good. So, someone has answered to me that star star keyword args is a dictionary. Absolutely correct. Therefore, I can continue answering the question. So, now I can say let us call it. Notice that keyword args is a dictionary. Now, what if I had called this as to be an error? Because this function takes no positional arguments. It takes only keyword arguments. So, now using this, you can write fairly sophisticated code, something that takes arbitrary arguments, something that takes arbitrary keyword arguments. You can also mix and match. So, for example, I can do this. So, once again I will repeat what I have been saying all of yesterday. If you want to experiment with some of these things, just type out on the interpreter, play around, you will understand what is going on. It is not very difficult. Since we are on the topic of this functions calling with arbitrary arguments. Now, supposing I have a list and I want to call a function with the elements of that list as positional arguments. So, let us say I have def func x comma y comma z, simple function. I want to call it with the elements of a list. That is somehow programmatically I was given three arguments which are in a list. So, I say my args is, I now do not want to do. So, how will I call this function now? I can do funk of args of 0, args of 1, args of 2. Very boring, right? That works. It is very boring, painful code. Instead I can just do this. What it will do is it will take that function, take the sequence, expand it out into the number of arguments that are necessary, return it to Python and call that function. Similarly, with keyword arguments. So, if I have a dictionary, I say you call it as star star. So, you know how to now write a function that takes arbitrary keyword arguments. I know that I can call a known function with certain keyword arguments using a dictionary. So, you can do both this way and that way. Now, this is fairly advanced. So, today we will try to do some elements of advanced Python programming as well. So, if you have even some crazy question like this, I will be able to answer. But pay a little careful attention to this, what has been done so far. And the secret of doing lot of these things is to experiment and think. There is no escape to do not blindly type something and then Google the answer. It is not a good idea. You should be able to think about it and say, that is why I am trying to stress on things like namespaces, trying to stress on experiment, look at the error messages. All of those things are very important for you to do. Is there any command line argument in IPython? I am not clear as to what your question is. Are you saying, are there command line arguments to IPython? Yes, certainly there are. The way to find out is the standard way for any Linux tool. You do IPython minus minus help. It will tell you a lot of information. How do you find out all the objects in the namespace? In IPython, it is easy. You just do who? It will tell you the interactive namespaces empty. However, if you want to know how to do it with pure Python, there are two dictionaries that are available typically called locals and globals. Now, this is pretty deep stuff. If you go down to globals and locals, you can start doing nasty things. If you do not know what you are doing, I will not help you. Be very careful when you start mucking around with stuff like this. The difficulty is you can start doing a bunch of things and if you are not careful, you can get into big trouble. Big trouble as in your files and all will not get deleted. Just your Python session may go for a toss. So, be careful when you start playing around with things like this. But basically, the globals and locals dictionary gives you access to the current namespace and what is defined in it. So, you can see a lot of internal stuff that is available when you do that. But generally, inside the iPython session, who, percentage who, all percentage commands are basically iPython special commands. They are not available in normal Python. There is also who's. So, for example, if I say x is 1 and I say percentage who, I will get x. If I say who's, it will give me more information. It will tell me variable type and information. Convenient. So, if I define say f, it tells me f and x are defined. Who's will tell me f is a function? Now, if I want to remove this binding, I already explained in my namespace slides. I did it on the terminal and I wrote it down in this sheet of paper. The way you remove a name bound to an object. So, first thing is how do you delete any object of namespace? Question is wrong. You cannot delete anything in Python. You only remove bindings to namespace in the namespace. So, you say del x, x is gone. So, if you want to remove some binding, you just say del, that variable name, that name is gone. The thing to remember is as soon as there are no names bound to that object, the garbage collector internally in Python will clear it up for you. You do not have to worry too much about it. So, I think I have answered all outstanding questions up to this point. We will resume after a break in half an hour.


Today, I have the pleasure of speaking with Chris Reed of NeoMetals. How are you today, Chris? I'm very well, Tracy, yourself. Well, I'm great.  So let me just start by congratulating you on being up, what, 347% last year? Thank you very much. Yeah. I just have to correct that. There's probably one of the leaders in the junior Lithium market where we're not yet a producer, but looking forward to joining the ranks very soon. Well, yes. And thank you for clarifying that. And also, I'd like to congratulate you on rewarding your shareholders so you've just recently done a return to shareholders and an on-market share buyback. I'd love it if you'd start by telling our investor Intel audience how they'll be rewarded by being a shareholder at NeoMetals. Okay. Well, at NeoMetals, we've taken the opportunity and needed to sell down some equity to bring in China's leading Lithium producer, Gan Feng, as an off-tape partner and an equity partner in the project. So as we've sold down in two tranches so far, we've built up quite a good war chest. At the end of the month, it'll be about 68 million Australian dollars. Now, that's far in excess of what we need to retain, a prudent level of cash. So we are looking to return some of the cash to our shareholders. You don't want to give it or, you know, as we're coming into production, we want to give something that's potentially sustainable. So we're giving back two cents a share and then we are conducting an on-market buyback to sort of reduce the number of shares we've got on issue. So Chris, in addition to being a fantastic leader in the Lithium market right now, you were recently speaking at an event, actually it was our Technology Metal Summit, and you wrote that the stake is really in renewable energy storage, solar and wind when it comes to the Lithium market because there's all kinds of what do you call promoters out there right now. There's Lithium companies exploding left, right and center and I really love for you to comment further on that idea. Right, yeah, I think I said the stake was the renewable energy storage and Elon and the electric cars with the sizzle. In terms of the volume of Lithium, you know, we see the growth in the amount of Lithium battery or energy storage as a whole being really more driven from renewables as opposed to the electric car. Yes, the electric car it's got to compete against the more efficient fuel cars that we're getting now. You've got these small turbocharged diesel engines and they use a fraction of the fuel they used to. We still think electric and hybrids are very, very compelling. Certainly the Chinese committing to the electrification of transport and in a very short period of time going from perhaps a third of what the Americans produced to last year exceeding them and this year they could double or triple the electric car sales that the US do is very, very positive and it's caught the market in a short position. What we see is that as battery costs come down at the start of 2015 there are about 800 odd US dollars kilowatt hour of storage then after the power pack and the power wall announcement by Tesla it's down to 350 kilowatt hour for the residential US 250 kilowatt hour for the power pack which is the industrial 100 kilowatt hour storage pack. Each one of those packs is equivalent to more than a Tesla car. So the success of that launch was that they essentially took orders to fill the Gigafactory in two weeks. So the Gigafactory will have the demand there to take it at full production which is equivalent to 500,000 cars but we see that there's probably 100,000 worth of batteries coming out for cars the rest of it will be coming out for the power pack and the power wall and this phenomenon is not just limited to Tesla you know you drive the battery storage costs down to 250 bucks a kilowatt hour and you know you've bypassed the cost of the grid. I think Warren Buffett's NV Energy signed an agreement last year with First Solar in it for a 25 year solar battery array at a fully amortized cost of about 3.8 US cents a kilowatt hour. Now in Australia we pay probably 15 US cents a kilowatt hour so you know solar batteries and storage have got a far greater market than just the electric cars we believe I mean essentially the electric cars at this stage are for rich people. Think about what you know there's a billion people in Africa without reliable energy you can't ship them diesel and diesel generators but if you gave them a couple of panels and a battery you know then they're pretty much self-sufficient for power and that also goes for India where there's about 300 million people without reliable power and the government's committing $22 billion over the next couple years to fix that. Now when they were faced with taking telecommunications and telephone to the masses there they went mobile so think about this as mobile power you don't have to build big coal-fired power stations you don't have to build massive high-voltage transmission networks you know everyone is essentially energy independent so we see this as the biggest growth market in Lithium in terms of volume. Well speaking of growth market you had your most recent one of your most recent announcements was you made an off-take and equity investment with China's leading Lithium producer Ganpeng Lithium can you tell us more about this it sounds very exciting to me because they're the leading producer from China this sounds big yeah that's what's going on you know the market caps about you know three or four billion dollars depending on what the Shenzhen stock exchange is doing on on any one day they are the most diverse Lithium producer in China producing everything from Lithium metal, Lithium hydroxide, Lithium carbonate, buta Lithium which is used to stabilise rubber in car tyres and obviously the tyre industry in China is pretty big because it's the world's biggest automotive in market at the moment you know all the way through to pharmaceutical grade products so you know they are the fastest growing the most profitable company so we're very very proud to have them as a partner at Mount Marion you know we've signed a life of mine off-take with them we're currently doing a massive drill out with a view to increasing the resources and a new reserve around mid-year and hopefully we can consider a decision to increase production further from Mount Marion. So Chris we are delighted that you're going to be one of our prominent speakers so you'll be our lunch presenter during the clean tech and technology metals some of this is our fifth annual one and you know Jack Lipton is saying that you know we're going to be addressing the technology technology metals demand supply and demand in the clean tech revolution I just love to hear your thoughts on that. Yeah look I think it's got a super role to play. Lithium you know in everything from transport through to the renewable energy storage you know what it does you know it drives a lot of the other metals so you know lithium is only part of the battery it needs nickel cobalt manganese titanium it leads lots of other metals that we would call them transition metals to enhance the probability or the sorry the potential of the of the technology metals which is lithium you know they're very complimentary so you know it's it's good for everyone you know cheaper power, ergo means less costs and more projects can get built. Okay well Chris thank you so much for joining us today it was a pleasure to hear from you. Thank you very much Tracey you have a great night.


마지막으로 이 워크샵의 주인공은 정윤 조, 또한 한 명의 기관자들입니다. 호프의 모델의 미래의 대신에 대해 이야기하겠습니다. 어서 오세요. 저는 모든 걸 이미 다가오셨고, 제가 짧은 공연을 해보려 합니다. 그리고 또 좋은 것은 이 소식에 대한 중요한 것들은 이 소식은 지난주에 배웠던 것입니다. 그래서 저는 매우 편안합니다. 그래서 지난주에 배웠던 것입니다. 오케이? 그래서 저는 그래디언트에 대해 이야기할게요. 그래디언트에 대해 알아볼 수 있습니다. 작년에 배웠던 프로필스 메타입니다. 저희는 롯스 펑션의 옵젝티브 펑션이 있습니다. 그래디언트의 펑션은 그래디언트의 펑션을 사용합니다. 이 길을 따라서 왜 이 길을 따라서요? 사실 이 길은 첫번째 방법입니다. 이 롯스 펑션의 텔러의 펑션이 첫번째 방법입니다. 이 길을 따라서 세타, 티플러스 1, 마이너스 세타, 티는 이 길이 아무것도 없습니다. 이 길을 따라서 다음 롯스 펑션을 제거해야 할 것입니다. 이 롯스 펑션을 제거할 수 있습니다. 이 롯스 펑션을 제거할 수 있습니다. 이 롯스 펑션을 제거할 수 있습니다. 다음 롯스 펑션은 이 길을 따라서 세타, 티는 이 길을 따라서 롯스 펑션을 제거할 수 있습니다. 이 길을 제거할 수 있습니다. 이 길을 따라서 이 길을 따라서 다시 다시 돌아올 수 있습니다. 이 길을 따라서 세타, 티는 수 begins. 이게 도전일 것인가요? 이건 도전일. 이 길을 따라서 세타, 티는 원을 치 elektro시辭 screaming 이 대성의 주인공의 주인공의 주인공은 다른 주인공의 주인공을 포함하고 있습니다. 여기 보이죠, 해시안 메트리스입니다. 이건 해시안 메트리스의 롯스팅션을 제공하는 것입니다. 만약 이 공장을 소개합니다, 이 기술은 second-order method because this loss function I also have the Taylor expansion now up to the second-order. So if you optimize this with respect to theta t plus 1 then you get this equation, okay? So again, calculating this is computationally very expensive. So smart people developed to overcome this way, this method they developed the cosine Newton methods. So BFGS is one famous one and recently people use actually natural gradient in deep neural network. So in that sense they use this chronicle delta factorization approximate cover chart K-fact method. So if you can actually imply this into neural networks if you use these numerical techniques, okay? Today I will introduce another very interesting algorithm called mirror descent. So as you see here, all these things are convex optimization. This field is developed very, very well. So in this society they are using mirror descent. Let me explain what mirror descent is. So you see again this proximal gradient, right? So previously we used this form but here you can see theta and theta t. We consider the Euclidean distance between theta and theta t, right? But it's not necessary to use Euclidean distance. So let's consider some more general distance. This. So as a candidate we can think about fragment divergence. yesterday Professor Coppola has introduced us fragment divergence. So if you have some convex function f, f which is a function of theta. So f is a convex function of theta. Then we can define the distance between parameter theta and theta t this way. So let me explain geometrically what this means. So we have a convex function f of theta, right? So we have a point of theta and also current point of theta t here. So this fragment divergence represent actually the gap between the function of value of theta and the Taylor expansion expand from this point of theta t. First order Taylor expansion. So the distance between f of theta and first order Taylor expansion that's a fragment divergence. So because this is a convex function only if theta and theta t coincide then this fragment divergence becomes zero, right? Otherwise it increases. So instead of this Euclidean distance we will plug this fragment divergence into here, okay? Then this is a loss function or Taylor expansion, first order Taylor expansion and this is the proximity with a fragment divergence. So now we want to optimize this with respect to theta, right? Just you differentiate this equation with respect to theta. And here theta t is just constant. Then you get this equation, okay? Then I will use another variable mu. So you learned this, right? This is a conjugate variable or with respect to theta, right? f is a convex function. So at every point theta they have different slope, right? So instead of the position theta I will use the slope as a variable. That's this relation. And actually we have a convex function f which is a function of theta but theta is a not good variable which is abstract. But we will see that mu can be more convenient variable. So I will change my variable theta to mu. How to this? You know everyone knows how to do this, right? Using this Legendre transformation. And because of the duality between f and mu you can easily see theta is a derivative of g, okay? So using this new variable mu then I can change this equation into this way, right? So this part f, this derivative is mu t plus one and this one is mu t. So I rearrange this then you get this equation. So this is a very interesting equation actually. So let me check. This looks like a gradient descent but it's not gradient descent. This is the update of mu but this gradient is not with respect to mu but with respect to theta, right? So you should be careful for this point. But let me reinterpret this gradient using chain rules. So you can apply chain rules here then. So our theta is this one, right? So if you plug this theta into here then you get this one. So in terms of mu actually this gradient is natural gradient considering the curvature, right? That's the essence of the middle descent. They are updating using gradient descent but implicitly they imply natural gradient. That's the key essence of this middle descent. So let me summarize how you update your parameters using this middle descent. It's like this. Usually when we use gradient descent we just place in this space, primal space from theta t you update to theta t plus one. But in the idea of middle descent first you transform this theta into mu using this loop, transformation rule. Once you are in the dual space you update this using gradient descent but keep in mind this gradient with respect to theta not mu. So you are doing gradient descent but implicitly you are doing actually natural gradient considering curvature. But computationally this update is cheap, right? You are using because you are using gradient descent. So once you update your mu then we have to go back to our primal space in theta space, right? So this inverse transformation is you can use this mapping, right? So this is middle descent algorithm. So this looks very fancy. So I want to apply this for updating my neural network. So we spent quite a lot of time which model is good to apply this algorithm? Because middle descent has been studied for a long time in convex optimization but not much in machine learning. So we want to find the right model. So finally, as a user Hopfield model comes out. That's I think the best model to test this middle descent. So let me remind you about Hopfield model. So suppose you have a data which is in multi-dimension and we have the frequencies of these samples. That's the empirical data distribution, p hat x. So we have this empirical data distribution. Then our goal is we want to model this distribution using our Hopfield model. So Hopfield model is this model, okay? I think you know about Hopfield model. You can think like this. If you have a sample x you have this network and each element has a bias and between elements there is an interaction. So this is energy-based model. So given this sample we can define energy in this parenthesis. Like this way. And this normalization vector is partition function as you know. And so we want to mimic this empirical distribution using this model distribution, right? So to represent this empirical distribution what is the best parameter B and W? That's the question of learning, right? But Hopfield give us a very good solution. So B is nothing but the expectation value of xi given empirical distribution. And this W, jk is a correlation between xj and xk given empirical distribution. That is called Hopfield solution. So you can understand intuitively understand that this can be a good solution. Because look at this. If you in this samples their probability should be high, right? If their configuration is consistent with this average behavior of bias and correlation that you get a high energy. No, sorry. High values in this parenthesis then automatically you have a higher probability. In this sense, this should be a good solution, right? So this energy model looks a bit complex. So to make it more simple I introduce another parameter variable, theta. Theta includes not only bias but also weight interaction. And I also observe the observable which includes x and also correlation between x, right? Then you can simplify this model in just like this one. So I use the Einstein summation convention here and partition function. And Hopfield solution is summarized this way. Again, this is an expectation with respect to empirical distribution, okay? So actually this Hopfield solution is very good to represent the empirical distribution. But actually you can do better by using the maximum likelihood estimation. So again, you can define the discrepancy between empirical distribution and your model distribution. Then if you optimize this with respect to theta then you can enforce your model be close to empirical distribution, right? Then you can do better than Hopfield solution. That is called a Boltzmann machine. And you already know what is the best measure of the distance between empirical and model distribution. That is represented by Kuhlberg library divergence. You already know that, this, right? So the distance between two distributions. And to apply the gradient descent method, you need a gradient to this loss function with respect to theta, right? So because this Hopfield model is an exponential family model, so it's very easy to compute this gradient. So the result is this. I'm sorry, it's too dark. But as you see in the lecture of the people, the gradient is nothing but the expectation difference between model distribution and empirical distribution. So you can easily calculate this one. So let me remind you of the Hopfield model. This is a partition function of Hopfield model and this is a free energy in physics in mathematics cumulant generating function you learned. So again, in this exponential family model, if you differentiate this app with respect to theta, you can get cumulant, right? So if you differentiate once, you can have the first cumulant, expectation value. And again, Legendre transformation. And your theta is, can be represented in terms of g. So you are ready to apply this middle descent for this Boltzmann machine model. So again, the primal space and middle space or dual space. So first step is going from primal space to dual space. And this is done by this mapping. But in this exponential family model, this is nothing but calculating expectation value. Therefore, this transformation is easy, you can do. So once you are in this dual space, muti, then you can update using this middle descent because you already know this gradient of loss, right? And then you have a muti plus one. So far, so good. But there is no freelance. The difficulty is how you come from muti plus one to theta t plus one. So that's the difficulty part. But here we can use again the Taylor expansion. Actually we don't need to know the overall length curve of g. We only need to know the local length curve of g near muti, right? That's why we can use the Taylor expansion of g. So this is Taylor expansion up to second order. And we need this differentiation with respect to mu. So you can differentiate this. And you get this. And what is this? So you know that this is theta t plus one, right? And this one is a theta t. And this one is a coverage I will show you again later what this means. Actually that is the covariance matrix of your data. And this one is this one. So now you have this muti plus one minus muti in this calculation. You know this, your previous step. So you can get this one. So actually you can use this middle descent in Boltzmann machine. So here are two important points. One is this. Usually when you use gradient descent, you start from random theta, right? Random theta. But in this middle descent, look at this. Muti is nothing but the expectation value, right? Therefore, if you use this middle descent, you have a very good starting point, mu zero. Based on this empirical distribution p hat. I think that's the important advantage using middle descent in this exponential family model. That means you don't need to start from random initial parameters. You can start very good initial parameters based on your data. That is our point. And another one disappointing part is this. Actually this gradient descent implies implicitly the natural gradient, right? So you don't need to calculate the curvature explicitly in this process. However, for this inverse map, now I have to calculate this one. So I lose the advantage of this one. But I emphasize this middle descent can imply this good initial parameterization. So let's calculate this curvature. So dg, dmu is theta, right? So you plug into here. That is just the inverse of this one. And if you remind mu is df, dseta, then that is just one, right? So let's explicitly calculate this partial derivative. Mu is expectation of this observable j, right? jth observable. So if you differentiate with respect to theta i, i, so you have these two terms. The term is that is covariance matrix. So let's think about this. This is the middle descent. And this is our inverse map. So if you combine these two, you have this actually natural gradient. So middle descent is actually same with natural gradient. But our advantage is we know where we should start. In this sense, middle descent is nothing but natural gradient plus good parameter initialization, okay? So we test this. We actually synthesize the data. So we choose bias and weight from samples from Gaussian distribution. So we hide this value b and w, which are true, true theta, right? We hide it. Based on this theta, we generated samples of x. So now I give you this x. Then the task is you should infer the true theta. That's our task. So we did this using middle descent algorithm. So now you will see how your loss decrease with iteration. You compare with gradient descent and natural gradient descent and middle descent. You will see how loss changes with iteration. And also you will see the final inference. True theta and inferred theta. How they are coincident compared for these four cases, okay? So the first, the loss change with the iterations. As you see here, this one, red one is the middle descent. In other words, natural gradient plus a whole field initialization. That is this red line. And then why can you apply this idea to gradient descent with a whole field solution initialization? So that's this blue line, okay? And this gray line means gradient descent with random theta. So we tried with several random initialization. And the green line is natural gradient, but with random initialization. That's this green. So as you see here, this middle descent is the most effective way. And also you can, if you see the inference result, the whole field solution is not so good. And Boltzmann machine, well maximum likely estimation is this. And this is natural gradient with random initialization. But this one is middle descent. Natural gradient with whole field solution initialization. So it is ideal works where we checked this. Okay, last slide. I will summarize. So middle descent is this. In gradient descent, you usually update in primary space from theta t plus t to theta t plus one. But in middle descent algorithm, they use the dual space of this theta. So you should first update from theta to mu t. But if we use exponential family model, this transformation is not difficult because this is just calculation of expectation value. And here, you just do gradient descent. But again, it implicitly implies natural gradient with respect to mu, okay? And then you need to go back to your primary space. So we use this linear inverse mapping. So we applied this to Boltzmann machine. And we confirmed that good parameter initialization is very effective. And okay, this is what we found so far. But we want to generalize this to more broad models including hidden variables. For example, restricted Boltzmann machine have hidden variables. So in this case, hope hidden solution, you based on data, you calculate the initial mu zero, right? But if you have hidden variables, we have no way to fix the variables correspond to hidden variables. That's the one problem. And another one is actually we good parameter initialization based on data, which is a very important subject in machine learning. So we want to go for that direction. Okay, that's it. Thank you very much. So questions or comments? So really it seems to me the thing that you really use here as convexity and the exponential family only comes in in terms of some way of identifying starting parameters in terms of the derivative, right? Yes. So that's really what you want. Do you think for non exponential family models just a better starting point as long as you have a convex optimization problem? Yes, I think so far I think our idea only applies to convex model. No, that's fine. It's just I'm wondering about non exponential distributions how you would extend this. Somehow you want to connect the non exponential free energy also to a convex function. You need convexity otherwise that matrix is not necessarily invertible, right? Yes. Any other? Thank you very much. In the last slide and you were comparing different algorithms in terms of the step size, I think as a function of step size. So how about the computational time and so yeah middle decent looks really nice so what we have to pay for in the real world so I want to know that kind of thing. You are very sharp. Because this is a convex problem so if you iterate more and more at the end every algorithm goes to the global minima but our algorithm reaches fast but again to compute the curvature it requires a lot of computational cost so in real computation time is I think more or less similar so in that part we don't have so much advantage. Right. Any more questions? And then let's thank the speaker again. Maybe on out. Okay. Let me conclude our workshop. I hope you enjoyed the lectures last week and workshop this week and I hope it inspires you and you learned many things and I hope all these things help for your future study. So this score is possible with the generous financial support from ICTP and also KIAs and I would like to thank to our staff Miss Liu and Miss Lee so and I hope you safely return your home and my last announcement please have your lunch at the cafeteria this will be your last time. Thank you everyone.


In the last five years, advances in next-generation sequencing has really given us an opportunity to dramatically improve the treatment of cancer. We're no longer necessarily going after where the tissue starts. Who cares if it's breast, prostate, or lung? Ultimately, it's what's causing it, and that's what you get out of genetic sequencing. You understand the mutation that actually causes it, which creates an opportunity to block that mutation. By blocking cancer at its root, at its core cause, you can have dramatic benefit. You really can change effectiveness and safety for the patient.


there's something that's been bringing a lot of damage to artist careers and it's still doing it and you gotta make sure you don't get caught up doing this because i knew it was happening but i didn't know it was happening as much as it is and man the level of damage that is about to do is crazy because it's only getting worse and that's drug dealer playlist now what do i mean by drug dealer playlist everybody's probably familiar if you're watching this video you're probably familiar with playlist right but what do drug dealers do if you know anything about street culture drug dealers they give a little sample out all right and once they give you that little sample you get hooked once you're hooked now you're coming back for more and they're charging you the premium right and that's how they build out their business samples now why is that related to playlist you might not have experienced this but a while ago it's been a minute i remember the first artist told me they were just like i saw my streams go up out of nowhere and i was like yo this is crazy i thought i was catching like an organic space in an algorithm and then i got hit up by somebody in my DMs and they were like yo you like that don't you and they were like what do you talk about and i'm that was such that just that story sounded crazy to me but anyway they he was like yo that was me do you like those streams i can give you more right just pay me put you on some playlist right and this guy did it and i was like what are you doing bruh that makes no sense why would you hop on this dag on playlist that's that this dude just came out of nowhere gave you a pump and now you're buying into the program makes no sense and i thought that was like a one-off situation then i heard it again cool but i still didn't hear it as like a frequently from most of the people that you know i work with why probably because we keep everybody highly educated in this mix but some recent conversations i found out that many people have actually been plagued with this issue they're making a lot of money these people who are actually doing and running this strategy and when you add on top of this this is where it could bring damage and i i'm sorry to say i don't know if you can do anything about it because we're in the day and age where Spotify is cracking down extra on playlist we've talked about this for and then the distributors are like yo okay we don't want to have to pay the money so um you know artists you're gonna have to pay up as a matter of fact we're just gonna get you off the platform we're gonna disassociate ourselves so we can stay in good standing with the dsp right see dsp we aren't on their side but here's the thing how do you stop it when somebody comes to you and they put streams on your profile they come and put you in a playlist against your will and then try to sell you something but then Spotify distro kid or whoever swoops in and says yo you have straight fake streams on your profile get out of here right they call you out do real damage to your profile suspend your profile when you literally had nothing to do with it and how are they supposed to just guess right honestly like there's no way i think this this the complexity of this this uh botting and these businesses is actually a lot more than most people understand when they wonder like well how come Spotify doesn't figure it all out how come um distro kid or all these companies figure it all out well something like that that's just not is it bots or not well hey i can see there's bots but how am i supposed to believe right random small artists in in the middle of nowhere that you didn't put that song on that playlist on purpose right oh somebody just came in and gave you some free streams why would somebody do that can you can you see why that doesn't add up or it's hard to believe that right it's just easier for me to close up on my side and say nah i'm just going to wipe all of y'all off now that's an issue we know that's that's an issue but it's something to one look out for pay attention to if you ever see something like that please please do not participate don't fall for the trap and then pay for the drug right that's that's crazy and then two also like the best thing you can do is try to alert a distributor or somebody like that in that case if you see something like that happening because i end up having somebody say yo man i don't know what to do this guy reached out and he tried to pump up my streams and i didn't want him to i said no and i told him to take it off and he said he couldn't take it off and now he was stuck right so we're in this weird space where we don't just have the danger of some of the decision making that the dsp's are making but we have a legitimate danger on these people who are making good money by tricking enough people and still damaging right people who aren't being tricked i hadn't seen this before before it's usually you know i present you with the trick box and then if you fall into the trick box cool and if you don't oh look you you just dodged you know a bullet nah man you're not dodging the bullet people are getting shot like up front and you really have no choice it's just whether you survive or not all right so it's an interesting space but the other side of this the other side of this has to be the accountability of the artists themselves right you yourself and this is something we promote on our channel most people don't promote thinking to be honest right most people say hey this is what you should do you should be indy you should be on a label you should go direct you should stream or you shouldn't go direct or you shouldn't stream or you shouldn't be indy or you shouldn't be on a label all right people just tell you this is exactly the only way to go versus giving you a way to analyze the whole process and the reason that most artists get tricked over and over again or people get tricked over and over again because they have trouble analyzing the actual business and the model and what works strategy wise and not in a given case situationally from one to the next and since they have trouble doing that they just fall for the next type of propaganda that gets pushed down the rabbit hole it becomes the next trend and everybody's doing it everybody says this is the way and you're just gonna fall for everything else that goes down that way right that's what's happening to most people versus understanding every single situation like there's a lot of online courses that are scams right but i've had some of the biggest benefits in my life from some online courses or consulting that we used in our own business like actually paying people and the things that they've taught us have been impactful for years on right but we had plenty of opportunities to buy things that wouldn't have benefited us so how do you decipher that's something that look most people aren't aren't even interested in figuring that out in this space most people just want to hear how do i grow how do i get more streams or how do i make more money of a music that's what most people want to hear so i only kind of drop the nuggets here and there in videos and those are usually when you see the artist say oh he's he's um i don't know like an industry or plan or something because he's asking people to think for themselves but the important thing is like if you can be accountable to yourself and realize all these strategies work right adds content right streaming there's great money to be made in streaming for some artists and done in the right way there's um what else a direct to consumer there's money to be made just selling direct for some types of artists and a group can work for some type of artists right all of these things have benefit and there's i could go on and on and on in terms of strategies but all of these things don't work for everybody or don't work for everybody based on where they are at the moment and that's the part that causes you to have to think for yourself situationally versus dating one person and then saying up ain't no good people out here right because you are bad at picking that's your fault right so that's what we have to get better at because we have new trends coming right everybody's saying oh direct to the consumer direct to consumer look that's been out there already right bandcamp has existed for years the platforms to do like all of these things have existed for years we have artists that are making hundreds of thousands every single year off of Shopify selling merch right none of this stuff is new right if you have fans right and you make sure you do that first they're going to go to where you need them to go right so don't fall for the idea that's being pushed and just because everybody's riding a certain wave think that it's time for you to hop on a wave you might not be ready for the wave and then you're going to call the wave a bad thing right even though no the wave is good you just weren't ready for it right or you might try a strategy or a platform that might not suit you and that's cool but it might suit somebody else right but you have to be able to analyze these things from a situational basis and that's where the accountability lies and that's my biggest point of this video here yes this situation with the playlisting and the scams yo that's that's crazy but playlist work right in use in the right way for the right reason not looking to think oh i'm gonna break my entire career by just getting one playlist all right rap caviar had its moment in time but that is not the the norm and that area error is even done for rap caviar okay right but there's real utility to even playlist done correctly but when you do these things wrong then you should expect a bad result or if you don't understand how to analyze the situation then you should expect the result that comes along with not understanding how to implement something that is all you you you pick the wrong partner that doesn't mean that marriage is bad do you get what i'm saying that's all hopefully hopefully you know you can hear this and rethink just how you're looking at these situations analyzing the strategies to platforms these trends again there's a lot of trends you hear everybody talking about these things at once right and indy that mean when you hear things being marketed heavily heavily heavily at once it's no different than when crypto got pushed out there to everybody in the world you end up with a lot of people who they get knocked out or knocked off why because everybody's just chasing the wave they're drunk off of the idea all right why is the idea sounding so popular i don't know right like but doesn't matter we don't have to go that deep all we have to do is analyze does this work for me does this work for me where i am right now maybe i will implement it later and if i decide to implement this which is the best way to do it does this platform work for me all right does this person that i'm trying to hire make sense for me all right doesn't look like they run their business legitimately all right and maybe i did make a mistake but i need to be able to hop out of that mistake as soon as possible right test all of this stuff but the principles don't change the idea is to make great music when you make great music the idea is to then get it seen by as many people as possible and out of those groups of people who see it the next idea is to turn people into real fans right and after you turn people into real fans the next idea becomes engaging these people and monetizing these people and mobilizing these people right that's the way you do it right you can skip to try to monetize and mobilize but when you don't have anything to monetize and mobilize what are we really doing here don't forget about the basics the paths still exist don't fall for the new hype and forget where the hell you are right now like that artist is already down the road let them do what they're doing they're selling you an idea right but what did they do when they were where you are right and is the thing that they did something that's going to make sense for you are you the same personality do you look like this woman do you look like this guy do y'all have the same audience is your niche even as big ask yourself those actual questions do you have the same talents do you have talents that they don't that you can implement ask yourself these questions and that'll help get you down that path again my whole thesis is not to give you one specific thing that will work because i'm talking to a general crowd out here right this is a video all right not a phone conversation so it's not to say this is the only thing you should do what these videos are all right with this channel hopefully is and inspires is to give you multiple different ways of seeing situations so instead of looking at one situation in shoe one d we're talking about 3d 4d 5d 6d as you get more and more ways of looking at a single problem so you can make a better decision that's it hopefully this video is helpful subscribe to the vibe this is yet another saturday video and look at y'all want to uh hop in no labels necessary we got our free community where we you know we had conversations every once in a while that's no labels necessary dot com other than that watch the next video if this is your first saturday video by the way we've got a playlist of it now check those out too peace


Okay, so that's it. Finish playing this key, adding the passing note to my four chord. That was it. One, two, three. The minor pentatonic scale, I make use of the pentatonic scale. That was the B minor pentatonic scale there. From the B minor pentatonic scale, I started from the five notes. So I did something like this. I was, I use this phrase on all the move. Okay? So you can see the kind of hammer-on thing there. So guys, number one movement I'm going to show you today is the two, five, one. Don't forget the key we are. This is my one and this is my two, three, four, five, six, seven, one. So when you hear your two, your two is the second notes of your A major scale. So this is it, one and two. Okay, so the two started from the two notes of your A major scale, which would be your two and five and one. Okay? So that is the first gospel movement I want to show you. So if you're going to your one chord, okay, you can do something like that. Okay? That's it. So that's the number one gospel movement. Then number two is the five, one, leading you to your four chord. The five one is two. This movement always lead you to your four chord. So number three movement is your seven and three. So we use this. This is it. We use this often, leading us to our six chord. Okay? You hear something like this. Okay, so that's your seven and three. Okay, leading you to your six chord progression. Number four gospel movement is also leading us to our six chord. You can do something like this. ["Ode to Joy"] What's up guys? Welcome to another episode of Bazley's Creek One. Today I will be showing you three gospel movements you can use going to your two chord progression the key there on the song is my is my a one seven always leading you to your C then you go to your two then you go to your four and five and one okay so that's it the first movement I did the first lick I played there leading into my two chord was this a chromatic work down the sustain note this thing helps to beautify your move is that if you're going in plain okay so that was the first move to my two chord okay this is my one this is my two this is my three this is my six this is my six this is my five five four three three two two one okay so the movement started from the six okay six this is my three don't forget the key we uh this is a a b and c sharp okay so one two three so six three one seven six four three flat three two before the next one one six seven one one six seven one then you drop to four four four four the 16th note so this was the key b and the progression of the song is five six four if you notice what I did on that song the first movement I played the bass line I played was this I took the same pattern the same movement to the five chord I took it to the six the ghost note underneath and everything the percussion underneath that's my riff took it to the five chord also to the six chord okay okay that's it as simple as this this is registered more in the minds of your audience take note of those things they really go a long way the key of a and my progression is four then one then five then one right these are my key progression on whatsoever song I want to jam on I want to play okay these are my main chord progression this is what defined that song this is what made that song to go that way okay the progression right now the passing note remember I'm on the key of a now the passing notes if you notice when picking out the progression or when choosing the progression it was not all the notes of the a major scale I made use of it was not all the notes right they are still the third note is not part of the progression the the sixth note is not part of the progression the seventh note is not part of the progression the one is part of the progression fine and we still have some basic like the flat five there is not part of the progression the flat six the flat seven is not part of the progression now these are what I will use to serve as my passing note to the actual main progression I'm going so another episode of basley quick one today I want to show you movement to connect four two three five six chord progression okay hope you're ready for this one so this movement is simple okay the key of the song is already on f so this is my key f and this is my one f sharp this is it the progression of the song started from your one give okay so the first lick I played there yeah does it so the lick started from my f sharp okay this is my f sharp this is my f sharp the high one one I know this is your one but don't start here this is it it's done okay one seven six seven one six seven five two five one then that lead led me to the seven chord which is my next chord progression you see that's it okay so the first movement I would like to show you there is don't forget the key we are okay leading us to our four chord flat five four three climb up to the one five your one what's up guys welcome to another episode of basley quick one so today I want to show you two different passing notes you can make use of on this worship song that I just finished playing okay they are simple to understand and very easy to play on to that love be the glory now this song I played this song on key a okay and every of the chord progression on that song is almost all the notes you have on your a major scale the only note I didn't touch there was the t was the seven okay now the song progression is just simple they are basic gospel progression you always come across okay so now this is the progression on to the love be the glory great things you have done on to the love be the glory great things you have done right now if you check the progression is like I said is almost all the notes you have on your a major scale these are the progression one four five six five then one I'm going to show you the first movement I made use of on that song was this the first passing movement passing notes I made use of was the on to sound more interesting okay now what I did was five one four drop to my four then I went to six five flat five seven just they work down to your three chromatic work down to your three two flat three three then drop to six now you're dropping to six the sixth movement was okay this is my one don't forget this is my two this is my three so I started from three from three I went to five one five six that's high to sound okay what's up guys welcome to another episode of baslady quick one today I will be showing you three gospel leagues movement you can make use of now the key of the song is b flat the first lick I did was this now the lick started from the five five three two two flat three three six seven one three six two three six does it