Placeholder Image

字幕列表 影片播放

  • all right, welcome back.

  • And today, what we're gonna do is a video that's very similar to another video that I did a few weeks ago called Super Quick Python automation Ideas.

  • And what I did in that video was go through basically ideas for things you could automate with Python.

  • And a lot of you seem to like that.

  • And what I want to do in this video is go through or just general project ideas for, Python said.

  • Not focused on automation but just general projects that you could try.

  • That would be fun to kind of do over a weekend or something like that.

  • And also what I did in that video is something that I would consider Maur beginner type projects.

  • And what I wanted to do in this one is more towards the intermediate level.

  • Or that's that's kind of what I've tried to do in this video.

  • At least the whole purpose of this video is really just to get you excited to code and to work on your own projects.

  • Hopefully, it'll also give you some ideas for some project to try out, and maybe one of these ideas will be something that you get super excited about and that you want to code straight away.

  • But maybe it would just be that one of these ideas ignites or lights a little spark in your head for a different idea and a different project that you're super excited about and that you want to work on.

  • I can kind of see, like, either scenario, playing out.

  • I personally really love to just watch other people code, and that really inspires me.

  • And I can kind of derive different ideas for new projects that I want to do from those sort of videos.

  • So that's kind of what I want this video to be for you and what I'll do also is I'll leave links in the description to all of the guitar repositories for all the different projects that are mentioned and what we're going to go through his three different ideas for different projects to try.

  • So let's get started.

  • Okay, so before we get started, I just want to mention that today's video is sponsored by Skill Share Skills shares, an online learning community with thousands of different classes in different topics like business programming, productivity and much more.

  • And it's only $10 a month.

  • And if you sign up using the link that I've added in the description, then you get a two month free trial.

  • The funny thing is that when they contacted me, I started signing up for their service.

  • And then I got completely lost on Step two out of three on the sign up process, and I'd already heard of skill shares.

  • I was pretty confident that it was a good service, and I've seen tons of huge YouTubers promoting it and like, create their own classes on there.

  • So it's pretty confident in it.

  • So, honestly, at this point, my idea was just to save three classes, watch some of them and then make sure that the quality was good to promote them on this channel.

  • But what ended up happening is I just kept scrolling through that page and saving class after class after class, and they ask you to save three classes.

  • But I ended up saving 53 freaking classes, and the only reason that I stopped was just because I'd spent like 40 minutes scrolling through that page.

  • So I have no idea how I'm gonna have time to actually watch all of these classes, but I'll have to make sure to do it somehow because I'm really excited about it.

  • So therefore, even if this doesn't sound like it's something for you, please just go to the link in the description and sign up.

  • You get two months free and you will get lost just like I did, just picking the classes that you want to take.

  • I love to learn things, so I shouldn't have been surprised.

  • But I was definitely surprised by how excited I got for this.

  • So just do it.

  • Just sign up link in the description, All right, so the first idea is to create a script that will store secret files for us, and we'll store these files using a sequel like Daughter Base.

  • And essentially, what the idea is is just that if you have any secret files on your computer that you don't want anyone to see, then you can store them in this like password protected daughter base.

  • And I think that's a really good idea for a project because most auto bases today use sequel and therefore, I think this probably will be a like a perfect opportunity to kind of practice working with sequel and Python.

  • So that's the first idea.

  • Now, here we go.

  • All right.

  • So I'm gonna show you now kind of how my script ended up working.

  • So if we run this, it will first ask you what is your password?

  • If you type in the wrong thing, then it will ask you again.

  • And I said the password to be 123456 And now we get into the daughter base.

  • And if you don't have a daughter base, it will create a database for you.

  • And then I'll ask you what do you want?

  • A story in it today?

  • And then it will list all the commands you can type in so we can talk in Q and I will quit the program.

  • We can type in Oh, and that will open a file and we can type in S.

  • And I will store a file.

  • What?

  • We want to start with this.

  • We're gonna try to store an image.

  • So I've added an image here to the desktop, and what we're gonna do is we're gonna try to store that in the daughter base, and then we're gonna delete this from the desktop so that it essentially doesn't exist anymore on my computer except for in this daughter base.

  • And then we're gonna try to retrieve the image from that daughter base, and that will then be the script working.

  • So we're gonna press type in s for store a file, and then it prompts you Thio, enter the full path to the file that you want to store.

  • I know that minus on the desktop.

  • So we're gonna type in the desktop direct path and it's called Image Image Dr J.

  • Peg and hopefully this then has to store this image for us.

  • So what, we're going to d'oh!

  • It's very gonna delete the image.

  • We're gonna put it in the trash.

  • Then we're gonna empty the trash like so.

  • So now the trash is empty, and now what we're gonna do is we're gonna try to open this file.

  • So what should happen now is if we try to open it, it should add a new file here called image dot jpeg.

  • And that should then be our image.

  • So let's try this.

  • Oh, and what is the file type of the fire you want to open.

  • It is a J peg.

  • And what is the name of the father that you won't open?

  • It's called Image.

  • So now this should hope in the right file for us.

  • Says you can see it added an image.

  • Added a file here called image dot JPEG.

  • If you press this, we get our image.

  • So that is essentially how this script will work and how are safe will work to store our secret files.

  • And so I'm really happy because this actually worked out.

  • So this that means that this script works and our daughter based works and its stores are secret files for us s.

  • So that means that idea number one is done.

  • All right, so the second idea here is going to be a little bit more complicated to explain, but I'll give it a try What it is, it's gonna be a script that we can call within a directory, and what it will do is then list all of the sub directories and all of the files within those subdirectories in a particular way so that we can kind of get an overview off at all of the files and all the directories that are within that directory, if that makes sense, so that would look something like this.

  • So the end product, I think, will be really useful.

  • So I think it was a really interesting party to kind of work on and for a little bit of, like, added extra spice or extra challenge.

  • What you can do is you can try to implement Riker Shin.

  • So what I did was I recursive Lee looked through all the different directories and all the different files.

  • So for a little bit of added extra challenge, you can try to practice your Riker shin.

  • Okay, Sounds good.

  • Let's do it right now I'm gonna show you how the script for listing all the directories and subdirectories and files and all that, how it actually ended up working.

  • So essentially, what this script will do is it will list all of the directories and subdirectories and files within the folder that the script is being running.

  • So right now, this script is being run in this folder called Directory Tree, which means they will only released all of the folders and files with in that directory.

  • So let's just run it and then I'll go through kind of what it all means.

  • All right, so let's run that.

  • Okay, So what we get now is show dear stop pipe, which is this file right here.

  • And that is within that directory.

  • So that's good.

  • And then it lists the folder that is this one, and then it lists the sub folders as well.

  • So as of right now, this script on Lee lists the directories and sub directors of the folder that it's being run from, and one, like simple or pretty simple improvement that can be made to this is to add it to the shell script so that you run it from anywhere and then also make sure that instead of getting the current working directory, which we're getting up here, you can make sure that it gets the directory from where the file is being run.

  • So essentially, then you could go to, like, desktop and you could run it there, and it will list all the sub directories and all that stuff from there, or you go to your documents and listed in there instead because right now it's kind of limited to the folder that it's in or to the location of the actual script.

  • So right now, if you would want to do this in a different location than you'd have to move the script to that folder and then run it from there, which is a bit of a hassle.

  • So I definitely recommend if an improvement on this would be to add it to the shell script and then change this so that you actually get the directory that it's being run from.

  • But that is idea number two done and dusted.

  • All right, so the third and final idea is gonna be to create a password manager.

  • And if you don't know what a password manager is, it's essentially like a daughter base, where you store all your different passwords and what you have.

  • It's like a master password that you remember, and you type that in, and then you get access to all your different passwords.

  • Essentially, that's how it works.

  • Well, my script will do is we will have a master password as well.

  • We will get access into the daughter base, and then we can just type in the name of the service.

  • So let's say that it's you two.

  • We type in YouTube and they would get back Our password for YouTube and the recent for using a password manager is essentially you don't have to remember all your passwords.

  • You only have to remember the master password.

  • And then you can get all of your passwords from the daughter base.

  • This also means that you could have a lot safer passwords.

  • You can have way longer passwords because you don't have to remember them yourself.

  • And you can also have different passwords for each site, which can sometimes be a little bit of pain.

  • And I wanted to be wanted to work on some like this for a while now.

  • So I figured this was, like, a perfect opportunity to kind of work on this.

  • And this will again allow us to practice a little bit more.

  • Using SQL and also hashing for creating the passwords and in general is just a really fun project to do.

  • So here you go.

  • All right.

  • So now I'm gonna show you how this all worked out.

  • This one is actually pretty similar to the first idea that I showed you.

  • So we're gonna run it, and then I'm gonna go through kind of how it works.

  • So first they will ask, What is your password?

  • 123456 It's my password.

  • And then it will create the safe for us if we don't have one already, and they will ask what we would you like to store in it today and similar to the first program.

  • I just copied this pretty much.

  • Q.

  • Will quit the program GP will get the password s people store the password.

  • So what we want to do so want a story?

  • Password pressed SP And then it asked you what is the name of the service?

  • Let's say that it's you tube, then what it will do.

  • It will create a password for us here right now, reported to be 15 characters.

  • But you could have it be like 100 characters or whatever you want.

  • Really, I don't know if there's like some service's might have limits to how many characters you can use, but this is a really useful program, because this way you can store super.

  • You can create super safe passwords and you get store them.

  • You don't have to remember them yourself.

  • The only problem with this one is that it's kind of limited to your computer.

  • So one thing that you could do to improve this even Maur it would be to create, like a Web service or something like that for this so that you can also access your passwords from your phone.

  • But anyway, it's a really great project to work on.

  • It's there's a lot of fun things to be due to be done here, and I really enjoyed it.

  • So that is the final idea done.

  • Okay, so those are my three super quick python product ideas we need to try.

  • And I really hope that you got some new ideas out of this video from new projects that you can get really excited about.

  • I really think that personal project is just the best way to learn.

  • And I also think it's the most fun way to learn.

  • I love when I come up with a new idea, and I just get super excited about it, and I just want to spend the entire weekend coating it.

  • So if I was able to bring that to one of you guys, then I'm super happy with the outcome of this video.

  • That's essentially the goal of this video.

  • So if you do end up doing this, then please feel free to leave a link to your get up depository in the comments, because I would love to check that out.

  • But it's not only for me.

  • I think that a lot of other people would want to check that out as well.

  • And then hopefully you can help inspire someone else with the idea that you came up with, or maybe the improvement that you made to one of my ideas.

  • Like I said, there's a lot of improvement that can be made, okay?

  • And lastly, before you get going, I just want to mention that I created something called Clean Code Friday, which is a short email that I sent out every Friday.

  • So once a week, that contains a few of the most interesting things that I've explored or discovered throughout that week.

  • And this would be things like books I'm reading.

  • Podcasts of Listen, thio coding tips and tricks articles are red productivity tips and really anything that I think you might enjoy.

  • So if this sounds interesting that you can sign up by going to caltech dot com slash clean code Friday and there's no spam.

  • I'm not selling anything.

  • I've really been enjoying it lately, and that's been blown away by how many people have signed up.

  • So I hope you signed up and I hope to see you there.

  • But that's it for this video.

  • I hope you enjoyed it, and I hope we'll see in the next one.

all right, welcome back.

字幕與單字

單字即點即查 點擊單字可以查詢單字解釋

A2 初級

超級快速的Python項目創意 (Super Quick Python Project Ideas)

  • 3 0
    林宜悉 發佈於 2021 年 01 月 14 日
影片單字