1 00:00:07,560 --> 00:00:14,209 So coming back here to the anaconda navigator, we can also launch here , jupyter lab. 2 00:00:14,209 --> 00:00:20,520 So this now looks a bit more complicated, but actually it isn’t because what you can 3 00:00:20,520 --> 00:00:24,890 see here is also a jupyter notebook. 4 00:00:24,890 --> 00:00:34,410 So you can always download such a jupyter notebook and import it into normal jupyter 5 00:00:34,410 --> 00:00:35,410 notebooks. 6 00:00:35,410 --> 00:00:41,930 Or you can also import it into for example, Watson studio or any other cloud hosted jupyter 7 00:00:41,930 --> 00:00:42,930 environment. 8 00:00:42,930 --> 00:00:47,700 So, they are all compatible and this is also pretty cool and what you can see here is that 9 00:00:47,700 --> 00:00:50,190 there are some more windows. 10 00:00:50,190 --> 00:00:57,780 So, you see here a little section so this is a file explorer, and then the other thing 11 00:00:57,780 --> 00:01:03,150 you see here, you have a number of so call kernel sessions. 12 00:01:03,150 --> 00:01:10,470 So, a kernel session is actually more or less attached to a jupyter notebook. 13 00:01:10,470 --> 00:01:16,700 So, this means a jupyter notebook is running in the kernel session and the kernel session 14 00:01:16,700 --> 00:01:19,060 is executing your actual code. 15 00:01:19,060 --> 00:01:25,570 So, you see here this jupyter notebook is of course rendered in my web browser and that’s 16 00:01:25,570 --> 00:01:28,429 communicating with that remote kernel. 17 00:01:28,429 --> 00:01:34,229 And the kernel is encapsulating the runtime environment, in this case, ordinary python 18 00:01:34,229 --> 00:01:35,229 interpreter. 19 00:01:35,229 --> 00:01:44,249 You can also shut down those and restart those, here you have some preferences and a list 20 00:01:44,249 --> 00:01:48,020 of the open tabs. 21 00:01:48,020 --> 00:01:59,819 So the things you can now for example, create a new terminal and you see here there is a 22 00:01:59,819 --> 00:02:07,479 second tab opening so you can mix and match jupyter notebooks and your terminals. 23 00:02:07,479 --> 00:02:10,179 And you can also drag and drop those around. 24 00:02:10,179 --> 00:02:22,909 So you can split and lets add another terminal for example, you can also put it here or here. 25 00:02:22,909 --> 00:02:29,240 So it’s a nice way to get and overview of your work. 26 00:02:29,240 --> 00:02:36,840 So, create a new python notebook here, and then lets put this here. 27 00:02:36,840 --> 00:02:44,519 Ok so you have now, two notebooks and two terminals open at the same time and yeah that’s, 28 00:02:44,519 --> 00:02:49,230 pretty cool and that’s basically it. 29 00:02:49,230 --> 00:02:53,780 So, now lets close all those. 30 00:02:53,780 --> 00:03:02,049 I’ve opened here a notebook from my applied AI course on coursera and you can see here 31 00:03:02,049 --> 00:03:04,330 we can execute shell command. 32 00:03:04,330 --> 00:03:10,439 So, whenever you see and exclamation mark you can directly execute shell commands, so 33 00:03:10,439 --> 00:03:12,110 lets do it here. 34 00:03:12,110 --> 00:03:20,180 So this is called a ‘pip install upgrade’ and some packages here so some of those are 35 00:03:20,180 --> 00:03:25,829 already installed, but some are being collected. 36 00:03:25,829 --> 00:03:28,420 And that’s some sort of a best practice. 37 00:03:28,420 --> 00:03:36,250 I’m always doing at the beginning of each notebook I will have a pip install, which 38 00:03:36,250 --> 00:03:43,819 make sure that I’m always on the correct versions of the dependent software packages. 39 00:03:43,819 --> 00:03:49,319 So you see here the star, star means that the current cell is just actually executed 40 00:03:49,319 --> 00:03:53,780 and once the execution finished, you will see a number. 41 00:03:53,780 --> 00:04:00,400 And a number is a task ID and that’s a incrementing number. 42 00:04:00,400 --> 00:04:04,260 Based on the number you know in which order you have executed the cells. 43 00:04:04,260 --> 00:04:10,260 You also see here, that the jupyter notebook is actually running. 44 00:04:10,260 --> 00:04:18,780 Now its done, so we see here one and what I always do as well is I’m checking on the 45 00:04:18,780 --> 00:04:20,430 correct versions installed. 46 00:04:20,430 --> 00:04:27,060 So you see here, I’m checking for tensorflow one fourteen and keras 225. 47 00:04:27,060 --> 00:04:31,669 And if that’s not the case I’m raising an exception, so don’t worry about the warnings 48 00:04:31,669 --> 00:04:34,470 we are officially on tensorflow 2.x. 49 00:04:34,470 --> 00:04:37,930 So I need to upgrade this notebook soon anyway. 50 00:04:37,930 --> 00:04:46,930 In case you have a long running task and its just not stopping, you can always restart 51 00:04:46,930 --> 00:04:47,930 the kernel. 52 00:04:47,930 --> 00:04:55,020 So lets do this here, and I’m saying often restart the kernel and clear all output because, 53 00:04:55,020 --> 00:05:01,669 once the output is gone I’m really seeing that the kernel has been restarted. 54 00:05:01,669 --> 00:05:06,710 So you see here, all your output is gone and that means you have actually shut down the 55 00:05:06,710 --> 00:05:14,180 python interpreter and created a new python interpreter in the background here. 56 00:05:14,180 --> 00:05:33,060 Another thing which maybe is interesting, lets actually, lets create a new notebook. 57 00:05:33,060 --> 00:05:36,280 So you have here, your output one. 58 00:05:36,280 --> 00:05:49,639 You can always say, ‘ collapse all code’ or ‘collapse all output’. 59 00:05:49,639 --> 00:06:02,449 And reopen a different cells, that way you can improve visibility of the relevant content. 60 00:06:02,449 --> 00:06:05,539 That’s basically it. 61 00:06:05,539 --> 00:06:14,830 So there are more things to explore, but I think that knowledge, you can survive. 62 00:06:14,830 --> 00:06:20,990 And I think I’ve covered around 80% of what’s important. 63 00:06:20,990 --> 00:06:27,860 Maybe one final thing, so you export this notebook into various formats and lets try 64 00:06:27,860 --> 00:06:32,949 the ‘reveal.js’ slides. 65 00:06:32,949 --> 00:06:46,779 Open it in Firefox immediately, and you see here that’s now a reveal.js presentation.