Latest / Talk Python To Me / #327: Little Automation Tools in Python
Transcript
- 0:00You've heard me talk to a wide cast of people building amazing things with Python.
- 0:04Some of them are building bioreactors to remove carbon from the air with artificial intelligence
- 0:09and Python.
- 0:10Others are optimizing the aerodynamics and race strategy at the highest level of automobile
- 0:15racing.
- 0:15This episode is different.
- 0:17Rather than seeing how far we can push Python to the edges of technology, we're diving into
- 0:22the tiny Python applications that might never be released publicly and yet can transform
- 0:27our day-to-day lives with simple automation on an individual level.
- 0:31We have four great guests here today.
- 0:34Rivers Cuomo, Jay Miller, Kim Van Wick, and Rusty Gregory.
- 0:38They'll each share a couple of apps and the underlying packages they use to build them.
- 0:42I know this will be a super motivational episode for many of you, and I hope that after listening,
- 0:47you'll transform something tedious and error-prone in your life to an instantaneous button-click
- 0:52solution with Python.
- 0:54This is Talk Python To Me, episode 327, recorded July 15th, 2021.
- 0:59Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the ecosystem,
- 1:17and the personalities.
- 1:18This is your host, Michael Kennedy.
- 1:20Follow me on Twitter, where I'm @mkennedy, and keep up with the show and listen to past
- 1:24episodes at talkpython.fm, and follow the show on Twitter via at Talk Python.
- 1:29This episode is brought to you by Linode, us over at Talk Python Training, and the transcripts
- 1:34are brought to you by Assembly AI.
- 1:36Please check out what we're all offering during our segments.
- 1:38It really helps support the show.
- 1:40Rusty, Kim, Jay, and Rivers, welcome all of you to Talk Python To Me.
- 1:45Thanks.
- 1:46Great to be here.
- 1:46Thanks.
- 1:46Thanks.
- 1:47Thanks.
- 1:47Happy to be here.
- 1:48It's really excellent to have you here to share this topic.
- 1:51A lot of times I have people on the show like, oh, here's how we built Instagram.
- 1:55Are we using this cool library to scale the largest Django deployment?
- 1:59Or here's how I built Flask and how we're evolving it and something like that in data science.
- 2:04And that's great.
- 2:05But I think so many people out there listening are like, well, I'm not building those kinds
- 2:10of apps.
- 2:10I'm building something entirely different.
- 2:11Or I don't.
- 2:12I just build little things.
- 2:13And I think actually that's where a lot of the magic is for everyone out there listening.
- 2:18You know, we all have these things that are in our day to day.
- 2:21And it's just like, you know, that is, I'm not looking forward to that.
- 2:25But so many times, a couple hours of Python or other coding, a little automation, and then
- 2:30that becomes automatic.
- 2:31And life is just, you know, it's so rewarding to do those little things.
- 2:36I'm excited to share the ones that I did.
- 2:37They're incredibly simple, but they're, they just make me smile so much as I do them.
- 2:41So really looking forward to doing that.
- 2:44But before we get into the apps and the details, you know, let's maybe go around the YouTube
- 2:50stream picture here and let you all quickly introduce yourself.
- 2:52Three of the four of you have been on the show before, but just, you know, a quick introduction.
- 2:56Rusty, let's start with you.
- 2:57Okay.
- 2:57Yeah, I gave my long introduction last time.
- 3:00So I'll just say that I'm a reformed teacher.
- 3:02About two years ago, or maybe three years ago, I started coding.
- 3:05And then I had an opportunity to kind of become the data manager at my school district.
- 3:09So I'm trying to build pathways between all the various services that we use and keep our
- 3:15data clean.
- 3:16And that is so cool because it's not like you had to leave the education space or the public
- 3:21school space.
- 3:22You just sort of transitioned into this world where you can take what you're really into
- 3:25and like help everyone with it, right?
- 3:27Yeah, it was a great move for me.
- 3:28I was actually trying to learn how to teach coding to the kids and then I just really enjoyed
- 3:33it.
- 3:33So yeah, so it was great.
- 3:34Just do more of that.
- 3:35Just the same time big data hit.
- 3:37So it was good.
- 3:38Yeah.
- 3:38Fantastic.
- 3:39Kim?
- 3:39Right.
- 3:40If I can borrow a phrase from Rusty, I'm a reformed embedded software engineer.
- 3:44So I've moved from C a couple of years ago to doing mainly DevOps work for a financial services
- 3:49organization here in South Africa where I'm based.
- 3:51Yeah.
- 3:52Fantastic.
- 3:52Fantastic.
- 3:52And you were also hosting the Ask Me Anything not long ago.
- 3:55Thank you for that.
- 3:56Yeah, that was great.
- 3:57Yes, that was not that long ago.
- 3:59Yeah.
- 3:59That was very good.
- 4:00Yeah.
- 4:00Yeah, it was fun.
- 4:01Jay.
- 4:01Hello, hello.
- 4:02I just saw you over on Python Bytes not long ago, but happy to have you here.
- 4:05Happy to be back.
- 4:07I will crib everyone and say I am also reformed, marketer, veteran, now developer advocate,
- 4:13and spend a lot of my time just talking to the community and learning from folks that are
- 4:19a lot smarter than I am.
- 4:21Like the four people on this panel.
- 4:22Yeah.
- 4:23And you're doing stuff with Elasticsearch and some cool database-like things, right?
- 4:27Absolutely.
- 4:27Yeah.
- 4:28Rivers, your first time on the show.
- 4:30Thank you so much for coming.
- 4:31It's really great to have you here.
- 4:32Tell people real quickly about yourself.
- 4:33My name is Rivers Cuovo.
- 4:35I'm the singer and songwriter for the band Weezer.
- 4:38Our first album came out in 94 and we've been touring and making records on and off ever since.
- 4:44I'm such a fan of your music.
- 4:46It came out when I was in college and I've been a fan of what you're doing longer than I've
- 4:49been a fan of Python, which is crazy.
- 4:51That's so awesome.
- 4:52So thank you for that.
- 4:53Yeah.
- 4:53I'm a huge fan of your show, Michael.
- 4:55I listen every morning and of course I've learned so much and gotten turned on to so many
- 5:00cool packages, but also it's just nice to get that human connection in the midst of a few
- 5:06hours of coding every morning to hear all you guys talking about it.
- 5:11It really warms the heart.
- 5:12Awesome.
- 5:13Thank you.
- 5:13I think a lot of people who have told me they listen to the show and some of the guests as
- 5:18well, they don't work in like a startup tech place environment, but being able to listen
- 5:24to a podcast like Talk Python To Me and others, it kind of brings that community to them, even
- 5:29though they're not necessarily like every day showing up with a group of people who would
- 5:33be that community.
- 5:34Yeah.
- 5:34That's exactly my situation.
- 5:36I'm working on my own here and I don't know anybody who is into coding.
- 5:40So it's great to know you.
- 5:42Yeah.
- 5:42Awesome.
- 5:43Yeah.
- 5:43You as well.
- 5:44So as you said, people will know you from Weezer and that's amazing, but you are doing
- 5:49such cool stuff with automation and Python and code.
- 5:52And so I think people are really going to be blown away by what you're doing as well.
- 5:56So I'm super excited to get into that.
- 5:59Let's just sort of go down.
- 6:00We all put together a couple of things that we're working on in a shared doc here.
- 6:04And it looks like Rusty, I put you first.
- 6:06So Rusty, you want to kick us off with the first sort of automation thing that you built?
- 6:10Sure. So when COVID hit, we had to change a lot of different things and adjust like everybody
- 6:15else did in the world.
- 6:16And we ended up sending out a lot of notifications from our school district when an infection would
- 6:21happen at a school and we'd have to notify people.
- 6:23And it was this huge thing.
- 6:24And at the height, we were getting lots of these things a day.
- 6:27And so schools started to put the information up on their website so that you could just go
- 6:30and refer to the website instead of get a wall of text every time something happened.
- 6:34So my superintendent came in and said she wanted to put this dashboard up and then she showed
- 6:39me some other schools that had done it.
- 6:40And I looked at what they were doing and just knowing how the web works and schools work.
- 6:44I knew that somebody who's going to have to update this information every single day or
- 6:48every other day on the website, it was something that could easily fall by the wayside.
- 6:51So I thought to myself, you know, who's going to be updating this?
- 6:54And then she's like, don't worry about it.
- 6:55I'll update it.
- 6:56You know, you've got so much to worry about.
- 6:58Like, that's not what you want your superintendent doing, right?
- 7:00You're updating the website, you know, once a day or whatever.
- 7:02So I was like, I should be able to handle this with Python somehow.
- 7:05So I hit Reddit and I just asked kind of, you know, or well, first off, I had to find out
- 7:10where she was getting the information.
- 7:11So the health department put it up on the website, but it was a PDF.
- 7:14And I was like, oh, that's crazy.
- 7:16Oh, gosh.
- 7:16Yeah.
- 7:16So I can't scrape that.
- 7:17So I was like, all right, well, yeah, maybe I'll just update it every day.
- 7:22All right.
- 7:22So then I hit Reddit and I was like, is there a way to turn, you know, a PDF into a CSV with
- 7:27Python?
- 7:27And of course there was.
- 7:28So about two or three different packages got recommended.
- 7:31I played around with them for about a half an hour.
- 7:32And this one called Tabula, which I wasn't crazy about because it depends on Java underneath.
- 7:37So it uses Java to kind of like recognize patterns on there.
- 7:40And it'll, so it'll, it'll turn your, your PDF, pull out just the tabular data and
- 7:46stick it into a CSV for you.
- 7:47So I was able to just with a bit of requests, go up, grab that every time, save it, process
- 7:52it, wrote a really gnarly little loop that finds my four schools and then puts those into
- 7:57my own CSV.
- 7:58And then I use Python again, Yagmail to just send it to myself.
- 8:03I did it twice a day because it was updated at different times.
- 8:06And then on the other end with a little JavaScript, I just went into my email and I find that and
- 8:11I just update a Google sheet that's embedded on the, on the website.
- 8:14So there's a bunch of little parts on it, but literally the Python was about 96 lines
- 8:19of code with comments and stuff.
- 8:21And it accomplished this.
- 8:23And that's super cool.
- 8:23And it's really valuable, right?
- 8:25That if something like that gets missed, you know, it could make a big deal or it could be
- 8:29some kind of outbreak.
- 8:30Yeah.
- 8:31And I can apply that to just about, you know, to so many other things as well.
- 8:35So the time, all the time I invested in learning how that was, and it was an afternoon and I
- 8:39was able to figure that out and, and impress my immediate boss, which was really cool.
- 8:43He, he enjoys those types of things.
- 8:44So that was good.
- 8:45I bet.
- 8:45Paul out there in the live stream.
- 8:47Hey, Paul says, I use Yagmail to automate sending out emails for the SciPy conference.
- 8:50Very cool.
- 8:51Rivers, it sounds like you and Rusty share some of the same tool set there.
- 8:55Like it turns with like web scraping, PDFs, Google sheets, that kind of stuff.
- 9:00Yeah.
- 9:00I was just remembering, in fact, I emailed you a few years ago in desperation because
- 9:05I was trying to get some data from our agents that they have a web service where they give
- 9:11you the artists, tons of details about their upcoming shows, attendance and tickets sold
- 9:17and gross income, all this stuff.
- 9:19So I wanted to get all that and I had to, I had to deal with Pete, like it's rendered as
- 9:25a PDF.
- 9:25I made the mistake of going to Stack Overflow first, I guess, instead of Reddit.
- 9:29And my question was getting all these downvotes.
- 9:32Oh yeah.
- 9:33Oh yeah.
- 9:34Yeah.
- 9:34That's rough.
- 9:35That is so, yeah.
- 9:36You've got to find your community.
- 9:37I turned to Michael.
- 9:37Yeah.
- 9:38Yeah.
- 9:38Michael helped me out.
- 9:39Yeah.
- 9:40That's awesome.
- 9:40I remember you were really frustrated because somehow the wrong information had been given
- 9:44to you when you showed up and you're like, this was supposed to be one hour and it's
- 9:47two hours and I was at the wrong.
- 9:49Yeah.
- 9:49I just, I could see, I imagine you're like, how do I get this table or this part of the information
- 9:54out of the PDF?
- 9:54And yeah, that was perfect.
- 9:55Yeah.
- 9:56But what is that package?
- 9:57Yagmail?
- 9:57I think I ought to try that one.
- 9:59Yep.
- 9:59Yep.
- 10:00Yagmail.
- 10:00It's really simple.
- 10:02The toughest part is going through the hoops with Google, but once you get your little
- 10:06file back from them, you can use it for everything.
- 10:08So.
- 10:08Very cool.
- 10:09All right.
- 10:10Thanks, Rusty.
- 10:10Kim, yours first one's up next.
- 10:12Just remind myself which one I wrote down as my first one.
- 10:15That was it.
- 10:16Yeah.
- 10:16This little one, there's no link to it.
- 10:18It doesn't have a name or anything.
- 10:19It's just a little small script that one of the many that sits on my hard drive.
- 10:23And this I think is really kind of an epitome of small time or very small tool Python
- 10:28writing.
- 10:29It's a small tool I wrote basically as my, my, the team I work with at work is about five
- 10:34or six of us.
- 10:35We kind of as agile as we need to be, which includes a Trello board because we're no longer
- 10:39standing in front of a whiteboard in an office.
- 10:41We're all in our own homes.
- 10:42And so basically tracking cards of what we're doing for the week.
- 10:46And we include in our team, people who have from day to day responsibilities for deployment
- 10:51to some of our environments.
- 10:52So one of the guys will push changes to staging, a different guy will push changes to our production
- 10:57environment.
- 10:57And then it's all kind of boring setup.
- 10:59But effectively what it means is at the start of the week, I need to generate 10 cards for
- 11:03who's doing what.
- 11:04So I used to get an email from one of our administrators to say, here's the schedule
- 11:07for the week.
- 11:08You know, Bob's doing the staging on Monday and Fred's doing production on Tuesday.
- 11:12And I want to track those on my Trello board.
- 11:14And I reached the point where it shouldn't be a big deal.
- 11:17It took me about 10 minutes on Monday morning.
- 11:19I would make 10 cards and I'd write down Fred Monday, Bob Tuesday, but it was tedious and
- 11:24it was fiddly.
- 11:25And I was putting it off because it was 10 minutes I'd rather not spend.
- 11:28And it's only 10 minutes, but still it was irritating.
- 11:30And that was kind of not the thing I wanted to do on Monday morning.
- 11:33So basically I have sitting on my hard drive about 150 lines of Python purely to ask me,
- 11:39interrogate when I run it, who's doing what?
- 11:41Well, basically I've now got it set up.
- 11:43So it says full staging on Monday, which of these six people is the deployer?
- 11:47And just repeat for each of those cards.
- 11:50And that was literally, it takes me 20 seconds to run it now.
- 11:54I have to read the email I get on Monday morning to say, you know, who's doing when.
- 11:58And then it all does it for me.
- 11:59And it's incredibly daft.
- 12:01I mean, I save myself 10 minutes a week.
- 12:03It's no big deal, but I also save myself some irritation and scratches that little itch.
- 12:07And that's the kind of thing I really love about a really small Python tool.
- 12:10It took me a couple hours to write.
- 12:12So it's not like it cost the company days of my time.
- 12:16Yeah.
- 12:16Yeah.
- 12:17And it probably saved them some mistake or some forgotten.
- 12:19Well, exactly.
- 12:20Yeah.
- 12:20Yeah.
- 12:20What's the Trello communication bit?
- 12:22That's all REST API on Trello.
- 12:24So like most similar REST API services, you go along to Trello's side, you identify yourself,
- 12:31you get back a token from them, and then that's all API queries.
- 12:34So of the 150 lines of Python, about 40 are just config files for me mapping the names of
- 12:39my team members and various bits of information about the Trello to ID numbers I have to send
- 12:44back to Trello.
- 12:44Yeah.
- 12:45It's a little less actual code.
- 12:47Yeah.
- 12:47That's fantastic.
- 12:48So I don't know how we managed to pull this together when you all arrived for the meeting,
- 12:53but we're exactly sort of in the loop of the same order in the docs.
- 12:57So awesome.
- 12:58Jay, you're next.
- 12:59That'll keep it easy.
- 12:59Awesome.
- 13:00Well, as I mentioned before, I work as a developer advocate and I work for Elastic.
- 13:05We do search stuff and search things.
- 13:08I'm sure any of my co-workers listening are like, that's it.
- 13:11That's all you're going to say.
- 13:11Yes.
- 13:13But one of the things that we have done because we do a lot of visualization is we build dashboards
- 13:18for like everything.
- 13:19There's so many dashboards.
- 13:20I have actually built a series of my own set of dashboards using one of my new favorite tools
- 13:26called Elon, which is like a pandas like data framing tool, but for Elasticsearch.
- 13:35And it's great because it's designed to work with pandas, but it's also designed to work like
- 13:40pandas.
- 13:41So if you've ever done any type of data framing, any type of dealing with big numbers, big,
- 13:45any type of information like that, and you're used to those commands, you can just try them
- 13:50and usually they work.
- 13:51And what I've learned is Elon is amazing for like parsing CSV files, parsing JSON files.
- 13:58You don't have to do like the for or with open, whatever the CSV file is as dict reader and
- 14:05like all this, like that whole pattern you just do, you know, in pandas, you would just do
- 14:09pandas read CSV or in Elon, you would say Elon CSV to Elon.
- 14:14And then it just loads that information into your database.
- 14:17No questions asked.
- 14:17And it just goes.
- 14:18Oh, that's super cool.
- 14:19So instead of trying to work with it directly with pandas, you put it into the database.
- 14:23You can do queries and reporting and stuff like that driven off of it.
- 14:26Right?
- 14:26Exactly.
- 14:27Instead of like, because you're having to figure out all of the mutations that you would need to find
- 14:31exactly what you need.
- 14:33You just do a general elastic search query and then it shows you the information you're looking for,
- 14:38but in like a data frame format, which is sweet.
- 14:41And I've used that for a couple of projects.
- 14:43I built a tool in react.
- 14:45Sorry, I know it's a Python podcast, but it's called diversity orgs.tech.
- 14:49I do a lot of diversity work in my job connecting with organizations that work with underrepresented
- 14:54folks.
- 14:55And this has been a way for me to collect, like, I think at this point, like over 500 different
- 15:02organizations that work with underrepresented folks in tech and put it in like its own little
- 15:07mini search engine, its own like small meetup and updating it.
- 15:11I actually just use Flask, which I think is funny because you have, that is not it.
- 15:15I wish that was it.
- 15:16Diversityorgs.tech.
- 15:18I was like, their design work much better than mine.
- 15:21There we go.
- 15:24Yeah.
- 15:24So you can just search for it and like, but yeah, like it's a lot of people.
- 15:32It's cool that like, you can just use things like Flask on the backend and build your own
- 15:36little admin portal and you don't have to worry about spinning up a server or like being worried
- 15:41that someone's going to try to brute force your backend or anything.
- 15:43You're just like, oh, let me start my Flask engine, run it.
- 15:47It's sending REST API calls to Elasticsearch and then it just works, which is great.
- 15:52Yeah, that's really cool.
- 15:53This portion of Talk Python To Me is sponsored by Linode.
- 15:58Visit talkpython.fm/Linode to see why Linode has been voted the
- 16:02top infrastructure as a service provider by both G2 and TrustRadius.
- 16:06From their award-winning support, which is offered 24, 7, 365 to every level of user,
- 16:12to the ease of use and setup, it's clear why developers have been trusting Linode for projects
- 16:17both big and small since 2003.
- 16:19To pull your entire application stack with Linode's one-click app marketplace, or build
- 16:24it all from scratch and manage everything yourself with supported centralized tools like
- 16:28Terraform.
- 16:29Linode offers the best price-to-performance value for all compute instances, including
- 16:34GPUs as well as block storage, Kubernetes, and their upcoming bare metal release.
- 16:39Linode makes cloud computing fast, simple, and affordable, allowing you to focus on your
- 16:45projects, not your infrastructure.
- 16:48Visit talkpython.fm/Linode and sign up with your Google account, your GitHub account,
- 16:52or your email address, and you'll get $100 in credit.
- 16:56That's talkpython.fm/Linode, or just click the link in your podcast player's show notes.
- 17:01And thank them for supporting Talk Python.
- 17:05I think this whole diversity org tech place is really cool.
- 17:09So the idea is, basically, you're trying to create groups that people can reach out to,
- 17:15because if you see people who like you, you feel way more like you should be part of that
- 17:20community, right?
- 17:20Way more part of technology or whatever.
- 17:23Yeah, just try it out.
- 17:24Just type in Portland and hit search and see what comes up.
- 17:26Like, there should be groups.
- 17:28In Portland, there will definitely be groups.
- 17:30Yeah.
- 17:30Oh, yeah.
- 17:31There's the PyLadies, Blackson Technologies, Django Girls.
- 17:34Keep scrolling.
- 17:34There's more.
- 17:35There's more.
- 17:35Oh, yeah.
- 17:36Yeah, there you go.
- 17:37Oh, yeah.
- 17:37Look at that.
- 17:37Which is what I'm telling you is I need a lesson in UI.
- 17:41So this is all running React.
- 17:43But the way that I update this, like if someone messaged me and says,
- 17:46oh, hey, I want my organization added to this list.
- 17:49I just have a Flask site that I just spin up locally on my machine that sends all that.
- 17:54Like, it's just a quick form.
- 17:55And then it sends all the data to my server in Elastic Cloud.
- 17:59And then it's up on the website instantly.
- 18:02I was just going to point out one of the powerful things that you can do that had only occurred to me much later than I wish it had done is a very fast way to get a GUI tool for something you're only ever going to use for yourself is something like Flask or Django or something like that.
- 18:15It doesn't have to be pretty.
- 18:16It doesn't have to look good.
- 18:17The only place it's ever going to run is on your own machine.
- 18:19But you get all the HTML GUI stuff basically for free.
- 18:23You're not writing anything.
- 18:24You're not writing a desktop app for buttons to click.
- 18:25You're just firing up some HTML.
- 18:27So that's actually quite a useful thing to do.
- 18:29You don't have to worry about deployment.
- 18:30There's no security issues, et cetera.
- 18:32It never leaves your hard drive.
- 18:33Yeah.
- 18:33Yeah, absolutely.
- 18:34You know, another one that's pretty good is Anvil.
- 18:36Yeah.
- 18:36In terms of I just kind of want something.
- 18:38Probably misspelling again.
- 18:40We're watching my Google.
- 18:42I know.
- 18:42Yeah, there we go.
- 18:44There we go.
- 18:45I thought that's what I typed, but that's okay.
- 18:47It's interesting because you write Python even on the front end and it runs in your browser,
- 18:51but it takes care of the hosting and whatnot.
- 18:53You don't have to share it publicly.
- 18:54So it's kind of, you know, if you want to have a semi-hosted one, that's also a pretty neat option.
- 18:58But yeah, Tim, you're right.
- 18:59If you're looking for a UI, sometimes the right thing might be just a private blast gap for you
- 19:04or maybe just for like your people who are going to work with it behind the scenes.
- 19:07It doesn't have to be pretty.
- 19:08Exactly.
- 19:08Yeah, it doesn't have to be pretty.
- 19:09You're not selling it or anything.
- 19:10The buttons are in the right places.
- 19:13Or for that matter, if it's the only people you know, they can ask you, what do I do?
- 19:16And you can tell them.
- 19:16It doesn't have to even be particularly attractive or easy to use if it gets the job done.
- 19:20Yeah, absolutely.
- 19:21Absolutely.
- 19:22Very cool.
- 19:22All right.
- 19:23Thanks.
- 19:23Thanks, Jay.
- 19:24That's a good one.
- 19:24Rivers, what's the first one you want to share?
- 19:26First one I want to share is an app called Demolisher.
- 19:29And I made this because when I'm writing songs, I very often like to Frankenstein unrelated bits
- 19:37together.
- 19:37That ends up sounding like a coherent song.
- 19:40But for me, it feels like the song feels fresher when I have these unrelated bits where when I
- 19:46was writing each bit, it was like, this is the only thing in my mind.
- 19:49I'm just making this as good as possible.
- 19:51So, I stick a few of those together and it turns into a song.
- 19:54However, when I'm looking for a bit to attach to the previous bit, I usually have some idea
- 20:00of what I'm looking for.
- 20:01Right.
- 20:01They can't just be a random combination of different types of music or riffs.
- 20:06Yeah.
- 20:06Even if it's a very contrasting bit, it's still something somewhat specific.
- 20:11So, I don't want to have to look through all 1,500 of my old unused demos.
- 20:17So, I needed some kind of filter.
- 20:20There's a Windows app called MP3 Tag, which I highly recommend for tagging music files.
- 20:26There's a search bar in there.
- 20:28And I'm not sure exactly what the language is for that search, but it's some kind of SQL
- 20:33looking thing.
- 20:34But I would write these filter queries and they'd get quite complicated and long and like all
- 20:41these nests with parentheses.
- 20:43There's the filter bar down at the very bottom.
- 20:45Gotcha.
- 20:46I think I was using this app in a way that most people weren't because my filters were
- 20:50just gigantic and unmanageable.
- 20:52I wrote this app called Demolisher, which is a Tekinter window with a bunch of switches that
- 21:00you set all the switches and then you hit a filter and it will copy this long string into
- 21:06that filter bar there.
- 21:07And you end up with the demos that only match the criteria you're looking for.
- 21:13Oh, how interesting.
- 21:14So, it basically develops this, the SQL query type thing.
- 21:19Yeah.
- 21:19For this app.
- 21:20Is it okay if I put it up on the screen?
- 21:21Do you mind?
- 21:22The screenshot?
- 21:22Oh, yeah, sure.
- 21:23There we go.
- 21:23I don't know if you can see, but there's just a bunch of switches here.
- 21:26So, tell us about the switches.
- 21:28I'm not very musical.
- 21:29So, you've got to help me out here.
- 21:31On the far right, this is pretty easy to understand.
- 21:33It's just a range of BPM.
- 21:35I often, I'm looking for a pretty specific BPM for a bit to Frankenstein in.
- 21:41And then below the BPM range, you see like a more human readable version of the filter string
- 21:48that this app has produced.
- 21:50So, then each column to the left there is a different parameter.
- 21:54Far left, I can select which folder I want to select from or not select from.
- 22:00So, you've got things like feel, section, masterpiece, mode, melody.
- 22:05Some of these you guys would probably recognize, but others are just particular to me.
- 22:09But they're different tags I put on my demo.
- 22:12Genesis, for example, on the far right, that's how I started writing the song, whether I started
- 22:17on a piano or I started with a lyric and then piano or just started with a lyric and so on.
- 22:22Because I found that those are useful tags.
- 22:25They kind of set the direction of how that little composition is going to go.
- 22:29This reminds me of like, like almost like a Moog synthesizer, like those giant patch panels
- 22:34you see in studios.
- 22:35We're just like, I need to find the perfect sound.
- 22:37Let me just unplug this wire, plug it in over here and see what happens.
- 22:40And then it's like that, but developing like a query for the right track that you have.
- 22:46That's awesome.
- 22:46Of your own stuff as well.
- 22:47And intensely personal because you built it exactly to your needs.
- 22:50So, very neat.
- 22:51Yeah.
- 22:51And it's quite easy to add or remove parameters.
- 22:55There's a file in this package called sections.
- 22:59And each section is one of these columns.
- 23:02So, it's basically just a dictionary.
- 23:03That is so cool.
- 23:05Works perfectly fine.
- 23:06Yeah.
- 23:06Excellent.
- 23:07I love that there's a feel there.
- 23:08It's like, I would add fiddly to it.
- 23:11That's the thing I've ever tried to do.
- 23:12That's how it always feels.
- 23:14I think you had the poetry guy on the podcast.
- 23:17So, I've just tried to start converting a bunch of these to real packages.
- 23:21And then I could put them up on GitHub.
- 23:23So, other MP3 tag users could download this and use it themselves.
- 23:28Oh, yeah.
- 23:29That'd be really neat.
- 23:30And maybe they can add some extra features and stuff as well.
- 23:32Yeah.
- 23:33Yeah.
- 23:33I love this.
- 23:34I love how you brought all this stuff together.
- 23:35And it's just, it's so exactly what you need to make your life better.
- 23:40And like you said, you had thousands of these demos.
- 23:43And these pieces you wanted to bring together.
- 23:45And it's just such a challenging format to combine.
- 23:48And then here's how you just bring it all together, right?
- 23:50Yeah.
- 23:51So, typically I'll end up with a, it'll return about 10 demos that are, you know,
- 23:55very likely to work for what I'm looking for.
- 23:58And then I just pick my favorite one.
- 23:59Yeah.
- 24:00Fantastic.
- 24:00Can you share any of the songs that maybe you sort of inspired to, you created through this thing?
- 24:05Well, probably not anything you guys would know.
- 24:07Because this is only, I've only been using this the last few years.
- 24:11And sadly, none of those songs have become massively well known.
- 24:16So, like, if you go back to the old Weezer classics, I was cutting and pacing, but I didn't have 1500 demos back then.
- 24:23It was just, you know, I had a cassette tape I could look through.
- 24:26Awesome.
- 24:27At the live stream, Zachary the Hacker, a nice username there.
- 24:30So, if I use this and it made us and came up with a search and it didn't return a sound,
- 24:35I couldn't help but to see that as a challenge to myself to come up with a sound that matched that query.
- 24:40That's a great idea.
- 24:42Put in random things and see what comes up and then fill those searches.
- 24:46If I could just note, one of the things I think is very kind of really cool about your approach here, Rivers,
- 24:52particularly in a small tool approach, is you didn't then sit down and write yourself a replacement MP3 file player or what have you.
- 24:58You're quite happy with the tool you had, but once you have the filter query,
- 25:01you're quite happy with the existing tool to find them and play them and so forth.
- 25:03So, you just wrote yourself a filter maker, basically.
- 25:06There can be a strong temptation, or at least I would be tempted to go too far and then throw in file playing and media playback and so forth.
- 25:12You don't need any of that.
- 25:13You've got a tool for that.
- 25:14You just need something to make you a filter.
- 25:16Yeah.
- 25:16Yeah.
- 25:17Good point.
- 25:17Yeah.
- 25:18I was talking to Matthew Rocklin from Dask and Coiled a little while ago,
- 25:22and he said that they have this interesting philosophy.
- 25:26I'll probably misquote it just a little bit,
- 25:28but something of the principle of minimum or minimal innovation.
- 25:33What is the least thing we can introduce,
- 25:35and what other pieces could we combine that everyone is already using and knowing about?
- 25:39And yeah, I think this sort of matches that.
- 25:41Oh, so I should add that one of the packages I used then is called PyWinAuto.
- 25:47So, when I start Demolisher,
- 25:49the first thing it does is PyWinAuto opens up the MP3 tag Windows app,
- 25:55and then when I'm done with creating the filter,
- 25:58PyWinAuto copies and pastes it into the filter bar on MP3 tag.
- 26:03Oh, how cool.
- 26:04Yeah.
- 26:05So, basically, the use case is you import the application from it.
- 26:09You can tell it to start some EXE on Windows,
- 26:12and then just tell it to start typing keys into it.
- 26:15Yeah.
- 26:16That's awesome.
- 26:17It's very cool.
- 26:17It's a really cool way to combine it.
- 26:18Yeah.
- 26:18Yeah.
- 26:19Fantastic.
- 26:20If I can just maybe make a note,
- 26:22you've reminded me about PyWinAuto,
- 26:23and I'd forgotten about an episode from my career of 10 years plus ago.
- 26:28PyWinAuto is also very useful if anybody's looking for,
- 26:31well, exactly what it does, Windows automation.
- 26:33What the kind of thing I'm thinking of is that more than once in my previous work,
- 26:38we got tools custom made by the supplier, a particular vendor,
- 26:42you know, that somebody was asked to knock together in a day.
- 26:44So, it was terrible to use.
- 26:46You had to click 50 buttons to get what you wanted.
- 26:48It didn't remember any settings.
- 26:49Every time you fired it up, you had to click all the boxes again
- 26:51for exactly what you need for your output.
- 26:53And it also means in factory work, you want it as automated as possible.
- 26:57You want this all to be running as part of a bigger stream of work.
- 27:01And you can't really say, well, do all these automated tasks,
- 27:04then send somebody to the computer, take this piece of paper,
- 27:06click these five or 15 sections, and then take the resulting file.
- 27:09And PyWinAuto was fantastic for that kind of thing,
- 27:12because I actually wrote some Python, basically remembered what the tool should be set to do,
- 27:16fires the tool up, makes those settings, runs it, and grabs the resulting file.
- 27:20Yeah, that's super neat because if you want to automate something on the web,
- 27:23you could use something like Selenium.
- 27:24But if you want to automate like a custom VV6 app that somebody wrote 20 years ago,
- 27:28there's no API for that.
- 27:29Well, exactly, yeah.
- 27:30And when you open these tools up, there's things like, you know,
- 27:32you need to tick a box 27 and, you know, drop down two.
- 27:36It's not, it's not, they haven't been designed to be particularly well-written,
- 27:40but the PyWinAuto doesn't care.
- 27:41I mean, it's happy enough to use dodgy variable names and so forth.
- 27:45Yeah.
- 27:45Yeah, for sure.
- 27:46I think there's a lot of folks that get their Python start doing little like computer automation
- 27:53bits like that.
- 27:54So I think having those tools, like one, like you said, starting out, it's never going to be perfect.
- 27:59I mean, I think probably the hardest part is when you show people code you've written and they go,
- 28:05that's not Pythonic.
- 28:05Well, for stuff like this, it's probably not going to be because you're not working in Python.
- 28:10You're just using Python to work in something else.
- 28:12And it allows people to make messy code and just figure it out and hack at it.
- 28:18And then over time, you just get better at hacking at it until your code does start to look more Pythonic.
- 28:23Exactly.
- 28:23Yeah.
- 28:24On one hand, you have Pythonic.
- 28:25On the other hand, I pressed a button and it happened automatically.
- 28:27So I win.
- 28:29The toughest parts about getting people to understand how to get into Python is you don't really know
- 28:34the little tasks that you can do that you can solve with it until you get in and you can do a few things.
- 28:38So little things like that open the door for you.
- 28:40Yeah.
- 28:41Yeah.
- 28:41It's like a comment on LiveShane Brian says,
- 28:43Never heard of PyWinAuto.
- 28:44This has just opened a lot of quasi-RPA doors for me.
- 28:48Indeed.
- 28:48Fantastic.
- 28:49All right.
- 28:49So I wanted to talk about one as well.
- 28:52So I'm going to throw out this one that I have to do.
- 28:54So over on the course website, we have literally thousands of videos.
- 28:58And these are MP4s.
- 29:00There's a whole bunch of really cool automation about like geo distributed in them and all sorts
- 29:05of stuff that I wrote during a break at my hotel at PyCon one year when I got hired.
- 29:10I needed just a break from humanity.
- 29:12But the thing I wanted to highlight is I end up with a folder full of folders full of hundreds of MP4s.
- 29:20And I need to come up with some way to import those into the database.
- 29:23And I was going through figuring out how long is this video.
- 29:27I'd go in my Mac finder.
- 29:29I said, all right, it's three minutes and 20 seconds.
- 29:30So what is that?
- 29:31That's 200 seconds.
- 29:33And I would put that into the database.
- 29:34And the file name is this.
- 29:35And then I would do it again and again.
- 29:37And after a couple of those and a couple of mistakes and similar stuff with the podcast,
- 29:41I would just go crazy.
- 29:42I'm like, I can't take this.
- 29:43Maybe I have to hire somebody because I make too many mistakes.
- 29:46And it's not useful for me to spend so much time converting minutes and seconds to seconds
- 29:51and trying to do this.
- 29:52So what I ended up doing is writing a little script that I just go to a directory.
- 29:55I JSONify the videos.
- 29:57I get a giant JSON document that I can just import into MongoDB.
- 29:59And boom.
- 30:00And it goes through and it finds.
- 30:01It does two things that are really fun.
- 30:04One is it goes through and it uses a little bit like what Rivers was talking about.
- 30:08It uses FF probe.
- 30:09Not the same thing.
- 30:10But it goes in and figures out information about the audio stream or the video stream.
- 30:16And it'll give me back the time and information.
- 30:18And the way it works is I'm not using some API for this.
- 30:21I'm actually using subprocess.
- 30:22And then there's an output format for JSON.
- 30:25And I just capture the standard out and then read it into a Python dictionary.
- 30:29And then boom.
- 30:30I have all that information.
- 30:31It's as if FFmpeg had an API for Python.
- 30:33So that's really fun.
- 30:35And then I want to not bother to scroll back and copy it.
- 30:37So I use hyperclip.
- 30:39I was wondering how you're going to say that.
- 30:41I've used a lot and I've never known quite how to pronounce it.
- 30:44And so then I just I generate this huge thing, this composition of all these video files.
- 30:49And then I just use hyperclip to copy it to the clipboard.
- 30:52And then I just paste it in to the tool that is editing the JSON and like does all the importing
- 30:57stuff.
- 30:58And boom.
- 30:58Off it goes.
- 30:59So real simple.
- 31:01But this thing was like it's no big deal to say.
- 31:03I just want to sort of get the right file name relative to each another and get the time
- 31:07and convert it.
- 31:08But boy, did it save me a lot of frustration.
- 31:10So I want to recommend those two things, especially hyperclip.
- 31:13That's a cool one.
- 31:14Yeah.
- 31:14Hyperclip is very nifty.
- 31:15The other thing I would just pick up from what you said there, Michael, is the point that
- 31:19you don't have to use Python to solve all the problems.
- 31:22If Fprobe exists, it's perfectly good at getting you the data you want.
- 31:25Subprocess is a perfectly reasonable way.
- 31:27Let the expert tool get you to do the difficult thing.
- 31:30If Fprobe is already on your system, it knows how to get you the data you want.
- 31:33It can get you the data in a format you can use.
- 31:35Just use it to do it.
- 31:36You don't have to write Python to do everything.
- 31:38It's perfectly.
- 31:39There's lots of very useful tools out there that are literally using Python to glue three
- 31:43other tools together.
- 31:44And that's fine.
- 31:45And that works perfectly.
- 31:46It works great.
- 31:47I'm sure you see this a lot in your world where there's a lot of sort of stuff that is
- 31:51more like desktop apps or CLI apps meant to automate things.
- 31:55But maybe there's not a programming API for Python to it.
- 31:59It's often that kind of thing.
- 31:59Yeah.
- 32:00Yeah.
- 32:00Yeah.
- 32:00Fantastic.
- 32:01All right.
- 32:02I think we've looped around our group here.
- 32:04So Rusty.
- 32:05Want to pick it up on the next thing you wanted to share?
- 32:07Yeah.
- 32:07So the next thing I needed to do at work was that I was going to automate was we have to
- 32:11do state reporting.
- 32:12And it's this big year long thing.
- 32:15And it's basically what's caused my position to pop up all over the state.
- 32:18So it's to keep giving the state information about our students and what's going on all the
- 32:22time.
- 32:22And it was a horrible process that they decided to automate.
- 32:24It used to be people filling out papers and sending it in.
- 32:27And then all of a sudden it just became this computer thing.
- 32:30And then computer people had to do it, but it really wasn't their area of expertise before.
- 32:35So we have to send our files in, CSV files in, and then they get checked and we get errors
- 32:40back.
- 32:41Then we have to fix that and do whatever.
- 32:42So we're given an automated way to do it.
- 32:44So if we can get the files there overnight, we get a time slot and then we get everything
- 32:48back.
- 32:48But eventually these errors creep in.
- 32:50It's a flawed system and they know it's flawed, but since it's a government agency, there's
- 32:54like nothing that could be done about it for multiple years or whatever.
- 32:57So we're looking something different to kind of combat that.
- 33:00Basically, I would get back errors every day and then I would have to go and hunt them down.
- 33:04They wouldn't actually be errors.
- 33:06It'd be false errors.
- 33:06Oh man.
- 33:07So what you have to do is upload three sets of blanks and then boom, then you can start over
- 33:12and now your files are clean and it can work.
- 33:14So what I just did was, I was like, well, we only have the one automated spot.
- 33:18So I whipped up a little program in Selenium that goes in and submits my blanks every night
- 33:24at nine o'clock at night.
- 33:25So I'm always working off of the clean files.
- 33:28And it's something I would never think of to do, but I could do.
- 33:31It's a bit like Kim's project.
- 33:32You know, I could have done that, take five minutes at the end of every night and submitted
- 33:36my blanks and then let everything else happen afterwards.
- 33:39But it just seemed really easy for me to go ahead.
- 33:41It was a, it was a great puzzle to find out, you know, how to navigate around inside Selenium,
- 33:45inside this older looking website.
- 33:48But it was a, it was a great solution for me and I don't really get the errors anymore.
- 33:51And because we can address things, you know, that day, it's really improved my job tremendously.
- 33:57So I'd say it takes, I would say it saves me hours a week just being able to have this
- 34:02little tool automated.
- 34:03That's fantastic to just like reset the errors.
- 34:06Yep.
- 34:08Talk Python To Me is partially supported by our training courses.
- 34:11Do you want to learn Python, but you can't bear to subscribe to yet another service?
- 34:16At Talk Python training, we hate subscriptions too.
- 34:19That's why our course bundle gives you full access to the entire library of courses for one
- 34:24fair price.
- 34:25That's right.
- 34:26With the course bundle, you save 70% off the full price of our courses and you own them
- 34:30all forever.
- 34:32That includes courses published at the time of the purchase, as well as courses released
- 34:36within about a year of the bundle.
- 34:38So stop subscribing and start learning at talkpython.fm/everything.
- 34:44So I would say Selenium is the PyWin auto, but for the web, right?
- 34:49The equivalent of that is such an amazing tool for that kind of automation.
- 34:53Yeah.
- 34:53Because we've got things like Beautiful Soup and we've got requests and Scrapey and stuff,
- 34:58but they don't so easily just go, let me go over here, log in, you know, enter my username
- 35:04and password here, click the button called login, then go to this page and then do that thing.
- 35:08It's amazing, right?
- 35:09I think that's definitely one of the secrets.
- 35:11Select these 10 files and yeah, it's really good.
- 35:14That was one of the reasons why, you know, with my previous one, the dashboards, I had
- 35:19to create that web app, that simple web app to like upload stuff.
- 35:22Because at first, my first thought was like, well, I'll just go to the website and scrape
- 35:27it with like Beautiful Soup.
- 35:28But then when you start getting like JavaScript frameworks and things like that, that come into
- 35:32play, you're just, you can't get that.
- 35:34You're scraping little curly braces that are just where the data would go.
- 35:38Yeah.
- 35:38I cycle in my spare time.
- 35:39So they came out of these Velo Sambos from Adidas, which were like cycling shoes, but
- 35:43they look like soccer shoes, which I was like instantly in love with.
- 35:46They sold out within seconds every time they put a new batch up.
- 35:50So I actually used Selenium and I kind of automated a check every three hours to kind of go in and
- 35:54scrape it and send me an email if my size was in.
- 35:56And I eventually got them.
- 35:58But yeah, so it was a really cool little fun project that I just kind of used everything
- 36:01I learned in this to go ahead and make that happen.
- 36:04That's awesome.
- 36:05You should do that for a PlayStation.
- 36:06They build everything out of JavaScript.
- 36:10So it's really hard to get.
- 36:11So you couldn't do it with Beautiful Soup.
- 36:12I had to go in and grab it this way.
- 36:15Yeah.
- 36:15Yeah.
- 36:16Very cool.
- 36:16Rivers, did you use Selenium when you were getting that schedule for your, when you were
- 36:21scoring?
- 36:21I definitely use Selenium a lot.
- 36:23I think I use it in the app I'm going to mention next, I think.
- 36:28So maybe I'll talk about it then.
- 36:29Yeah.
- 36:30Yeah.
- 36:30Yeah.
- 36:30That's awesome.
- 36:31Yeah.
- 36:31When I was trying to scrape from our agent's web service, I was trying to use Selenium.
- 36:36Yeah.
- 36:37Yeah.
- 36:37Very cool.
- 36:37I kind of wanted to just mention one other thing, Michael.
- 36:40I had the mic here.
- 36:41Just the way that I've been automating things.
- 36:44I used a lot of Raspberry Pis in the early days to use Cron jobs to kind of fire these off.
- 36:49Because I know that's something that I had trouble figuring out when I wanted to start automating
- 36:53things was how to make it happen when you wanted.
- 36:54And I had a guy that was a heavy Linux guy who was able to help me figure out, you know,
- 36:59kind of how to do that with Cron jobs and things.
- 37:01And then I moved on to an app on my Mac called Launch Control that helps create demons and things
- 37:06like that, which is really, I found really helpful.
- 37:08So those are some great tools to help make these things happen on the time that you want it.
- 37:13Yeah.
- 37:13That's really neat.
- 37:14On my Mac, I install stuff with Homebrew.
- 37:16And a lot of times you can install it as a service as well.
- 37:19And it behind the scenes will basically run the launch control stuff, install something like
- 37:23MongoDB or something on your Mac, which gives you slightly simpler commands to do it.
- 37:27But it's got to be like lined up just like that.
- 37:29That's cool.
- 37:29Yeah, that is actually quite handy.
- 37:31The other thing that is maybe worth looking at if you wanted to do that kind of automation
- 37:35for stuff that's not just on your own machine, the GitHub Actions, which I'm not particularly
- 37:39familiar with, or GitLab itself has got some very powerful, effectively free to use until
- 37:45you get quite heavily involved CI.
- 37:47And I've forgotten what CI stands for right now.
- 37:49Continuous integration, that's the word.
- 37:51But really, it's just automation.
- 37:52At a particular time, do this thing.
- 37:54That can be quite powerful.
- 37:55I really want to try and figure this out because what I want to do is I put everything on GitHub
- 37:59and then I just, you know, get up, pull it on the remote computer that's actually, that's
- 38:04on all the time.
- 38:04But I want to be able to figure out how to make it update when I, you know, when I push,
- 38:08just make it auto updates.
- 38:09That should be fairly doable.
- 38:11That's what everybody says.
- 38:12Again, my GitHub Action experience is not great, but certainly if you can do it on GitLab,
- 38:17I'm sure you can do it.
- 38:18Yeah, I've heard.
- 38:18The CI tools are all geared around this kind of thing.
- 38:20I've heard whispers, but I'm looking for it.
- 38:22Something's changed in the code chat.
- 38:23Do something.
- 38:24Let's chat, Rusty, because my topic is actually designed for GitHub Action.
- 38:29Wow, fantastic.
- 38:29I'm glad I shaved today.
- 38:33Yeah, yeah.
- 38:34Yeah, I mean, if I can put my DevOps hat on, that CI kind of stuff is bread and butter for
- 38:40us.
- 38:40It makes a heck of a difference because it means when the developers make changes to their
- 38:45code, they don't have to know how to go about and deploy things or build things and so forth.
- 38:48It just happens.
- 38:49It basically happens for them.
- 38:51That's fantastic.
- 38:51I also set up an automation, so if I git pushed to a certain branch, I'll just automatically
- 38:56do a zero downtime redeploy of the Talk Python training infrastructure and stuff like that,
- 39:01which is so fantastic.
- 39:02Rivers, you mentioned Source Control before.
- 39:05You guys are using GitHub for your kind of stuff.
- 39:08Is there Source Control plus music going on here?
- 39:11That's one of my many weaknesses because I'm usually just working on my own.
- 39:15I haven't had much use for that sort of collaboration tool.
- 39:18I do have my own website, so it does go through GitHub.
- 39:22I've recently started volunteering.
- 39:24I'm like a volunteer coder with this other group of people.
- 39:28And I'm going to have to learn a lot more of this, of these Git tools, push, pull, all
- 39:35that.
- 39:35Once you have a need for it, I think it's easier to learn.
- 39:38You know, until then, it's all just something you hear about.
- 39:41But then it's like, oh, now I need this.
- 39:42Now I can dig in and figure it out.
- 39:44Yeah, if I could basically make one suggestion, if you are currently making changes to your
- 39:49software by making final final.version.2 kind of files on your hard drive, look into version
- 39:54control.
- 39:54It doesn't have to be Git, but Git is effectively one in this argument.
- 39:57It really is by far the most well-used one.
- 40:00Even if you never collaborate with it, just the ability to use a version control system to
- 40:04basically see what your code looked like yesterday or when you made the last, the change you made
- 40:09three changes ago, compare them to each other, those kinds of things.
- 40:12Until you have that capacity, you don't really kind of think about how you thought it would
- 40:16be.
- 40:16Once you're able to do it, you cannot really imagine not being able to do it.
- 40:21You're saying even if I'm not collaborating with anyone, it's still very useful to involve
- 40:27Git.
- 40:28Yeah.
- 40:28I think I've probably collaborated in my personal projects once with someone, but I wouldn't dream
- 40:33of not using something like Git for anything I've ever written just because I know I'm not
- 40:37going to remember, I'll have this vague memory that a week ago I made some change that actually
- 40:42would be useful to have back now.
- 40:44And Git's got that kind of history.
- 40:45It'll show me that a week ago I made a push that said, you know, tweaks the Prognob Decator
- 40:49knob or something like that.
- 40:50And I'll go and look at that and do a comparison against what I've got now.
- 40:54Yeah.
- 40:54That sounds great.
- 40:55I've been using the poor man's version control, which is my Dropbox history.
- 41:00I just refer to like the state of the folder three months ago.
- 41:04Yeah.
- 41:05Yeah.
- 41:05That is super handy.
- 41:06But like just the ability to see, like, I want to see how it was two weeks ago when
- 41:10it worked like I expected.
- 41:11And now it doesn't anymore.
- 41:12Tell me, why did I break it?
- 41:14What did I do?
- 41:14Right.
- 41:15And then you don't make it public, right?
- 41:18No, no, definitely not.
- 41:19No, no, definitely not.
- 41:21Yeah.
- 41:21Yeah.
- 41:22I feel like we all have been there with Zach the hacker.
- 41:24Like once you've accidentally lost eight hours worth of work because of misunderstanding
- 41:28of Git, you probably, that's when you.
- 41:30Yes.
- 41:30I've given talks on the data I've lost from bad Git commands.
- 41:35Or because you didn't commit something and you really, really wish you did.
- 41:38Yeah.
- 41:39Yeah.
- 41:39If we had more time and some beers, I would definitely be able to tell some good horror
- 41:43stories to that.
- 41:44But I think it's, Kim, you're up next on the sharing, right?
- 41:48I just wanted to just finish off that Git discussion.
- 41:50Just another, just to comment on what you were saying there, Rivers.
- 41:54In terms of making it public, Git itself never necessarily needs to leave your hard drive.
- 41:58You could run Git entirely locally if you wanted to.
- 42:00And it's still useful as a version control system.
- 42:03GitHub is just a publicly accessible Git tool.
- 42:07And it's not the only one.
- 42:08GitLab exists as well.
- 42:09But even there, you don't have to share anything.
- 42:11You can do it all privately as long as you're the only person ever seeing it.
- 42:14But it's still useful.
- 42:15Right.
- 42:16Interesting.
- 42:17Yeah.
- 42:17I'd never do it that way.
- 42:18But you're right.
- 42:18You could just do Git and just save it there, right?
- 42:20It is something you could do if you wanted to.
- 42:22Yeah.
- 42:22Yeah.
- 42:23If it were in Dropbox, it'd be backed up even.
- 42:25Yeah.
- 42:25Exactly.
- 42:26Lots of us are using GitLab and GitHub as offsite backups of our files, not necessarily to
- 42:31collaborate with anyone on them.
- 42:33Oh, yeah.
- 42:33That's absolutely true.
- 42:34In my case, we're back to PDFs, actually.
- 42:39And manipulating the data in them, although not CSVs this time.
- 42:42The second little tool I wanted to talk about was, again, doesn't have a name.
- 42:46And in fact, this ties into a previous example.
- 42:49This is in my GitLab, but it's one of my private GitLab repos because it involves some kind of
- 42:54data that the world doesn't need to see.
- 42:55That has basically my wife and several of her colleagues regularly receive large PDF documents.
- 43:02She's in the financial services industry.
- 43:04That's got 60 to 70 people's account details in them.
- 43:08So it's three pages per person.
- 43:10So you can get a 200-page document.
- 43:11And they then basically need to split those up and send them to each of the individual recipients.
- 43:16And similarly to what you were saying earlier, Rusty, you get your CSV data in a PDF.
- 43:20It'd be much more convenient if you could get that CSV directly.
- 43:23In this case, it'd be much more convenient if you could get 70 people's separate files.
- 43:27But that's just not how they come.
- 43:28You can't go to the provider generally and say, do something else.
- 43:32What you get is what you get.
- 43:34And from various cries of anguish from my wife of hours of doing this and it's era-prone and you're opening up a PDF GUI tool,
- 43:40selecting the first three pages and saying, save these three as this person's name.
- 43:44Then the next three and save these three as this person's name and that kind of thing.
- 43:48It was actually surprisingly easy to use some Python to write them a tool to make life a lot easier on their side,
- 43:52which effectively opened the PDF.
- 43:55And I had a comment on the name of it.
- 43:57What did I use?
- 43:58PyMoo PDF, which I had never heard of before.
- 44:01I see you've got that one.
- 44:02I've never heard of that either.
- 44:03I don't know.
- 44:04In fact, I haven't looked at it since I wrote this thing.
- 44:07I'd forgotten what it was called.
- 44:08It used to be called FITZ.
- 44:09There's something called FITZ, F-I-T-Z, which this has become, which is what was confusing me because FITZ is what's in my poetry history in my PyProject.automal file.
- 44:18And this is actually, it's a remarkable project.
- 44:20You split up everything in your PDF.
- 44:23You can basically access all the text fields.
- 44:25And once I'd done that, it was a lot of kind of trial and error.
- 44:29I split up each page and printed out all the fields until it looked like the one I wanted.
- 44:33And when I had that, now it's just a simple loop that goes through each page.
- 44:36And if the page happens to have the details of an account holder on it, then that's a new document.
- 44:40Take the ones I've seen before then and save those three pages or four pages as the person's name that I found in the PDF and repeat.
- 44:48And within seconds, it's spitting out 70 PDF files with automated names.
- 44:53So maybe not the most best way to do it, particularly if you've got, as is common in South Africa, two or three surname, two or three words in your surname.
- 45:00It's trying to be smart about it.
- 45:01But ultimately, it's easy enough to identify who the file belongs to.
- 45:05And that was saving hours and hours of time.
- 45:08Yeah.
- 45:08And that's really rough error-prone work that you go to this big PDF and break it up.
- 45:13PDF's a bad format.
- 45:14That's not right.
- 45:15Yeah.
- 45:16Once you use a tool like PyMoodie, if you break the PDF up, I mean, it's all, it's little bits of text.
- 45:21There's a full stock here and there's two commas in separate text fields.
- 45:24They look perfectly fine when rendered, but when broken up, they're terrible data format.
- 45:28But the beauty is if for work like this, if a tool made it in the first place, it's likely to be consistent enough that you can break it up and expect to find the same data in the same places because it wasn't written by a human in the first place.
- 45:40Yeah.
- 45:40Yeah.
- 45:41That's super neat.
- 45:41Another thing you mentioned in the notes is GUI.
- 45:44GUI, yes.
- 45:46GUI is a beautiful thing.
- 45:47I think GUI is really interesting.
- 45:49I vaguely recall every now and then on Python Bytes, you brought them up briefly.
- 45:52You don't discuss GUIs much, but every now and then you vaguely discuss that.
- 45:56Oh, wow.
- 45:56Yeah.
- 45:57Yes, actually.
- 45:59GUI is magnificent.
- 46:01They come in waves.
- 46:02GUI.
- 46:03G-O-O-E-Y.
- 46:04As in UiGUI, but it creates a GUI GUI for applications.
- 46:09What I really like about GUI is that when I develop things, I'm very much a Linux-based developer these days.
- 46:14So I don't really want to be developing a GUI app at all if I can avoid it.
- 46:19A command line is perfectly fine for what I want.
- 46:20So I wrote this tool as a command line tool and then just basically attached GUI to it.
- 46:25And then I think two or three lines of code.
- 46:26I think it's really just a GUI decorator on one of my functions.
- 46:30It produces on this.
- 46:32If you guys are watching it, people on the live stream, you can have this look at GUI.
- 46:36It just makes really basic looking GUIs in form layout that pretty much taking every option you could give in the command line.
- 46:43Yeah.
- 46:43If you wanted to create an app that would come up and show like a UI that would have a little text fields or even drop downs or stuff.
- 46:51Exactly.
- 46:51It would be the command line arguments.
- 46:52Like this is it.
- 46:53And then you package it up with I2 installers.
- 46:56Is that right?
- 46:56That's what I did.
- 46:57Yeah.
- 46:57Or PI installer, I think.
- 46:58PI installer.
- 46:59Yeah.
- 46:59Yeah.
- 46:59Sorry.
- 46:59You're thinking PI2.exe perhaps.
- 47:02I'm thinking PI2.app.
- 47:04You're thinking PI2.app.
- 47:04Sure.
- 47:04So PI installer is beautiful.
- 47:08So with a bit of, I wrote the code.
- 47:09I got it working in the command line.
- 47:11I was happy with it.
- 47:12Attached GUI to it.
- 47:13And suddenly I have a GUI, which isn't a Windows only thing.
- 47:15It works just fine on a Linux box too.
- 47:17And then PI installer to make an exe.
- 47:19And I can hand a tool over to somebody else.
- 47:22And they need no Python.
- 47:23They need no installation expertise.
- 47:25I'm certainly not going to be able to explain to people who aren't in the technical industry
- 47:28how to open a command prompt on your Windows machine, find where you put this file, and
- 47:32then give it command line arguments.
- 47:33That's not reasonable.
- 47:34Right.
- 47:34Oh, yeah.
- 47:35And also set up a virtual environment.
- 47:37Make sure you have the right version of Python.
- 47:38Install the requirements.
- 47:39Like, this is not going to fly.
- 47:41No.
- 47:41Exactly.
- 47:42Like, why did you not build me an app?
- 47:43Even at the exe distribution level, I mean, you can make an exe that's command line only,
- 47:47but no one's going to want to use that.
- 47:48Unless, like me, you prefer not to ever use the mouse.
- 47:51But most people aren't like me.
- 47:52They want a tool that they understand on the screen.
- 47:55So GUI is beautiful for that.
- 47:56Yeah.
- 47:56Yeah, absolutely.
- 47:58That's awesome.
- 47:58Thanks for sharing that.
- 47:59All right.
- 47:59A couple of live stream comments I'll throw out here.
- 48:02Got one.
- 48:02I once worked for almost like three weeks on a project in a company that had commissioned
- 48:06me.
- 48:07Then the server crashed.
- 48:08My backup got fried and I lost everything.
- 48:10Yeah.
- 48:10So good reason to put stuff.
- 48:12Ouch, indeed.
- 48:13Yeah, I've been there.
- 48:13Good reason to put stuff up on maybe like GitHub private repos or something like that.
- 48:18And then also Reginald.
- 48:19Davis came here to show love to my guy, Jay.
- 48:22Hey, Reginald.
- 48:23Thanks for being here with all of us.
- 48:24Let's see.
- 48:25So now we're on.
- 48:27You're up next, Jay.
- 48:28Awesome.
- 48:29So like most of us have and at some point in our lives, I built my own website.
- 48:35I would say I don't think the show isn't going to be sponsored by like Squarespace or anything,
- 48:39is it Mike?
- 48:39Because I'm going to I'm going to give you the perfect reason.
- 48:42I'm perfectly acceptable to let the sponsor.
- 48:45So I built my site.
- 48:49I made a static site generator.
- 48:51And one of the things that my brain is kind of buzzing right now because I actually just launched
- 48:57a new podcast on Relay FM called Conduit.
- 48:59And like the first episode went live the same time this live stream did.
- 49:03So there's like a bunch of stuff happening in my head.
- 49:06But I say all of that to mention that when you run your own site and you're doing stuff on like other people's podcasts and other people's sites and things like that, and you're doing it consistently, you always forget to put it on your website.
- 49:21So I built a small tool for my little static site generator that uses feed parser to just check the RSS feeds for the shows that I do regularly and then check for certain information.
- 49:36If I'm a guest, like if I'm just a regular guest, it'll just check to see if I'm a guest.
- 49:39If it's there, then it'll it'll create the blog post for me using the summary for the show.
- 49:45So now I do a show every Tuesday I do, you know, conduits going to be biweekly.
- 49:50I'm I guest on another show once a month and every once in a while Mike calls me to to get me on here to to I guess share Python tricks and stuff.
- 50:00But I can have all of that running and just have a cron job for through GitHub Actions that checks all of these RSS feeds every, you know, six hours or so.
- 50:09And it's perfectly free, perfectly within the realm of it.
- 50:13And I don't know, it's just one of those things.
- 50:15It's like I love the idea of taking RSS, which is an amazing but often forgotten format, and just say, let me parse this data because it has a very defined schema on it.
- 50:28And I mean, I love data and I love data that's well defined.
- 50:31So that's kind of my tool.
- 50:33And feed parser is kind of the thing that that really makes that happen in conjunction with GitHub Action.
- 50:38Yeah, feed parser is super neat.
- 50:39If you're working with some kind of RSS feed, you could approach it from a like ground up thing.
- 50:46I'm going to use requests and I'm going to use elementary and do my XPath queries.
- 50:51And you're like, whoa, but it has just this format, right?
- 50:53So you could use feed parser and it just turns this into like a dictionary of dictionaries, which is so much nicer.
- 50:59Yeah.
- 50:59So you don't have to worry about the RSS format.
- 51:01Yeah, it's a quick and easy one.
- 51:02So it's a nice example of taking a higher level Python library, you know,
- 51:07maybe a good place to look would be awesome Python or something like that to go.
- 51:11Instead of just saying, I'm going to start from scratch.
- 51:13You're like, OK, well, I'm going to go over here and find the audio section.
- 51:15And then over here, I want to do like Liberosa for the audio and music analysis.
- 51:20And so we're going to go with that and then like see if that's going to solve my problem.
- 51:24Right.
- 51:24So I'm trying to start with something higher level.
- 51:26You know, something I forgot.
- 51:28Now, this reminds me that I was going to ask you about.
- 51:31Have you done anything with FoxDot?
- 51:33No.
- 51:33So with FoxDot, basically you can write little tiny Python things and build up like almost like a growing symphony of a type of it's super, super interesting.
- 51:45It's like the sort of interactive and not quite IDE, like a REPL for music.
- 51:51It's something pretty interesting.
- 51:52For making music?
- 51:53Yeah.
- 51:53For making for like live performance.
- 51:55So you write these little tiny Python elements to like change the tempo or bring in like a background drum or like now I want this, this sort of bass guitar to come in and add to it.
- 52:05And the performances of it are really, really interesting.
- 52:07I'll check it out.
- 52:08I think GitHub Universe used this for like their intro this year.
- 52:13Like they had a live DJ that was like writing code to make the actual music live.
- 52:19It's like so now DJ sets are being controlled via Python.
- 52:22I love that.
- 52:23It's fantastic.
- 52:24Yeah.
- 52:24Yeah.
- 52:25I love it.
- 52:25Just remembering at the end of the 2020 Python ZA conference, which I was attending, was purely online.
- 52:31There was a DJ set by two Brazilian chaps whose name I've forgotten I can look up, who were also doing basically programmatically controlled or at least generated music similar to this.
- 52:40It's actually quite an interesting idea.
- 52:42This is something that kind of builds up over like 10, 15 minutes, but it's really neat if you just want to like have something in the background.
- 52:48But the fact that the way they do it is really impressive.
- 52:50Yeah.
- 52:51Cool.
- 52:51Rivers got a quick shout out in the live stream there.
- 52:53I love Rivers.
- 52:54You're pretty epic.
- 52:55The Sarah DM says awesome.
- 52:57Definitely.
- 52:57We all agree.
- 52:58Speaking of Rivers, I think you're next.
- 53:00And before we move on, just Jake, congrats on the new podcast.
- 53:03That's cool.
- 53:03I'm already subscribed.
- 53:04All right, Rivers, you're next.
- 53:05Michael, hearing you mention Labrosa and FF Probe reminded me that to maintain the tags of all those 1500 demos, I use a fantastic Python package called ID3.
- 53:19Oh, yeah.
- 53:19Which makes use of FF Probe and Labrosa.
- 53:24So, you know, every night my program will run and using ID3, it opens up the tags of all those files and does a ton of maintenance.
- 53:33I'll access spreadsheets of my managers and see what comments they've left on these demos or ratings.
- 53:42That's awesome.
- 53:42And you have automation back over to Google Sheets as well, right?
- 53:46I mean, that's how I got into coding in the first place was from spreadsheets, especially Google Sheets.
- 53:51Just getting tired of like trying to work those formulas in those little cells.
- 53:56I went on, was it Fiverr?
- 53:59And had some people code me some scripts to help with the spreadsheets.
- 54:05And then I just started looking at the code.
- 54:07I was like, well, this is pretty interesting.
- 54:09And from there, I just got into it on my own.
- 54:11Yeah.
- 54:12So, what's the last one you want to share?
- 54:13Is that there or you got another one?
- 54:15I love to listen to a lot of music, but also I feel like it's part of my job is to just be aware of new ideas.
- 54:21And so, I'm just constantly listening to music.
- 54:24I feel like I don't need to hear a song more than once or twice and then I kind of get it.
- 54:28And then I just want to hear more new music.
- 54:30And by new, I mean new to me.
- 54:32So, there's tons of old records, classic records I still haven't heard yet.
- 54:36So, it's very tedious to go through the Spotify app every day and try to find stuff for myself.
- 54:41So, I have an app called New Music that assembles a playlist for me.
- 54:47First of all, using Beautiful Soup, it goes to all the online charts so I can get like the,
- 54:54whatever the hot songs in the different formats are, gets a few of those.
- 54:58And using a package called Spotify.
- 55:01Spotify, okay.
- 55:02Yeah.
- 55:03It accesses the Spotify API and I can access any playlists from there.
- 55:09So, I go on to all the editorial playlists like Today's Top Hits or Wrap Caviar, whatever it is.
- 55:16But then I can also access any user playlists, playlists my manager shared with me or playlists I've created.
- 55:22And I grab a random sample from each of those.
- 55:25Some of the parameters are hard-coded in that script.
- 55:28But then I also came up with the idea of creating a front end with a Google sheet.
- 55:34So, in the Google sheet, I can see one column is all the different playlists I'm drawing from.
- 55:40And then another column is how many songs I want to pull from there each day.
- 55:43Another column would be like, how long do I have to wait before a song is allowed to come in again?
- 55:48That's super cool.
- 55:49I love how you've automated this to go basically scrape through that.
- 55:53Because, you know, these streaming services, they're great.
- 55:56But when you sort of say, you'll play my channel, they really get in a groove of like, here's the 100 songs we've decided you don't skip.
- 56:03Yeah.
- 56:03I can also control what songs, what artists, and what genres are banned.
- 56:08And, you know, with Python, I can create more complex algorithms.
- 56:12So, like, I only want to hear hip-hop from before 1996.
- 56:16Except for Kanye and Cardi B.
- 56:18I'll let those ones through.
- 56:20Yeah, yeah.
- 56:21Very cool.
- 56:21Whatever you want.
- 56:22I only go to that same playlist every day.
- 56:24It makes my life a little simpler.
- 56:25Wow.
- 56:26That is so neat.
- 56:26And I, you know, I did not plan this.
- 56:28I don't know.
- 56:29This is just sort of some awesome inception thing.
- 56:32So, I pull up the PyPI listing for Spotify.
- 56:35And their documentation shows how to get the show list from you, Rivers.
- 56:42This feels like a setup.
- 56:43This does feel like a setup.
- 56:45I have not seen that before.
- 56:49I think that's a recent change.
- 56:51Yeah, yeah.
- 56:52Brian out in the live stream also.
- 56:53I noticed that.
- 56:55That's awesome.
- 56:55And then Zachary the hacker says, Rivers, please tell me this app.
- 56:59It's available.
- 57:00This sounds amazing.
- 57:01I need it.
- 57:02Yeah, it was one of the very first apps I tried to publish online.
- 57:06And so, it was super janky.
- 57:08And I don't think it works at all anymore.
- 57:10But yeah, maybe.
- 57:11I found that people didn't use it in the way I expected them to.
- 57:16Most people, they would say they would just put in the name of an artist or the name of
- 57:21an album.
- 57:21And really, it's more useful for sampling from playlists.
- 57:24Because then you have a much greater variety.
- 57:27People would just go and put in their favorite three bands.
- 57:29And the results weren't all that impressive.
- 57:31Yeah, yeah.
- 57:32Guess what?
- 57:32You know, with music from your three favorite bands.
- 57:34There was a talk last year by Gotham by Angeline Protasio called The Album Discoverer, which
- 57:41was like an album recommendation system that uses something similar to this.
- 57:45But it was like going into a deep dive of Spotify's API.
- 57:49And I mean, I will give Spotify all the props because there's just so much information and
- 57:56stuff that is like similar to like your previous example, Rivers, where you had these variables
- 58:03that most people who don't think about music wouldn't think about originally.
- 58:08Like they're like, is it somber?
- 58:10Does it have good gut feel?
- 58:11Like stuff like that.
- 58:12And you're just like, I don't know how you quantify that.
- 58:15But at the same time, like the talk was really interesting because it showed like a comparison
- 58:20of tracks that were in different genres, but had similar feelings.
- 58:25And it was a really cool example.
- 58:27And I've been trying to find it online while you when you mentioned it, but I can't find it.
- 58:31So I'll have to reach out to the PyGotham team and see if I can get, you know, find out where
- 58:35that link is.
- 58:35Yeah, I know just what you're talking about.
- 58:37And Spotify gives you access to all that data.
- 58:40That being said, I'm skeptical of a lot of it because I've seen the data on my own songs.
- 58:47And like we covered Take On Me by AHA, which is a very danceable song, especially compared
- 58:55to a regular one.
- 58:56Yeah, especially compared to normal Weezer song.
- 58:59You'd think that would be rated very high on the parameter of danceability, but it's
- 59:04they rated as one of our least danceable songs.
- 59:07Oh, interesting.
- 59:08Very cool.
- 59:09I love this look at how you're interacting with music because it's really different than
- 59:14I think a lot of people out there just looking for something in the background.
- 59:17Cool.
- 59:18I must admit, I think you're onto something here.
- 59:20You were saying there, Michael, if you just let Spotify do its own thing, it'll say to you,
- 59:24here's the things you've listened to again and again and again, including the things
- 59:27you've always skipped, which we are convinced you'll listen to if you play enough.
- 59:29But I should be doing this.
- 59:31I should craft it more deeply to kind of get exactly what I want to listen to or at least
- 59:35things that sound like stuff I like to listen to.
- 59:38This is brilliant.
- 59:38Yeah, absolutely.
- 59:39And Jesus out there in the live stream.
- 59:42Welcome, welcome.
- 59:43There's an awesome app reverse.
- 59:45Please share so I can get an automated Chimba Wamba playlist.
- 59:48Fantastic.
- 59:50Yeah, I agree.
- 59:51That's a really, really cool one.
- 59:52All right.
- 59:52I want to share one.
- 59:53I'll be really quick since we're at the end.
- 59:54This is my second one as well.
- 59:55This brings together a lot of pieces.
- 59:57It is ridiculously simple.
- 59:59Like you're almost like, why would you ever do this?
- 1:00:02So I built this app and it has a screenshot because it's an app that runs in the Mac toolbar
- 1:00:07in the notification area by the clock.
- 1:00:09And this is primarily why I even wanted to bother bringing this up because if you've got
- 1:00:13these little scripts, like Kim talked about GUI, which is a cool thing you package up as
- 1:00:17an EXE you can share.
- 1:00:18But sometimes you just want like a little notification thing or something that might listen to a hot
- 1:00:22key that can just like live up there.
- 1:00:24And so one of the things that I have to do all the time is I'll take the title of a
- 1:00:27podcast.
- 1:00:28I will take the title of a course video and thousands of them.
- 1:00:31And I want to turn that into a file name that will work well.
- 1:00:36So I have this little app I called URLify, which is probably poorly named, but it does like
- 1:00:40simple little text transform.
- 1:00:41So it uses Piperclip again, and I can just click a thing and it'll turn it into something that
- 1:00:46would look as like a slug for URL.
- 1:00:47So like if it was the playlist with spaces and a capital T, it'll be all lowercase with dashes
- 1:00:52and it'll strip out symbols that wouldn't work.
- 1:00:54Right.
- 1:00:55So that actually turned out to be incredibly helpful because I can always reliably name
- 1:00:59stuff the same.
- 1:01:00And anytime I put something in, I just copy like the title of a presentation and then I
- 1:01:05hit that button and it turns it into the, just the right file name.
- 1:01:08And then that app I talked about before, it'll actually read that in the reverse engineer
- 1:01:11it back into like, like a title, like with case, the right casing and stuff again.
- 1:01:17So it actually sort of comes all around about, but the thing to build this is there's this
- 1:01:21app called rumps and I'm just be careful when you search for this, I'll link to it rumps.
- 1:01:25And it's an acronym for ridiculously uncomplicated macOS Python status bar apps.
- 1:01:31So glad it has a shorter name, but just like GUI, like there is a full on application on the
- 1:01:37screen here that you can find on the PyPI listing, which I don't know, what's that?
- 1:01:4112, 15 lines of code.
- 1:01:43And you've got a notification app that pops up little macOS toast runs as a .exe, not
- 1:01:48a .app in your Mac bar there, which I built the .app with, Py2 app.
- 1:01:54So yeah, that's two really cool things to put together to just like, I want something that's
- 1:01:58always up in my Mac bar.
- 1:01:59There's probably something like this for the taskbar and windows, but I haven't found it.
- 1:02:03So,
- 1:02:04That sounds like a great little free course.
- 1:02:06Yeah, it does.
- 1:02:08It does.
- 1:02:09Maybe I should just take a week and fill it down.
- 1:02:11I've actually been thinking about building like little notification app, like a simple,
- 1:02:15simple GUI, like GUI, GUI at G O O E Y.
- 1:02:19And like this, and maybe that taskbar one.
- 1:02:20You can fork archive project that I have then.
- 1:02:23Cause I actually used rumps to make like a, like we've all seen those little timer apps
- 1:02:28where you can put a bunch of dates in and it'll tell you like how soon until that thing was
- 1:02:32happening.
- 1:02:33Yes.
- 1:02:33I made an app called wins at that.
- 1:02:34I just like put on GitHub and it was just like, I'm not going to develop this anymore.
- 1:02:38So I'll send you the link for it, Michael.
- 1:02:40But the thing I like about this is there are so many tools that just do the thing and do
- 1:02:45it like really simple, really quick.
- 1:02:47And when you think of stuff like, what is it?
- 1:02:49PipX, where you can just call a command directly from your command line and it just runs and
- 1:02:54does the thing.
- 1:02:55Like that's always nice.
- 1:02:57And then doing things like rumps where it's like, okay, I want to do this thing normally,
- 1:03:01but I want to put it up in my menu bar so that I can just take a quick look and see it.
- 1:03:05I think it's super awesome to, you know, we've talked about these big programs or these things
- 1:03:10that change our lives, but sometimes it's even just like the little things that you can
- 1:03:14look to see when, how, you know, how soon before your anniversary is coming up so you
- 1:03:19don't forget it or like, Hey, when is that big meeting that I'm supposed to be preparing
- 1:03:24for?
- 1:03:24When is that big conference presentation or when a CFP deadline is due?
- 1:03:27And you can, you can just make a little applet that you just run every now and then and get
- 1:03:32results like that.
- 1:03:33Yeah.
- 1:03:33You're making me think that the next one that I want to build is one for when I go live
- 1:03:38stream on a recording.
- 1:03:39I want to send out a tweet.
- 1:03:40I want to update the website.
- 1:03:41So as a little banner, we're live streaming right now, all those kinds of things.
- 1:03:44That just seems like another one up there.
- 1:03:45I just click.
- 1:03:46I like a little button that opens up my Jupyter notebooks, you know, like I always have to clear
- 1:03:51my desktop all over.
- 1:03:52So I would, I would take the time to make something like that would be cool.
- 1:03:55Yeah.
- 1:03:55That'd be super neat.
- 1:03:56All right, guys.
- 1:03:56It looks like we're a little bit over time, but so many interesting things.
- 1:04:00Thank you all for being here now, since there's so many of us, I'm not going to, and I think
- 1:04:05we've all just, this has basically been the entire show, like these little libraries.
- 1:04:08I normally ask, you know, what's your favorite PyPI package you want to recommend?
- 1:04:11But like, we've got 30 of them.
- 1:04:13So that was a show.
- 1:04:14It was awesome.
- 1:04:14But just really quick, I'll go around for the final question.
- 1:04:17Favorite editor.
- 1:04:18Start VS Code again.
- 1:04:19Rusty.
- 1:04:20Right on.
- 1:04:20Kim?
- 1:04:21Emacs still.
- 1:04:22I'm probably always.
- 1:04:23Emacs.
- 1:04:23Right on.
- 1:04:24Yeah.
- 1:04:24You like to type on an operating system that is itself artificial intelligence.
- 1:04:28Pretty much, yeah.
- 1:04:29Yeah.
- 1:04:29Reverse.
- 1:04:30VS Code.
- 1:04:31Okay.
- 1:04:31Right on.
- 1:04:32That's a good one.
- 1:04:33Jay?
- 1:04:33The war begins, Kim.
- 1:04:34Vim.
- 1:04:35Well, Vim you said at least.
- 1:04:37At least you're using the M version.
- 1:04:39Neo Vim.
- 1:04:39Yeah.
- 1:04:39Yeah.
- 1:04:40Neo Vim, I should say.
- 1:04:41Awesome.
- 1:04:42I can tolerate Vim.
- 1:04:44Basically, yeah, I can tolerate it, but if I have to very, very slowly get things done.
- 1:04:48Because basically the problem, and I'm sure you've, this probably happens less to Vim guys.
- 1:04:52If you're an Emacs guy, then you remember the key bindings for Emacs, and VI is what's on the really primitive servers.
- 1:04:58And you cannot remember how to make it do things because you keep pushing the wrong buttons because your fingers remember Emacs commands.
- 1:05:03The same would probably happen to you, but you probably don't necessarily have to use Emacs very often because VI is everywhere.
- 1:05:08Yeah.
- 1:05:09If I have to use a text editor, there will be like HJKLs just all over the place because I think I'm in normal mode.
- 1:05:16And I'm just like, oh, no, it's just typing.
- 1:05:18Yeah.
- 1:05:18I'm reminded of the joke.
- 1:05:20Like, how do you generate a random string?
- 1:05:22You give a first year computer science student Vim and you tell them to exit it.
- 1:05:26Yes.
- 1:05:30All right, you guys.
- 1:05:31Thank you so much for being here.
- 1:05:32It's been really great.
- 1:05:33Everyone is doing such neat stuff.
- 1:05:35And I'm sure we're going to inspire a lot of people, even ourselves.
- 1:05:38Like Rusty's like, I need a button to launch on my Jupyter Notebooks, right?
- 1:05:40I'm going to do one for live streaming.
- 1:05:42So thank you.
- 1:05:43Thank you all for being here.
- 1:05:44It's been great.
- 1:05:45Thank you.
- 1:05:45Thanks, Michael.
- 1:05:46That was fantastic.
- 1:05:46Thank you, everyone.
- 1:05:47Yeah.
- 1:05:47Yeah.
- 1:05:47You bet.
- 1:05:48Bye.
- 1:05:48Bye.
- 1:05:49Bye.
- 1:05:49Bye.
- 1:05:50This has been another episode of Talk Python To Me.
- 1:05:53Our guests on this episode have been Rivers Cuomo, Jay Miller, Kim VanWaik, and Rusty Gregory.
- 1:05:59And it's been brought to you by Linode, us over at Talk Python Training, and the transcripts
- 1:06:03are provided by Assembly AI.
- 1:06:05Simplify your infrastructure and cut your cloud bills in half with Linode's Linux virtual machines.
- 1:06:10Develop, deploy, and scale your modern applications faster and easier.
- 1:06:13Visit talkpython.fm/Linode and click the create free account button to get started.
- 1:06:19Transcripts for this and all of our episodes are brought to you by Assembly AI.
- 1:06:23Do you need a great automatic speech-to-text API?
- 1:06:25Get human-level accuracy in just a few lines of code.
- 1:06:28Visit talkpython.fm/assembly AI.
- 1:06:31Want to level up your Python?
- 1:06:32We have one of the largest catalogs of Python video courses over at Talk Python.
- 1:06:36Our content ranges from true beginners to deeply advanced topics like memory and async.
- 1:06:42And best of all, there's not a subscription in sight.
- 1:06:44Check it out for yourself at training.talkpython.fm.
- 1:06:47Be sure to subscribe to the show.
- 1:06:49Open your favorite podcast app and search for Python.
- 1:06:52We should be right at the top.
- 1:06:53You can also find the iTunes feed at /itunes, the Google Play feed at /play,
- 1:06:58and the direct RSS feed at /rss on talkpython.fm.
- 1:07:04We're live streaming most of our recordings these days.
- 1:07:06If you want to be part of the show and have your comments featured on the air,
- 1:07:09be sure to subscribe to our YouTube channel at talkpython.fm/youtube.
- 1:07:14This is your host, Michael Kennedy.
- 1:07:16Thanks so much for listening.
- 1:07:17I really appreciate it.
- 1:07:18Now get out there and write some Python code.
- 1:07:20Now get out there and write some Python code.
- 1:07:20I'll see you next time.