Alright, so I'm going to get started. Thanks, Adam, again for the intro. I'm talking about the UX of language. There's a lot of stuff on the floor here. I'm talking about the UX of language and I'll briefly describe what I mean by the UX of language because that may not be immediately clear. So a preface is that there's a lot of pressure for someone like me who submits a talk called the UX of language to speak well because my user experience should be good. But I'll warn you that that's not me. And also there's a misconception that since I'm talking about translations and internationalization a bit that I speak a different language. Someone told me that that was the way to say that. I don't know. I do ever do a convincing Jersey accent. So we could maybe put that in. So we'll call me an enabler of people who can speak well. So that's my preface. The other thing is that this is less about internationalization and more about user experience. So it really it comes down to making sure that the language in your application fits your users the best whether they speak a different language or not. The first step to internationalization if you speak English is getting English right. So step one. The way that this will relate to you and your applications is that anytime you output a string and right now you probably just use the plus operator to concatenate some data into it you want to consider the problems that I'm going to address here. So that may look to you like there are five results or you have three new messages. Welcome Adam to come see X data or your score is 25. You need 25 more points to continue if you're developing games about me a little bit. That's poor translation pluralization rather. I like to build JavaScript programs. I work at a place called bizarre voice in Austin. We do like ratings and reviews and stuff on lots of retailers that you probably have heard of. But the idea is we can put our ratings and reviews in any language on anyone's site anywhere. So I get to do this for a living. It's fun. I really enjoy it. My mom was an English teacher. It was like little kids though. So I don't know if it counts. I have an eight inch vertical jump. I bench 115 on a good day and I can score 250 probably I never tried. So getting into it. This is I wrote a blog post if maybe like two of you have read it. And this is the premise that I worked off from the blog post. So whenever I went to write the talk naturally I just took a screenshot of it easier that way. So Greg Brockman I have no idea who he is but he wrote this funny thing and then a thousand people retweeted it and I guess one of my friends did. And I thought that was funny more or less. So a brief history of string concatenation is where we start. So we'll go back to 1986. You have like text based browsers and the web was for documents right static files you could you could get to TXT files. There were no formats. There was no HTML. There was nothing right like ARPANET or whatever Al Gore was working on. So some time passes. I wish I could have put like a what is it like a montage like Rocky. And people desire to customize content based on people. So different people on the same web page would experience different things. The tendency we're talking about mixing data and documents. This was a fundamental shift in the web and that's why we have web applications and games and things like that now. I think Tim Berners-Lee has a quote somewhere that I totally bothered to look up but it just got lost in my slides that he never intended for the web to be dynamic. He didn't even intend for it to have images. He's like why would you need images. And then later when they try to add like authentication he's like no the web is open. You don't need authentication anywhere. It's crazy. So we branched a little bit from that but I still like the guy. So then we enter the era of literally just outputting concatenated strings. You might remember CGI bin folder. And this is just some headers, some HTML, some strings. This is my first web application. 1993. I was nine. So and then after that there was more time passed. I figured the montage was too long for twice. But then we get to crappy templating languages. There was a language called personal home page that came out later back renamed into something else that I don't know what it is. I think it's like one of the recursive ones. PHP, something, something. I don't know. It's weird. But you get into these situations where it says like your template is also the application. So you just have an if block and you're like if they're logged in show this. If they're not logged in show this. And then go here. You can have like one file that was literally the whole application including the markup. And that was like ten years of string concatenation dark ages. That was the non-innovation period in the web. And it was where like half of us started. And I'm glad I don't work that job anymore. So around 2004 to present time, you know, Django and Rails and all these, even PHP came around, especially with PHP 5. There was a lot better mechanisms. PHP really was a template language first that just got out of hand. But now there are real, you know, first class language things in PHP. And so you can do things like MVC. MVC is not the only thing. But you can separate, you have separation of concerns. You can actually use good software development practices. It's kind of like there were the software engineers and there were people building web pages and they never talked. And so finally you can do things like logic list templates. And I know not everyone loves those, but I think everyone can agree that you don't want too much of your application logic inside your templates. That's not really what I'm talking about. Really what I want to say is that at some point we're pretty good at rendering HTML right now. We can separate data. We can separate views and controllers and have Timberling languages that we like. And it all feels pretty good to us. So we can finally render HTML. We're out of the that type of string concatenation modern iron age. So what about rendering a sentence? So that's the basis of my talk is how do we render sentences? Do our techniques that we use in templates work for sentences? So let's try it. Here's a templated sentence. Handlebars. Oh, you want to, I guess that would work. That? All right. If I, maybe I can go bigger, we'll see. So this is a handlebars template because Yehuda's here and I didn't want him to beat me up. Also, I love them. So welcome to the site username. Seems good. So you put it in. Welcome to the site, Adam. It's nice. So let's try another sentence. Hi, Adam. You have blank new messages. Seems good. We'll give it a shot. It's not good. Alex, you have one new messages. Not that bad, but it's not exactly my favorite thing. If an application told me this, I would probably disrespect it. It's gross. Hence the UX of language, right? That is poor user experience. So our traditional way of concatenating strings together is not sufficient when those strings form a sentence. So the way we create HTML can't be the way that we create sentences unless those sentences are completely static, in which case that's fine. Do whatever you want. This is true if you support multiple languages, but still true if you only support English. And trust me, if you only support English in like four months, you'll have to support other languages and you'll be really mad that you thought you never had to support other languages. Because that's a terrible time. Re-internationalize like something. So this is a rhetorical question. It's supposed to be poignant. So how many of you optimize the markup on your page to be like pretty indented? So whenever you make sure the template prints out to where you have like the correct indentation in the source of your page, probably like half of you at least. Or maybe I'm just weird.  So it's weird that we're so worried about the source, but we can't actually get the thing that the person, the content, the thing that someone is actually there to see. And so that's the poignancy. That's not a word. So we can do better. So consider the previous example of you have two new messages. That one works fine. What if we just did this? You'll see this a lot. So you have X new messages. Messages is in a, the S is in a parentheses. And messages you have to, which is like the Yoda version, right? Like in reality, people would just put like messages colon two, but it wasn't as funny. I couldn't make the Yoda joke. So the first one was just ugly. And it doesn't work for a whole slew of things that I've yet to bring up. And the second one works okay, but not if you care about user experience. This works well if you have like tabular data, something like that. But this is really impersonal. Consider Facebook. Two people liked this post, right? Can you imagine if in the bottom of every Facebook post, it was just liked colon two, right? Or even if they wanted to put people who have liked this post, Alex Sexton, comma, Adam Sontag, comma, two more. It's just weird. I don't know. It doesn't work. The second one's called prefix or post fix. A lot of times this works well for internationalizing things because the way that the sentence structure works is you can almost do that in most languages, but it still kind of sucks. I just realized there's like a C of apples, but it looks like stars. So it's like Apple stars. Someone should take a picture of that later. So should you do this in your application? Absolutely not. So we'll get to plural branching. This is like, once you realize how much prefix and post fix pluralization works, you can try this, right? So you're like, hey, Alex, what if I just said, if it's one, do this. If it's this, do this. I hope someone just hears the audio and that sentence works well. So this is cool. So let's add Spanish. You might be saying, I don't need Spanish. It doesn't apply to me. Just pay attention for a little while and get back to you. So here's that same thing with Spanish. Hopefully those translations are good. And you can tell it explodes. It doubles immediately. It more than doubles because you need if statements for this kind of stuff. And that's really gross. The other thing is it's coupled directly into your application code. Where do you put that? You put it in your template. If you're using a logistic list template, you can't really do that. Where does that go? There's no good place that that fits. Plus, consider these commonly supported languages. Can you imagine the if block for each of these in the case where you had to support any, you know, half of these or five of these every time you needed a sentence? That just gets unwieldy. So I guess I was feeling kind of sorry. So I know you're thinking, or at least some of you, that Richard Stalman came in. He's like, can you get text 30 years ago, solve this? Everyone uses get text. This is a solve problem. That's what I use. And that's cool. This is the reference. There's Richard Stalman right there. He's fighting ninjas. It's like an XKCD or whatever. So I thought so too. So we'll get back to that. I just thought I'd interject that because everyone likes a good comic. So navigating the message landscape, I want to go a little deeper, talk about properties files. So this is the next thing people tell me, oh, well, I know I don't do the if statement stuff or whatever. We have internationalization. We use properties files. And a lot of times we'll do it for internationalization because the way it works is you can kind of switch out your messages nice and easy. A lot of times, the last people like, do you have internationalization support? Let's say, yeah, we have properties files, which is like the equivalent of me saying like, is this TV high definition, and then someone saying, yes, it has pixels. It's not a no, but it's not a yes either. So it's not necessarily what you want. But here's how it works. So you have a properties file for each language. In this case, it's one file and they're just objects, but whatever. And I was like, that joke wasn't funny. So this is the way they work. And then in your templates, you pull them in as like the properties data or whatever you could say it, i-e-t-n or whatever. And then you have button text and you have invalid message. And they go in. And that kind of stinks because not only do the translators like not have any reference of where it goes, like when you write your templates, like, what is that? When you have strings in there, you know that this is like the submit button and what the invalidation message is. And so this makes it hard on you. It's pretty common in a lot of places. So by default, a lot of languages come with the ability to do this. They're not bad inherently, but if you want true internationalization support, you need more. You can use properties files to do more than what people generally do with them. So it doesn't really address any of the hard problems except for rendering different locales. So now you can switch out the strings in one Spanish and one's English. And so that's a totally different thing, but now what about pluralization and stuff like that? So sometimes people add sprint def. This is like an old C function that we keep around. It's not in JavaScript by default, but it's in a lot of languages. It's implemented kind of okayly in like underscore string. And this is what that looks like. So the message inside the properties file has like the sprint def parts in it. And you have X messages. And we're back to the initial problem of what if there's one? You have one messages. And so it didn't really solve much in that case, except for now we can poorly translate and pluralize every string instead of just English.  So we can switch out messages. We can interpolate, is how you say that. But they're incorrectly pluralized. They don't have gender. They don't have context.  Not to mention, offering templates sucks. So we're back to Salmon. Get text. Get text is pretty cool. It's the way they internationalize a lot of the Linux stuff. Salmon didn't write it. I don't think at all. I'm just, comics works better if Salmon wrote it. So plural forms and PO files. I thought that was like a good album title. Like have I ever wrote an album? Get text. Plural forms and PO files. So plural forms are pretty cool. It decouples the data in the message, but also it decouples locale specifics. And this is what can really make a difference in starting internationalize your app well. Or not just internationalize. Just have good messages. So this is kind of a crappy version. Well, no, it's like a way better version of a PO file. Describing the sense that it wouldn't work. But it's very simplified. So there's like this old PO file spec. And it's all just raw text. And it's like half arrays. And there's equal signs and just random characters everywhere. So this is like, if you were a sane person, how you might do a PO file these days. And so essentially, there's the messages. And then there's a plural form section. And then you tag it with the locale. The plural form says this is the index of the message that you would use whenever you pass the number in. So if you pass in one, it'll return zero. And so that array that has, there's one message in it, the first one will be picked. And so it would pick there's one message. And in the other one, it would return that. And so you could sprint to F it. And I do it nicely. So in this case, that's me doing that. So you just pass in the message count to the result of that. And if you pass in something to the first one, nothing gets replaced. It's just there's one message. The other thing to notice here is that the key in this file is actually the string that is the singular function. Is that me? No, it's someone. And this is nice because whenever you add these keys into your templates, then you end up with the real strings in your file again. And so that's pretty cool. We used to look at that. So this is the English plural form. So one is the only thing that changes the way we pluralize a sentence. The Spanish, similar. Exactly the same actually. French is a little different. Zero is the same as one. So like zero and one work one way. And then everything after that works with the plural form. Slovenians crazy. It's like mod 100, the end is one, then do something, and then two and three or four, otherwise do it the normal form. Which is pretty nifty. If you think about it like the thing that seems the most like to me is like first, second, third, and then everything else is th. That makes sense, right? But I don't know. I don't care. I don't translate anything to Slovenian. So this is what it would look like inside your file. If you notice this is handlebars, this is a regular helper. And the helper is underscore. And you might be like underscore. That doesn't make sense. Underscore was get text way before it was underscore js. But now if you search for underscore, I guess I won't search for underscore right now. It literally underscore the JavaScript library beats underscore the thing in Google. That's cool. The JavaScript. So this is cool because you can see this and you can actually write this straight up without doing a PO file first. And if these keys don't exist in your PO file, then we'll just use the ones you put in there. So it kind of allows you to write everything you need in your template file. And later, if you need to switch them out, you can create the PO files and do that kind of stuff. It'll also do fuzzy matching. So if you miss a comma or a period somewhere and you put it in, it won't just break and you have to go switch out all the keys and things like that. However, that's really difficult to do in JavaScript. So most people don't. Gender is a little different. This is kind of a hack that people do with get text. And so what they'll do is they'll say there's a context of the gender. And the way that context works is it just prefixes things with your context. That's not really the context delimiter. It's like some weird unseen Unicode character.  So it's not an asterisk. And the way that works is you just send it and he liked it. And that's the key. But if the key is female, then it will come out as she liked it. And that's fine. It means that you can see one example of it inside your template. And that's pretty good. Also p for some reason means context will go with it. So a common mistake is that you'll take two translated things and you'll concatenate them together. And you can't ever do that. That's bad. So this is why. I like my red shirt and me gusta mi camisa roja. So awesome. That was really good. So these are scritched around. This is a fairly contrived example. I don't know how many people are going to be outputting this sentence. But it actually gets way worse in some other languages that I assume all of you know. So what do you have now? We can pluralize our message. We can interpolate our message. That's good. We can pluralize our message correctly for each locale separately. We can have templates with messages kind of in them. It doesn't actually have to end up mapping, but at least readably so. And we can use gender specific words as per the locale requires. You can actually also add a rule for gender in specificity. Which is it's like whenever someone's too far away to determine their sex. So if someone rides a horse over the horizon, they rode a horse over the horizon. English barely has that. They is ambiguous. But it works. So Get Tech seems to do a good job of some of the things we've been talking about, which is interpolation, gender, pluralization, and happiness as far as the way it looks in your templates. And that's why I wrote Jed. Any of you know Jed Schmidt? He lives in Japan. And he's a translator. But he just writes JavaScript for fun on the side. And all of his code is better than mine. So I named the library after him. Because, hey, he has a three-character name, and that's short to type. So this is the way this works. I kind of have two APIs on top of Get Text. The old, the actual Get Text APIs on the bottom. And the new one's kind of like a cool jQuery chainable thing. And that's fun, and it works. And it's more or less what we've been talking about. So what's wrong with it? Because it's like not the end of the talk yet, and I still have more to say. So back to just English. There are three messages from two people.  That function takes one number, and then it translates that plural form based on that one number. So what if also I have a real context? They didn't put context in there for gender. Context is for like, I'm translating this for when I'm in the menu, or I'm translating this for when I'm in this part of the application. And they can kind of have slightly different contexts, like look at this, or look at this, which is the same sentence that didn't work well. So I can only go one level deep too, which is kind of indicative of why you can only have one plural. So you can't have two contacts, you can't have two plurals, you have two anything.  This is all the functions. There's another like function overloading from back in the day. So you have to have each one of these things, and you have these like obscure characters.  Plural forms have to be sent with each message. So when someone sends a PO file, they have to put the plural form in. And why? I don't know why. They shouldn't have to. If one word changes, then you had to retranslate the whole sentence, because we can't do fuzzy matching very well in the client side, because it would take too much guessing and time and things like that. So in the client side, it's not even that very good solution. It's not very extensible either. There's some things that I'll show you in the future that can kind of show you what I mean by extensible. So I want to take this section to thank Norbert Lindemburg, who is not here, doesn't know I exist, I think. But he is a guy on the ECMAScript, TC39, globalization spec, something or other. And I put out Jed, and I was all excited about it. I did the cool face thing with Jed's face, and I put it on the site. And Bren and I posted the library up to ECMAScript, and he's like, hey, internationalization guys, how does this look?   Rightfully so, though. So next up, he convinced me to switch to something called ICU message format. ICU, they do a lot of Java stuff, actually. There is a message format in Java, but it is not ICU message format by default. So if you have preconceived notions of message format, leave your baggage at the door. So really, it's not even a thing, it's just two things put together. Plural format and select format. And the way that they work is that, well, the way that plural format works is it has a mapping of keys. So any plural function, the plural form functions that, like for English, we had zero and one, they'll output any one of these things. But the minimum set. So in English, the only thing that matters is actually one. Everything else is other. Even though we have a zero and we have a two, exact literals, they don't actually matter. They're not different. So in English, we have one and other. In some languages they use all six. They don't always exactly match up. You know, few means different things in different languages. But you can pretty much tell the translators that this is what it maps up to. You kind of have to give it some wiggle room. You're nice to it. These all come from CLDR, which is like a database that stores plural functions and things like that. So thanks to those guys. It's an XML though, so just convert it. So the basic syntax overview for how this works, it's, it looks pretty complex, which is crappy for translators, but it's, it works really well. And so you have a literal and you can just type it. That's just any words that you want to put in the sentence. You can just type them. If you want to do something a little crazy, if you want to use a variable, you can just put it, put brackets around it. It's like it, like mustache, right? And then if you want to use a plural select function, use this comma section, and then you end up, let's see if I mouse. Yeah, I do. Bigger it doesn't, it wraps. Thanks, Adam. And so you have option one, option two, option three. That would be like a select. And so if those are the, the value of this variable, then these will run. And then it recurses. So inside here, you start up here again. You can have a literal, you can have a literal variable, or you can have this whole thing again. And then go infinitely recursive, which I don't suggest. It would take a while. So let's try this sentence again. So we have this message. We say how many messages are there? That's our variable num message. We're saying that this is a plural form, a plural select, plural format rather. And then we're saying there's one and then there's other. And then this is what comes out of it. You have one message. If we wanted to change this to two, we come here and recalculate this, and you have two messages. That's pretty nice. That can be pretty good. You can also come up here. Oh, it's hard with it doing that on my monitor. You, let's say don't have two messages. Yeah. All right. So that would be like the worst message. You might have any other number, but it's definitely not two. We could guarantee that. So if we can add literals in there too. This is where things get cool. So a lot of times you want to treat specific numbers differently. So you have one message. We do that again. But if we switch this to zero, rather than saying you have zero messages, which is fine. We can make it a little more warm and say that you have no new messages, which is nice. And so we have a special case for zero and it overrides these run first and then the other ones run after that. So we can come in here and add, I'm not going to do the formatting nicely, 42. And the answer to life, blah, right? And then we can come in here. It won't do anything, right? And then we can change this to 42. Right. Messages. I forgot to add messages, whatever. You get it. So for those you have been saying, I don't need multiple languages. This is what applies to you. That's just English, right? So before you couldn't do that in any language, let alone English. So that's five results in two categories. Or even worse, he received five results in two categories. And that's like, you say, well, that never happens. But that's like everything Facebook or Google plus writes on your screen. If you do this with the if branching, you have to branch on all three gender choices, as well as each pluralization of category and results. So it blows up to 12 different if statements just for English. And that's not maintainable. So if we want to do this in ours, we just use these same forms twice, right? So you can say that there are five results in two categories. There are five results in one category. There are let's do a crappy one, right? There are zero results in six categories. Also very unhelpful. So we'll go on. Select format works similarly, rather than the pluralization function choosing the key, you just get to choose the key. So that's how we can do gender. So we can have the same one as before and we say the gender. This is a select format. And then we'll select based on these three things, right? So he found five results in two categories. And we can do she and we can do my good friend Noel. They found five results, two categories. That's nifty. You have named arguments. This is just like a temple language. I won't play around too much with that. And then plugins are nice. That's totally readable. Everyone's good with that. So we'll move on. More or less, the key here to focus on, let's see if I can do this, is this guy right here, the offset. And that's actually pretty cool in the long run because you can take the number that you're passing in and do an offset. So this is the kind of extensibility that you don't have in other translation and message formatting stuff. So he added himself, or I could come in here and say he added, or he added himself in one other person. He had to adjust himself. He added no one to his group. He added, oh, this is the first one we did. And then we'll do it here. Two other people. We can change it to female. Well, we'll change it to my wife, Alan Al. Yeah, that's cute. Ali added herself and two other people. And then we can do like if we didn't know again, and then you didn't know which of us, right? So like that's pretty cool how on every single one you can do all the different things and it just comes together. It's a very technical way of saying that. So this is translator friendly because all the variations are translated together. You put all those together and you make sure each one of them works. You can automate the just displaying each one of the data points just by some dummy data. So it's also not very translator friendly because the syntax is crazy and they already speak like Chinese. You can't expect them to speak select format as well. Luckily, a tool wouldn't be that hard to build for this doesn't exist yet. But it would be pretty easy to build. So I wrote message format JS and that's what I've been using this whole time. And so you can pull this in. It's compilable. That's pretty nifty. What that means is I used peg.js in order to parse the grammar. This is a parser expression generator. You could use Gison or something like that. It just generates an AST of the different nodes and then I can take those and do some cool stuff with it. So this is our argument one from before. If you look like we do a pre compilation rather than a compilation, it'll output JavaScript. And the cool thing about this JavaScript is that it doesn't actually require message format anywhere in it. So once you compile your messages, it's just the JavaScript that's left. And that's pretty cool. And so we can come in here and we can say this was a named argument to us is my favorite word. And you'll notice that this JavaScript changes in here. And that's pretty nifty. It works a lot like handlebars pre compilation. And to that point it actually you can put it directly in handlebars. You can give it some random key and then in here, you can just write it raw. And then I have a plugin that I haven't released yet, but will probably within the week that will take this pre compile this and pre compile the template. And everything's pre compiled and you can just throw away the handlebars parser and compiler and you can throw away the message format handlebars and parser. And that's nice. So what does all mean? It's extremely fast to just wrap your messages with the message formatting wrapper. You don't actually have to use it at all. But you can do it and you'll thank yourself whenever you have to go back and internationalize your app. You can run a tool and I'll just tell you here's all your messages. Put them out in some file format and do it. It's way easier to do it now and just ignore it forever than it is to go back and figure out all of them later. So even if you don't have any intentional that was I've messed up that slide. So date and number of formatting are important. If you're internationalizing to it doesn't it's not really in the scope here. So you you want to look into number format and like moment JS or something like that. Commas as periods are crazy. It's like dogs and cats living together. So there's no excuse for sentences like this. Premise of the talk. The language on your site is more important than the markup in your site. So pay just as much attention to it. Are there any questions? Any ones persons people's persons. I get it. All right. So I have the require handlebars plug in.


Well the next topic is Osmo regulation in vertebrates. Osmo regulation means that Kistra vertebrates, they maintain water balance. This is what is called as the Osmo regulation. So there's a variety of mechanisms which have been evolved in vertebrates to cope with the Osmo regulatory problems and most of them are adaptations of the urinary system. Because urinary system is the system which has maximum water loss. And due to this, this nitrogen waste is also removed. So this is very important to maintain the Osmo regulation. If the water retain, then urine will pass less. If the water loses more, then this is something which is automatic. It is under the control of nerves or under the control of the hormones. So the vertebrates have a closed circulatory system containing blood that is under pressure. Or under pressure you have, you can say, that is by the throbbing of the heart or by muscular contraction. Now this pressure, there is blood forces to pass through the membranes or membrane kaha hai, that is usually that is in the in the in the kidneys or we can say that is in the part of the excretory system. We are the following three functions which are very important functions which we will read in detail. And here is a simple name or explanation of it. That is filtration, then reabsorption or secretion. And these are the three main processes which are in the kidneys. The first is filtration. The filtration is like the name shows that blood is filtered and then the filtrate is made. And on the filter, as we call it as residue, they are usually the red blood cells, the white blood cells or bigger cells. So in this process blood passes through a filter that retains blood cells, proteins and other large solutes. But let small molecules that is ions and urea that is passed through. So this is the function of the filter. If we have to filter something from a filter paper, then of course something, the small things which pass through the filter paper and when those things come in the residue, which cannot pass through, which are usually bigger molecules. Then next process is reabsorption. Reabsorption, that means that the reabsorption, there is a selective reabsorption. Select molecules, they come back again into the bloodstream. And this means that they can maintain the solute concentration. And taken back into the bloodstream from the filtrate, then the other important things are absorbed again into the bloodstream. And lastly the secretion, this is a process, it may be select molecules and end products of metabolism, which are usually potassium, hydrogen or ammonia. They are reabsorbed, they are in the blood and added to the filtrate for removal from the body. And this is also a selection, which are to be retained within the blood and which are to be absorbed into the coming out urine. Or this urine that comes out of the body containing the excessive water as well as containing the excessive solutes, which are surplus. So these are three very important steps. First the blood is filtered, then the reabsorption occurs and lastly the secretion. So this is all about this small topic. So this is all that.


Indices by default will always be 0, 1, and 2. And similarly, if you want to select multiple columns, you can simply pass the list of the names of the columns that you want to fetch. And any guesses for the structure will be there? Exactly. Easy, right? So easy. So yeah, it will be tough for you when you want to fetch a row. You can just simply pass a index of the row. We just pass the index of the row to the location map, which is LOC. And it will give you another series. But as you can see, the indices now are changed. Insts will be the column names now, because in this case, when we fetch a row, the data is really x, 6, and true in this case. And the indices will be the names of the column, because those are the identifiers for any value. So now if you want to fetch the multiple rows, what we can do is just do it the Pythonic. Just mention whichever rows we want. And it will, of course, fetch the 0, 10 first row, like this. So that was just like when you know that what you're going to fetch. But what about if you have some conditions, like if you want to fetch some data based on the value in some column, then you can just do this. So in the square baggage, just mention the condition that you have. And easy to guess that it'd be a data frame. It will just return those rows, which satisfy the condition. And the condition can be on any number of columns. As we can see, the source of a complicated example, which is, let's say we want to, let's say a hypothetical condition. We want to fetch the rows which have x or z value in their first column. We can do this. Like it can be any sort of complicated condition. And it will just fetch, according to your condition, in this case, this. So let's say we have these two data frames now. As you can see, there are a, b, c, and d indices for the first one, and a, b, and c columns. And the second one, a, b, c, d, e, as indices, and a, b, as columns. So if we decide to merge these, if we decide to add these, which is like addition operation, not exactly automatic, but we'll see how it is not exactly arithmetic. It will return you this. So as you can see, some of the values are some of corresponding values in both the data frames. But some of them are not defined. It's like a not a number, which is non-type in numpy, and which is sort of ported to a pun, because it relies on numpy. So why are some values not a number? The reason is, for example, for e row, for e index, there's no value in the first data frame. So it doesn't know what value to add, what value to fetch. And that's why it cannot perform addition operation or a merge operation on e. So that's why all the elements of e in the resultant data frame will be not a number. And the same the case with the c column as well. We see a lot of not a number values. How can we handle it? If we could every day, we know if something goes wrong, either we draw it, either we eliminate the disk, eliminate the bug, or we fix it. It's as simple as that. So let's see how we can handle these values. We can either draw them. Either we can say, OK, if anything is not a number, we don't want to keep it. Or we can just say that if anything's not a number, we're going to fill it with some value and on the basis of some logic. So let's say the first thing, if you want to drop the values, you can just pass on the matter like drop NA. And by default, it's got to drop all the rows, which have at least one not a number value. So it has at least one unfined value. It's going to drop all those rows, as we can see this. And there may be a case when you want to say, OK, second row, like the index two row, has some values, has some data. So you want to keep it, because it has some data and we're not going to lose it. For that, we have another method, which is you can pass a parameter saying, how do you want to drop the values? You want to drop the values only if all of the values are unfined. So it will just drop the last row. So it's not going to lose any data, which you are losing in the first case. And let's talk about another case, like when you fill the values in some manner. So we have this data frame again. And what we can do is just pass a default value which we want to, this is one case, when you know that there is something undefined, you want to fill it with something like let's say 0 or minus 1 or something, which is like the default value for your data. And it will just simply replace every not defined value with that default value that you pass. And if you don't really want to do that, like if you're like, no, why should I fill it with 0? Fine. You can use the NA method with the parameter, which is like forward fill, F fill is for forward fill. And what it will do is it will take the value just above the not defined value and copy it all over. So as you can see, in the second row, there was a not defined, like not a number. But now it is 10 because the 10 is copied from the last defined value. And similarly, you have backward fill methods as well and just pass the method equal to B fill and it should be fine. And yeah. So this was a case when it just copied over everything. But there may be a case when you just want to copy one, like a copy twice and know that if something is really wrong, then you want to drop all the rest of the values. But you want to surely want to copy some of the value. So you can define the limit. And since the limit is 1 in this case, you can see one not did not a number value still left because, of course, because of one limit. And it won't copy more than once. Let's talk about indexing now. Like I've talked about indices like we have 0, 1, 2, or we have ABC, we can have custom indices. Let's talk about a little bit more in detail about that. So for this data frame, we have this index. And we can just fetch the index. We want to do something, the index. In this case, it's not really good to be useful. But as we can see, we'll see later, it will be really like indices can be anything. And this is a way to access any index of the data frame. So let's say we have this data frame once again. And what we want to do is we want to change the index. And we want to assign some column as index. Like we want to use one column as index. Just like we use in databases, we define some column as an index. And so that searching is easy. And everything is searching, sorting everything easy. So we can do the same thing here. We can just pass the name of the index that we want. And as you can see, the new data frame that we will have will have that column as index. So everything you are doing, you in the index now, will be done using these values a, b, c, and d. Let's see how we can do that. So same thing. We want to fetch a row. We can just pass the name of the row, which is now a character a, because it's the content of the index. Zero is the index in this case. And you will get this. You will get a list. Values are of course only six and true, because a is already in the index now. And yeah, the columns again become the index, as we saw earlier. And you can do this as well. If you still want to go with row number, like zero-based index, you can still do the i-trail location, which is i-lock. And you can use that for doing the indexing, the rows as you were doing earlier. So let's talk about if you want to have multiple indexes, like multiple lower indices. So what I've done in this case is I set the index, and let's see the result first. So what I do is I pass the list of indices, which is 1, 1, 2, 2. So what that means is whatever my current index is, assign 1 and 1 to the first two elements in the indices, and 2 and 2 to the other 2s. So that means it will create a multi-level data frame, multi-level index in the data frame. And 1 is going to be the sort of a parent index for A and B, and 2 is going to be the same for C and D. So once we have this multi-level hierarchy, let's see how we can perform some of the operations again. Again, we want to fetch two rows. Let's say we want to fetch all the rows which are under one index. We can simply do this as we were doing earlier. And it will give us that frame because that's a structure for the data that we want, because there are multiple rows. And if you just want to fetch still one row, we can still do that. But what we need to do is we need to make sure that we traverse from 1 to A. So we simply pass a list of all the indices, the sort of hierarchy that we want to pass on, and it will just return list again. We have another thing, which is like transposing data, which is really useful when we are operating on some matrix operations or something. And as you can see in this case, indices were 1, 2. And then the next level was A, B, C, and D. Now we have the same level of hierarchy in the column names. So the column names for bar and bars become the indices. And now index is not multi-level anymore. And it's just one level. And the column structure is multi-level now. So that was just about like manipulating data and manipulating rows and fetching rows that may have seemed really simple. But it's not that. Like pandas is not just for that. It's also for all the statistics, and any statistics operation that you may want. So for example, this describe method, it is just like else is described. So it will return you a lot of useful information about your data, like the statistical information. Like it will tell you average, maximum, first partiles, second and third, bunch of things like this. So this is a useful method for finding any information about your data, like when you're like, OK, just have a glance about your data, like what's there, what's the information in your data. There's another method for finding the covariance between different columns or between different aspects of your data. And there's also this method for finding the correlation easily.  Like if you have some value in the column, then you want to fetch. If you find the rank of that value in the column, we can easily do exactly the rank of this value for all the values in the column. And you also have this another method for finding the cumulative sum of all the values in one column. OK, so now comes the most difficult part. That's a live demo. Let's hope it works. Is it visible at the last line? Yeah? OK, cool. So how many of you are like football fans here? Do we have any football fans? OK, OK. So the data that I've fetched today is the number of goals put by Messi and Ronaldo in the last 10 years. And we're going to analyze their data and to see how we can make some sense of the data that we have. So I'll go ahead and just import the library. And this is a data frame. This is like I actually construct the data frame from a dictionary. It may be fetched from anywhere. Like maybe come from some fetching the data from some mapping or some database or anywhere. And so once I build the data frame, if I try to print it what it looks like, you may find it familiar now, because that's how it looks like in my slides as well. So it has one row. Like for each year, it has one row. And it shows the number of goals scored by Messi and Ronaldo for that one year. Let's see what we can do. So since we know that we make the index as year, then we know that we can easily fetch the number of goals scored by any one of the players in that one year. So that's why I've created another index, which is the entry column, which is year. And now let's see how we can operate some of the operations to make more sense of this data and to see which one which player is better. So if you want to fetch all the goals scored by Messi, all the performance of Messi in the last 10 years, we can simply just as simple as accessing one column. We can just simply do that. And if you want to find one row, like if you want to find in 2016, how many goals were scored by each of the players? You can simply do that. Like it's so easy. And if you want to find all the entries when Messi scored less than Ronaldo, you can find all those years. And as we can see, there are only six years when Ronaldo scored more, like not only, but yeah. So this is another useful method which gives you information about your data. And it clearly shows that it's a Python class, a data frame. You can see the entries are in teachers. 10 entries, 2017 to 2016. And data columns are only two. Messi, phenomenal integer values, and same for Ronaldo. And it also shows like scored 250 bytes. Who cares? Oh, maybe care, but not really. So if we want to find the head, like we want to just see how the data looks. We can simply just pass the head and number of values that we want to fetch. And we'll just show you sort of a snapshot of the data frame how it looks like. And same thing is if you want to see it from the tail. You can mention the number of elements that you want to see. And both head and tail, if you don't mention any number of elements that you want to see, then I'm going to show you five elements by default. So this is the method I was talking about. Describe.  Like you can see the count, which is not really that useful in this case. Mean standard deviation, you can see the minimum, 25% dial, 50% dial, 75% dial, and max value. So yeah, there are a bunch of other methods that are like finding the covariance between these two players, which is not really useful in this case. But it may be useful if you're operating on some data which really need to find what's the covariance between some variables you want to see, something like that. And you can really do that. And there's another thing which is correlation. In this case, the correlation won't be really too much because they are independent players. And they don't play deathly scoring more. And I'm going to score more as well. So there's not going to be much correlation. And we also have this sum. OK, this one is interesting. So as we can see, Messi has scored four goals than Ronaldo. I'm not saying that. Data is saying that. So don't blame me if you are like Ronaldo fan and you're saying, no, it's better. So just that's what it says. And we always go with what data says. Yeah? Maybe, so yeah. Yeah, I knew that was coming. See, I'm not saying anything. I'm not making a statement here. So yeah, there's another method which is cumulant sum. And this really allows us to find the number of goals scored by each player at any moment, like at any point of time, at any years. Let's say we want to see how many goals were scored in 2012, let's say. As you can see, there were 304 by Messi and 270 by Ronaldo. So it's really easy to make sense of data. This is, of course, really a small data set. But you can do whatever you want. You can do operations on big data as well. Not exactly the big data, but the data that you can hold in your memory. And yeah, that's all I have for the demo. And no. OK, anyway, I'm done. Yeah, thanks. Do we have some questions? No. So data for each of the elements can be anything. Like it doesn't have to be same. Yeah, you can mix it, but it's going to be difficult for you if you have to manual data. If you want to put some condition on that, it's really going to be you have to check for each value. Like let's say you have integers and strings, right, in one column. Yeah, you can have that, definitely. But when you have the fast data, you have to recheck, like, if you are giving some condition. You have to check the type and then compare. So it's really going to be difficult for you to make sense of data to analyze the data. And you can find me on all these social links and reach out to me if you have anything to talk about, anything interesting to talk about. So do we have any questions here? Any question that how big data should be to use partners? It should be more than one element. That's it. That depends on memory. Like, because all the data that it's going to have is going to be in memory. So it just depends on what system you are on. And it really is a system dependent. So it is like, of course, there's going to be complexity thing as well. But that's sort of proportional to how big your data is. Do we have more questions? Yeah. Do we have any more questions? Index of one, one, two. And then you will transform the data, right? I'm not sure I understand your question. Index, one, one, two. Yes. And then you transform. Yes. Yes. And then you have to see a second column. Yeah. I guess that's no option. The second column is for that area. Oh, yeah, yeah, yeah. I'm not sure about that. So your question is there, whether we can add multiple level columns directly without doing the samples, right? I'm not really sure because the library is really big and I'm not aware of all the functions, all the methods. But I'm not really sure. I didn't check that and see because the library is really huge and I'm not aware of all the methods. Yeah? Another one? Yeah, you can do that just the same way as you were doing for this. So you need to go from one to A. Let's say one from one A. And you need to pass one and A. And it's going to see like, OK, six one and not different one. So it's going from A from one to A and it's going to just run the first column. So it's exactly same as we saw here. Yeah, it's just like traversing through hierarchy, like just a tree or something, like you pass along. Any more questions? OK, thank you.


Everybody want to be clutch man, whether it be a basketball whether it be in fortnight and we're not playing for an animal It's 2020. What's good y'all? Welcome back to a new video We're talking about ice in the vein moments shout out to everybody that linked me in this video wanting to see me react I'm guessing ice in the veins is literally talking about clutch because I think about like D'Angelo Russell We need that you know the Yeah, I'm saying so everybody want to be clutch man when it's a 1v4 At the war zone you want to be clutch when you're in the gulag and everybody else already lost theirs You want to be clutch because you want to continue your streak and I'm guessing we get close clutch shots And I could already tell you this clutch shot. It's gonna be um Corner Danny green corner Danny green start the video start the video baby 12 minutes of my game winners and good shots Green ranger, baby. I think he got a I mean I'm ashy, but I think he got a tattoo under like on his elbow That's a bull's-eye and points to it when he hits shots like that. I mean, that's what I would do I would just point to it. You know I'm saying another LeBron Laker moment pulling up. Oh Man, this is last year. No one I don't remember that I still see Lonzo ball in the course I still see Josh Hart on the court. So this is last season Don't Little backstory. This is Victor Depot's first game back. He was not having a game. I he was actually having a really bad game But he hit this one and then we went on to overtime and lost this game Yeah, we lost this game. Thank you. Vio. Thank you. Vio Shot the channel Hutchison, I guess that's that's decent defense now makes us go another LeBron moment. Okay This season LeBron nasty Just not a game winner, but that's a dagger. Yeah, you get the daggers too. There goes that man Norwell did a good job contesting Yes, that's good defense act. That's good. Thank you. Okay. Oh, this is one of the craziest shots I've ever seen This is one of the crazy shots I've ever seen luck probably but still it's a crazy crazy shot Rookie Luca and the after Jordan can't believe it, bro. Oh Man good defense. I don't remember who in this game because this was to go into OT But I mean if they were to win this game Man Imagine being in the crowd for that one. I Swear I've seen this clip on this channel a thousand times, bro It's losing his value to me now. It's just everywhere. I keep I keep seeing the same clip. It's everywhere It's lost his value to me. Is it a great shot? Of course. It's amazing shot But when you keep seeing it Same thing with this one step back same shot They gonna say he is that shot pretty often. I've seen this one We've seen this he's hit some big shot from this exact angle. Same thing work. I'm gonna see that I see it a thousand times. Can we get some more something new? Oh speaking of all yet. This is it Dagger, baby Yes, sir dagger, baby I missed this bro. I missed this version of the Brooklyn match and of course a thousand times You bring a cake Katie a calorie if you can but this team was funny I bought a Brooklyn that's hoodie because of his team I'm gonna wait no more. I don't want to wait no more. This team is fun Jared Dudley as the as the enforcer is a fun team. I also saw this clip a thousand times Marcus Moore step back. Yep Great shot. It's an amazing shot, but everything loses value. You keep seeing it over and over and over. You feel me? Loses value. Oh, this is this I've seen this a bunch too, but this one don't get old This don't get old I mean that don't get don't that don't get on no better, man. That is an amazing amazing shot amazing Sequence of events everything had to be perfect for this to work.  I imagine a few would have been now When it mattered at the end of the season History might be different Wrong. Oh my god. Oh my god wrong Sheesh Look, this the moment ad was like Yeah, that's I think that's who I want to play with Look at this. No, go back. Look at Anthony Davis's face, bro. Anthony Davis like really Really? That's crazy, bro. That's a ridiculous He sort of looked over Anthony Davis and pointed, you know, I've seen this clipping bars, too It's a good one though. Stephen Adams amazing step. I mean, I was called this man Steph Curry. He was shooting with Steph Curry Reigns Also, that's really wow That's a nasty shot. This is also one of the best shots I've ever seen That's one of the best shots I've ever seen, bro It does not get better than that shot and they could have caught the foul and everything Look at this, man Ridiculous ridiculous. Oh, I remember I was and this one happened. It's a running stuff One of the best curry moments Legit one of the best curry moments of his career Gray shot tray, but the bulls won this game Ha this game with the triple Went to triple over time What they did in these last two seconds for the bulls to win this game a senator t They fouled autoporter and autoporter had ice in his veins And he hit all three free throws We end up winning that game.  A lot of stuff happened This is bea-litsa.   I don't know if I remember this one Okay, John Wall, Avery Bradley, good defense And y'all know John Wall ain't a shooter like that, bro. That's a big shot That's a big shot John This is a good series of my mom's thinking this is uh This is the kelly old linux series. I think it was a kelly old linux series Five seconds remaining Jimmy Butler. This is one of Jimmy Butler's first games as a part of these 76ers One of his first games on the team He's their flozer He loves a spot too. If I'm going to be baller late in the game I'm guarding that spot because that's his spot. It's his spot. It's kairu spot. It's a lot of people spot That's jimmy spot And I'll get better than this give me the ball give me the ball Come on, man He's just be sending people home on a regular In 14 years 14 years of not winning the playoff series and damia lila comes in as a like year three year four player Does that to him? LeBron Jesus Christ That's a big shot because I think this series went to six or seven So they needed that shot And like this team is really bad. This LeBron team is really bad And uh here they are You know what I'm saying here they are they went to the finals if you don't remember But they almost got eliminated in this first round by Get dola deep on them I mean, y'all know this clip ultimate ice in the veins moment Ultimate ice in the veins veins moment bang tie game with five seconds of Ridiculous shot Oh LeBron, this is like the turnaround off glass, right? Run Yup Oh, man, oh man I was just watching an interview with Bradley Beal when they were talking about the shot He just couldn't believe it, bro. That's a great defense. That's a bad shot, but it's LeBron And he hit shots Oh cold. Oh cold Double team don't have to pass it Let's go, man. Oh, man Every time this man pop up in the video, I just I don't know. I just so sad That's my guy man. That's my guy That's the piece cold That's the piece cold Ice in the veins for sure LeBron down by two Iggy on them But I don't remember that shot I don't remember that shot, but Miami LeBron was was ridiculous, bro Miami LeBron was ridiculous Oh, he ain't called bank He called game When we watched a lot of Paul Pierce clips and games and stuff, you realize just like how How good of a player he was, you know what I'm saying? This is old him This is old him Uh-oh Mellow at the guard versus my bulls Luau played decent defense The trigger was just too fast, bro. Look how fast he released this ball, man Look how fast this ball went from his hand to the rim You can't guard it. It's nothing better. You can do Luau. It's just happened to be that way. It's nothing better. You can do Boy both teams hitting such big shots great defense.  Yeah, he got lost What a series I think this series went for I think it was Anthony Davis first series in the playoffs and play out in his playoff career Malik Nice shot. Malik nice shot. Now stay off the weed Malik Yeah, now we get to a point. We're just seeing the same clips every video Solomon Hill Yeah first win of the season first win under under the coach You know Yep Is this the end of the video? Oh, you should always end the video with this one because he's sitting in your home You know what I'm saying? It's good It is good ridiculous I would love to hear my brain call on this shot I would love to have my brain shot a call on this shot the bang that he wouldn't hit on that one At some point he did this Oh, George and one And one and if I'm not I'm trying to remember this game Can rush to westbrook foul at foul out of this game? I'm gonna be getting my names. Oh, no, I'm getting my games mixed up the game. I'm thinking about is getting to Utah Jazz Give it back to him Great defense Steph Office just be better sometime and dame got that He gets so much Height on this jump shot Oh, man finds rose Rose trying to get open fires away Bang it's over the bulls win at the buzzer Oh We get back to these times bulls fans, you know what I'm saying? We're getting back to these times They won't be there bro. It's gonna be somebody else Give us some time give us some time And y'all know how yeah, okay, this is the end of the video. I respect that as it's the at the at the end crowd silent Silence Definitely ice ice in his veins player We enjoyed the video leave it a like man. We'll be back a little bit later with some more


What is going on guys, it's your boy DPJ here today with another Destiny video and in today's Destiny video I'm going to be opening 10 post master packages but before we get to the video, if you guys do enjoy this at the end, if you could leave a like, I would appreciate the support and also may I take a second out to tell you guys about my new apparel shop, my clothing shop which is linked in the video description. If you guys wanna go over there and check out the epic DPJ product, that'll be absolutely amazing, it really would. Like I said, link is in the video description. We're getting straight into the video.  Okay, so what we've got here, we have one crucible, we have one, two, three, four, five, Kryptok and we have one, two, three, four, new monarchy.  And I might as well just leave them here. Just gonna take up space in my vault and shit's on there as well, just leave them there. But we're gonna start with a Kryptok and any engrams or legendos I get I will open in this video. Okay, so we get two blues, nothing great, three more blues, a legendo, not bad and one blue. Two more blues and under city and two more blues. The shade I've had about 10 bazillion times. Okay, let's go with a crucible, why not? And I got the Ulysses tactical, fucking, I don't know, Titan Boots, they can't be for the warlock. Let's go with this one here. From new monarchy, I would really like a ship or a shader I don't own. That would be absolutely epic. I mean, I only got one shader, a mouthful, I think it's called, haven't even seen the others yet. I'm all alone.  So I better check down here every time I open a package. Okay, shader, ooh, oh, oh, oh, oh, so that one must be for the Titan, it says there. And that one is for the warlock, which looking pretty bad, that's by the thingy, but I'll have to check that out in a second.  Come on, game, give me a shader. Oh my days and a mouthfulite.  Now I'm gonna have to make space for three chests so let me just quickly put chests inside my bolt. Okay, let's just put in that, that, and that. What defense is it gonna make? And I think that's all I got, wasn't it? Yes, it was, oh, oh, was it? Did I get something else? No, that's it. Okay, we will open these engrams first to see if I get anything decent out of it. Come on, Crypto, please, give me a Legendary, or give me an exotic out of my Legendary. Not that I need any exotic coordinates, or do I? No, I don't, let's start here.  Oh, hard lock charm, Legendary, shut going, not bad. Let's all start with this, and I got the Italian Grace. I think I might have another package, but this will be 10 plus packages, and Legendary is what they're here. Here we go, here we go, go, go, go.  Let's just put that in there for now, I'll delete it after, it don't really matter. And let's grab that blue and open these, open these, and see what we get, I ain't gonna get nothing great out of these, but who cares? Might as well get them out of the way.  Nothing, there we go, let's just check out, sorry. What I got, okay, I got, that, look at the range on that, ridiculous. I'm in range, so look at the impact, even crazier. I got the hard lock charm, oh, oh, nice. We got crowd control, we got final round, and we got injection mode. I'm gonna reroll this, I haven't got this shotgun, and I do like the look of it, I meant to buy it last week, but I brought something else, but I will reroll this shotgun, so ain't too fussed about that, what else did I get, again, how many snow? I got these gauntlets, which are Italian Grace, 50 discipline and 56 strength, increased reload speed of auto rifles and grenade, the hits restore melee energy. Let's have a look, what these look like, if he wants to load. And standard, standard. I'm gonna get rid of that while I'm here. Chest, I got three, well, two chests, didn't I? There's two chests. I got this one for the, no, Titan, so I think I already have, and I got this one for the warlock, which I'm liking to look up new monarchy, is my shit, it's what I like to roll.   Let me put on that God of War. Oh, sexy in red, what we got in this, we got a 78 discipline and 77 strength, carry more ammo for sniper rifles, and carry more ammo for hand cannons. Not bad whatsoever, didn't I get any boots? I got these for the Titan, which are just ridiculous. And that's it, that's all I got, from 10 packages, one legendary and about 10 blues, nothing great whatsoever to be honest, maybe I'll get rid of these while I'm here. But guys, that is it for another video, I hope you guys enjoyed it, if you do enjoy these package openings and engram opening videos, if you could leave a like, I would appreciate the support, it really does help out. Thanks for stuffing by us always, and peace out until next time, peace.


The galvanostatic intermittent titration technique, GITT, is commonly used to measure the diffusion coefficient of lithium ions in insertion electrodes. However, this method can be slow and difficult to interpret, so researchers have developed the intermittent current interruption, ICI, method as an alternative. This method uses Fick's law to calculate the diffusion coefficient based on the amount of time it takes for the current to return to its original value after being interrupted. Experiments show that the ICI method produces similar results to those obtained using GITT, but with much shorter measurement times. Additionally, the ICI method can be used to correlate the diffusion coefficient of lithium ions with structural changes observed during operando x-ray diffraction experiments. This article was authored by Yu Chuan-Chien, Haidong Liu, Ashok S. Menon, and others.