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


Transcript #257: Python Launcher - Launching Python Everywhere

Return to episode page view on github
Recorded on Wednesday, Nov 3, 2021.

00:00 - Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.

00:06 This is episode 257, recorded November 3rd, 2021.

00:10 Hey, it's November, cool.

00:11 I'm Brian Okken.

00:13 - I'm Michael Kennedy.

00:14 - I'm Morales Acarabo.

00:15 - Well, welcome Morley.

00:17 We haven't even really met other than a few seconds ago, so can you tell us who you are?

00:22 - Yeah, my name is Morales Acarabo and I met Michael Kennedy a couple of weeks ago at a Pi Bay event in San Francisco.

00:31 - A fantastic Pi Bay event.

00:32 For people who cannot see it, they should go to pibay.com and just see the graphics.

00:37 This is a conference outside at a food cart area.

00:40 So awesome, so great to see you there.

00:41 - Right, and so I help Grace Law organize that event.

00:46 She and I have been working over the past couple years and it's a fantastic community.

00:51 And I've been in San Francisco for the past three years And I'm actually, I work for the defense department and, I do, I lead a software development team and we work on optimizing software processes.

01:04 And on the weekends, I'm a Marshall pilot.

01:06 So I do fly and I do teach a student pilot.

01:09 So that's, generally speaking, who I am.

01:11 That's so awesome.

01:12 That's cool.

01:13 Oh, my side job is a professional pilot.

01:16 Yeah.

01:16 Including jets, right?

01:18 Yeah.

01:19 I do fly a couple of corporate jets.

01:21 That sounds so fun.

01:23 I think that's so neat.

01:24 you know, it's good to get away from the keyboard and the offices, especially when with COVID happening and everything's harder to get out around.

01:33 Like you really get away, you get up in the sky.

01:35 I do get away.

01:36 And, but you gotta be careful, right?

01:38 Because you go on across, different ecosystem, right?

01:41 So you gotta make sure that you're well protected, that you take in all the precautions that are required to not get sick, but, it's an adventure.

01:49 I do like to get around.

01:50 Awesome.

01:53 - And Teddy had the license, you invited James Bond, I think.

01:56 - I think we may have, actually.

01:58 - Yeah, where do you park your Austin Martin?

02:00 No, seriously, let's kick this off, Brian.

02:03 With something also, Morley, you also are involved with Django stuff, right, in San Francisco?

02:08 - Yes, just a little bit.

02:09 By the way, first off, I do want to say thank you very much, Michael.

02:13 So many years ago, I was overseas, and I was in Qatar at the time, and I got started learning how to code, And Python was the language that was, at least from my perspective, you know, something I can use in my data science perspective and working with you through Talk Python to me was extremely helpful for me learning how to code, just being with a community and I think that was extremely helpful.

02:38 It's gotten me in different places only because I started to learn how to code and got involved with your podcast many years ago.

02:47 So thank you for that.

02:47 That's amazing.

02:49 Thank you so much.

02:50 I really, it means a lot and it's easy to forget Brian and I just sit here at our desk and chat about stuff, but it really helps connect people, especially if they're new or they're coming from places where there's not a big community they can drop into it, it helps people get more integrated quicker.

03:06 And I think that's sometimes.

03:07 And it's, it's just the way you guys talk, right?

03:09 I mean, it's just, you're talking to me as opposed to talking to an audience or, you know, a group of large, you know, you know, crowd or something like that.

03:18 So, you know, I'm listening to a podcast and I'm going, this is relatable and I can actually go out and do a little bit more research on a package on a topic that you guys are talking about.

03:28 So it's really good.

03:29 - Yeah, nice.

03:30 - Yeah, fantastic.

03:31 - Speaking of packages, let's talk about Django.

03:33 - Yeah, let's start with Django here.

03:36 So I don't do that much Django.

03:38 I do more on the micro framework side of things, but Django is super important.

03:43 And when cool stuff happens there, I wanna make sure to give it a shout out.

03:47 So we're Django 4, I mean, in beta, but still Django 4.

03:51 Morley, have you been tracking this?

03:52 Are you excited about this?

03:53 - I am tracking it, I'm excited about it.

03:55 Yep, absolutely, yep.

03:56 - Yeah, super cool.

03:58 So Django 4.0, beta 1 was released.

04:01 I feel like it was Django 1 for a really long time and then Django 2 and then, you know what?

04:06 You know, blow the doors off.

04:07 We're going 3, 4, 5, 6, right?

04:09 We're gonna be at Django 20 soon enough.

04:11 But this is really good news.

04:13 The beta 1, so it means feature freeze, bug fixes only type of thing is out.

04:18 And if you're interested in this, you can try it out now.

04:21 notable changes here for what's coming along.

04:25 First of all, it's only compatible with Python 3.8 and beyond, which is pretty fantastic.

04:31 And if you want older support, as in all the way back to 3.6, you got to go back to Django 3 series 3.2.

04:37 So I think that's pretty interesting as well.

04:39 The rapid adoption of new Python, right?

04:42 This is like two years of Python and not more.

04:45 So things that are new, there's stuff about time zones, which I'm not gonna bore you with, but database stuff is cool, right?

04:52 One of the things that I think Django is really renowned for is its web front end plus database integration, right?

04:59 Wouldn't you say so, Morley?

05:01 - Yes, absolutely, yeah.

05:02 - Yeah, I think it's the, not just the, well, you have an ORM that's built in, but you've got the admin sections that know about the models and all kinds of stuff.

05:10 We're actually gonna come back to that as well later in this episode.

05:14 But one of the new things is functional unique constraints.

05:19 So like I can only insert this record if there's not already one that matches, say the email address for a user.

05:25 So now what you can do is you can create functionally unique constraints with expressions and database functions.

05:32 So for example, you could have an index, which is a unique constraint where you have the lowercase of the first name, the lowercase of the second name, descending I guess for the index bit, but that doesn't really matter for the constraint.

05:45 And then you can give it a name, like first name, last name must be unique constraint.

05:50 And so that's pretty awesome, right?

05:51 You can say I can't have two users with the same name.

05:54 I'm not sure how practical that is, but as an example, it makes good sense.

05:58 - Yeah, poor Joe Smith or Michael Kennedy for that matter, like probably gonna not make it in after a couple hundred thousand users.

06:06 Let's see, they have the script password hasher.

06:09 So you do not, hopefully you are not storing raw passwords.

06:14 Every time I see a website that says, "Your password cannot be more than eight characters." I'm like, "That had better not be a Varchar eight field." I don't know what you're doing, but I'm starting to get really worried 'cause the size of the output of a hash is always the same size regardless of the input.

06:27 Anyway, so new password hasher that's more secure and recommended over what was previously the default of pbkdf2, right?

06:36 It's however not the default because you have to now install OpenSSL 1.0 or above, which is not super high, but it's still not super new version.

06:44 All right.

06:45 Then Redis there's now a dedicated built in Redis cache as the caching tier.

06:50 So you can set up caching in Django and say, cache here.

06:53 Now one of the options is Redis.

06:55 Yes, you could do that previously, but now it's like a built in thing.

07:00 So you don't have to do that outside of.

07:02 - That's cool.

07:03 - Yeah.

07:03 That's cool.

07:03 Right?

07:03 - That's very cool.

07:04 - Yeah.

07:05 And then a template based form rendering.

07:09 So enhanced customization of forms, form sets, errors list, and so on using the template engine.

07:13 So pretty cool.

07:14 Not a huge bunch of changes, but they all sound really nice.

07:18 - Yeah, the support of which Python versions is pretty big.

07:21 But I mean, come on people.

07:23 It's an application.

07:24 You can pick your whatever Python version you want.

07:26 - Yeah, that's right.

07:27 Out there in the live stream, Alvaro, hey, says, "I guess that dropping versions "helps to reduce the number of wheels to build "and also to test, right?

07:35 "Probably so CI is probably faster.

07:38 you can take advantage of some of the newer things and just count on them being there, which is great.

07:43 Yeah.

07:43 Also, speaking of versions, Sam Morley, hey Sam, great to see you again.

07:48 Says, getting my boss to agree to drop Python 3.4 was a task.

07:52 [laughs]

07:53 That's, it's been a while since 3.4 is out.

07:55 I actually remember I think where I was.

07:57 I was out in Redlands, California.

07:59 That came out, which is pretty interesting.

08:01 Anyway, don't know why that came to my mind.

08:03 Is this stuff exciting to you, Morley?

08:05 someone does more Django than probably Brian or me.

08:07 - No, it's very exciting to me.

08:09 Just being able to see just the iterations of Django is very, very helpful to the community.

08:16 I started with Django 3, so this is, these few iterations have been very helpful, especially Redis, absolutely.

08:22 - Yeah, the Redis is exciting.

08:24 - Yeah, for sure.

08:24 - Brian?

08:25 - Well, I have to apologize.

08:27 I don't remember who pushed us this way, but somebody on Twitter said, "Hey, you guys should maybe talk about Pi once in a while, like just by itself, the PY, the application.

08:37 So a Pi or Pi.exe, it's the Python launcher.

08:42 This has been bundled with Python 3.3.

08:46 It's been there for a while, but to be honest, I've ignored it because it's a Windows only thing.

08:53 I do work on Windows, but I also work in Mac and Linux in multiple environments.

08:59 I really don't want to change my workflow just for one.

09:02 But the idea is that you just type Pi and it picks the latest version that you have installed on your system.

09:09 It's kind of neat, but I didn't really get the feel for it.

09:14 But then Brett Cannon wrote this thing called Pi Launcher that is the same thing, but it works on Mac and it works on Linux and it works on a bunch of other stuff like Arch Linux.

09:29 and really anything that Rust can run on, I think it works on, which is like almost everything.

09:36 This is pretty neat, but why is it neat?

09:39 I'm like still, why did Brett spend time making this work?

09:43 I started changing my workflow for this.

09:46 I got to say, it's life-changing.

09:49 The big thing is, I don't have to care where Python's installed anymore.

09:53 I have this set up on my Mac.

09:56 I've got it set up on, I included it in the install on Windows.

10:00 And then you just say, Pi, like for instance, you can say Pi dash dash list and you get like all of the, I don't have the example here, you get all of the versions listed out and it lists, it tells you where they are too but you don't really have to care.

10:18 And in the Pi launcher version on Linux or Mac, it shows the paths right away.

10:23 On the Windows version, you have to say list paths but it's still pretty easy if you want to know where they are.

10:28 But basically, you don't have to care where things are anymore.

10:31 I also don't have to care where they are in the path, like in my path variable.

10:36 The Python version I want, is it the first one, the second one?

10:41 Did I install something and mess it up?

10:43 Like if I install Python 3.10, but I also want to test on 3.6, so I installed 3.6 later, where does that show up in the path?

10:50 I don't have to care anymore because my workflow is mostly around virtual environments.

10:57 So I say like Python-mvnv, and I create a virtual environment, and I create it with the most recent Python version, no matter where they are in the path, where they're located.

11:09 And then if I want to test like a 3.8, something on 3.8 or 3.9, I can either, I can just type pi-3.8 or 3.9, and then it just automatically runs that version.

11:22 So I can run a script in Python 3.8 easily like that, or I can run it with, I can create a virtual environment, a 3.8 virtual environment really easily.

11:31 And then I still don't, basically I don't have to care where things are installed anymore.

11:35 And I love that.

11:36 So.

11:37 - Yeah, the other thing that I really like, sorry if I missed you hearing you say this is, once you create the virtual environment, subsequent calls to Pi will use that environment long as you're either in that directory or in a sub directory of other, you don't have to activate the virtual environment.

11:53 Like long as traversing up the hierarchy hits a .ve and v directory.

11:59 It's like, okay, that's the most appropriate Python.

12:03 - Does it work that way?

12:04 - That's what it says.

12:05 Like see the code sample right there?

12:06 Look right underneath the, what's the next paragraph, right?

12:08 It says subsequent uses of Pi will then use that virtual environment as long as it is the current or higher directory, no environment activation required.

12:16 - That's pretty cool.

12:17 - Yeah.

12:18 - That's very cool.

12:18 That's very cool.

12:19 - Yeah.

12:19 It's so nice.

12:20 Cause that way you can set up your file system.

12:22 You don't have to remember to activate it.

12:24 Like certainly not common, but it is not also uncommon that I'm like pip install this thing.

12:30 Oh, it went to the wrong place.

12:32 You know what I mean?

12:33 Yeah.

12:34 Configuration is extremely important.

12:36 Right.

12:36 So this is, this is very good.

12:38 Yeah.

12:38 Very good.

12:38 Yeah.

12:39 And ZDocs on live stream.

12:41 Hey, says what's the main difference from this to PI E and V.

12:45 I think that that's one of them, right?

12:47 PI and V you've got to do PI E and V run.

12:50 You've got to like start the shell and it's kind of, and I think this one is sort of, it's more like node packages or node modules.

12:56 Like as long as it finds something there, like, okay, that's the project I'm in.

12:59 Let's run.

12:59 Yeah.

13:00 And PI E and V does these shim things to change which, which you can set up, which one you find, and I just, that, I don't know.

13:08 That makes it weird to me.

13:10 It makes my, my system have state that I have to remember what I did.

13:14 Yeah.

13:14 Yeah.

13:14 Yeah.

13:14 I've activated Python three seven.

13:16 So now it stays that way until you change it, right?

13:20 >> So anyway, this has changed my life for the better and it's great.

13:24 So thanks, Brett.

13:26 Now I use it on Windows too.

13:28 >> Fantastic. All right.

13:30 Up next, I almost closed what you're talking about, Marley.

13:35 Yeah, you're on the data science side of the world now, so bring us some data science news.

13:40 >> Now, this is good. So this is this Data for AI Report 2021.

13:43 It's a pretty extensive report that comes out every year, just surveying across the world, really, just the trends on data science.

13:53 And so at the very top there, it has the actual report.

13:56 It's a PowerPoint version.

13:58 But in this report, it highlights just the need for transformers being used not just for NLP, right?

14:07 So for looking at text, but it's also looking at audio.

14:12 it's also looking at BDO and it's also looking at like, you know, protein transcription, for example.

14:17 So it's transformers are going beyond what they were intended to be, which was just primarily just NLP.

14:25 >> Right.

14:26 Yeah.

14:26 Give us a quick definition of a transformer.

14:28 This is, like you say, out of the natural language processing side of ML, right?

14:33 >> Right.

14:34 So it's basically a sequence to sequence.

14:36 So it's, it's taking a text from say, English and converting it into an equivalent text into French or something else, right?

14:45 So, having a natural language processor transformer that can do that in a rather efficient basis is the whole idea of transformer space.

14:54 So it's basically taken, again, tokens or this sequence from one language to another language.

15:01 And so, what this is saying now is that it isn't just constrained to just NLP, right?

15:08 So now you can use it for looking at large datasets that are audio or large datasets that are, you know, imagery, and then converting that into something that's that you intended to do.

15:20 So you're sticking those models, transfer learning, essentially, taking transfer learning from one model into another set of models.

15:27 That's essentially what this is talking.

15:29 The idea here is that you're moving away from just NLP that you use in it for computer vision, as it says on there, and even protein structure prediction.

15:37 This is important to me because I actually, Michael, I don't know if I was telling you earlier.

15:42 I spent some time in Qatar and I was, I was studying Arabic there.

15:45 Right.

15:45 So we would spend like hours just, just going through like that transcription, datasets and stuff.

15:53 So now, you know, having a transformer that can actually do that faster and maybe more accurate than, and in the past, I think it's extremely helpful for somebody like, and, the hug and face transformer from a Python perspective, it's an extremely popular, package on, GitHub.

16:12 And most people it's, it's got about 53,000 likes at this point, all stars at this point.

16:17 Wow.

16:17 That's, that's comparable to Django and Flask level of popularity.

16:21 Yes.

16:21 Yes.

16:22 Yes.

16:22 And, they formed partnership with AWS.

16:25 And so now you can spin up resources.

16:28 So enable AWS to use a Hugin space transformers.

16:31 And again, those transformers have models that you can use for transcription.

16:35 You can use them for a vision, a computer vision, or even like it's saying here for a protein structure predictions.

16:42 Yeah.

16:43 Cool.

16:43 I'm very excited about what ML can do for medicine and biology research.

16:48 I think, you know, machine learning and like recommendation engines and all all sorts of stuff have good sides and bad sides and all kinds of things.

16:56 But on the medical side, it seems like it's mostly good.

17:00 Right, if you could say, "Actually, we can cure this disease 'cause we understand how to create something that will bind to this protein 'cause now we know its actual shape." Yeah, that's great.

17:09 - That's incredible, right?

17:10 So predicting those shapes for protein is extremely important.

17:14 I studied chemistry in college and a little bit of biochemistry when I was in college.

17:18 And knowing the structures for proteins like extremely important, but it takes a long time to model those, the structures, right?

17:26 Now you can do it pretty easily on using transformers. It's a good thing.

17:30 >> Yeah, there's probably less well-known ways around more like physical chemistry as well, right? Like trying to understand different kinds of batteries and things like that, potentially, you know, don't get all the press.

17:41 >> Well, I'm thinking that maybe we're not too terribly far away from universal translators in AirPods. That would be cool.

17:48 >> Yes. That would be actually pretty amazing.

17:52 I mean, we're pretty close with Google Translate.

17:54 You can speak to it and then show it to someone in their language, and then I can think you can even make it read back, and you can really clumsily do it.

18:01 But what you're envisioning is just natural conversation.

18:04 >> Yeah, and have it be in their voice too.

18:07 >> Yeah.

18:08 >> That's pretty cool.

18:10 >> You got to wait five seconds for it to calculate a deep fake then you can start talking.

18:14 >> Well, now, but our kids are going to be like using these things probably.

18:19 - Yeah, I know.

18:20 I think you're totally right there.

18:21 Absolutely.

18:21 Awesome.

18:22 Yeah, good pick there, Morley.

18:23 Great.

18:24 Before we thank our sponsor, I wanna just give a quick shout out to John Sheehan's comment here.

18:30 The Python launcher, the Py thing that Brian spoke about, looks like a nice package and a better alternative to the Py alias I created on my Linux laptop.

18:38 Oh man, you and me both, my .zshrc is full of alias this, alias that, many of them starting with P to do something with Python.

18:48 - Yeah, I mean, I used to list like make up aliases for PI 38, PI 39, just to, and then I couldn't remember if I had a dot in it or not.

18:55 Was it 3.8?

18:56 3, yeah, anyway.

18:58 - Yeah, yeah, cool.

19:00 All right, before we move on though, I do wanna tell you about our sponsor, Shortcut.

19:04 Thank you, Shortcut, formerly Clubhouse, for sponsoring the show.

19:07 Check them out at shortcut.com/pythonbytes.

19:10 Or Brian, do you know what else that people can do now?

19:13 - What?

19:14 - We started adding chapters, chapter images, chapter links.

19:18 So I guess you could even click the chapter link right here in your podcast player or in the podcast show notes.

19:23 So that's pretty awesome.

19:24 But however you get to them, thank you to Shortcut for sponsoring this episode.

19:29 They've built simple project management tools that grow with your engineering team and don't get too complex, but are not too simplistic.

19:39 So some of the highlights include team-based workflows.

19:42 So individual teams can use Shortcuts default workflows or they can customize them.

19:47 Organizational-wide goals and roadmaps led the overall organization to find workflows and then tie these smaller team ones into the larger workflow and kind of get a big organization-wide view.

20:00 VCS, version control integration.

20:02 So it works with GitHub, GitLab, and Bitbucket, and it can tie your items in your project management back over into what's happening there.

20:13 And you can even do that from the command line, which is cool.

20:15 As almost all web apps should have, but many don't, Shortcut has a bunch of keyboards, so you can use their power bar and use hotkeys all over their web app to just zoom around because like someone like Brian, who would rather be in Vim mode and not take his hands off the keyboard, can cruise around.

20:34 - Nice.

20:34 - It does iteration planning and will automatically schedule how that should go along if you don't wanna customize it.

20:39 So give it a try over at shortcut.com/pythonbytes 'cause you shouldn't have to manage your project management.

20:45 So yeah, thank you to Shortcut for sponsoring the show.

20:48 Now, let's go back to Django.

20:50 And I'm gonna tie this together.

20:53 So Morley has a background in Django.

20:55 Brian, you have clearly a bunch of testing.

20:58 So let's talk about testing Django models.

21:01 - Okay, awesome.

21:01 - Okay, yeah, so one of the problems you might need to do in your test is you are going to create some data models and then you wanna do stuff with them, right?

21:09 You wanna pass them off to a function or whatever.

21:12 And so that can be a bit of a hassle.

21:14 So I wanna tell you about Model Bakery, which are smart fixtures for better, parenthesis, Django tests.

21:21 That's not quite there, but for better tests for Django code.

21:24 So the idea is it's like Baker or Makaru or something like that, but for Django or our models.

21:31 And it specifically understands things like relationships and whatnot.

21:36 So pretty cool.

21:37 You can come over here and do things like you've got your Django model defined as it does, right?

21:43 Derivation models has fields which are columns, like email fields, character fields, and so on.

21:49 And then when you wanna use it, you just go to the baker and you say make a, you know, in this case, it's like a shop, like online e-commerce shop.

21:57 So you can say shop.purchase history is the namespace of the class.

22:02 And then guess what?

22:03 It'll populate it with customers and emails and all kinds of stuff, that's cool, right?

22:07 - Yeah, it is. - It's very cool.

22:08 - Yeah, and then you could also set up model to model relationships.

22:12 So you can say, I want you to, when I create a purchase history, for example, it also has a products.

22:19 So you can say, make the model to model relationships for me and mock those out as well.

22:23 So then in your test, you can work with your purchase history object and say dot products and then loop over them, do count, whatever, right?

22:30 It's like a collection of sub or related models that were baked up for you.

22:36 Yeah, you can even go and say, prepare something to bake.

22:41 When you ask somebody gives you a product, I want you to create me a product of five of these, and then as you make a purchase history, also use those five as the related object instead of guessing or randomizing or whatever.

22:56 It's cool, right?

22:57 - That's very cool, very cool.

22:58 - Yeah, so if you're out there writing tests for Django, specifically the relationships, I think, is where this is pretty interesting, but it's interesting all over.

23:07 I suspect it'll do things like create emails if the model says here's an email field, and it'll create integers if it says here's an integer field and just take care of that for you.

23:16 >> That's very cool.

23:17 >> So is it another fake system or is it using a faker or something under the hood?

23:24 >> Now, that is a good question.

23:27 What kind of project?

23:29 >> I can go find out, I guess.

23:31 >> No. All right. Let's go check out the requirements here.

23:34 It's just Django. It's only requirement is Django.

23:38 >> Django.

23:39 >> It doesn't use like Baker or anything like that.

23:43 I'm guessing it's its own thing.

23:44 >> Nice.

23:45 >> I seem like it.

23:46 >> Yeah.

23:46 >> Very cool. It's very cool.

23:48 >> Yeah. Thanks. All right, Brian.

23:50 You're going to cover this next one for us or what?

23:52 >> Yeah, I'll cover this one.

23:54 That's one of my goals.

23:57 >> Well, good comeback.

24:00 So Ned Bouchelder is the maintainer for coverage.py, excellent tool and he's a great person to have at the helm there.

24:10 But he says that he's got had requests for, like one of the things you can do with coverage is you can incorporate it in your testing tool chain and CI and stuff to say, that coverage has to be at a certain level.

24:24 So you can say, has to be 100% if you wanna do that, or you can say, well, at least, what is the current percentage?

24:30 And we want to make sure that we don't drop it.

24:32 So you like, let's say you're at 75.

24:34 You want to make sure that we don't drop below 75.

24:37 But he's had requests for per file thresholds, which is an interesting idea.

24:42 But instead of giving us per file thresholds, he's got like this proof of concept thing called goals.py.

24:49 And it's just a snippet that you can download yourself and try it out.

24:54 But it's a little tiny script, but it uses the coverage data after the fact.

24:59 So coverage generates a report and then you can do things on it.

25:03 But what this goals thing does is it kind of acts like another stage.

25:07 So you can set up these in your pipeline to check for these and it'll have a exit code that indicates to your CI system that it failed.

25:16 But for instance, you can say, I want all my tests to be 100% covered, but my source code, maybe 85% for those.

25:25 And, but like maybe the HTML part of it, I wanna really want, or like all the code that is dealing with HTML, that I wanna make sure that it's really tested.

25:35 So I want 100% coverage there, but in general, you can 90%.

25:39 So he has an example set up to do just what I said of that.

25:44 So there's these glob groups that you can say, you know, the 85% for everything that's a Python file, except for the tests, and then have a different test.

25:54 So the way you basically do it as a CLI thing, and then you pass in file patterns like star.py or star HTML, star.py or whatever, right?

26:05 And you can even do knots, which is interesting.

26:07 - Yeah, and one of the things he's talking about is just he wants to have people try this and say, is this kind of, does this satisfy what you wanted or is there something else that's needed?

26:18 Do we really need per file?

26:20 I actually would hate to have per file 'cause it would--

26:22 - Yeah, well, yeah.

26:24 One quick way to like accomplish per file is just to put the file name as the pattern, right?

26:29 I mean, so it like, this is a superset of per file testing potentially.

26:34 - But I believe that he's probably right, that there's, and there's a link in here to say, if you want to comment on this, go to the original feature request and do a comment.

26:42 But there, he's probably right, that like, it's not really a per file thing.

26:46 It's that there's different sections of the system that you want to have specifics.

26:51 Or like for instance, with a not, you could say, well, everything except for, there's this one file that I know it's a problem, but we don't care about it.

26:59 Maybe exclude that.

27:01 - Oh, wow. - The developer who wrote it quit.

27:03 Nobody understands it.

27:04 We're not touching it.

27:05 Please don't complain to us about it.

27:06 We have no intention of touching it.

27:08 - Or maybe it's the splash screen.

27:10 Like, you know, some things throw up a splash image and, you know, really, if that's wrong, who cares?

27:16 Sort of thing, but.

27:17 - That's very cool.

27:18 - Yeah, it's a good one.

27:19 Nice find.

27:20 I like the generalization of it.

27:22 Well done, Ned. All right.

27:24 More late. So there's a lot of stuff about economic news these days, especially DeFi and Ethereum and Bitcoin.

27:32 >> And NFTs, right?

27:34 So it's already out there.

27:36 >> Yeah. My brother is an artist and worked for a long time doing just like insurance stuff and project management stuff.

27:43 >> Okay.

27:43 >> He's now started getting into NFT stuff because finally putting his master's degree in art to use, which is fantastic.

27:49 Yeah, it's a crazy world.

27:51 It's a crazy world.

27:53 And just the thought about like, making digital assets, valuable, digital scarcity, right?

28:00 Like the thing of digital was you could copy it.

28:02 Right.

28:02 Right.

28:03 Right.

28:03 And, and over the past, I mean, I've been looking at this over the past six months or so, and I'm just curious, I'm just, you know, where does this go in terms of like, how can you use digital assets as scarcity, but, you know, provide value eventually.

28:17 So artists can actually, you know, get paid or, or, or, or make, make use of their, their art, make it, make it available out there and get, and get value from it.

28:27 So Ethereum though is like one of those blockchains that pretty much I think about, I don't, I want to say 80 to 90% of all NFTs reside on Ethereum blockchain.

28:37 I think so.

28:38 Yeah.

28:39 It's definitely popular.

28:40 Yeah.

28:40 And so of course the language there is, solidity, but to interface with the blockchain, there's this library called web3.py, right?

28:51 So instead of using JavaScript, you can use web3.py to actually interface with Ethereum blockchain.

29:00 So basically you can write smart contracts there, but you can also get information from the blockchain, except for post information into the blockchain.

29:08 So this is something I found and I'm actually looking into it and I thought I want to share that with the community.

29:14 Yeah, it's interesting.

29:15 Yeah.

29:15 So there's an Ethereum.org/python for Python tutorials.

29:20 There's a quick start.

29:21 Right.

29:22 And so on.

29:23 Yeah.

29:23 Right.

29:23 If you were allowed, you can see what it takes to actually get it installed and use it for some of the protocols that are required.

29:30 So it's actually a pretty good, I've used it just a couple of times and I'm still playing around with it, but I think it's a, instead of using something else, if you're familiar with Python, this is a very comfortable transition.

29:41 If you're curious about blockchain or Ethereum.

29:43 So.

29:43 Yeah.

29:44 So you could build your own platforms and your own integrations, not just own Ethereum coins.

29:50 Right.

29:51 And so you can be the old smart contract, right?

29:52 We should just logic essentially send ether or CB ether or, or if it's NFTs, again, how do you interface with the blockchain with cryptography?

30:03 So, so web three point web three point PY, I think is extremely helpful.

30:09 Yeah.

30:10 Yeah.

30:11 It's neat to see Python applied in so many different places.

30:13 Yep.

30:13 Everywhere.

30:14 Everywhere, right?

30:15 Yeah, everywhere.

30:16 [LAUGHTER]

30:17 Yep.

30:18 Cool.

30:18 All right.

30:19 Awesome.

30:19 Yeah, that's a great find.

30:20 Pretty cool.

30:21 Yeah, pretty cool.

30:22 Brian, it's time for extras.

30:23 Extra, extra.

30:24 What you got for us?

30:25 What do you line up for us here?

30:26 I actually don't have any extras today.

30:28 No extra?

30:29 There's no extra, extra, extra read-all about it?

30:31 No.

30:31 All right.

30:32 I'll take care of it.

30:33 I got you covered here, as you might imagine.

30:37 So I want to give people an update on McFly.

30:39 I mentioned McFly a little while ago.

30:42 And book fly is sweet.

30:44 It's allows you to install it.

30:46 And it's kind of like reverse search of your shell commands, be that bash, zshell, phish, whatever, but way better.

30:54 Right?

30:55 You get like an Emacs interface to your history and you can delete it.

30:59 You can edit your history.

31:00 So if you mistype something and you want to save it or you see like, oh, geez, put the password in there.

31:05 I want to get that out of my history file.

31:06 You can do that.

31:07 So you just hit control R after you install it.

31:09 and it gives you this awesome interactive view.

31:12 I just want to tell people that I've been playing with this and totally loving it.

31:16 I've taken it for a spin for a while and I really, really dig it.

31:19 I've even set up the fuzzy matching so it doesn't have to exactly match what I've done in history, which is pretty cool.

31:26 I can now with some experience give that a thumbs up.

31:29 >> Nice.

31:29 >> I have.

31:30 >> Nice.

31:31 >> Also, a couple of exciting things about Python web conference.

31:34 If you're looking to speak somewhere and you want that somewhere to be on the Internet, you should check out Python webconf.

31:40 This is like a five day conference.

31:41 It's one of the biggest virtual conferences going these days, I think.

31:46 And it's interactive presentations or live presentations over the internet and then chat and so on.

31:53 So we've had Calvin, one of the organizers of it on before.

31:57 And the news is they've extended their call for papers out into November 15th.

32:04 So you got 12 more days, maybe 11, if I'm slow releasing this one.

32:07 And also I'm going to be talking about flask and HTMX over there.

32:11 Cause I'm still psyched about that.

32:13 So that's the next year early next year, but people can check that out.

32:16 Nice.

32:17 All right.

32:17 What else have I got for us, Brian?

32:19 So, the new MacBook pros, like the super expensive MacBook pros have come out.

32:24 there's an interesting review.

32:25 I'm not super thrilled with it, but over at ours, they usually do a pretty good job.

32:29 But I do want to read a fun quote from it.

32:31 And they say, rest assured if you didn't like the direction that Apple has been taking with the MacBook Pro for the last five years.

32:37 This laptop feels like an explicit apology for all that.

32:40 The result is it's the best laptop money can buy for many use cases, provided you have a lot of money.

32:45 (both laughing)

32:47 But one of the things that I found pretty interesting is the power supply for that thing is 140 watts.

32:52 - Oh, wow.

32:53 - That's insane for a laptop that you carry around the power supply.

32:56 - Wow.

32:57 - So I came across this thing called Anker Nano 2, 65 watt.

33:01 And it's, if you put it up next to--

33:05 - That's not enough.

33:06 - It's, well, hold on.

33:07 It's barely bigger than the brick that you use to charge an iPhone.

33:11 Like an American brick, not a UK brick, which has gotta be giant because the size of the plug.

33:16 But it's like super small and light.

33:18 And yeah, it seems like it's not enough, but with my, I got a MacBook Pro Max, and I've been using it, and this 65 watt thing will charge it just fine.

33:27 So unless you're doing like machine learning or video exporting or something that completely nails it.

33:33 Like this will charge like 25% in an hour, even though it's supposed to take 140 Watts, you can give it this little tiny thing.

33:39 So I haven't done enough to really give it 100%.

33:42 Like absolutely this is gonna work all the time, but my new plan is to travel with this tiny little thing and like a long USB-C or Thunderbolt cable.

33:50 Interesting, right?

33:51 - That's pretty interesting.

33:52 - Yeah.

33:53 - Could you put two in there?

33:54 - I don't think, maybe it'll catch fire if you do that.

33:57 I'm not gonna do that.

33:59 But like here you have the picture, It's like less than half the size of the charger, which is pretty interesting.

34:03 That's a 60 watt charger right there.

34:06 Not the 140 watt charger.

34:07 All right.

34:09 And finally, I want to say that if people who have an M1, not an M1 Max or Pro, you can pretty much not have FOMO about this thing.

34:18 Like as far as I can tell my Mac mini and my much more expensive MacBook pro are exactly the same speed.

34:23 Oh, really?

34:24 Okay.

34:25 almost always, except one thing I found is for outputting video.

34:30 I found that I could re-encode or I could encode the videos for TalkBytes on Training more efficiently.

34:36 And I re-encoded the entire library, which is like 220, 230 hours in multiple formats.

34:44 It took 14 days of compute time.

34:46 Not, I got around to doing it in 14 days, like start, it finished 14 days later.

34:52 And it's actually three over three times faster with the M1 Max.

34:57 So, so just like three or four days.

35:00 Yeah, it's only five days, which is still a long time.

35:02 But it's way better than 13, 14 days.

35:05 >> Let me tell you.

35:06 >> Yeah. So I think also this will have a really interesting knock-on effect for ML.

35:11 More like it's got like the on-board machine learning block and it's got a 32 core GPU.

35:17 I think there's a lot of stuff that's going to be coming along that's pretty interesting there.

35:20 What do you think?

35:21 No, no, no.

35:21 It's absolutely, you're absolutely right.

35:22 I have a friend that works for Google, does the same thing with that I do.

35:26 And, him and I were talking, I have just the, the little version of, MacBook Pro and I wasn't going to wait for another one to come out, but, it has a lot of the components and a lot of capacity that I need to do my works instead of just putting your stuff on like AWS and now you can run them locally.

35:45 And it's, it's extremely powerful.

35:47 So this is, this is, it's been good.

35:49 Especially M1, M1, M1.

35:51 The new stuff is quite, it's seriously impressive.

35:54 as Sam has said out there, I totally agree.

35:57 Very impressive.

35:57 Yeah.

35:58 More than anything else you want to throw out for people while you got the mic.

36:02 No, I just, I want to say thanks to you and Brian.

36:05 Right.

36:05 So again, I've been listening to you guys for a very long time and, I've come this far partly because I've been listening to you guys, just the encouragement.

36:12 I think you guys every day, every time I listen to you guys, you guys, you guys are talking to me and not to a large group of audience.

36:18 I think it's extremely helpful to see you guys be part of the community and a shout out to Pi, Pi Bay in San Francisco.

36:24 those guys are real cool.

36:26 And Michael, thanks for coming out there and talking to us.

36:28 that was a great trip.

36:29 A few weeks ago.

36:30 That's a few weeks ago.

36:31 So it was really good.

36:31 So I want to thank you guys for the work that you guys do.

36:34 And, we'll continue to listen to you guys and be part of the community.

36:38 Yeah.

36:38 Thanks.

36:39 Yeah.

36:39 I really appreciate that.

36:40 Thank you.

36:40 It's a lot of times we put stuff out there and there's not a lot of feedback, but you know, people are out there listening.

36:45 And then, then you meet folks and talk to them.

36:47 You're like, actually that it has an impact, which is really great.

36:50 You know, for me as a particular impact, right?

36:53 So like, like I took a journey and that it's, I am where I'm at today, because again, partly because of the work that you guys do, I'm listening to you guys doing a lot of the research and following up on a lot of the topics that you guys have on the show.

37:04 So it's, it's taken me a long way because, just because I listened to you guys a lot.

37:09 That's great.

37:10 Thank you so much.

37:10 Yep.

37:11 All right, Brian, we're ready for a joke.

37:13 You just show up with a smile.

37:15 Well, I just wanted to comment that maybe the next version of MacBook Pro might, you might have to charge it in the laundry room because that's the only one with a plug that's strong enough.

37:26 Yeah, if it gets a 240 volt, yeah, that's right.

37:29 [laughter]

37:31 Yeah, it's exciting.

37:32 But the thing is, it almost never runs at that, right? It'll go for like 14, 15 hours.

37:36 It's only if you're doing like insane stuff.

37:38 Also, you can plug in three Thunderbolt USB, three things, And each one of those it will provide up to 15 watts of output from the laptop.

37:46 Oh wow.

37:47 So I think it's also trying to pass.

37:49 Yeah, I think it's trying to pass through 45 watts.

37:52 So it needs a charger that can account for how much does the Mac need plus 45 more watts.

37:56 Right.

37:57 Because you plugged it into all these Thunderbolt thingies.

38:00 Okay.

38:00 Anyway, I've been trying to think about why it really needs someone that's so high.

38:04 Chris May is going to hook us up to like a level three DC fast charger.

38:10 Charge that thing up five minutes on the car.

38:12 All right. So this one comes to us from the variable XKCD and it talks to us about programming standards. So how standards proliferate. See AC chargers, very timely, character encodings, instant messaging and so on. I'm thinking network protocols. Remember this is a follow on from the joke of what is soap? And then rest. What the heck was wrong with soap? I know GPRC is better than rest. The torture never ends. Okay, so this is a follow up from that. And here is a man and woman developer saying, talking, says situation. There are 14 competing standards, 14 ridiculous. We need to develop one universal standard that that covers everyone's use cases.

39:02 Yeah, soon.

39:04 Situation, there are 15 competing standards.

39:06 (both laughing)

39:09 - Yeah.

39:09 - Yep.

39:10 - Yeah. - Yeah.

39:11 - The only thing going in the other direction is cellular standards.

39:14 They seem to be-- - Oh, really?

39:16 - Lessing.

39:17 So, but Wi-Fi is going crazy.

39:20 Anyway, it's just one standard, but it comes out with a new version about every six months.

39:24 - Good thing they don't bake those into hardware and chips and stuff.

39:28 Oh, wait.

39:28 (both laughing)

39:30 - It's a good thing they do, I'd be out of business if they didn't.

39:33 - Exactly, the testing never ends, fantastic.

39:36 - Yeah, thanks Michael, thanks Morley.

39:38 This was a really fun episode.

39:39 - Yep, thank you very much.

39:40 Thanks for the invite, appreciate it.

39:42 - And thanks everybody on the chat and on the stream for watching.

39:46 - Bye all. - Bye.

39:47 - Bye.

39:48 - Thanks for listening to Python Bytes.

39:49 Follow the show on Twitter via @PythonBytes.

39:52 That's Python Bytes as in B-Y-T-E-S.

39:55 Get the full show notes over at PythonBytes.fm.

39:58 If you have a news item we should cover, just visit PythonBytes.fm and click submit in the nav bar.

40:04 We're always on the lookout for sharing something cool.

40:06 If you want to join us for the live recording, just visit the website and click live stream to get notified of when our next episode goes live.

40:13 That's usually happening at noon Pacific on Wednesdays over at YouTube.

40:18 On behalf of myself and Brian Aukin, this is Michael Kennedy.

40:21 Thank you for listening and sharing this podcast with your friends and colleagues.

Back to show page