Advent of Code(x) | Day 2 - Python | Using OpenAI's Codex to solve Advent of Code

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello again back for day two of trying to solve the advent of code with codex today we're trying with python and the challenge is to take instructions of the moving of the submarine and then kind of see what is the area under the graph of it so multiply your final position x and y and whatever you get as the produce this is the answer and so let's take the input and first let's try let's remember that yesterday we found out that it's nicer to try with the example input so we'll do that today and let's see how can we explain the instructions to the code in the best way so i will copy paste like this and add that in here and i will also actually i will just copy paste the whole thing and see if we if it starts well so i'm going to add a lot of space for the response i'm going to ask for the python syntax highlighting and i will look up how to do comments in python because i forget so learn python there it is um so comments are with a pound i knew that so let's add that everywhere and i expected to start with adding some more information rather than adding some code and that's okay we saw that yesterday and let's see interestingly enough it knows about our gold stars but that's actually not what we need so i will delete all the way until here and i will just keep the import import and we'll try again so it expects me to have this file called input txt so i'll make sure to copy my input into that file so first i have this and i will add the second file i'll call it input.tx txt into which i'm going to only copy this later on i will copy the whole thing whoops no new files and so 150 is the correct answer i wonder if this is what it should be or just because it got this in here but there's only one way to find out let's copy the whole input this time and let's click run and let's take this number and add that as a solution see that's right that's the right answer well that was unexpected i expected i'll have to do a little more of explanation but it seems like this code was perfectly or sorry those instructions were perfectly explained for the ai kudos to you so some interesting content that we can add to this unexpected short video is how does one continue after you have your prompt prepared and the easy thing that you can do is click on view code and then basically it turns your input into a pos command then you can integrate that into your code and for the api key you have the guide in the developer quickstart there's a whole section of documentation which is written pretty well and write your code whatever way you want it so if it's a website for example that does or some program that runs locally and then just copy the whole thing as a post command and this is the input that you need for the ai part of it thanks for joining for one more fun day of the advent calendar of adventure code and see you tomorrow
Info
Channel: Natalie Pistunovich
Views: 216
Rating: undefined out of 5
Keywords: codex, openai, python, nocode, no code, replit, adventofcode, adventofcodex
Id: r7opSyZ6di0
Channel Id: undefined
Length: 5min 30sec (330 seconds)
Published: Thu Dec 02 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.