1 00:00:00,510 --> 00:00:05,010 Hey guys, welcome to day 38 of 100 Days of Code. Now, 2 00:00:05,040 --> 00:00:08,189 today I've got a challenge project for you. 3 00:00:08,580 --> 00:00:13,580 And this challenge project is going to be building an exercise tracking 4 00:00:13,710 --> 00:00:17,430 application using Python and Google sheets. 5 00:00:18,090 --> 00:00:23,090 One of the things I've been trying to do recently is to track my workouts and 6 00:00:23,130 --> 00:00:25,620 I've been doing that on pretty much pen and paper. 7 00:00:26,250 --> 00:00:30,330 But wouldn't it be nice if we could track the workout that we're doing, 8 00:00:30,690 --> 00:00:33,990 what time, how long we've been doing the exercises for, 9 00:00:34,410 --> 00:00:39,060 and also figure out how many ice creams we can eat because of the workout that 10 00:00:39,060 --> 00:00:43,170 we did. So tracking the amount of calories we've used up as well. 11 00:00:44,160 --> 00:00:44,370 Now, 12 00:00:44,370 --> 00:00:49,370 a lot of the inspiration for this project comes from the recent news on the Open 13 00:00:49,800 --> 00:00:53,190 AI's GPT-3 AI model. 14 00:00:53,820 --> 00:00:58,740 And it's a really smart, natural language processing model where for example, 15 00:00:58,740 --> 00:01:01,860 if you went onto Wikipedia, you found an article on bread, 16 00:01:02,160 --> 00:01:05,910 you decide to use this model to ask it, well, why is bread so fluffy? 17 00:01:06,480 --> 00:01:11,190 It can actually search through all of the text and find you the relevant part. 18 00:01:11,730 --> 00:01:16,620 So it's doing some intelligent stuff behind the scenes to understand what you're 19 00:01:16,620 --> 00:01:19,620 saying and also understand what the article is all about. 20 00:01:20,190 --> 00:01:23,670 And this is called natural language processing, 21 00:01:23,790 --> 00:01:28,170 but it's just a very powerful one. Now, in our case, 22 00:01:28,200 --> 00:01:31,260 we're also going to use natural language processing, 23 00:01:31,680 --> 00:01:35,580 and we're going to write down the exercises that we did, 24 00:01:35,760 --> 00:01:38,010 but in a normal English sentence. 25 00:01:38,550 --> 00:01:43,440 You can imagine the situation where you're in the gym and you pull up your final 26 00:01:43,470 --> 00:01:47,880 Repl.it. So this is the link to the completed app's console. 27 00:01:48,380 --> 00:01:49,213 Right 28 00:01:51,350 --> 00:01:53,510 Now I've pulled up this same page, 29 00:01:53,570 --> 00:01:56,900 but on the Chrome browser on my mobile phone. 30 00:01:57,350 --> 00:02:01,790 So this is what I might do after a gym workout or after a quick cycle. 31 00:02:02,270 --> 00:02:07,270 And what we're going to try and do is to get the data to go into our spreadsheet 32 00:02:07,340 --> 00:02:08,690 here on Google sheets. 33 00:02:09,590 --> 00:02:14,590 So here I'm gonna type the I ran 5K and cycled for let's say, 34 00:02:18,350 --> 00:02:19,220 20 minutes. 35 00:02:20,060 --> 00:02:25,060 So this is my full input and it's pretty much just a plain English sentence. 36 00:02:25,610 --> 00:02:29,390 Now I'm going to go ahead and hit return to trigger the code to run. 37 00:02:29,930 --> 00:02:33,860 And immediately you can see that my activities have been logged. 38 00:02:34,280 --> 00:02:37,070 So the date and time have been added automatically, 39 00:02:37,490 --> 00:02:42,110 it's understood that one of my activities was running and it figured out the 40 00:02:42,110 --> 00:02:45,620 duration based on the distance. So on average, 41 00:02:45,830 --> 00:02:49,820 it might take somebody 31 minutes in order to run 5 kilometers. 42 00:02:50,210 --> 00:02:54,800 And then it worked out the number of calories I've expended doing that activity. 43 00:02:55,310 --> 00:02:57,290 And it did the same thing for my cycling, 44 00:02:57,650 --> 00:03:02,650 except this time the duration comes from my input and the calories is calculated 45 00:03:03,250 --> 00:03:04,090 automatically. 46 00:03:04,870 --> 00:03:09,310 So this is really exciting and the best part you're going to be building it all 47 00:03:09,310 --> 00:03:10,143 by yourself. 48 00:03:10,810 --> 00:03:14,020 You're going to be using a bunch of things that you've learned so far, 49 00:03:14,050 --> 00:03:17,980 including the Python datetime, strftime method, 50 00:03:18,340 --> 00:03:23,140 using APIs, making post requests, creating authorization headers, 51 00:03:23,260 --> 00:03:24,610 and environment variables. 52 00:03:24,940 --> 00:03:28,450 You're going to be doing a bunch of this, step by step, by yourself. 53 00:03:28,900 --> 00:03:30,760 And if you head over to the next lesson, 54 00:03:31,120 --> 00:03:33,250 there's the instructions for how to get started. 55 00:03:33,580 --> 00:03:36,970 So I hope you're excited to get started and I'll see you on the next lesson.