Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book

« Return to show page

Transcript for Episode #289:
Textinator is coming for your text, wherever it is

Recorded on Tuesday, Jun 21, 2022.

00:00 Hello, and welcome to python bytes where we deliver Python news and headlines directly to your earbuds. This is Episode 289, recorded June 21 2022. I'm Brian Aachen. Hey, I'm Michael Kennedy.

00:12 And I'm Gina Huesca.

00:13 Welcome, Gina. I'm so glad that you could join us for the show.

00:16 Well, I'm still very, very honored that I'm allowed to be on here. Because I've been a longtime listener. And yeah, so being on here is absolutely amazing. For me.

00:26 That's very cool. So tell us a little bit about yourself before we jump in?

00:29 Yeah, well, so I think my claim to fame most likely is that I'm the creator, and maintainer of OctoPrint, which is basically a web front end slash print server for 3d printers that I've been now maintaining for almost a decade, actually. So this December, it will be addicted. And it's written in Python, which is why I have gotten more and more interested into the language over the course of the past decade, and also now hang out on conferences when I get the chance. And there is no pandemic going on right now. And in general, just kind of fell in love with the language. I gotta admit, I used to be a Java developer, very clear that I no longer am. And now I'm full time open source maintainer, actually, because I'm in the very lucky position that people apparently love OctoPrint enough that donations and such and sponsorships and such generate enough revenue that it can work for me.

01:27 Oh, that's awesome. Very cool. Pretty awesome.

01:29 That is so fantastic. Yeah,

01:31 I still don't know why it why it works. But hey, I'm taking it.

01:36 Well, Michael, you got our first topic today?

01:39 I do. I want to combine some things that we've covered before, as a way to introduce something new. So way back when we talked about something called Mung Gaeta have, if I mentioned that I liked MongoDB I think this might be something I've been talking about, like, I love MongoDB. I think it's great. I love working with different Python, it works superduper Well, for me now, one of the things I'm envious of on the relational side is sequel lite, which ships with Python. And you don't have to start up a server or anything, just say, here's a file, that's my database. Let me point database tools like SQL alchemy and stuff at it. Right. But MongoDB we haven't really had anything like that. But then we did talk about this thing called Mung Gita, which is manga is to MongoDB as SQLite is to SQL. So that's pretty awesome. You pip install monkey, no, it does a beautiful little character for its icon and you pip install this thing. And then you can just create a like a disk connection or a memory connection or stuff like that. It's not incredibly fast. But you know what, fast enough, right? fast enough for simple apps for demo apps. If you're teaching a class or something like that, or my primary, basically demos, YouTube, video demos and class examples and stuff, I don't want to have to people set up a whole database server, they may have never set up just to play with an example. Right? So here's a cool way except where it only does like the low level MongoDB API. So big fan of beanie, I reached out to Roman right and said, Hey, do you know of anything that will allow beanie to work with something like manga? And he said, not really. So I'll make one. Where did I put it? Oh, no. Have a copy? No, I Yeah. So had the wrong one selected, heated beanie, the ORM. And I said I want to use this ORM against the disk database, much like you would SQL alchemy against SQL lite said no, I don't know one of those. But what if I made beneatha for among Gita. So I love the naming year. So I would have put them all together. So Binita is a local DB like database ready to work with beanie, right. So basically, all you have to do to work with this is import client. From there, create a client paste, give it a directory just like you would SQLite pull a database off of it and then just call initialize Bini like you normally would but pass it this Binita database. So it just works out the file system. So now you've got a local mostly compatible MongoDB disk based in process thing that you can use for simple MongoDB examples. It has some things it doesn't support links, which are like following references across documents, aggregations, which is a whole crazy data analytics aspect of MongoDB. And unions and other things that monkey doesn't support. So I'm pretty sure let's just double check here. Yeah, so it's basically just builds that wrapper on top of monkey data. And the real challenge that was tricky here was Bini is only async. And monkey data is only sync. So you got to somehow put those together. Anyway. Thank you, Roman right for doing this. It looks really cool.

04:44 And we could we could come up with the joke for this but I think that's beneath us. Oh.

04:51 Oh, Brian. That was solid. That hurts. Yeah,

04:59 sorry. I'm not sorry. Okay. So I think that I'd like to talk to people about using good coding practices, especially in research and science. So read a cop crossed. Patrick Manola. It's it's an online book, really, it's called the good research code handbook. And he says, it's for grad students, postdocs, and PI's, which I had to look up was principal investigator, who didn't do a lot of programming as part of the research. And I think it's also just kind of a good thing for really anybody that's coming in to, to coding from a different field, and wants to jumpstart some good practices. It's actually really kind of great. He's got a little roadmap, which is neat. Culliford, little small here, but it goes through, got a journey

05:49 mapped out there. I love it.

05:50 Yeah, it's nice. But kind of a visual of where we're gonna go with this. But he talks about setting you're setting yourself up for success using Git in virtual environments, and projects, and even packaging and cookie cutter, which is cool. Talks about style guides and keeping things clean and removing dead code, some coding practices, like separating concerns and separating your pure pure functions from side effects functions, which I thought that some people don't really touch on, right off the bat, but it's a good practice, even talks about testing, although the focus is really around unit testing, and sort of some hand waves around it, then testing, but still, it's, it's nice, and then even gets into documentation and social aspects, like doing pairing and peer reviews and, and getting involved in open source and community. It's actually just really kind of a pretty solid book for people.

06:48 Sounds great. Yeah, that's really great. I think it's, yeah, go ahead. You know,

06:52 I just wanted to say it sounds great. Because I sometimes have people joining OctoPrint, who are pretty much newcomers to the whole coding aspects, but are interested in writing a plug in or something like that. So that might be a good resource for them to just direct them to?

07:08 I had, you know, I'm good, right?

07:11 I had somebody contacted me once and try to, I wish I knew about this before, because somebody contacted me and said, we don't really need coding training, but we kind of aren't used to working together. Well, we're all individual people. And now we're working as a group. And we don't know how to do that. And I don't know if that's here, but a lot of this around this is sort of good practices for working well with others.

07:35 Michael, yeah, what I was gonna say is, a lot of people, especially in this research field, learn to code in a JIT fashion, like just enough learning of coding to get the problem solved. And then they just, they have to keep moving on. And it's easy to find yourself just stumbling into wrong patterns of well, everything's into one huge file. And it doesn't take like command line argument inputs, it just hard codes, the values and so you can't reuse it. It's not a module you can import or a function, you can call and it was no error checking. These are Yes, exactly. No, no testing, all of that kind of stuff would be really valuable for people who are coming from that angle. So definitely a good thing to check out. And I love it good research dot Dev, what a sweet domain name.

08:19 There's also one of the neat things about the writing style is he's talking about trying to just free yourself with from time, so not free yourself from time, but as a researcher, you're in a hurry, there's a lot of stuff to do. And a lot of the stuff he's he's trying to get people to do is about offloading information so that you don't have to keep it in mind. So he talks about short term memory and long term memory and how, you know, like unit tests, and inline code comments are good, too, you know, short term reminders in the moment. And then project documentation and test suites are about keeping that knowledge long term. And that's kind of I never really thought about that before of short term versus long term information. But it's kind of a neat angle

09:10 as well. So anyway, yeah, that is clever.

09:14 So where are we going next, we have

09:16 something that I brought along. And given that I come from a 3d printing background, now I thought I would start with something that can be applied to 3d printing. And that is Python library for building parametric 3d CAD models. It is based on for those of you who have heard of the open source cat solution called free cat. It's based on the same cat kernel on the same on the same modeling kernel and allows you to programmatically design stuff and that is pretty amazing if you want to do it parametric so for example, imagine that you have some kind of case for for an electronics project or something and you need screws from screws screw He holds it at certain distances. But maybe you want to be able to scale it up or down or whatnot, or things like this. And for stuff like this, something like this is absolutely amazing. From the Ground Up calculator is only a library. But it all also comes with as it says here, it also comes with a Qt based GUI called Secure editor, which I tried out and worked great. The only problem was, it came with an older version of Cadbury that did not yet support some stuff that I wanted to play around with. So what I did instead was I tried the Jupiter extension and just threw that up on my NASS in a Docker container and that works absolutely wonderfully gives you in the browser gives you a 3d model view of the stuff that you're currently modeling automatically refreshed whenever you change something. And the way things look is this is the GUI by the way. You simply create, you define a work plane, then you create a box on this, for example. Then you say to the face to the top face, or in z direction, define that as a work plane, put a hole through that with a diameter. So the whole API is pretty intuitive as well. Also well documented on here. And if you scroll a bit through the examples, you can see that there is way more possible than just holes with planes with holes, but things like where was it somewhere there was a little dumb, right? flask or the aforementioned parametric enclosure, a Lego brick. So for all of that there is examples example code there. And yeah, it really surprised me how quick I got this up and running because I had a very specific use case that I wanted to try to run through that. And that was inserts for one of these parts. Case thing is where you can put inserts into sorts, screws and stuff. And that worked flawlessly with that I had this finished in maybe half an hour or something like that. So really great package works nice has everything that you expect from a basic CAD solution and also works in the browser. So if you want to go fully parametric and already know Python, then give this a look as well as free cat.

12:20 Very cool. Yeah, this looks super. Yeah, I have a friend who is doing a lot of Python, and C and C machines. He has a guitar company and it gets these wood blocks and shaves out guitars and necks and things that I don't I'm not familiar with, would this be applicable to something like that as well as 3d printing, but solar, if you've got to define the cons of it, basically, the

12:44 objects that it can output are STL files, object files, I think step export is also available. So all the stuff that you find commonly in the CNC and 3d printing world. So I could just design something with this export the STL, throw it in a slicer for my 3d printer or alternatively, throw a resulting STEP file or something into whatever workflow preparation I do for my CNC router. I guess. So I'm not that familiar with CNC.

13:13 Yeah, I think that's huge CNC machine. I think it takes STL files. Pretty sure. Well, then I'll have to check. But that sounds like it could be really relevant. couple pieces of feedback. Daniel craft says, nice because he hates GUI work. The GUI workflow Freecad.

13:30 Yeah, the funny thing is capillary originally started out as a Freecad plug in, actually, as far as I see. So the category one was free cat still built into free cat. Category Two is now standalone and just uses the kernel and all that. So really nice for people who used to use Open S cat. That one is the next level and really nice.

13:50 And then Brandon Brainer here, Brandon says, Can you import this into a slicer for 3d printing?

13:56 Yeah, that was what I meant with you can export the STL and then throw that into the slicer.

14:00 Yeah, that's what I thought. Perfect. Awesome. This is a great fine, I love it. And I also I love that you come with your experience and your view of Python. And what's super interesting, because I would have never picked this but it's very, it's very cool. And a lot of people are into it, right? It's just like, I'm like oh fast API. Yeah, and stuff like that. Yeah, yeah.

14:17 different point of view. I

14:18 guess. I want to do some 3d printed will be it'd be fun. It is but be

14:23 careful that you don't start a hobby project that then takes over your life that sometimes happens I've heard

14:27 well so that's what that's what I got off because I know that I don't need another one. So

14:36 Brian, I heard you have some awesome 3d Star Wars stuff. And maybe you could like build in like you could print some additional stuff to go

14:43 with it. I could Yeah. Or just buy

14:47 a go. Or you could just buy it.

14:50 I just actually bought a part so I needed a camera mount. So I had a camera that the one I'm using. Now there's other applications where I want to use that I don't I didn't have a mount for tripod mount. And there was somebody somebody on Etsy that that it's obviously a 3d printed thing that you can buy. So, Etsy is full of people making useful things with 3d printers. That's, I think that's neat and 10 bucks to somebody else to do it for me, but the deal, so

15:18 I'm happy to report that I'm currently looking into a camera that is sitting on a mount that I designed and printed myself. That's me. Wow. So yeah, so I that mounts to a visa monitor arm and then has a little slip that I can actually slide up and down to adjust the height. And I also have some of these angle brackets that with with tripod mounts on the up and down side that I can use to adjust the tilt and stuff. And yeah, so after I did this, that thing finally set where it is supposed to sit. So when when. Awesome.

15:54 That's awesome. And just for people listening who are not watching, Gina has the best video setup of all three of us she looks. It's really good studio setup. Alright, and then parting thought on this one. Henry Shriner. Henry says 3d work from Python has always been tricky. So this looks great. Right? It's ready for a fun one.

16:12 Yeah, let's switch to you. Alright,

16:14 I got something cool. So previously, I spoke about text sniper. This is a Mac app, and it lives in the menu bar, like up by the clock. And you just run it and you can on Mac, you can hit Command, Shift four and select a region and screenshot it. This one adds Command Shift to and if you select a region, it will capture the text out of whatever's behind it. So for example, I was on a meeting on Zoom and somebody put something up and like, oh, I want to have notes on that. And I thought oh, it could type it. Wait a minute, Comanche have to swipe on Zoom, boom, I have notes of the whole page instantly, right? This is a cool app. It's like 11 bucks for the Mac. This I sort of randomly mentioned that was I thought it was cool. This is not what I'm talking about. What I want to talk about is Rhett, Rhett Turnbull said, Hey, I heard Michael talk about this tech sniper thing I just described on Python bytes. That's neat. I bet I could build this in Python. So he did. It's that dope. So if we jump over here, to the I love the name, I got so many good names today. I didn't get them. I just gathered them up. So we have text sniper for that thing that grabs the text, he created the text inator. And it's a simple MacOS status bar menu bar app that automatically detects text within screenshots. So instead of adding a new hotkey that does its own thing, you just do Command Shift four, copy it, and then it hooks into Mac OS through pi Obj. See, figures out a screenshot was taken grabs it real quickly uses the neural engines and Mac OS, and the apple silicone and stuff to do the text processing and then drops out the answer. And if you look at the whole app, the entire app, and the end is 450 lines of code. That's brilliant. Yeah, very cool. If you look at this, like, let's see Apple, there's a lot in it. So you can see it's, you know, from foundation from cocoa, you know, import NS Notification Center, and all these different things is what it's basically using to listen for events of screenshots being taken, and then feed those off into the various places that it needs to go. So what do you think?

18:16 I think it's awesome. And read to the audience. And he says, oh, yeah, hey, right. Thanks. Thanks for the shout out. And then of course, somebody says, just for Mac Power, I Bucha.

18:28 I'm afraid. Do you know what do you run for your OS?

18:32 Actually, Windows? Yeah, to the to the big surprise of many, but I'm also a gamer, so I got tired of constantly dual booting. So

18:43 yeah, that's definitely a challenge. So there's actually a video showing you how it works. And it uses something that I've built apps with as well called rumps, ridiculously uncomplicated Mac OS, mini var after the fair like that. And so it's really an interesting way where it's just kind of like clicking together a couple of cool, cool things like the NS query for spotlight with Pio BGC the vision V and recognize text request and like building on top of Mac OS and rumps, which is pretty cool. You do have to give it special permissions because it has to be able to like monitor your system globally. So there's a few steps you got to follow but Weldon, Rhett, I love the vision here. And it looks good.

19:25 But this is incorrect. One of the what I love about this is it's just one it's just one thing, but it's a small application. So I mean, potentially just you could you come up with with all of these pieces, you could do other stuff, too, is and and have just a small example to try to learn off of let's preview.

19:40 Indeed, let me let me just make a real quick suggestion out there. Maybe I'm not sure if this is I don't see it over here. But if over on the releases side on my rumps app. I did this and I put over in the releases. You come over here and you can just download a dot app zipped but just unzip so the dot app file so you If that was some pie install and no pie to use pie to app on it and make one call further step there,

20:08 and maybe automate that with GitHub actions. Yes.

20:11 That's a very good point. Absolutely.

20:12 So you don't have to constantly keep doing it.

20:16 Yes, very good point, push to a branch have a do some magic, magic,

20:20 or click on Release and have it do some magic. That's, that's always wonderful to watch in the in the in the in the lock?

20:28 Yeah, you know, what I find is that people that set that stuff up, they release apps like this more frequently, they're like, Oh, it's just one feature, but I don't mind pushing the button, or I can just push to that branch. And the more that you have to do it manually, make sure you don't mess up stuff. And don't forget to bump the version and you just do it a lot less frequently. And so there's some really cool knock on effects of that recommendation,

20:46 I went through a lot of pain to automate testing and release tasks in OctoPrint, which also involved by the way, flushing physical hardware. And so I build a lot of stuff so that all of that is more or less, at least semi semi automated, because that takes so much work out of every single release. That's absolutely insane. So yeah, automation is great. Yeah,

21:11 I do have to add some, yeah, there's a couple, I don't maintain that much stuff. But I have to admit that I am reluctant to bump versions, because then I'm like, I gotta I gotta push it out to two pi pi, then and I haven't documented that through GitHub actions yet. So we got to get on that stick. So Okay. I'd like to talk about locks, actually, not using locks. So this is an article called handling concurrency without locks, from hotkey, Binita. And it's, it's just sort of a nice, actually, this isn't intimidated. At first, they read like flipping and getting ready to read this article, but I was really well written. So the idea is, it starts with a Django application. And it's a URL shortener, actually, you were just talking about, but there's, so there's like an idea that you've just sort of walks through it of the idea is you have something that creates a unique URL, but, but that that uniqueness is checked, because you keep a database of it. And so you check to make sure it's unique. And then you create it the check, make sure it's unique, and then store it in the database. But that check has to hit the database, and you've got to read right thing, and there's a construct currency problem. I know there's lots of ways to get around it. But it's, it's a reasonable use case to just think about. But there's a lot of places with within Django or with within Web, actually, and within actually all applications where if you're using a database, there's this concurrency thing might be a problem. And you can get around it with locks or other things. But the discussion kind of goes through basically brought it up a bit and just talks about collision problems and locking problems in general. And with some diet, nice diagrams, I can't remember where they are on the page, but nice horse. But it's a kind of a good slow walk, here are some diagrams. It's ID, and then, okay, going on, continuing on with the article. The idea is like, once you have once you know, what's unique is storing in the database, the database is already going to, if you set it up, right, it's already going to make sure that that he is unique. So instead of making sure you can do it ahead of time, and then doing it and making it then checking for database errors, just assume that it's right and throw it into the database. And then and then watch for a problem. So basically, using the database as the uniqueness indicator, and, and then and then talk, he talks about how to do that. And then how to structure code a little bit to to deal with those issues and then recover from it gracefully. If that happens, and and then the side effect is you, you're faster because you're not you're not putting the concurrency locks within your within your application, you're depending on that uniqueness. And in that control of the database, which is already, you know, fine tuned to allow multiple access and keep track of that. Just utilize that. So it's a neat reminder, everybody to utilize the tools under you, I guess.

24:24 Yeah. Good reminder. Gina, do

24:26 you? Yeah. Do you do much data? Much database or Django stuff?

24:31 Me? No. I never. I think I've never so far even touched Django and I tried to avoid databases like the plague. Yeah, I'm a huge enthusiast for flat files. Yeah, I don't know I can do valuable, right. Yeah, it's just it takes it takes so much complexity out of the system. If you can somehow avoid having to run a database server or an SQL lite file somewhere or Binita file Data?

25:01 Yeah, I've been working on a project, which I'm not really talking about yet. But it's, I've been thinking, well, could this just be a bunch of local JSON files? I'll talk about that later. But yeah, it's Yeah. Could it just be maybe it's not if it's 20 records, or something, maybe just a JSON files, all I need.

25:17 I mean, sometimes there's no way around that. But yeah,

25:20 I've kind of a project with a very small database. And it's in it, it fits. It's a very tiny text file as we, as we started out, but but the problem always is, as soon as you get more than one user, you have concurrency problems, even if the the application isn't multi threaded, or multi process you've in and we're running into that. So switching to, it does feel weird to have to switch to a database just for that. And you mean, you can get around it also, you can put, you can just say, hey, if I don't already have a database, I can put the currency in, in the server. So that so that that is handled there, you can do that.

26:00 But could be sure, yeah, for sure. My example is a client side, like desktop type story. So there's only gonna be one user that there might be two people hitting the keyboard, but it'd be one, one app. Cool. But I also just really like thinking about, well, if you have a database, and you have an ORM, in what ways could you just leverage that and then instead of like you said, well, let's you know, from threading, import reentrant locks that are lock, and then take those, and then you do pay the price for every successful time. And if it's one in 1000, or more, that you're going to hit that problem, you know, pay that price, and that little bit of complexity of catching like the integrity error, and then reporting the error instead of reverse. That's great.

26:40 Yeah. All right. Um, we have next.

26:44 Yeah, next, we have something that I have not yet had a chance to test out myself, sadly, but which I could have used roughly five or six years ago, really hard, but did not have access to them. So I thought maybe I should make a mental note now and share it here. So I will remember the next time that something like Tatsu exists, and Tatsu is a laboratory with with will, with which sometimes English is hard. You can generate parsers for for Python, so Python based parsers based on EB and F's. So I think the E was for extended and BNF is backwards in our form. So very structured way to define a grammar of a language have a file format of whatnot. And text textual, I should add, though, maybe also binary, but that sounds like a lot of pain. And that looks like something like I'm looking for a good example. Let me quickly doodle doo doo doo doo doo doo doo. I had, yeah. So for example, this is a grammar. And then you turn that into a slightly annotated grammar. And in the end, you run this through Tatsu, and then Tatsu, spits out something which builds an ASP out of your thing that you put into it, that is supposed to parse. And apparently Tatsu cannot only do that, like so it can do on the one hand in this this this kind of way that we know that we know from the R E module from the regular expression module in Python, where you can compile a pattern and then reuse it in during the duration of your code. But you can also generate Python code itself out of it so that you can then import it as a module and reuse it and reuse it. Maybe also just it but I don't know how well that works. And apparently it is also compatible to endless grammars, which is a name I haven't heard since university. So that is nice. I guess for people who have grammars lying around that are written in antler I think version four or something like that. And yeah, so this is really one of these things that I wish I had found sooner when I had a desperate need to generate a parser from abnf. Because writing an EB and F is sometimes way easier than writing a parser. And, yeah, now I have it, but now it's too late.

29:08 For people who are listening that EB and f the grammar file, it looks a little bit like a Yamo definition, a tiny bit, a little bit like a like a little bit of reg x, but you basically specify the rules of the language. And take that and run with it. Right?

29:22 Yeah, in a way you basically say you have an expression and that expression consists of this other components. And then these components are defined further down. And so you dig deeper and deeper into the syntax and build up the definition from that basically, like, if you've ever seen one of these JSON grammar, railroad diagrams, it also goes a bit like this. Just in textual form.

29:46 I was teaching a class and it's so good, right? No, I

29:49 just, I was getting PTSD from my language classes in college.

29:54 Yeah, that's admittedly also where I learned about this stuff, but for some reason i Yeah, back then it was horrible. Now I kind of like it. It's weird. Yeah, it just makes it so easy to define something. Yeah, and no pressure. And now I see the advantage is because it makes it so much easier to define a structure, text and stuff that you need to use in machine communication. So if I had an Ebn F, or if I had, if I had had that, like 10 years ago, when I started in OctoPrint, I would have written an EB and F for the yeah, basically, for the for the G code stuff that runs between a printer and OctoPrint to communicate over the serial interface, and then it would have been way easier to pass that the way it is now I had to do all of this by hand. Yeah. But maybe I can rewrite it with this. We'll see.

30:44 Yeah, it seems useful if you wanted to create a simple higher level scripting language that controls your app, right? If, say, you are writing code for scientists in a lab and those scientists, we're not developers, we could say like, okay, you can enter a couple of simple expressions, and it'll like, move the robot around, or it'll like upload the results or, you know, something like that. Right. You could probably build that with this. And that seems neat. And then the other thing that's noteworthy here is, this is 310 or above, and I'm sure that's because it's the pig parsers. Match the effectively the switch statement that's in Python 310, which is using right.

31:22 Also, with regards to data science. I could also imagine this helps maybe with parsing weird data formats that you haven't textual that fall out of some legacy software that is running on some ancient Sun cluster or something that is connected to your measuring these devices. So I could imagine that could also help there. Good idea,

31:42 right. Is that it for items?

31:44 I think it is. Do you have anything extra? All right, of course.

31:48 Of course, I got some extras? Let's see. Real quick. All right. I fantastic. Alright, I'll throw mine out. So not here. And recent episode we covered where was it was the 286 9285. Thank you. Yes, that's it. So we talked about PEP, 690 and lazy imports. And this was recommended by Ismar. This comes out of the cinder project and other things since then I've had very Warsaw or mountain Bravo and Karl Meyer on talk Python to discuss this, which was fun. And they've also written this up as a formal blog post. So people were interested in that they wanted to just go dive in. I just want to point out that that's a pretty intense dependency graph, right there is black cloud of dots all connected, and stuff. So there's some really interesting things from Instagrams use of this and whatnot. Very neat. People can check that out. There was an expedited release of Python 311 beta three, because of an incompatibility with PI test, Brian, can you imagine? Yeah, but it was what I didn't know about this. Yeah. So

32:55 I do. I found it amusing. One of the announcements, it said, apparently, pi test is well used.

33:04 No copy. No way.

33:08 I think it was a joke, but maybe less.

33:11 Yeah, yeah. But the fix was no joke. So there's a quick fix that rolled out for people if they want to check that out. And then last thing I kind of threw out a, a teaser for this episode, saying I just did something completely silly and weird. And I think I might like it. I'm not sure. So for a long, long time, I've used Duck Duck go. Right. And I really think that duck taco is fantastic. And I may just keep using that. But let me give a little credit here. For Daniel, her phone, sent us a message and said, you know, this isn't really Python related. But if I know Michael, I bet he will love this ad free privacy respecting search engine called Have either of you heard of kaegi? I had not never know. And so it's it's pretty interesting. I went and I listened to or read or listened with my eyes. I listened to this, this interview, watch this interview. There's an audio version of it. So I keep some light on that. But the vijver Vladmir provoq is the founder of khakis was founded in just march. So it's really brand new, talks a lot about the motivation for creating a search engine. And basically, I says, I think the ad tech, which I think maybe should be called more like surveillance capitalism or something like a little more serious. But ad tech, putting all these ads and tracking in front of my kids, I don't want my kids to grow up thinking that just like being completely tracked, and having zero privacy is like the way of the world. So there's a pretty interesting conversation here on what they built. But the idea is, it's a search engine that is a premium search engine. So instead of having as users have to pay for it, so I'm gonna I'm going to do an experiment for us, Brian, I'm gonna live with this for a month, and then I'll give you a report on what I think. I think that'd be great. Yes, yeah. So So check this out, for example, PEP 690, lazy imports. What happens if we put that up there? So comes up with the peps page and check that out number three, and then probably somewhere a little farther down since it's not in the title is Python bytes, I would suspect, but like, these, these results are pretty interesting. But check this out. So I can come over here. And I can hover over next to one of these and it says, Oh, this is on this page. This one doesn't have that much information about it. Some of them see, this one should have it. So before we even visited, it'll say there's four trackers, it's this rank by traffic, it'll use HTTPS, it's faster, not it lands in this category. And you can upvote and downvote thing or not, you can push things up and down. That is, for example, isn't that cool? You can say W three schools I never ever wants you to exactly that was my thoughts. It's, they're so good at SEO, and they're so bad at writing meaningful, helpful stuff. So you can just I when I got my first W three C result, schools result, I just did block that. And so you can, for example, go to like the docs on And say, You know what, that one's higher for me, because if I search for Python stuff, I'd kind of want to get the the official discussion. The other thing you can do as cool as you can have these lenses. So you're saying I'm only interested in programming stuff right now. So it takes you to like GitHub and stuff like that. And then you can say, You know what, I'm just actually what I want is just more results, just basically search GitHub for all of this. And the final thought here, that's cool. Is it D ranks? So you know, I showed you like different sites. So here, let's put them let's put something embarrassing for a company that needs to be embarrassed CNN. So if you hover over this, how many blog there's 43 ad detectors blocked on this thing? 4343. Here's what they do. They are down ranking downvoting, like, lowering the SEO rank of things that have tons of ad trackers and things like that. So if you if you're overwhelmed like this, where it's orange or red, like that's, that lowers your rank. So it's like an anti ad tracker, result surfacer. Anyway, what do you think?

36:56 I'm tempted, but I let you test it first.

37:00 Yeah, go get. Give me a month, I didn't think I was going to like it that much. It's It's pretty nice. So I paid 10, it's $10 a month, which seems a little high. I think they're getting the results by buying API access to Google and Bing and then re surfacing those results to you. And it makes sense is privacy respecting way.

37:20 Yeah, I actually I kind of think it's brilliant. And I want to try it too. Because at first I was like, I don't want to pay for search. But I you know, I want no. Yeah, I tried to tell my kids, if you're not, if you're not the customer, if you're not paying for it, then you're not the customer. You're the product. So

37:39 yes, absolutely.

37:40 Absolutely. And even if it wasn't for that, that the customization options are just like amazing. Like, I don't know, to me, that's the game changer of

37:49 this site, less of that site. Yeah, it's, it is pretty neat. So I really, really appreciate that Daniel sent this in, and I'm gonna live with it for a month and I will let you know, but the maps doesn't work very well. They don't work very well. But you know, you can always just go somewhere else. A final thought the whole reason I switched to Vivaldi over Firefox is I didn't want to bring other things like ad blocking you have ad blocking, Tracker blocking and stuff there. But then you have to get extensions and then those extensions send their data back and then sometimes they'll like well, these ads paid to be let through our ad blocker and there's just like still kind of a tracking level so with with Vivaldi, you know, you get like total blocking without third party thing. So with this, you kind of get a search engine that is like a good, good match to that. So anyway, I think it's, I think it's cool. And anyway, I just wanted to give it a quick shout out here because it seems fun. Funny hands, I think that's it for everything.

38:44 Okay, what do you think in the chat? Ico V, or EP AQ BU, says, I used to use a custom Firefox, Firefox extension to block W three schools. That's interesting. I didn't know that existed. But

38:59 yes, I installed that as well. And I give you that as an absolutely worthwhile thing to do. I totally agree. So I'm with you. I used to use that as well. I also use something that like it was, it was called I'm okay with cookies, and it would automatically accept all cookie disclaimers. And would just say, okay, and there's almost none of them, and then I just blocked them on my network. So it doesn't matter if I accept them or not.

39:21 Um, well, let's jump to Gina's extra stuff.

39:25 It's only some small stuff. Okay. So one thing, can you share my thank you. So one thing is something that I mentioned before that I went through a lot of pain to automate a bunch of stuff about the testing and OctoPrint, which involves some raspberry pi cluster here that I can flesh via a Python tool and stuff like this. And I also needed voltage monitoring for this Raspberry Pi cluster because I don't know how familiar you are with Raspberry Pi's, but they can be a bit, let's say, selective about what powers supplies they like, and they start running out easily and stuff. So Power Monitoring is very helpful. And there are these cheap ish 3040 bucks, US B power and voltage monitoring dongles that you can just pluck between two USB cables, and then it will measure everything. And they also come with Bluetooth. And I found a tool that can lock the data from this Bluetooth interface via piracy. It's it's written in Python, from these un 24 CPU and 25 CPU and 34 C dongles in order to allow you to track the voltage and power over course of yeah, whatever. So I have to set up, lock this out, throw that into an InfluxDB, throw it up on a Grafana dashboard and get warnings when something under powers and that is great for sleeping in peace at night about the Tesla situation. And the other thing is something that reached me actually just last night in the shape of a tweet. And that is that there is now another node j s py py distribution that you can just depend your Python apps on that will then pull in for you a complete node j s distribution with empty NPM with node and with MPX. So if you have, like me, for example, if you happen to build a web server that also ships with Web UI built in, then now you have a way to ensure that everything that you need in order to build that web UI is also there. And can also maybe make this part of a build process that you built into your setup pi or something like this, as well. So that was a really nice thing to discover. still considered alpha, but I tried it briefly this morning. And really great. That's cool. That's really cool.

41:47 That is fantastic. Yeah, that's super interesting. You could pair that with py script and have it do electron thing and then just run that run Python, write Python for your little web app that runs on the front end.

42:01 Or if you do something like so for example, I still use Cypress js for end to end testing and OctoPrint, which means that I now need an OJS environment enterprise environment in order to have all development dependencies together. This would solve this problem, because then I could just make this part. Maybe I could even fire it up as part of the PI test suit. I don't know. That would be interesting. Certainly to test that out. Definitely.

42:27 Very cool. Ryan, it sounds like a PI test fixture needs to be put in place.

42:31 If you want to do that, if you want to do that, that would be great.

42:37 I'll put it on my to do list right after 3d printing.

42:39 Ah, yeah, I know the problem.

42:43 We're kind of since I'm running, we're running a little longer. I'm gonna skip my extras till next week. So let's maybe jump to something funny. Nathan ash backer. It's a tweet. And it's like, pretend you're getting a call. And then the the phone says, Hey, I'm from somewhere. We built the first AI driven sales platform, and I wanted to talk to you about your sales needs. He says, Wait, are you an AI? No. Well, we can both appreciate the irony here. Right. So I don't know if this was real or not, but it just made me laugh. I'm just funny.

43:21 So I love it. Yeah. It's maybe having their API call you with their AR platform.

43:25 It's subtle. Yeah. Okay. So let's go. Maybe yours is funnier. Let's go to use Reichel.

43:31 My Well, mine is as a it's a collection of jokes. So maybe one of them will be this. This comes to us from Brian skin, who, as I said, has been on the show before. Thank you, Brian. And these are you know how like, you've got the the Mars Rover badge and you've got the Arctic volt badges on GitHub, these are ones that were considered and potentially rejected. Okay. Okay. Well, let's see what's over here. These are, they were considered feel like David Letterman, with his his like, add stuff. Okay. So one of them is the vital contributor over 100 issue comments consisting of just plus ones or thumbs up emoji. There's the Sith Lord who wiped out someone else's Chem, commit by force pushing to the main branch, you could have that badge, I have crossed a neater bad word. You could be the procrastinator create a repository of a single commit with just the and never touch it for five years. My personal favorite is the secret santa accidentally commit a secret API key to a repository? That's good. We have the monkey rich. Yeah, the monkey Rich is makes a commit directly to the main branch that breaks the build. This is fine. It has a dog in a room that's full of fire. We've all seen this meme in some form or other I'm sure this is fine. Over 1000 open issues on a public repository that you own watch let's wrap it over the last one works on my machine. The worst Mind machine certification suggests user error and at least 10 issue threads without attempting to reproduce in user runtime environments. All right, these are pretty good

45:08 would be hard to automatically detect though, right? It would. Yes.

45:14 Maybe fine, I think. Yeah. Yeah.

45:17 But yeah, I don't know if you saw that the GitHub recently actually rolled out more achievements that you can now try to hand so it's not anymore just the Arctic stuff. But there's no stuff like merge shark and a PR shark. I think they called it and so there are several they are hidden. You have to figure Yeah, they I think last Thursday, also they rolled it out, which was also when this this report, I think popped up or at least popped up. I also it also went past me on my Twitter feed, and I immediately shared it around with people. Because yeah, it's good. It's cute. It's kind of sad that some of them didn't make the cut. Didn't make the coffee. So

45:56 for sure. Yep. This is fine. People definitely. Definitely need that. This is fine. Absolutely. Anna. Yeah. I Brian, to set it for us.

46:04 I think it is is a fun episode. Thank you, Michael. Thank you, genius Lily.

46:08 Thank you. Yep.

46:09 Bye, everyone. Thanks for being here. Gina.

46:11 Thank you for having me. Bye.

Back to show page