 Great. All right. So let's at least get introduction. So let's say hello, hello. I guess probably people know me. I'm Jeremy, co-founder of Fast AI, and we're going to be doing a careful, thorough and correct walkthrough of Fast AI lessons and more generally, how to data science, I guess. That's the plan. And we will see who ends up being regular guests with us. But at least we have at least two regular guests, hopefully, being Radek and Nick. So Radek and Nick, do you want to say hello and introduce yourselves? Sure. Nick, want to go first? Sure. I can go first, Radek. No worries. Hi, everyone. I'm Nick. I'm friends with Jeremy. I've been involved in machine learning and deep learning over the last, geez, longer than I care to think about, actually. But it's great to be here. And yeah, I'd love to help you out, however I can. And I'm looking forward to getting into it. So nice to meet you all. And so, Nick, your background is mainly trading, I guess? Yep. Yeah. Mainly quant finance, yeah. And it'd be fair to say, like, you're extremely, extremely good coder, but you haven't had as much experience with deep learning using Python, like you seem to mainly, from what I've seen, you've used Wolfram quite a lot. Yeah, exactly. Technical background. Yeah, so I suppose I'm a one trick pony in one sense in machine learning and deep learning in that it's usually been pretty heavily tabular data and financial data and some other bits and pieces along the way. Yeah, I've always coded in R and less so in Python. So it's a transition for me. So I'm learning stuff along the way here too. And especially with coming to these frameworks like FastAI, like I'm making my way around them, just like the rest of you are, but it's fantastic to be here. And I'm glad to be on the journey with all of you. Awesome. Hello, everyone. My name is Radik. And super happy to be here. So I guess I was trying to learn machine learning for quite a while. And then I did a fast AI course, which was four years ago. And it changed everything for me. And I have been doing fast AI courses ever since, hoping to contribute in whatever way I can. And just because the home of global AI is clearly in Queensland, Radik and I all happened to be in Queensland within about an hour's drive of each other, in fact. Yeah, absolutely. And AI can take you to interesting places because if it weren't for AI, I wouldn't be able to be here. So that's quite fun. You normally don't expect that to happen when you take an online course. But hey, fast AI is unique in many ways. So I thought we should start at step 0.1, which is making sure that we've got Python working. And not just working, but working well. So these sessions are not going to be about showing options for things, but showing you the one true way, by which I mean of course the way I do it. Having said that, I do actually try a lot of things. I am totally addicted to trying out software libraries and tools and configurations or whatever. And I've been doing that for 25 years. So I have actually more than 25 years. So yeah, I find a lot of people on the forums watch a fast AI course and then go and have this conversation about how to set something up. And nobody actually seems to just set it up the way I said, just do it like this. And when I say, no, actually do it what I said. And then people are like, oh, wow, that does actually work. So before you get into complicated things, you read about in the blog somewhere, just do this. And you're going to see me do it from scratch. So you'll see it really does work. So one of the things we're going to be doing a lot is using a terminal, which a terminal looks like this, which is not the most exciting looking thing. And I started out back in 30 years ago, not using a terminal much at all. I was all kind of Excel, VB, whatever. And those were all very useful tools. But the terminal is great for data scientists because rather than having to have a long list of click here, click next, minimize that, click there, drag here, you put it in a little script and you just say run the script. You can do things very quickly. You can automate things. It's also like the difference between me speaking to you with English language versus me holding up pictures and diagrams or hand signals. Language is a really powerful way to communicate with a human and also with a machine. So there's a reason we're going to be using the terminal. A lot of the things we do, there will be gooey ways of doing it as well. But because this is the opinionated do-it-my-way version, that's what we're going to be spending a lot of time on. And I want to like assume nothing except that you like know how to use the computer and you know the basics of Python. That's hard for me because I've been using terminals in Python and stuff for a long time, so I'm highly reliant on people asking questions. And I would certainly appreciate it if people ask questions here in Zoom, directly on audio if possible. Otherwise, on YouTube Live, don't use the Zoom chat because it's a little bit harder for me to like zip in and out of. So yeah, before I get started, anything particularly, Nick and Radek, that you were hoping to get out of these sessions or to share in these sessions? I know, Radek, you were interested in learning a bit more about paper space, I believe. Yes, yes, that's true. I'm wondering where it fits in my stack as a data scientist, if it has a use. So I'm thinking about having something that I could access in my browser without thinking about starting any instance somewhere and essentially just add a click. This could be helpful, not even for doing the course, but just something useful to have. So definitely looking forward to learning about how we can use paper space. And of course, Radek, you're an AI expert in Nvidia, so it's not like you have a shortage of GPUs you can access, but they're not necessarily set up in as convenient a way as you described for just jumping into a browser and starting work, right? That is true. And I'm thinking, so I want to use tools in a way that speeds me up. I want to create an environment where I feel comfortable, where I remove the tools from the equation and I can focus on doing the work. And that not only includes work for professional work, but a big part of being a data scientist is continuing to grow your skills. So if I could be working on something and very often in data science, you still have to wait for something to start or for some calculation to complete. And in those units of time where it's two minutes, three minutes, 10 minutes, I would jump onto Reddit or would essentially waste my time and my attention. If I would have a window in my browser, a tab, I could jump and do something useful or something exciting, like for example, submitting to a Kaggle competition or trying out a new library. I think that would be a really, really nice outcome. So I'm curious if that's something that paper space can provide. Fast iteration speeds important for sure. By the way, I can hear you okay, but you're a little quiet and I don't know if you've got a headset you can use or a microphone you can move or a volume control you can change or anything. How about you, Nick? Yeah, I would reflect what Radek said straight off the bat there that you want to just have as little friction as possible in your tool chain. And I think one of the great things about doing these sessions is for people who it can be intimidating. I think once you really start to get down into the tool chain, when you go from perhaps having tried your first notebooks on Kaggle or you've been on Colab or something else, it can be intimidating to actually start getting down in the weeds of your system and getting to really know it. And some things can be so confusing. It's like, oh, should I be using condo? Should I be using Mamba? What's the right Python environment? All these things. And it can be intimidating to find that out. So it's not always great, right? Exactly. And almost everyone is opinionated about how they want to use their tool chain for their thing. But I think what I hope that everyone gets out of this is a way of, as you said, there's a canonical fast AI way of doing things and to be able to have a tool chain that's as friction-free as possible so that you can get productive with whatever task in your general compute environment, I think that's fantastic. And yeah, look forward to it. Anybody else listening or on YouTube Live want to say what you're hoping to get out of this? Hello, everyone. My name is Ashi. Hi, Ashi. I'm trying to switch on my video. Can you guys see me now? Sure can. Where are you joining from, Ashi? I'm in Brisbane. What do you do? Are you working in Brisbane or student? Yes, I'm working as a graduate data scientist at Rio Tando. And it so happened that today I don't have any meetings. So I was like, this is good. I'll join in here. And I can totally reflect on what Nick and Radick said about having as little friction as possible because like since I'm a graduate data scientist, I'm just starting my journey as a data scientist. So trying to become a data scientist is how I describe myself. And most of the times, the problem that arises are just conflicts and libraries. And I want to do data science, but I still end up doing lots of data engineering stuff, which is good to realize that you're learning what a data engineering role or that sort of thing, what they do and help us in getting our environment set up, which is good to learn that they do a lot of stuff. And I have huge respect for the data engineers at least at Rio now. But also learning that it's a good thing to, you know, what my interest line was, it was just data science, and I would like to do that. So that's something I'm looking forward to as well for this session. Yeah, I mean, there's a lot of stuff I think we need to really dig into over the coming weeks, you know, and it needs to include stuff like, you know, SQL and, you know, working with CSV files and all this stuff. And it's good that all of you have talked about kind of decreasing the friction of data science, because it's not just about doing it more quickly, but if you have a lower friction, then it's less cognitive overhead for your brain and thinking about the process, which means there's more room for your brain to think about solving the problem. Yeah, absolutely. Okay, anybody else? Yeah, Jeremy, I'm just really enjoying the narrative. And also, I'm hoping you'll be able to tune into the environment by the end of it. So I've had a bit of a troll with a paper space, but I finally got that going after about less than five weeks. And so anyway, that's set me back a bit. But so I'm really grateful that you're running these additional sessions. That's great. Now, could you quickly introduce yourself? Who are you and where are you joining from? Me. I'm a QUT in Brisbane. And I'm a late entry PhD student. I'm just about coming to the end of that. In fact, I saw you at the ISDM when you presented there. Great. And it looks like your name's Daniel, according to. And when I'm playing in the decomposition of heterogeneous data into homogenous sections and then using that for modelling of simulation. Oh, interesting. Great. All right. Well, let's make a start then. So I'm Yeah. So please just dive in any time. I do recommend if you're planning to join, you know, on a regular basis. The best thing to do is to get a headset with a boom, like I have here. And like I see Nick has there. And then you don't even have to worry about muting yourself, especially if it's a noise cancelling headphone, because you can then just chat anytime. Yeah. And as I said, just don't don't feel like you have to wait for the right moment. Just jump in and treat this like a conversation. Especially if I kind of like do something that you're like, what did Jeremy just do? Or I talk about something as if everybody knows about it. And you're like, I don't know what that is like, please ask. So let's start. So step one to working with the terminal is running a terminal on your computer. So I guess, you know, people here hopefully either have a Mac or Windows or Linux. If you have a Chromebook, things are a bit difficult. And so I would suggest trying not to use a Chromebook. Right. If you're on a Mac to start your terminal, just if you Google for Mac OS terminal, Apple will tell you what to do. You can use command space type terminal. You can click Launchpad type terminal or in the folder. You'll see lots of conversations online about all the different terminals you can download and use. As you'll see, it really doesn't matter. Okay. So just use the one you've got. If you're on Linux, you probably already know how to use the terminal. If you're on Windows, Windows now has a terminal as well. So if you just go to Microsoft Store and type terminal, it'll download that for free. Okay. So what's a terminal? A terminal is strictly speaking, it's a program looking like this that knows how to display a console window or a shell window. Now the thing inside it with the flashing cursor and these words and stuff is not strictly part of the terminal. That's something called a shell. So this thing called the Windows terminal can start a number of different shells. It can start a shell called PowerShell and so forth. So there's two different things. There's a thing called the shell. There's a thing called the terminal. We often use them a little bit interchangeably and that's fine. But the first time you start the Windows terminal, it's actually going to start something called PowerShell, which looks like this. So if you're running Windows, the next thing you need to do is type WSL install, which stands for Windows Substance for Linux. And nowadays in Windows, it's a single line. You just type WSL dash, dash install. And it says do that in Administrator PowerShell. So if you type start PowerShell run as administrator, right? And then you can copy and paste that into the window and then reboot when it's done. And then you'll have actually an entire copy of a Linux distribution called Ubuntu running inside Windows. And that's what I recommend for Windows users. Okay. So once you've done that, you should now find that you can click here and go Ubuntu rather than PowerShell. And one of the things I like to do is to get all of my tools working so that they do what I want kind of automatically each time. So I don't use PowerShell very much. I mainly use Ubuntu as I expect you will be especially for this course. So if you go into settings, you can choose the default profile as being Ubuntu. And then next time you open it, it will do Ubuntu by default. Okay. So first time you run it, it'll ask you to choose a username and a password. That's because this is a whole separate operating system. So I've actually set up a new user totally empty. So I've got an empty, I'm going to start with a totally empty kind of virtual machine here. Okay. And then, you know, the other thing I think is a good idea is to kind of give your terminal a full screen. So on Windows, for example, if you hit Windows tab, you have the ability to kind of move things around. And if you hit alt enter, you'll get a full screen. So now I've got lots of room for working with my terminal. So I'm not sure for whatever terminal you use on Linux or Mac, what the equivalent keyboard shortcuts are, but Google for keyboard shortcut, Mac terminal full screen or something and virtual. These different like separate kind of virtual windows are called virtual desktops. Very good idea to learn to use virtual desktops. Okay. So this is, here we are in the terminal and we're going to set up Python. Now the first thing to do in your terminal is to type Python. And this is bad. I typed Python and something happened. I didn't want something to happen because we actually want to install our own version of Python. And so if you type something happens, that means you've already got a version and we definitely don't want to use it. And the reason for that is that the version that you're going to see by default is going to be what's called the system Python. It's the Python that your computer uses for like running stuff. We want to put in a separate version of Python. So when I type a command like Python, what it's actually doing is it's finding this somewhere on your hard drive and running that program. And you actually want to know which one is it running. And so you can type which followed by the thing that you want to run Python. And it's going to tell you this is running from something called slash user slash bin slash Python. Now on the other hand, the user I created, which is called JPH00, if I want to find out where I am right now, I can type print working directory pwd. So there's this idea of like directories, which hopefully you're kind of somewhat familiar with from using like, you know, the finder or explorer or whatever. So on your computer, you know, there's some directory that you're in, in finder or explorer, and that you're seeing the contents of it. And you can kind of move up and down and move around. And there's kind of a concept of a current directory you're in. So in the terminal, it's exactly the same. There's a concept of what directory I'm in. And if I type pwd, it tells you what directory you're in. So currently, I'm in a directory called slash home slash JPH00. So on all of the operating systems we're talking about today, I believe there's the same idea. Actually, I don't know if this is drawn Mac. There's an idea of a home radic or neck. Are you guys Mac users? If you go into terminal and type pwd, do you end up in some kind of home directory? Yeah, you do by default in Mac. Yeah. Okay. And that'll be like slash home slash neck or whatever. Correct. Cool. Yeah. Home slash your system username. Great. So all the same. Terrific. So generally speaking, we want to install everything into our home directory. We don't want to be using any versions of Python or anything that are in anywhere else such as this system directory. So let's go ahead and install our own version of Python we can use. And there is one and only one correct answer at the moment in my opinion to what should I install, which is to install some kind of anaconda distribution. So Python is an open source program. Lots of different people packaged up for your computer. Which Python you install is going to make a huge difference to how easy everything is. To me. Yeah. May I ask you a question, please? Are you using Windows 11 or Windows 10? I'm using Windows 11. They're almost exactly the same. I actually don't like it quite as much as Windows 10 to be honest. They're about to force everybody to upgrade anyways. So I just bit the bullet. Sure. Thanks. It's just I guess with the WSL installed, there is a slight difference between that. So tell me again, what's the difference? With the WSL installed, I guess under 10 you have to specify WSL 2 instead of something. I would suggest a good reason for installing. Yeah. I do think Windows 11, the WSL story is a little easier. So that's probably one reason to upgrade. Also, if you do have a Nvidia GPU in your laptop, like I do, it's much easier to use it in WSL if you use Windows 11. Okay. So the particular distribution I strongly recommend using is called MiniForge. Sorry, actually, we're not going to use MiniForge. We're going to use MambaForge. MambaForge. I always get confused. MambaForge. So let's go ahead and install it. So if we scroll down, we'll find installers for MiniForge. Keep scrolling down. MiniForge, PiPi3, click on it. Here you are. MambaForge. Okay. So I'm going to try to remember to put stuff in here as we go. MambaForge installer. So let's do everything through the terminal. I think it makes life easier. So not PiPi3, just MambaForge, plain MambaForge. So we'll find, so I know I'm on Windows, but I'm using WSL. So that means I'm effective really. I'm Linux. And I've got most computers AMD64, unless you're on a Mac. So I'll right click on this and I'm going to choose copy address. Okay, let's go back to our terminal. So in our terminal, you know, just like in find or explore, it's good to keep things nicely organized. So let's create a directory to put things we download into. So to create a directory, we type Moctur, make a directory, and then we'll call it downloads. So if I now list the directory, that shows me or LS shows me all of the things that are in this directory. And so I've now got something called downloads. So to make that the current directory, I change directory CD into it. Now, typing downloads takes far too long. So instead, I'll just type the first couple of letters and then hit the tab key on my keyboard. And it fills it out for me. So the tab key is very helpful key to use in, in your shell in your terminal. So we need some way in the terminal of downloading a file. And the main one I recommend using is called W get. So W get gets a URL. And make sure you know how to paste things into your terminal. So I'm trying to remember, I think there's some things you can fit around with, or maybe it's just a default. So in, I think maybe it's a default in, in WSLs, in Windows terminal, you hit control shift V to paste. So there's the thing that I just copied URL. So if I hit enter now, it's going to go ahead and download that for me. There we go. Okay. Now, with data science, you spend a lot of time waiting for things. And so don't spend time waiting for things like downloads, do something else at the same time. So you'll see here, there's a little plus sign that lets me create another window, or I can use control shift one. Now I strongly recommend using keyboard shortcuts, wherever possible. So if I hit control shift one, I've now got a second terminal running, and I can control tab between them. And so now we can keep doing things where that's happening. Just going to switch to my fresh new user. Okay. So, so while that's happening, let's talk about if you've tried to install Python before, and you've got a million different versions of things, that can get really confusing. I strongly recommend trying to clear everything away and starting from scratch. So the first thing is if you're in your home directory, so if you see this little tilde here, that means I'm in my home directory. So although my working directory is slash home slash JPHOO, on Linux and on Mac, most shells, the shortcut for your home directory is just to call it tilde. So if I CD into downloads, change directory into downloads, it says you are now in tilde slash downloads. So it's a shorthand way of saying slash homes as JPH00 slash downloads. Okay. If you've got any other anaconda, mini conda, mini forge, whatever here right now, delete it. And so let's say you've got a mini conda, for example. So to delete a directory and all of its contents, well, first of all, you could just move it out of the way. If you're worried, you might lose something important. So to move something, you type MV for move. Move mini conda to you could call it like mini conda dot old say, and that now is going to get out of the way. It's not going to interfere with anything. So either remove or move out of the way any existing installations. The other thing you want to make sure is you don't have any We don't have voice of Jeremy. Sorry. We had interruption, I think. Oh, you lost me for a bit. Can you hear me now? Yes, it's working now. Okay. How long did you lose me for? About five seconds. Oh, just five seconds. Okay. Great. Thanks for letting me know. Okay. So as well as making sure that you don't have any other copies of anaconda or mini conda or mini forge lying around, you also want to make sure you don't have any copies of Jupiter installed or anything like that installed in your system Python. So if you type ipython, you want nothing to happen. This is what you want. Or if you type Jupiter, you want nothing to happen. Okay. If something is happening, right, then try typing pip uninstall, for example, ipython and Jupiter. Try to uninstall all the copies of this stuff. You don't want them in your system Python. It's going to make things very, very confusing. If you can't uninstall things no matter how hard you try, then find out where that is. So for example, type which Jupiter, right? And if you've got it installed, it'll tell you since slash user slash bin slash Jupiter or whatever and delete it. So to delete things, to delete a directory and all of its contents, this is obviously very dangerous to be careful. You don't delete something you don't want to RM to remove minus R means recursively. So all folders and files underneath it. F for force. So do this without asking. Many condor.old, for example. And you could do something similar. If you had a slash user slash bin slash Jupiter, for example, you could type RM slash user slash bin slash Jupiter, and that would get rid of it. So you wanted to be at a point where, yeah, you don't have ipython, you don't have Jupiter, and you've downloaded, you don't have any kind of any kind of directories in your home directory. And you've downloaded MamboForge. All right. Any questions or comments so far? If you're kind of trying to follow along and something weird happens, feel free to let us know. You're welcome to share a screen, you know, debugging will help you. Yeah. As you can see me, hopefully you can. I'm Rob, I'm down in Hobart. Hi, Robin Hobart. I love Hobart. It's a great place. It's just got above 11 degrees outside. I've been there to play Royal Tennis, have you ever been there? Oh, yeah. Yeah, I know the tennis club there. Yeah, beautiful. Anyway, I work for the Bureau of Meteorology. There's a bit of background. Oh, you're the guy that did the clouds to tech? Yeah, that's me. Yeah, yeah. Yeah, that was fun. I have a quick question. Would you mind talking a little bit about Condor versus Mambo? Yeah, we're going to do that now. So absolutely. Oh, sorry. No, no, don't be sorry. Please, any time, jump in. All right. So let's just get this installed, first of all. So we've got, okay, so we've learned that LS lists the directory that we're in right now. And LS minus L is like L for long form, gives you more information about each thing. And so long form, it tells me how big it is. Now, that's quite hard to read. So another really helpful, these are called flags, really helpful flag is minus L minus H. H is for human readable 89 big. And when you pass multiple flags to a program like this, you don't actually have to put them each with a dash, you can just put them next to each other. So minus LH is the same as minus L minus H. So this is list long form, human readable. So we just downloaded an 89 megabyte file. And this is a .sh file. A .sh file is a script. It's something that it's basically a shell script. It's a list of shell commands like LS or CD or which that are listed in order one after another in a text file. So you can look at a text file by typing less. And then the name of the file to look at. Now I'm going to type capital MA. I'm not going to type all this out because I'm lazy. I just hit tab. And then I'll press enter. And so you can see this is what a script looks like. Anything starting with a hash sign is a comment. So it doesn't do anything. And then everything else is literally the shells is going to go through each of these lines one at a time and run them in your terminal. And so this is the thing that installs BamboForge. So to run a script, there's a few ways to do it. The best way to do it is to run it. Well, there's a few ways to do it. I think the way they suggest in the docs is that you type bash space and then this. So let's explain what's happening here. I mentioned that inside the terminal, the thing that's like printing out this information and listening to my commands and doing stuff like LS is not the terminal itself. It's something called a shell. And a shell is just a program that somebody wrote to let me type commands and get answers and stuff like that. The shell that Ubuntu uses by default is called bash. And the shell that Linux, most Linux is used by default is also called bash. The shell that Mac uses by default is called ZSH. They're so similar. My suggestion is just don't worry about it. Like you'll find basically almost everything, I think everything we see today if you use a Mac will work just as well with bash. Macs also come with bash. So it's like a pretty safe thing to run scripts with. So if you type bash space and then that it says, please run this shell script using this shell. So it's going to run this as a bash script. So if I press enter, okay, so this is now running this program called memberforgelinux.sh. So please review the license agreement, of course. Do I accept the license terms? I've read them very carefully. Okay, and it's going to get installed for you. So I'll just press enter. And you'll see here, it's going to install it into my home directory into something called memberforge. Away it goes. Okay. So while that's happening, let's describe what's going on here. So this is installing not just Python, but a whole bunch of libraries. These are all the libraries that it's installing. Okay, so it's finished. That was quick. Do you want this to initialize it? So the answer is yes, we do. And what that means is each time in the future that we open our terminal, it's going to automatically set up our Python environment for us or type yes. There we go. So as it says, for changes to take effect, close and reopen your shell. So let's go ahead and do that. Jeremy, I have a quick question. Yeah, I'm using a Mac and I went through lesson three. And I think you had covered something about installing some of the software including and then getting to the notebook. I'm a bit confused. So Ubuntu doesn't apply to Mac, does it? Everything just described so far will work perfectly on Mac, yes. But should I be using the terminal directly? And I do see the... Yes, I suggest doing everything exactly as I'm showing it. Although the Mac version of the installer, let's see, OSX, the Mac installer might be not a shell script. No, it is a shell script. Yeah, so it looks like it should work. Yeah, I do see... Yeah, I can confirm it is. Great. Great. Yeah, so that should all work fine. If it doesn't, let us know. But yeah, should all the steps should be identical. Great, thanks. All right. Okay, so I just closed and reopened my shell. So one way to do that is just to close your terminal and open the terminal again. And my terminal now looks slightly differently. It looks... It's got the word base before it. And this is the way we can tell that we have our Python environment running. We're inside it, if you like. So we're all set up to use Python. So if I now type which Python, it doesn't say slash user slash bin slash Python anymore. It actually shows me I'm in my home directory. There's a man before directory and there's a bin slash Python there. This is what we want. Okay, you know you've set this up correctly if you type which Python and you get back an answer that's inside your home directory. There's a number of reasons for this, but really a key one, as I say, is that the main alternative is that you'll be using your system Python. That's the Python that your computer uses for like running stuff in your operating system. And that causes all kinds of confusion between what your computer is trying to do and what you're trying to do. It's also super easy when you're using the one in your home directory. Because if anything ever goes wrong, you just rm minus rf member forge and that deletes everything and this run it again and you're up and running. And you want to get to a point where you can do that incredibly easily. So let me now describe, okay, so what I'm now going to do is I'm going to, I'm actually going to show you, I'm going to start from scratch, right? So currently I got that all set up. There's my man before directory created. So I'm going to go rm minus rf member forge. There we go. I'm going to go to downloads and I'm going to even remove the installer we downloaded. Okay. And I'm going to show you how we can do all the same steps by using a script. Oh, and also let's delete the thing that it added. Remember I said, do you want to automatically initialize member forge when you start your terminal? Well, what it actually did was it edited a secret hidden file. Normally LS doesn't show you secret hidden files, but if you add the minus a for all, it does. And so you can see now there's a whole bunch of files that we didn't see before. Anything starting with a dot is by default hidden in the shell. And this one here called dot bash RC, which if you're using a Mac will be called dot zsh RC is a script where all the things in that are run automatically every time you run your terminal. So if we edit that script, then you can see at the end of it, the installer is set up stuff to initialize condo. So I'm just going to delete all that so that we're really back to scratch. Okay. So if I now close and reopen my shell, you can see it no longer says base, right? So we've totally started again. So I don't like to do anything I'm going to do more than a couple of times. I don't like to do manually. So I'd like to automate this whole thing. So which I have, there's a repo called fast setup, which Radick knows well, because he's helped set up some of this, which contains all the things I use to like very rapidly set up everything on a new computer or a new server or whatever. And there's a thing here called set up condo. I just wanted to ask, can you tell me a little bit better now? I switched to a different microphone. Oh, so much. Wonderful. Wonderful. So now that you can hear me, if I could maybe make one tiny comment, please. Please. You know, with the comments, like we've seen LS dash minus A or there was another one MV dash minus RF, the flags, they often have the same meaning for different programs. So if you have MV minus R, that's recursive. I don't think you actually need that for MV. But for example, with LS, the minus H flag, you will see it across a bunch of other comments that the minus H would be human redouble. So it might sound a little bit overwhelming to see these flags that maybe don't seem to make that much meaning. But since you will be using them across many comments, and then there's also a trick to very easily list the flags for a comment, it actually gets quite straightforward. Yeah, that's a great point. Many, many programs have a special flag minus, minus help, which will list all the flags, for example. They can be a bit overwhelming because there's a lot of flags, but that doesn't mean you have to know them all. I mentioned something else, which is like, you know, we're covering a lot of stuff pretty quickly. And so people who haven't used the terminal before, there's going to be a lot of new information here. Obviously, it's a good idea to watch the video afterwards. But something that would I think help a lot of people in the community would be if there are bits that you do read it, watch again afterwards, because you want to learn that bit, is if you write it down, like just write down what, you know, this is what Jeremy said, and here's a link to the thing he was talking about, and chuck it into a blog post that would like help a lot of people. Because, you know, watching a video takes more time than grabbing the best of bits out of a blog post. So that would be something if you're interested in both giving back to the community and documenting it for yourself, that would be amazing. And I guess something we should probably talk about in more detail at some point is how to write a blog post. Sharing things like the blog post or your tweets are on the forums. It has a lot of nice benefits. It's not only that you're helping others, but you're also remembering the stuff better or understanding the things better. When you explain something in words, you know, I often find myself writing something out, and I think I understand it, but it's only at the point of putting it in words that I identify gaps in my understanding. It's definitely great for remembering things. And then another effect that I still have hard time predicting that it is a real thing, but it is, you will write something and you will share it and then somebody else will read it and they will say, hmm, this is what this person maybe knows about what they're talking about. And suddenly people will reach out to you asking you to collaborate or maybe even, you know, might need to professional opportunities. So it's something that's very far away from what we normally imagine that is possible, but apparently it is a very real thing. Well, that happened to you for sure. And lots of our people in our community, when I look at the biggest contributors to our community, pretty much all of them started out without having a job in AI and pretty much all of them have jobs or research positions in AI now. So probably not a coincidence. Now this thing we're looking at right now is a Git repo in GitHub. We'll talk more about Git a lot, but for now it's enough to know that GitHub is a place that has lots and lots of coding libraries and coding tools that you can download, edit, play with, explore and so forth. A very, very, very useful tool to get extremely familiar with. In this case, we want just one file from it, which is the file called set up conda.sh, which is a list of steps necessary to install member forge on your computer. As you can see, it's just 28 lines. It's very short. So how do you download a single file from GitHub? The easiest way, in my opinion, is just to click on the file, click on raw, because you see at the moment it's got all this stuff around it. We just want the file itself. Click on raw. And now there's just the script, right? And now if I click on the URL and copy it, I can now go back here and who remembers what we typed? wget is the way we download something. So if I type wget set up conda, then that's now created a file called set up conda on my computer. And if I want to look at it, remember we type less. And there we can see there's the file. So we want to run the script. And as you can see, a bash script, a shell is a little mini programming language. So it's got a case statement. So the case, I mean, we can look at what it's going to do, right? It's going to check the operating system type. It's Darwin, that's a Mac. It's going to check what kind of CPU you have and it'll download the appropriate mini member forge for your environment. And then it's going to check what shell you're using and then it's going to set up bash or zsh or fish is appropriate. Echo means printouts. It'll print out downloading installer. It'll download it. Carol is just like wget. And then it'll run that bash thing we just saw and it'll initialize it. There's a handy flag for the member forge installer minus b, which is something that causes it to not ask you to check the license and stuff like that. It all happens automatically. So if I now do exactly what I did before to run my script, I could type bash set up conva.sh, that would work. But another thing we can do is the very first file here, hash exclamation mark, blah, blah, blah, blah. This tells our computer how to run this script that says to run it with bash. So we actually don't need to say bash than that. We can just run it directly. So we could try doing that, set up dash conva.sh with a dot slash. This means in the current directory. And that doesn't work. And the reason that doesn't work is because by default, things you download from the internet, you can't just run. Your computer assumes that you know, things are dangerous unless you specify otherwise. So we need to tell it that this is something where I want to give it permission to execute this as a script. So if I type ls minus la, except it's ls minus a would be fine. No, ls minus l. Oh, here's a trick. I want to repeat the last command, but I want to change the a to an l. So just press up arrow to get back the last command. Backspace make that an l. So this thing over here we skipped over before. This is what's called the permissions. This tells you what you're allowed to do with a file. An r says you're allowed to read it. A w says you're allowed to write to it. And this dash here, if that was an x, it means you're allowed to execute it. So to change the permissions of a file, so we want to say that the user is allowed to execute it. We use a program called chmod. So type chmod and you say, okay, who do you want to change the permissions for? And I say this user, that's a w. What permissions do you want to change? I want to add the executable permission. So you say plus x. And then you type the name of the program that you want to change the permissions for. So press tab. And so now if I go ls minus l, I'll press up arrow twice and then hit enter. There's that x we wanted. Okay, so now I should be able to rerun dot slash setup condo. So press up a few times to find that. There it is. And hit enter. And so that's all going to go ahead and download and set that up for us. Okay, so while that's happening, does anybody that will take a minute or two? Does anybody have any questions or comments up to this point? Hi Jeremy. I had a doubt which version of Python I'll be using right now. And in case of some other kind of experimentations, if we want to switch Python versions, do you have any recommendations on that? So this is just going to use whatever the default is. And generally speaking, the default will be the most recent release. So we can check which version it's going to be by looking at Mamboforge. And the latest installers have Python 3.9. So I just use whatever is like the default because that's going to be most likely what most other people are using. There is actually a Python 3.10 now. But the fact that they're making the default 3.9 suggests that folks are thinking that's probably the most reliable thing to use. So that's what I would also recommend using. That's a nice thing about Mamboforge and I combed out that it allows you to create environments very easily. So if you just want to experiment with a different Python version or with some different sets of packages, then it's just one command in your terminal that you have to execute and you're transported to a new environment, which is very helpful. Although I would recommend not using different versions of Python, if you can avoid it, sometimes you need to because you need to check compatibility. A lot of workplaces use really old versions. There's actually, if you look at Python EOL for End of Life, there's a list of when each version of Python became End of Life, which means you shouldn't be using it anymore. So 3.6 is now officially ended security support. So if your workplace is using 3.6 or older, you should be strongly encouraging them to upgrade because it's insecure. And so currently, 3.7 to 3.10 are all supported versions of Python. I do tend to avoid using the very most recent version for probably a year after it's released because I find it takes a while for everybody to get compatible. 3.10 in particular introduced some nasty incompatibilities, which I try to make sure FastAI works with all the versions as long as PyTorch does. But yeah, I'd say the penultimate version is a good point to choose. And that's the default. Okay, so look at that. We just ran a single command and it downloaded and installed. I have run into an error saying, may I share my screen if that's all right? Yes, of course. Absolutely. Do I need to do anything? Yeah, you might need to give me permission to share. I'll stop sharing. And then Okay, got it. Thank you. Okay, so I just stopped. No worries. Sure. Great. This is great. Our first debugging session. Here we go. So this is the error, I think. Expected environment not found at prefix aborting. Interesting. Okay, so did you do the manual version first and then now you're doing the script version? That's right. But I removed the through RMNRF. Oh, I see the problem. Do you see how you've got base in brackets before your? Yes. Okay, that means you're your inside condo right now. So you've removed it, but then you didn't close and reopen your shell. Oh, I see. So let's start again. So close your, close your shell. Yeah, reopen it. Okay, now, so the next thing you'll see here is it's complaining. No such file directory. Oh, that's something else. Never mind about that. Okay, great. So, oh, now, yeah, good. So that's something that Ashley just did is she typed CD with nothing after it and that put her in her home directory. So you've done two on WSLs a bit weird. Most things put you there by default. This one doesn't. Okay, great. And that should run the setup quantifier now. So I would do an RMNRF member forge at this point. Okay. And then, yeah, and then .slash setup 100.sh. And then, yeah, come back. Number four. That's it. Good. Nice. All right, then come back to us if that causes problems. All right. Thank you so much. My pleasure. And the Python versions that we discussed before. It is very rare, but it happens that you might encounter some code on GitHub that you would want to use in your project. And it will use, it will require some Python version, you know, that's much earlier from what you're using. And in the environment that we'll be using in Jupyter notebook, there is actually a way to run a specific version of Python for a given notebook. Okay, should we add that to our list of things to talk about then? That sounds useful. Shall I put that here? Things to cover? Sure. Running. I mean, it's useful in the sense that you don't have to switch environments while you're working on something and usually that would be part of your workflow that you want to do something to your data. Thanks, Radek. Great. Okay, so I have to close and reopen my terminal. Done. And so again, we've got that base there. Okay. And we'll also double check with which Python. Okay. So with Python installed, we can run Python scripts, which isn't that useful of itself. I mean, because we want to be able to like, you know, have some environment we can work in, particularly in particular, we want Jupyter. So we can install, we can install stuff into our Python environment. But actually, this Python environment, it's more than just Python, we can actually install just any program we like, in fact, into here. So basically what Mamba, Forge, and Conver, and so forth do is they basically create a whole kind of directory of programs and libraries for you in your home directory. So it's not just for setting up Python, but for installing literally any program you want. So you'll find often when you install something, you don't just end up with a Python library, but there's actually programs that you can run, like Jupyter, for example. Jeremy, just very quickly, just a quick interruption. I think maybe some people might find it helpful, even I find it helpful to still try and understand. I guess what disambiguates Mamba from Conver from using PIP? Why would you choose one over the other? That's what we're up to now, exactly. So how do you install software into your Python environment? Well, let's start just by talking about how do you install Python libraries into your Conver environment? And Nick just mentioned the three options you have, which is Conver, PIP, and Mamba. You'll come across all of these three things. Let's just focus, first of all, on Conver and Mamba. So Conver and Mamba are literally two ways of doing the same thing. And they are fully compatible with each other. Mamba is a faster version of Conver. So why would you use Conver? Basically, you wouldn't, but Mamba is very new. So the vast majority of documentation you'll find on the internet uses Conver. Anytime you see something that says Conver blah, you can type Mamba blah, and generally speaking, that's going to happen much faster, at least if the blah is installed. So let's look at an example. So a really helpful thing for playing around with Python at the command line is IPython, that's interactive Python, which we'll play with. Now, I don't have IPython, doesn't exist, right? Now, when I try to run it, it says, oh, did you mean some of these other things? This is Ubuntu talking to me. I don't want, make sure you never install any Python stuff through, through brew on Mac or apt on Ubuntu or whatever. That's just for the system Python. Only use Conver Mamba or PIP. The vast majority of the time, you're going to be using Mamba. So if I type Mamba, if I just type Mamba, then it tells me, okay, well, what do you want to do? And in fact, it even says Conver is a tool for blah, blah, blah. So you can see Mamba and Conver really get mixed up, right? These are things you can do. Most of the time, after typing Mamba, you're going to be typing install. So Mamba install, what do you want to install? IPython. And so what that's going to do is go away and check its index to see if anybody has uploaded something called IPython. And if they have, it's then going to see what are all of the things that IPython depends on. And so it's now going to check with me. It's going to say, okay, in order to use IPython, you've got to install all these other things as well. Is that okay? Let's say, yep, that's absolutely fine. So that goes ahead and downloads those things. And installs them. And now I can type IPython. And there we go. So this is a Python REPL, a REPL is R-E-P-L, a read eval print loop. I can type things and it will tell me the answers. Okay. So this is like a good way for quickly experimenting with stuff in Python on the command line. I don't use it very much because I mainly use Jupyter, but sometimes you're really quick and dirty stuff can be helpful. If you've read Wes McKinney's Fantastic Pandas and so forth book, Python for Data Analysis, he does most things in IPython. To close IPython, you close it in the same way as the fastest way also to close a bash or ZSH shell, which is to hold down control and press D. And that exits. Okay. So control D is a nice fast way of closing probably most programs at your terminal. Okay. So that's how you install stuff. So let's install PyTorch, shall we? So PyTorch install. PyTorch probably gets started, I guess. There we are. Start locally. All right. Get the latest version. It's choosing Windows, but I'm actually not on Windows. Like, I'm not, WSL is not considered Windows, it's considered Linux. So Linux, Konda, Python, and then there's various platforms you can choose. So if you've got an Nvidia GPU, which you probably don't, you would choose CUDA. And if you don't, you would choose CPU. I actually do have a Nvidia GPU on my laptop, but just to keep things simple, I'm going to do this. And you can see by default it says Konda install. So remember, it's going to be faster if I use Mambo install. So I'm going to copy everything except the Konda copy. And then over here I type Mambo and then Ctrl Shift V to paste. And enter. There we go. Now, you'll see here, it's going to install PyTorch, Torch Vision, which is the computer vision bit of PyTorch, Torch Audio, the audio bit of PyTorch, just for the CPU. And this minus C is important. This is called a channel, a PyTorch channel. When people upload stuff to that you can install from Mambo, it can kind of be installed to the main default repository that people grab stuff from, which in the case of the Mambo Forge package we're using is called Konda Forge, or they can upload it to their own channel. So PyTorch and FastAI and Nvidia, we all upload things to our own channel. So to get stuff from the PyTorch channel, you say minus C PyTorch, that says please search in PyTorch's channel for this software. Okay, so it's now downloading all the packages that we asked for and also decompressing them. And so this is basically a list of all of the stuff that it figured out was needed to install PyTorch. Jeremy, quick question. Let's say that I'm, yeah, like I just come along and I type in Mambo install PyTorch or something similar, or even if I'm reading through a blog post or a tutorial and I accidentally type in pip install xyz, have I created a cardinal scene for which there is no return? You mean if you pip install something rather than Mambo installing the thing? Correct, yeah. Yeah, so if you pip install PyTorch, like that is an option here, pip. The thing is though that they've got some extra things here to make sure that you get the version you want, right? Mambo's, so for one thing if you've got a graphics card, right, an Nvidia graphics card, pip installing won't work unless you do a lot of futzing around with installing Nvidia's CUDA software development kit, which you don't want to do that. It's annoying, right? If you use Condor or Mambo to install it, it installs those libraries automatically for you. Even if you're using Windows, your Nvidia GPU will still work. So yeah, in general, installing with Condor or Mambo is going to more reliably give you the kind of correct setup of everything without you futzing around, because Condor and Mambo are able to install what's called binary dependencies, so installs all the libraries you need. If you've accidentally pip installed something, you can just type pip uninstall, the same thing. Problem is though that pip's going to have installed also a bunch of dependencies. Again, they came from pip rather than Mambo, and again, they might not be the right versions that are optimized for your machine. So yeah, you know, I would be inclined to delete my MamboForge directory and start again, particularly if I did that for PyTorch, because it's just really important to have a good PyTorch installation, so that would be certainly my recommendation. I feel a bit the same way when we do Drupada, if you accidentally pip installed Drupada, you know, I'd just be inclined to start again. But if you always type Mambo or Condor instead of pip, just make that your habit, then you won't get in that situation. Can it? That's helpful, thanks. Yeah, I mean. Yes, so for certain things I believe was Tim, there is no way to install it with Condor. I didn't see it. There is, we will get to that, don't worry. But for now, my channel called FastChan will let you do that. Can I just type in or just make a comment? With pip, now if I understand correctly, I think if you just do pip when you set up a con environment, that pip is still going to be, I think, for the system, right? No, no, it's not. It'll be fine. In fact, let's check, shall we? All right, so which pip? No, we're all good. So it should be a problem. No, but like if you were to create a new environment, right, then, because right now you're from the base, right? So if you create your own environment. Well, we haven't got the environments yet, so I wouldn't worry too much. Oh, okay, sorry. No worries. Amin, did you have a question or comment? It was the same as already discussed, so thanks. Okay, so now that we've like installed this stuff, how do we know if it's working? So if I hit up arrow, I can find my ipython. And I could just try importing it. And there it is, right? So I can now type torch dot. And if I hit tab in ipython, it actually gives me a nice list of things. So for example, torch dot tensor. And you can see it's going to give me the arguments. There we go. So that's working. So remember control D. So yeah, another thing we probably want to install is, is jupiter. So there's a couple of different versions of jupiter. There's jupiter lab, there's jupiter notebook. So we'll probably use lab because we're using member forge. This, this condo forge channel, we're going to be using automatically, right? So we don't need this minus C condo forge. So we can just type member install jupiter lab. Okay. So that's got a lot of stuff. It's a big piece of software. But that's okay. It doesn't take too long. There we go. It's finished. Okay. So now we're ready to create our first notebook. So it's nice to keep things organized. So let's create a directory for our notebooks. So I'll make a directory called nbs and change directory to nbs. So that's empty. Okay. And so now we can type jupiter lab and there it is. Okay. So it got a little bit confused here in my version because WSL tried to open my browser, but my browser is a Windows application, not a Ubuntu application. So it tried to open it up and said there was an error. Now it's actually fine. I can still use this. So you can see here if these are hyperlinks, I can control click on it and it opens it up. There it is. Right? If I don't want it to complain like that, you can say don't open a browser by typing no dash browser. And that's it. Okay. And then click or at least control click, actually. Yes. Alan. Hello, Alan. Hi everyone. I'm from Brisbane as well. I'm currently getting over COVID. How are you feeling? Apparently I'm allowed out of isolation today. I don't feel that great yet. No, I'm sorry mate. Much better though. So that's fine. You know, the most important thing to know about for COVID is to take it easy on exercise until you're fully recovered, because it actually makes long COVID higher probability if you exercise when you've still got any symptoms. So take it easy. That's good. Well, I'm going to go for a walk later just to the shops. A nice one. Just I was going to say with that Jupyter Lab and then no browser, this is one of the ones where I discovered the aliases were really my friend. I was about to show that. Yes. Yeah, exactly. So I actually have even an alias for alias. So for things that are kind of long and annoying to type, you can create an alias. So there's a few things we could do to not have to type Jupyter Lab no browser. One would be to hit up arrow. Now, one nice thing about up arrow is if I close my shell and go back into it, up arrow still works. And by the way, none of this stuff is magic, right? If you're wondering why does that still work? It's because bash creates a file called dot bash history, which is actually really useful to know about because everything you've ever done is listed in that file. So here's all the things we do. This is another good reason to use a terminal is you can always go back and repeat things. This is actually how I create scripts. I do everything interactively. And then I copy and paste stuff from my bash history into a text file and that creates a script. So if I hit up arrow, I can get my Jupyter Lab browser. A very, very, very helpful thing that works in bash and ZSH is the control R keyboard shortcut. If I type control R, it says reverse search. And then I type JU for Jupyter. That will show me the last thing I type with those letters in. Okay. And if that's not the right one, just hit control R again and it'll keep searching. So that's very useful. Jamie, is there any way to clean this history clear? I assume that after a while it becomes such a long file. It's very difficult to make a script out of it. Don't worry about it. It's just text. I think it automatically cleans itself. But yeah, just leave it. You can always delete it if you want to, or you can even edit it with an editor. But yeah, it's kind of nice to have all your history there, in my opinion. Oh, another thing you could do. Sorry. I think by default it stores 1009 or something like that, but you can set it to something more. Yeah, that sounds right. I think there's some environment variables. And then one other one, which is kind of interesting, is exclamation mark followed by some letters, runs the last thing that starts with those letters. So exclamation mark JU will run Jupyter Lab No Browser. Something that you'll see quite often is exclamation mark exclamation mark, and that means just rerun the last command, as you see. And you can put that anywhere, by the way. So for example, if I type echo $$, that filter out as echo Jupyter Lab No Browser. So there's a little trick for you as well. Okay, so Helen mentioned aliases. I could type alias Jupyter Lab JL equals, and then I could put... I wonder if this is going to work. Let's try it. Yep. Okay, so alias JL equals echo Jupyter Lab. I don't want the echo there, never mind. So let's just delete the echo bit. Oh, okay. When I am editing this line, there's a few shortcut keys to know about. To go to the end of a line, type control E. To go to the start of a line, type control A. And then to go forward and backward by a word at a time, press alt left and right, which radical nick is that option left and right on a Mac? To move by a word? Never had to make. I had it for a month, but couldn't get used to it. Nicky, you want a Mac? I'm using one as we speak right now, because it's better for running Zoom on. But yeah, you can do things like that. Although I'm used to all the Emax key bindings, but that's a rabbit hole. I won't subject people to... Okay. So now that I've got this alias, I can just type JL. And it does the same thing. Now, the problem is that's not going to appear automatically next time I run my terminal. But do you remember I told you about that special hidden thing called .bashrc that automatically runs? So if we put it in there, then it will automatically run. So if I close my terminal and reopen it, there's JL. Beautiful. Now, you'll notice that when I edit files in the terminal, I tend to use a program called Vim, which, as Nick well knows, is obviously much better than the competition called Emax. But you don't have to use either of these. You can use whatever you like. And in fact, on a Mac, if you type open... I can't type an open dot, it will open the finder at this directory. Or on Windows, type explorer.exe dot... Oh, why doesn't that working? That's weird. Okay, that's never happened before. All right. So, amazing. Must be some recent change to WSL, which I will have to look into to find out why explorer.exe is not working. I think you made a typo in the spelling explorer. What did I do wrong? I think you typed it. Explore. Okay. You added an extra period. Yeah, the period at the end is intentional. That's to say, open it in this directory. And I tried to tap complete and tap complete didn't work. So... Is it because they've changed it to edge? It needs to work on my end. No, it's not. It works. I think the problem is with your user, maybe you need to go to other users. Yeah, I tried it in another user, I think. All right, never mind. Come back to that another day. I wonder if like... Yeah, they've obviously changed something. It seems to work for me. Yeah, I don't know if there's never not worked before. Okay, we'll figure this out and we'll cover it in the next session. WSL is super amazing. And one of the things I like particularly about it, WSL, like with the explorer.exe, that trick, I think that's super useful and super amazing. But another wonderful thing that WSL allows you to do is to run GUI Linux programs in Linux. I, for example, use a password manager. I can't imagine living without it. And it's a GPS X that's used. And I can just start it in WSL and it pops up a window in Windows. So I don't have to go via the CLI. Another thing to mention in WSL is you can just access through wsl.localhost. So if I change this to JPH00, I can do it this way. And so here's my bash RC. And then I can edit it with whatever I want to. Visual Studio Code, for example. All right. So, okay. So let's take a quick look at Jupyter. CDNBs. So when I run Jupyter, okay, so I'll control click here. When I run Jupyter by default, it's going to, it's going to kind of be inside the NBs directory. So when it says here, there's nothing in here, like it kind of says slash. It doesn't really mean slash. It means wherever I, wherever you launched me from. So this is the contents of the NBs directory. So I can now create a new notebook like so, run a cell and save. Okay. By default, it's called untitled.iponb. So if I now, so that's now running here, right? So I can't like do stuff here because it's busy running Jupyter. So I'll open up another tab and I can LS. And so on Windows terminal, it's just control tab to switch between tabs. And you can see there it is, untitled.iponb. All right. And we can even take a look at it. It's just a normal text file. All right. Okay. So we have Jupyter working and we can import torch. Okay. That's interesting. Torch.tensor. Cool. Okay. So I'm guessing we need to install IPI widgets. So we're getting pretty good at this. Let's try it. Mamba install IPI widgets. Oh, this is needs to be reopened. Okay. I'm surprised that's not installed by default. But there you go. So I'll close Jupyter, reopen it, control click. I already had it open. And let's see if it now works. Okay. Oh, did I say new? Didn't mean to say new. There we go. And let's see if it now works. Yep. It's not complaining anymore. Okay. And you can see Jupyter lab, you can kind of do like normal GUI kind of stuff. So if I want to delete this, I could either go into my terminal and click and type RM untitled one, or I could right click on this and choose to leave. This feels like a pretty good place to leave things. Does anybody have any questions or comments before we wrap up? I appreciate the session, Jeremy. That was really helpful setting up. Very smooth as well.