WEBVTT

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

00:00:05.920 --> 00:00:10.220
This is episode 257, recorded November 3rd, 2021.

00:00:10.220 --> 00:00:12.700
Hey, it's November. Cool. I'm Brian Okken.

00:00:12.700 --> 00:00:13.800
I'm Michael Kennedy.

00:00:13.800 --> 00:00:15.120
I'm Morla Sicarbo.

00:00:15.120 --> 00:00:16.400
Well, welcome, Morla.

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

00:00:21.740 --> 00:00:29.360
Yeah, my name is Morla Sicarbo, and I met Michael Kennedy a couple of weeks ago at a PyBay event.

00:00:29.720 --> 00:00:30.800
In San Francisco.

00:00:30.800 --> 00:00:36.840
A fantastic PyBay event. For people who cannot see it, they should go to pybay.com and just see the graphics.

00:00:36.840 --> 00:00:41.620
This is the conference outside at a food cart area. So awesome. So great to see you there.

00:00:41.620 --> 00:00:46.740
Right. And so I help Grace Law organize that event.

00:00:46.740 --> 00:00:51.120
She and I have been working over the past couple of years, and it's a fantastic community.

00:00:51.120 --> 00:00:57.800
And I've been in San Francisco for the past three years, and I'm actually, I work for the Defense Department.

00:00:59.440 --> 00:01:04.240
I lead a software development team, and we work on optimizing software processes.

00:01:04.240 --> 00:01:06.840
And on the weekends, I'm a commercial pilot.

00:01:06.840 --> 00:01:09.460
So I do fly, and I do teach student pilots.

00:01:09.460 --> 00:01:11.400
So that's, generally speaking, who I am.

00:01:11.400 --> 00:01:12.660
That's so awesome.

00:01:12.660 --> 00:01:13.440
That's cool.

00:01:14.140 --> 00:01:16.020
My side job is a professional pilot.

00:01:16.020 --> 00:01:18.280
Yeah. Including jets, right?

00:01:18.280 --> 00:01:21.740
Yeah, I do fly corporate jets.

00:01:21.740 --> 00:01:24.680
That sounds so fun. I think that's so neat.

00:01:25.680 --> 00:01:33.580
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.

00:01:33.580 --> 00:01:35.600
Like, you really get away. You get up in the sky.

00:01:35.600 --> 00:01:41.820
I do get away, but you got to be careful, right? Because you're going across different ecosystem, right?

00:01:41.840 --> 00:01:48.040
So you got to make sure that you're well protected, that you take in all the precautions that are required to not get sick.

00:01:48.180 --> 00:01:51.140
But it's an adventure. I do like to get around to it.

00:01:51.140 --> 00:01:52.460
Awesome.

00:01:52.460 --> 00:01:56.560
And Teddy, on the live stream, says, you invited James Bond, I think.

00:01:56.560 --> 00:01:58.100
I think we may have, actually.

00:01:58.100 --> 00:01:58.640
Yeah.

00:01:58.640 --> 00:02:00.620
Where do you park your Austin Martin?

00:02:00.620 --> 00:02:01.340
No, seriously.

00:02:01.340 --> 00:02:03.180
Let's kick this off, Brian.

00:02:03.180 --> 00:02:06.640
With something also, Morley, you're also involved with Django stuff, right?

00:02:06.640 --> 00:02:07.220
In San Francisco?

00:02:08.060 --> 00:02:09.500
Yes, just a little bit.

00:02:09.500 --> 00:02:12.960
By the way, first off, I do want to say thank you very much, Michael.

00:02:12.960 --> 00:02:20.300
So many years ago, I was overseas, and I was in Qatar at the time, and I got started learning how to code.

00:02:20.300 --> 00:02:27.980
And Python was the language that was, at least from my perspective, something I could use in my data science perspective.

00:02:27.980 --> 00:02:37.140
And working with you through Talk Python To Me was extremely helpful for me, learning how to code, just being with the community.

00:02:37.480 --> 00:02:38.660
And I think that was extremely helpful.

00:02:38.660 --> 00:02:47.280
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.

00:02:47.280 --> 00:02:47.980
So thank you for that.

00:02:47.980 --> 00:02:49.100
That's amazing.

00:02:49.100 --> 00:02:50.080
Thank you so much.

00:02:50.080 --> 00:02:51.340
It really means a lot.

00:02:51.340 --> 00:02:56.300
And it's easy to forget, Brian and I just sit here at our desk and chat about stuff.

00:02:56.300 --> 00:03:03.260
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.

00:03:03.260 --> 00:03:06.620
It helps people get more integrated quicker.

00:03:06.900 --> 00:03:07.460
And I think that's fantastic.

00:03:07.460 --> 00:03:07.480
Yeah.

00:03:07.480 --> 00:03:09.380
And it's just the way you guys talk, right?

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

00:03:18.540 --> 00:03:22.440
So I'm listening to a podcast, and I'm going, this is relatable.

00:03:22.440 --> 00:03:28.500
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.

00:03:28.500 --> 00:03:29.340
So it's really good.

00:03:29.340 --> 00:03:30.200
Nice.

00:03:30.200 --> 00:03:31.120
Yeah, fantastic.

00:03:31.500 --> 00:03:33.400
Speaking of packages, let's talk about Django.

00:03:33.400 --> 00:03:35.880
Yeah, let's start with Django here.

00:03:35.880 --> 00:03:38.340
So I don't do that much Django.

00:03:38.340 --> 00:03:41.960
I do more on the micro framework side of things.

00:03:41.960 --> 00:03:43.840
But Django is super important.

00:03:43.840 --> 00:03:47.220
And when cool stuff happens there, I want to make sure to give it a shout out.

00:03:47.220 --> 00:03:49.000
So we're Django 4.

00:03:49.000 --> 00:03:51.340
I mean, in beta, but still Django 4.

00:03:51.340 --> 00:03:52.780
Morley, have you been tracking this?

00:03:52.780 --> 00:03:53.540
Are you excited about this?

00:03:53.540 --> 00:03:54.580
I am tracking it.

00:03:54.640 --> 00:03:55.700
I'm excited about it.

00:03:55.700 --> 00:03:56.360
Yep, absolutely.

00:03:56.360 --> 00:03:56.700
Yep.

00:03:56.700 --> 00:03:57.980
Yeah, super cool.

00:03:57.980 --> 00:04:01.440
So Django 4.0 beta 1 was released.

00:04:01.440 --> 00:04:06.220
I feel like it was Django 1 for a really long time, and then Django 2, and then, you know what?

00:04:06.220 --> 00:04:07.600
Blow the doors off.

00:04:07.600 --> 00:04:08.840
We'll go 3, 4, 5, 6.

00:04:08.840 --> 00:04:10.620
We're going to be at Django 20 soon enough.

00:04:10.620 --> 00:04:11.120
Right.

00:04:11.440 --> 00:04:12.500
But this is really good news.

00:04:12.500 --> 00:04:17.980
The beta 1, so means feature freeze, bug fixes only type of thing, is out.

00:04:17.980 --> 00:04:21.100
And if you're interested in this, you can try it out now.

00:04:21.100 --> 00:04:25.300
Notable changes here for what's coming along.

00:04:25.300 --> 00:04:31.040
First of all, it's only compatible with Python 3.8 and beyond, which is pretty fantastic.

00:04:31.040 --> 00:04:37.180
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.

00:04:37.500 --> 00:04:42.840
So I think that's pretty interesting as well, the rapid adoption of new Python, right?

00:04:42.840 --> 00:04:45.480
This is like two years of Python and not more.

00:04:45.480 --> 00:04:46.840
So things that are new.

00:04:46.840 --> 00:04:50.120
There's stuff about time zones, which I'm not going to bore you with.

00:04:50.120 --> 00:04:52.020
But database stuff is cool, right?

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

00:04:59.560 --> 00:05:00.720
Wouldn't you say so, Morley?

00:05:00.720 --> 00:05:01.900
Yes, absolutely.

00:05:01.900 --> 00:05:02.340
Yeah.

00:05:02.340 --> 00:05:02.880
Yeah.

00:05:03.220 --> 00:05:10.720
I think it's 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.

00:05:10.720 --> 00:05:14.500
We're actually going to come back to that as well later in this episode.

00:05:14.500 --> 00:05:19.060
But one of the new things is functional unique constraints.

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

00:05:24.940 --> 00:05:32.540
So now what you can do is you can create functionally unique constraints with expressions and database functions.

00:05:32.540 --> 00:05:44.040
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.

00:05:44.040 --> 00:05:45.440
But that doesn't really matter for the constraint.

00:05:45.640 --> 00:05:50.100
And then you can give it a name, like first name, last name must be unique constraint.

00:05:50.100 --> 00:05:51.940
And so that's pretty awesome, right?

00:05:51.940 --> 00:05:54.620
You can say, I can't have two users with the same name.

00:05:54.620 --> 00:05:57.680
I'm not sure how practical that is, but, you know, as an example, it makes good sense.

00:05:57.680 --> 00:05:58.240
Yeah.

00:05:58.240 --> 00:06:06.180
Poor Joe Smith or Michael Kennedy, for that matter, like probably going to not make it in after a couple hundred thousand users.

00:06:06.180 --> 00:06:06.860
Let's see.

00:06:06.860 --> 00:06:09.240
They have the script password hasher.

00:06:09.460 --> 00:06:13.820
So you do not, hopefully you are not storing raw passwords.

00:06:13.820 --> 00:06:20.140
Every time I see a website that says your password cannot be more than eight characters, I'm like, that better not be a varchar eight field.

00:06:20.140 --> 00:06:27.260
I don't know what you're doing, but I'm starting to get really worried because the size of the output of a hash is always the same size, regardless of the input.

00:06:27.260 --> 00:06:35.780
Anyway, so new password hasher that's more secure and recommended over what was previously the default of PBKDF2, right?

00:06:36.240 --> 00:06:44.740
It's, however, not the default because you have to now install open SSL 1.0 or above, which is not super high, but it's still not super new version.

00:06:44.740 --> 00:06:45.140
All right.

00:06:45.140 --> 00:06:50.420
Then Redis, there's now a dedicated built-in Redis cache as the caching tier.

00:06:50.420 --> 00:06:53.340
So you can set up caching in Django and say cache here.

00:06:53.340 --> 00:06:55.100
Now one of the options is Redis.

00:06:55.100 --> 00:06:59.980
Yes, you could do that previously, but now it's like a built-in thing.

00:06:59.980 --> 00:07:02.580
So you don't have to do that outside of.

00:07:02.580 --> 00:07:03.000
That's cool.

00:07:03.000 --> 00:07:03.920
Yeah, that's cool, right?

00:07:03.920 --> 00:07:04.780
That's very cool.

00:07:04.780 --> 00:07:05.340
Yeah.

00:07:05.580 --> 00:07:08.860
And then template-based form rendering.

00:07:08.860 --> 00:07:13.600
So enhanced customization of forms, form sets, errors list, and so on using the template engine.

00:07:13.600 --> 00:07:14.660
So pretty cool.

00:07:14.660 --> 00:07:17.800
Not a huge bunch of changes, but they all sound really nice.

00:07:17.800 --> 00:07:18.360
Yeah.

00:07:18.360 --> 00:07:22.860
The support of which Python versions is pretty big, but I mean, come on, people.

00:07:22.860 --> 00:07:24.480
It's an application.

00:07:24.480 --> 00:07:26.340
You can pick your whatever Python version you want.

00:07:26.340 --> 00:07:27.400
Yeah, that's right.

00:07:27.400 --> 00:07:30.580
Out there in the live stream, Alvaro says,

00:07:30.580 --> 00:07:35.940
I guess that dropping versions helps to reduce the number of wheels to build and also to test, right?

00:07:35.940 --> 00:07:37.700
Probably so CI is probably faster.

00:07:37.700 --> 00:07:42.960
You can take advantage of some of the newer things and just count on them being there, which is great.

00:07:43.800 --> 00:07:46.880
Also, speaking of versions, Sam Morley.

00:07:46.880 --> 00:07:47.380
Hey, Sam.

00:07:47.380 --> 00:07:48.240
Great to see you again.

00:07:48.240 --> 00:07:52.020
It says, getting my boss to agree to drop Python 3.4 was a task.

00:07:53.580 --> 00:07:55.260
It's been a while since 3.4 was out.

00:07:55.260 --> 00:07:57.220
I actually remember, I think, where I was.

00:07:57.220 --> 00:07:59.700
I was out in Redlands, California.

00:07:59.700 --> 00:08:01.460
That came out, which is pretty interesting.

00:08:01.460 --> 00:08:03.140
Anyway, I don't know why that came to my mind.

00:08:03.140 --> 00:08:05.060
Is this stuff exciting to you?

00:08:05.060 --> 00:08:07.820
Morley, someone does more Django than probably Brian or me?

00:08:07.820 --> 00:08:09.620
No, it's very exciting to me.

00:08:09.620 --> 00:08:15.920
Just being able to see just the iterations of Django is very, very helpful to the community.

00:08:15.920 --> 00:08:17.500
I started with Django 3.

00:08:17.500 --> 00:08:21.740
So this few iterations have been very helpful, especially Redis.

00:08:21.740 --> 00:08:22.360
Absolutely.

00:08:22.360 --> 00:08:23.780
Yeah, the Redis is exciting.

00:08:23.780 --> 00:08:24.660
Yeah, for sure.

00:08:24.660 --> 00:08:25.100
Brian?

00:08:25.100 --> 00:08:27.400
Well, I have to apologize.

00:08:27.400 --> 00:08:30.560
I don't remember who pushed us this way, but somebody on Twitter said,

00:08:30.560 --> 00:08:37.480
hey, you guys should maybe talk about Py once in a while, like just Py itself, the PY, the application.

00:08:37.480 --> 00:08:42.180
So Py or Py.exe, it's the Python launcher.

00:08:42.180 --> 00:08:45.660
This has been bundled with Python 3.3.

00:08:45.660 --> 00:08:47.480
So it's been there for a while.

00:08:47.480 --> 00:08:52.920
But to be honest, I kind of ignored it because it's a Windows-only thing.

00:08:52.920 --> 00:08:58.920
And I do work on Windows, but I also work in Mac and Linux and multiple environments.

00:08:58.920 --> 00:09:01.920
So I really don't want to change my workflow just for one.

00:09:01.920 --> 00:09:09.480
But the idea is that you just type Py and it picks the latest version that you have installed on your system.

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

00:09:14.880 --> 00:09:29.580
But then Brett Cannon wrote this thing called Py Launcher that is the same thing, but it works on Mac and it works on Linux and it works on a whole bunch of other stuff like Arch Linux.

00:09:30.320 --> 00:09:36.380
Really, anything that Rust can run on, I think it works on, which is like almost everything.

00:09:36.380 --> 00:09:38.560
So this is pretty neat.

00:09:38.560 --> 00:09:39.860
But why is it neat?

00:09:39.860 --> 00:09:43.160
So I'm like, still, why did Brett spend time making this work?

00:09:43.160 --> 00:09:45.920
And so I started changing my workflow for this.

00:09:45.920 --> 00:09:49.140
And I got to say, it's kind of life-changing.

00:09:49.700 --> 00:09:53.160
The big thing is I don't have to care where Python's installed anymore.

00:09:53.160 --> 00:09:56.580
So I have this set up on my Mac.

00:09:56.580 --> 00:10:00.400
I've got it set up on, I included it in the install on Windows.

00:10:00.400 --> 00:10:05.280
And then you just say, like for instance, you can say py-list.

00:10:05.280 --> 00:10:09.680
And you get like all of the, I don't have the example here.

00:10:09.680 --> 00:10:12.280
You get all of the versions listed out.

00:10:12.700 --> 00:10:17.080
And it lists, it tells you where they are too, but you don't really have to care.

00:10:17.080 --> 00:10:23.120
And in the Py Launcher version on Linux or Mac, it shows the paths right away.

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

00:10:28.120 --> 00:10:30.600
But basically, you don't have to care where things are anymore.

00:10:30.600 --> 00:10:36.200
So I also don't have to care where they are in the path, like in my path variable.

00:10:36.200 --> 00:10:40.060
So the Python version I want, is it the first one?

00:10:40.060 --> 00:10:40.800
The second one?

00:10:40.800 --> 00:10:42.500
Did I install something?

00:10:42.660 --> 00:10:43.280
mess it up?

00:10:43.280 --> 00:10:47.280
Like if I install Python 3.10, but I also want to test on 3.6.

00:10:47.280 --> 00:10:48.680
So I installed 3.6 later.

00:10:48.680 --> 00:10:50.640
Where does that show up in the path?

00:10:50.640 --> 00:10:51.980
I don't have to care anymore.

00:10:51.980 --> 00:10:57.080
Because my workflow is mostly around virtual environments.

00:10:57.080 --> 00:11:03.360
So I say like Python-MVNV, and I create a virtual environment.

00:11:03.360 --> 00:11:08.160
And I create it with the most recent Python version, no matter where they are in the path, where they're located.

00:11:08.880 --> 00:11:18.700
And then if I want to test something on 3.8 or 3.9, I can just type pi-3.8 or 3.9.

00:11:18.700 --> 00:11:22.240
And then it just automatically runs that version.

00:11:22.240 --> 00:11:24.920
So I can run a script in Python 3.8 easily like that.

00:11:24.920 --> 00:11:30.240
Or I can run it with, I can create a virtual environment, a 3.8 virtual environment really easily.

00:11:30.740 --> 00:11:35.520
And then I still don't, basically I don't have to care where things are installed anymore.

00:11:35.520 --> 00:11:36.560
And I love that.

00:11:37.000 --> 00:11:50.220
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 subdirectory.

00:11:50.220 --> 00:11:53.480
So you don't have to activate the virtual environment.

00:11:53.480 --> 00:11:59.660
Like long as traversing up the hierarchy hits a .ve and vdirectories.

00:11:59.660 --> 00:12:02.880
Like, okay, that's the most appropriate Python.

00:12:02.880 --> 00:12:04.120
Does it work that way?

00:12:04.480 --> 00:12:05.100
That's what it says.

00:12:05.100 --> 00:12:06.280
Like, see the code sample right there?

00:12:06.280 --> 00:12:08.780
Look right underneath the, what's the next paragraph, right?

00:12:08.780 --> 00:12:14.600
It says subsequent uses of pi will then use that virtual environment as long as it is the current or higher directory.

00:12:14.600 --> 00:12:16.480
No environment activation required.

00:12:16.480 --> 00:12:17.540
That's pretty cool.

00:12:17.540 --> 00:12:18.100
Yeah.

00:12:18.100 --> 00:12:18.740
That's very cool.

00:12:18.740 --> 00:12:19.520
That's very cool.

00:12:19.520 --> 00:12:20.400
It's so nice.

00:12:20.400 --> 00:12:22.700
Because that way you can set up your file system.

00:12:22.700 --> 00:12:24.380
You don't have to remember to activate it.

00:12:24.380 --> 00:12:30.200
Like, certainly not common, but it is not also uncommon that I'm like, pip install this.

00:12:30.200 --> 00:12:32.620
Oh, it went to the wrong place.

00:12:32.620 --> 00:12:33.320
You know what I mean?

00:12:34.400 --> 00:12:34.640
Yeah.

00:12:34.640 --> 00:12:36.860
Configuration is extremely important, right?

00:12:36.860 --> 00:12:38.080
So this is, this is very good.

00:12:38.080 --> 00:12:38.300
Yeah.

00:12:38.300 --> 00:12:38.980
Very good.

00:12:38.980 --> 00:12:39.420
Yeah.

00:12:39.420 --> 00:12:39.620
Yeah.

00:12:39.620 --> 00:12:45.420
And Zdocs on Livestream says, what's the main difference from this to pi e and v?

00:12:45.420 --> 00:12:47.180
I think that that's one of them, right?

00:12:47.180 --> 00:12:49.620
Pi e and v, you've got to do pi e and v run.

00:12:49.620 --> 00:12:51.220
You've got to like start the shell.

00:12:51.220 --> 00:12:56.320
And it's kind of, and I think this one is sort of, it's more like node packages or node modules.

00:12:56.320 --> 00:12:59.220
Like as long as it finds something there, like, okay, that's the project I'm in.

00:12:59.220 --> 00:12:59.940
Let's run.

00:13:00.360 --> 00:13:00.480
Yeah.

00:13:00.480 --> 00:13:06.980
And pi e and v does these shim things to change which, which you can set up, which one you find.

00:13:06.980 --> 00:13:08.960
And I just, that, I don't know.

00:13:08.960 --> 00:13:10.220
That makes it weird to me.

00:13:10.220 --> 00:13:14.000
It makes my, my system have state that I have to remember.

00:13:14.000 --> 00:13:14.340
That's true.

00:13:14.340 --> 00:13:14.640
Yeah.

00:13:14.640 --> 00:13:14.820
Yeah.

00:13:14.820 --> 00:13:14.980
Yeah.

00:13:14.980 --> 00:13:16.800
We've activated Python 3.7.

00:13:16.800 --> 00:13:18.580
So now that's, it stays that way.

00:13:18.580 --> 00:13:19.120
Yeah.

00:13:19.120 --> 00:13:20.000
Until you change it, right?

00:13:20.000 --> 00:13:20.200
Okay.

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

00:13:24.620 --> 00:13:25.840
So thanks Brett.

00:13:25.840 --> 00:13:26.380
Yeah.

00:13:26.380 --> 00:13:28.000
And now I use it on windows too.

00:13:28.000 --> 00:13:28.380
So.

00:13:28.380 --> 00:13:29.200
Fantastic.

00:13:29.200 --> 00:13:30.200
All right.

00:13:30.200 --> 00:13:30.980
Up next.

00:13:30.980 --> 00:13:34.680
Oh, I almost closed, closed what you're talking about more than.

00:13:34.680 --> 00:13:35.580
Yeah.

00:13:35.580 --> 00:13:37.360
You're on the data science side of the world.

00:13:37.360 --> 00:13:37.880
Yeah.

00:13:37.880 --> 00:13:38.260
Now.

00:13:38.260 --> 00:13:39.940
So bring us some data science news.

00:13:39.940 --> 00:13:40.840
No, this is good.

00:13:40.840 --> 00:13:41.040
Right.

00:13:41.040 --> 00:13:43.620
So this is this data of AI report 2021.

00:13:43.620 --> 00:13:46.080
It's a pretty extensive report.

00:13:46.080 --> 00:13:52.920
It comes out every year, just surveying across the world, really just the trends on data science.

00:13:52.920 --> 00:13:56.820
And so at the very top there, it has the actual report.

00:13:56.820 --> 00:14:07.780
It's a, it's a PowerPoint version, but in this report, it highlights just the need for transformers being used, not just for NLP, right?

00:14:07.780 --> 00:14:12.460
So for, you know, looking at texts, but it's also looking at audio.

00:14:12.460 --> 00:14:17.640
It's also looking at video and it's also looking at like, you know, protein transcription, for example.

00:14:17.640 --> 00:14:25.460
So it's transformers are going beyond what they were intended to be, which was just primarily just NLP.

00:14:25.460 --> 00:14:26.120
Right.

00:14:26.120 --> 00:14:26.360
Yeah.

00:14:26.360 --> 00:14:27.920
Give us a quick definition of a transformer.

00:14:27.920 --> 00:14:33.800
This is, yeah, like you say, out of the natural language processing side of ML, right?

00:14:33.800 --> 00:14:34.240
Right.

00:14:34.240 --> 00:14:36.740
So it's, it's, it's, it's basically a sequence to sequence.

00:14:36.740 --> 00:14:45.280
So it's, it's taking a text from say English and converting it into an equivalent text into French or something else.

00:14:45.280 --> 00:14:45.540
Right.

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

00:14:54.100 --> 00:15:01.240
So it's basically taken, again, tokens or just sequence from one language to another language.

00:15:01.240 --> 00:15:07.900
And so, what, what this is saying now is that it, it isn't just constrained to just NLP.

00:15:07.900 --> 00:15:08.140
Right.

00:15:08.140 --> 00:15:16.960
So now you can use it for looking at large data sets that are, audio or large data sets that are, you know, imagery.

00:15:16.960 --> 00:15:20.420
And then converting that into something that's, that you intended to do.

00:15:20.420 --> 00:15:27.240
So you're sticking those models, transfer learning, essentially taking the transfer learning from one model into another set of models.

00:15:27.240 --> 00:15:28.140
That's essential.

00:15:28.140 --> 00:15:28.840
What is this talking?

00:15:29.000 --> 00:15:37.560
The idea here is that you're moving away from just NLP that you use in it for computer vision, as it says down there, and even protein structure prediction.

00:15:37.560 --> 00:15:45.520
This is important to me because I actually, Michael, I don't know if we're still in the early, I spent some time in Qatar and I was, I was studying Arabic there.

00:15:45.520 --> 00:15:45.740
Right.

00:15:45.740 --> 00:15:53.480
So we would spend like hours just, just going through like transcription, data sets and stuff.

00:15:53.480 --> 00:16:07.160
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.

00:16:07.400 --> 00:16:17.500
It's an extremely popular, package on, GitHub and that most people it's, it's, it's got about 53,000 likes at this point or stars at this point.

00:16:17.500 --> 00:16:17.780
Wow.

00:16:17.780 --> 00:16:20.900
That's, that's comparable to Django and Flask level of popularity.

00:16:20.900 --> 00:16:21.100
Yes.

00:16:21.100 --> 00:16:21.600
Yes.

00:16:21.600 --> 00:16:22.000
Yes.

00:16:22.000 --> 00:16:22.400
Yes.

00:16:22.400 --> 00:16:22.500
Yes.

00:16:22.500 --> 00:16:25.400
And, they formed partnership with, AWS.

00:16:25.400 --> 00:16:31.840
And so now you can spin up, resources on AWS to use, Huggins face, transformers.

00:16:31.840 --> 00:16:35.500
And again, those transformers have models that you can use for transcription.

00:16:35.500 --> 00:16:42.600
You can use them for a vision, a computer vision, or even like it's saying here for, protein structure predictions.

00:16:42.600 --> 00:16:43.160
Yeah.

00:16:43.160 --> 00:16:43.600
Cool.

00:16:43.600 --> 00:16:48.620
I'm very excited about what ML can do for medicine and biology research.

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

00:16:56.640 --> 00:17:00.840
But, on the medical side, it seems like it's mostly good, right?

00:17:00.840 --> 00:17:06.440
If, if you could say, actually we can cure this disease cause we've understand how to create something that will bind to this protein.

00:17:06.440 --> 00:17:07.840
Cause now we know it's actual shape.

00:17:07.840 --> 00:17:08.940
Yeah.

00:17:08.940 --> 00:17:09.600
That's great.

00:17:09.600 --> 00:17:10.640
That's, that's incredible.

00:17:10.640 --> 00:17:10.840
Right.

00:17:10.840 --> 00:17:13.920
So predicting those shapes for protein is extremely important.

00:17:13.920 --> 00:17:14.080
Right.

00:17:14.080 --> 00:17:26.500
I studied chemistry in college and, and a little bit of biochemistry when I was in college and in knowing the structures for proteins, it's like extremely important, but it takes a long time to model those, the structures.

00:17:26.500 --> 00:17:26.760
Right.

00:17:26.760 --> 00:17:29.840
Now you can do that pretty easily on a using transformers.

00:17:29.840 --> 00:17:30.900
It's a, it's a good thing.

00:17:30.900 --> 00:17:31.320
Yeah.

00:17:31.320 --> 00:17:35.720
There's probably less well-known ways around more like physical chemistry as well.

00:17:35.720 --> 00:17:35.960
Right.

00:17:35.960 --> 00:17:41.220
Like trying to understand different kinds of batteries and things like that, potentially, you know, don't get all the press.

00:17:41.220 --> 00:17:47.380
Well, I'm, I'm thinking that maybe we're not too terribly far away from universal translators and in AirPods.

00:17:47.380 --> 00:17:48.360
That would be cool.

00:17:48.360 --> 00:17:48.860
Yes.

00:17:48.860 --> 00:17:49.300
Yeah.

00:17:49.300 --> 00:17:52.060
That would be actually pretty amazing.

00:17:52.060 --> 00:17:53.960
I mean, we're pretty close with Google translate.

00:17:53.960 --> 00:17:56.960
You can speak to it and then show it to someone in their language.

00:17:57.080 --> 00:18:04.280
And then they can, I can think you can even make it read back and like, you can really clumsily do it, but what you're envisioning is just like natural conversation.

00:18:04.280 --> 00:18:04.600
Right.

00:18:04.600 --> 00:18:04.880
Yeah.

00:18:04.880 --> 00:18:05.200
Yeah.

00:18:05.200 --> 00:18:06.820
And have it be in their voice too.

00:18:06.820 --> 00:18:09.720
yeah, that's pretty cool.

00:18:09.720 --> 00:18:10.600
That was pretty cool.

00:18:10.600 --> 00:18:14.080
You know, you got to wait five seconds for it to calculate a deep fake, then you can start talking.

00:18:14.080 --> 00:18:19.060
Well now, but like our, our kids are going to be like using these things probably.

00:18:19.060 --> 00:18:19.660
Yeah, I know.

00:18:19.660 --> 00:18:20.960
I think you're totally right there.

00:18:20.960 --> 00:18:21.380
Absolutely.

00:18:21.380 --> 00:18:22.120
Awesome.

00:18:22.120 --> 00:18:22.360
Yeah.

00:18:22.360 --> 00:18:22.640
Yeah.

00:18:22.640 --> 00:18:23.300
Good pick there.

00:18:23.300 --> 00:18:24.100
More like great.

00:18:24.620 --> 00:18:38.220
Before we thank our sponsor, I want to just give a quick shout out to John Sheehan's comment here that Python launcher, the Pi thing that Brian spoke about, looks like a nice package and a better alternative to the Pi alias I created on my Linux laptop.

00:18:38.220 --> 00:18:39.100
Oh man.

00:18:39.100 --> 00:18:47.620
You and me both, I, my, ZSHRC is full of alias this, alias that many of them starting with P to do something with Python.

00:18:47.760 --> 00:18:48.160
Yeah.

00:18:48.160 --> 00:18:55.780
I mean, I used to list like, like makeup aliases for Pi 3.8, Pi 3.9 just to, and then I couldn't remember if I had a dot in it or not.

00:18:55.780 --> 00:18:56.680
Was it 3.8?

00:18:56.680 --> 00:18:56.880
3.8?

00:18:56.880 --> 00:18:57.580
Yeah.

00:18:57.580 --> 00:18:57.960
Anyway.

00:18:57.960 --> 00:18:58.920
Yeah.

00:18:58.920 --> 00:18:59.300
Yeah.

00:18:59.300 --> 00:18:59.920
Cool.

00:18:59.920 --> 00:19:00.740
All right.

00:19:00.740 --> 00:19:04.360
Before we move on though, I do want to tell you about our sponsor shortcut.

00:19:04.360 --> 00:19:05.160
Thank you.

00:19:05.160 --> 00:19:07.440
Shortcut formerly clubhouse for sponsoring the show.

00:19:07.440 --> 00:19:10.420
Check them out at shortcut.com slash Python bites.

00:19:10.420 --> 00:19:12.800
Or Brian, do you know what else that people can do now?

00:19:12.800 --> 00:19:13.340
What?

00:19:13.660 --> 00:19:18.240
We've started adding chapters, chapter images, chapter links.

00:19:18.240 --> 00:19:23.340
So I guess you could even click the chapter link right here in your podcast player or in the podcast show notes.

00:19:23.340 --> 00:19:24.120
So that's pretty awesome.

00:19:24.120 --> 00:19:28.840
But however you get to them, you know, thank you to shortcut for sponsoring this episode.

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

00:19:39.340 --> 00:19:42.460
So some of the highlights include team-based workflows.

00:19:42.460 --> 00:19:46.820
So individual teams can use shortcuts, default workflows, or they can customize them.

00:19:46.820 --> 00:20:00.000
Organizational wide goals and roadmaps led like the overall organization define workflows and then tie these smaller team ones into the larger workflow and kind of get a big organization wide view.

00:20:00.500 --> 00:20:02.000
VCS, version control integration.

00:20:02.000 --> 00:20:05.480
So it works with GitHub, GitLab, and Bitbucket.

00:20:05.480 --> 00:20:13.220
And it can tie them, tie your items in your project management back over into what's happening there.

00:20:13.220 --> 00:20:15.600
And you can even do that from the command line, which is cool.

00:20:15.600 --> 00:20:19.820
As almost all web apps should have, but many don't.

00:20:19.820 --> 00:20:21.700
Shortcut has a bunch of keyboards.

00:20:21.700 --> 00:20:33.680
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.

00:20:33.680 --> 00:20:34.300
Nice.

00:20:34.300 --> 00:20:35.680
It does iteration planning.

00:20:35.680 --> 00:20:39.440
It will automatically schedule how that should go along if you don't want to customize it.

00:20:39.440 --> 00:20:45.600
So give it a try over at shortcut.com slash Python bytes because you shouldn't have to manage your project management.

00:20:45.600 --> 00:20:48.380
So yeah, thank you to Shortcut for sponsoring the show.

00:20:48.380 --> 00:20:50.200
Now, let's go back to Django.

00:20:50.200 --> 00:20:53.520
And I'm going to tie this together.

00:20:53.520 --> 00:20:55.780
So Morley has a background in Django.

00:20:55.780 --> 00:20:58.080
Brian, you have clearly a bunch of testing.

00:20:58.080 --> 00:21:00.560
So let's talk about testing Django models.

00:21:00.560 --> 00:21:01.200
Okay.

00:21:01.200 --> 00:21:01.760
Awesome.

00:21:01.760 --> 00:21:01.900
Okay.

00:21:01.900 --> 00:21:02.480
Yeah.

00:21:02.580 --> 00:21:09.880
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 want to do stuff with them, right?

00:21:09.880 --> 00:21:12.300
You want to pass them off to a function or whatever.

00:21:12.300 --> 00:21:14.580
And so that can be a bit of a hassle.

00:21:14.580 --> 00:21:20.820
So I want to tell you about model bakery, which are smart fixtures for better parentheses Django tests.

00:21:20.820 --> 00:21:24.540
That's not quite there, but for better tests for Django code.

00:21:24.540 --> 00:21:31.340
So the idea is it's like Baker or Makaru or something like that, but for Django or our models.

00:21:31.740 --> 00:21:35.680
And it specifically understands things like relationships and whatnot.

00:21:35.680 --> 00:21:36.700
So pretty cool.

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

00:21:43.640 --> 00:21:49.280
Derivation models has fields, which are columns, like email fields, character fields, and so on.

00:21:49.280 --> 00:21:57.760
And then when you want to use it, you just go to the Baker and say make a, you know, in this case, it's like a shop, like online e-commerce shop.

00:21:57.760 --> 00:22:01.840
So you can say shop.purchase history is the namespace of the class.

00:22:01.840 --> 00:22:02.840
And then guess what?

00:22:02.840 --> 00:22:06.560
It'll populate it with customers and emails and all kinds of stuff.

00:22:06.560 --> 00:22:07.140
That's cool, right?

00:22:07.140 --> 00:22:07.960
Yeah, it is.

00:22:07.960 --> 00:22:08.460
It's very cool.

00:22:08.460 --> 00:22:08.980
Yeah.

00:22:09.080 --> 00:22:11.820
And then you could also set up model to model relationships.

00:22:11.820 --> 00:22:18.780
So you can say, I want you to, when I create a purchase history, for example, it also has a products.

00:22:18.780 --> 00:22:23.140
So you can say, make the model to model relationships for me and mock those out as well.

00:22:23.140 --> 00:22:30.520
So then in your test, you can work with your purchase history object and say dot products and then, you know, loop over them, do account, whatever.

00:22:30.520 --> 00:22:35.700
It's like a collection of sub or related models that were baked up for you.

00:22:35.700 --> 00:22:36.620
Yeah.

00:22:36.620 --> 00:22:40.900
You can even go and say, prepare when, prepare something to bake.

00:22:40.900 --> 00:22:47.760
When, when you ask somebody gives you a product, I want you to, or create me a product of five of these.

00:22:47.760 --> 00:22:56.000
And then as you make a purchase history, also use those five as the related object instead of guessing or randomizing or whatever.

00:22:56.000 --> 00:22:56.700
It's cool, right?

00:22:56.700 --> 00:22:57.580
That's very cool.

00:22:57.580 --> 00:22:58.280
Very cool.

00:22:58.280 --> 00:22:58.760
Yeah.

00:22:58.760 --> 00:23:06.740
So if you're out there writing tests for Django, specifically the relationships, I think is where this is, is pretty interesting, but man, it's kind of interesting all over, right?

00:23:06.740 --> 00:23:09.900
It'll, I suspect it'll do things like create emails.

00:23:09.900 --> 00:23:13.100
If the model says, here's an email field and it'll create integers.

00:23:13.100 --> 00:23:16.000
If it says, here's an integer field and just take care of that for you.

00:23:16.000 --> 00:23:17.040
That's very cool.

00:23:17.400 --> 00:23:24.600
So do you know, is it, is it another, like a, another fake system or is it using a faker or something under the hood?

00:23:24.600 --> 00:23:24.880
Do you know?

00:23:24.880 --> 00:23:26.820
No, that is a good question.

00:23:26.820 --> 00:23:28.660
What kind of project?

00:23:28.660 --> 00:23:31.920
I can go find out, I guess.

00:23:31.920 --> 00:23:32.400
No, no, no.

00:23:32.400 --> 00:23:32.940
Like, all right.

00:23:32.940 --> 00:23:34.640
So let's go check out the requirements here.

00:23:34.640 --> 00:23:35.920
It's just Django.

00:23:35.920 --> 00:23:38.240
It has, its only requirement is Django.

00:23:38.240 --> 00:23:38.700
Django.

00:23:38.700 --> 00:23:39.320
Wow.

00:23:39.320 --> 00:23:42.780
It doesn't use like, faker or anything like that.

00:23:42.780 --> 00:23:44.760
So I'm guessing it's its own thing.

00:23:44.760 --> 00:23:45.340
Nice.

00:23:45.340 --> 00:23:45.780
Cool.

00:23:45.780 --> 00:23:46.300
I seem like it.

00:23:46.300 --> 00:23:46.760
Yeah.

00:23:47.040 --> 00:23:47.220
Cool.

00:23:47.220 --> 00:23:47.500
Cool.

00:23:47.500 --> 00:23:48.160
That's very cool.

00:23:48.160 --> 00:23:48.400
Yeah.

00:23:48.400 --> 00:23:48.940
Thanks.

00:23:48.940 --> 00:23:49.640
All right, Brian.

00:23:49.640 --> 00:23:52.000
you got to cover this next one for us or what?

00:23:52.000 --> 00:23:53.960
Yeah, I'll cover this one.

00:23:53.960 --> 00:23:56.280
that's one of my goals.

00:23:56.280 --> 00:23:59.780
so, well, good comeback.

00:24:00.460 --> 00:24:06.700
so, Ned Batchelder, is, maintainer for, coverage.py.

00:24:06.700 --> 00:24:07.760
Excellent tool.

00:24:07.760 --> 00:24:09.920
And he's a great person to have at the helm there.

00:24:09.920 --> 00:24:16.160
but he, he's says that he's got, had requests for like, one of the things you

00:24:16.160 --> 00:24:21.320
can do with coverage is you can incorporate it in your, your testing tool chain and CI and

00:24:21.320 --> 00:24:24.260
stuff to say that coverage has to be at a certain level.

00:24:24.260 --> 00:24:28.820
So you can say has to be a hundred percent if you want to do that, or you can say, well,

00:24:28.820 --> 00:24:30.740
at least what, what is the current percentage?

00:24:30.740 --> 00:24:32.440
And we want to make sure that we don't drop it.

00:24:32.440 --> 00:24:34.380
So you like, let's say you're at 75.

00:24:34.380 --> 00:24:40.340
You want to make sure that we don't drop below 75, but he's had requests for profile thresholds,

00:24:40.340 --> 00:24:42.100
um, which is an interesting idea.

00:24:42.100 --> 00:24:47.480
But instead of giving us profile thresholds, he's, he's got like this proof, proof of

00:24:47.480 --> 00:24:49.520
concept thing called goals.py.

00:24:49.520 --> 00:24:55.520
And it's just a snippet that you can download yourself and try it out, but it's a little tiny

00:24:55.520 --> 00:24:59.340
script, but it, it uses the coverage data after the fact.

00:24:59.340 --> 00:25:03.300
So coverage, generates a report and then you can do things on it.

00:25:03.300 --> 00:25:07.340
But this, what this, goals thing does is it kind of acts like another stage.

00:25:07.340 --> 00:25:11.040
So you can, you can set up these in your pipeline to, to check for these.

00:25:11.040 --> 00:25:16.300
And if, and it'll have a exit code that, indicates to your CI system that it failed.

00:25:16.300 --> 00:25:20.480
But, for instance, you can say, all of the, I want all my tests to be a hundred

00:25:20.480 --> 00:25:25.280
percent covered, but my source code, maybe 85% for those.

00:25:25.640 --> 00:25:31.340
And, but like maybe the HTML part of it, I want to really want, or like all the code

00:25:31.340 --> 00:25:35.060
that is dealing with HTML that I want to make sure that it's really tested.

00:25:35.060 --> 00:25:39.680
So I want a hundred percent coverage there, but in general, you can 90%.

00:25:39.680 --> 00:25:44.480
So he has an example set up, to do just what I said, of that.

00:25:44.480 --> 00:25:50.400
So there's these glob groups that you can say, you know, the 85% for everything that's

00:25:50.400 --> 00:25:53.900
a Python file, except for the tests and then have a different.

00:25:53.900 --> 00:25:54.340
Interesting.

00:25:54.340 --> 00:25:59.160
So the way you basically do it as a CLI thing, and then you pass in.

00:25:59.160 --> 00:25:59.680
Yeah.

00:25:59.680 --> 00:26:05.120
File patterns like star.py or star HTML star.py or whatever.

00:26:05.120 --> 00:26:05.460
Right.

00:26:05.500 --> 00:26:07.300
And you can even do knots, which is interesting.

00:26:07.300 --> 00:26:07.840
Yeah.

00:26:07.840 --> 00:26:12.580
And one of the things he's talking about is just, he wants to, wants to have people

00:26:12.580 --> 00:26:17.420
try this and say, is this kind of, does this satisfy what you wanted or is there something

00:26:17.420 --> 00:26:18.280
else that's needed?

00:26:18.280 --> 00:26:19.780
Do we really need profile?

00:26:19.780 --> 00:26:21.920
I actually would hate to have profile.

00:26:21.920 --> 00:26:22.520
Cause yeah.

00:26:22.520 --> 00:26:22.740
Yeah.

00:26:22.740 --> 00:26:28.280
One quick way to like accomplish profile is just to put the file name as the pattern.

00:26:28.280 --> 00:26:28.940
Right.

00:26:28.940 --> 00:26:32.640
I mean, so it like, this is a superset of profile testing.

00:26:32.800 --> 00:26:33.240
Yeah.

00:26:33.240 --> 00:26:34.000
Potentially.

00:26:34.000 --> 00:26:38.380
But I believe that he's probably right that there's, and there's a link in here

00:26:38.380 --> 00:26:42.320
to say, if you want to comment on this, go to the original feature request and do a comment,

00:26:42.320 --> 00:26:46.220
but there, it's probably right that like, it's not really a profile thing.

00:26:46.220 --> 00:26:51.000
It's that there's different sections of the system that you want to have, yeah, have

00:26:51.000 --> 00:26:55.440
specifics or like for instance, with a knot, you could say, well, everything except for

00:26:55.440 --> 00:26:59.180
there's this one file that I know it's a problem, but we don't care about it.

00:26:59.180 --> 00:27:00.540
maybe exclude.

00:27:00.540 --> 00:27:00.840
Yeah.

00:27:01.360 --> 00:27:03.280
The developer who wrote it quit.

00:27:03.280 --> 00:27:04.320
Nobody understands it.

00:27:04.320 --> 00:27:05.060
We're not touching it.

00:27:05.060 --> 00:27:06.420
Please don't complain to us about it.

00:27:06.420 --> 00:27:08.000
We have no intention of touching it.

00:27:08.000 --> 00:27:10.340
Or maybe it's the splash screen.

00:27:10.340 --> 00:27:15.020
Like, you know, some things throw up a splash image and, you know, really, if that's wrong,

00:27:15.020 --> 00:27:15.500
who cares?

00:27:15.500 --> 00:27:17.280
sort of thing, but.

00:27:17.280 --> 00:27:18.020
That's very cool.

00:27:18.020 --> 00:27:18.560
Yeah.

00:27:18.560 --> 00:27:19.200
It's a good one.

00:27:19.200 --> 00:27:19.760
Nice find.

00:27:19.760 --> 00:27:22.460
And I like the generalization of it.

00:27:22.460 --> 00:27:23.200
Well done, Ned.

00:27:23.200 --> 00:27:23.880
All right.

00:27:23.880 --> 00:27:24.580
More late.

00:27:24.760 --> 00:27:30.380
So there's a lot of stuff about economic news these days, especially, DeFi and

00:27:30.380 --> 00:27:32.140
Ethereum and Bitcoin.

00:27:32.140 --> 00:27:34.600
And, NFTs.

00:27:34.600 --> 00:27:34.920
Right.

00:27:34.920 --> 00:27:36.280
So it's, it's already out there.

00:27:36.280 --> 00:27:36.840
Yeah.

00:27:36.840 --> 00:27:41.840
So my brother is an artist and, worked for a long time doing just like insurance stuff

00:27:41.840 --> 00:27:46.820
and project management stuff and is now started getting into NFT stuff because finally putting

00:27:46.820 --> 00:27:49.860
his, master's degree in art to use, which is fantastic.

00:27:49.860 --> 00:27:50.160
Yeah.

00:27:50.160 --> 00:27:51.600
It's a crazy world.

00:27:51.600 --> 00:27:52.980
It's a crazy world.

00:27:52.980 --> 00:27:58.140
And just the thought about like, making digital assets.

00:27:58.140 --> 00:28:00.160
Digital scarcity, right?

00:28:00.160 --> 00:28:02.640
Like the thing that was digital was you could copy it.

00:28:02.640 --> 00:28:03.640
Right, right, right, right.

00:28:03.640 --> 00:28:07.820
And, and over the past, I mean, I've been looking at this over the past six months or so,

00:28:07.860 --> 00:28:13.100
and I'm just curious, I'm just, you know, where does this go in terms of like, how can

00:28:13.100 --> 00:28:17.300
you use digital assets as scarcity, but, you know, provide value eventually.

00:28:17.300 --> 00:28:23.960
So artists can actually, you know, get paid or, or, or, or make, make use of their, their

00:28:23.960 --> 00:28:27.900
art, make it, make it available out there and get, and get value from it.

00:28:27.900 --> 00:28:33.820
So Ethereum though, is like one of those blockchains that pretty much, I think about, I want to

00:28:33.820 --> 00:28:37.680
say 80 to 90% of all NFTs reside on Ethereum blockchain.

00:28:37.680 --> 00:28:38.180
Right.

00:28:38.180 --> 00:28:38.680
I think so.

00:28:38.680 --> 00:28:39.180
Yeah.

00:28:39.180 --> 00:28:40.060
I think it's definitely popular.

00:28:40.060 --> 00:28:40.500
Yeah.

00:28:40.500 --> 00:28:46.800
And so of course the language there is, solidity, but to interface with, the

00:28:46.800 --> 00:28:51.280
blockchain, there's this library called web3.py, right?

00:28:51.280 --> 00:28:58.680
So instead of, instead of using, JavaScript, you can use, web3.py to actually interface

00:28:58.680 --> 00:29:00.280
with Ethereum blockchain.

00:29:00.280 --> 00:29:05.460
So basically you can write smart contracts there, but you can also, get information

00:29:05.460 --> 00:29:08.160
from the blockchain itself or post information into the blockchain.

00:29:08.160 --> 00:29:12.320
So I, this is something I've found and I'm actually looking into it and I thought I want

00:29:12.320 --> 00:29:13.720
to share that with the community.

00:29:13.720 --> 00:29:14.500
Yeah.

00:29:14.500 --> 00:29:15.160
It's interesting.

00:29:15.160 --> 00:29:15.540
Yeah.

00:29:15.640 --> 00:29:19.860
So there's an Ethereum.org slash Python for Python tutorials.

00:29:19.860 --> 00:29:21.580
There's a quick start.

00:29:21.580 --> 00:29:22.260
Right.

00:29:22.260 --> 00:29:23.180
And so on.

00:29:23.180 --> 00:29:23.380
Yeah.

00:29:23.380 --> 00:29:23.720
Right.

00:29:23.720 --> 00:29:28.120
If you were allowed and you can see, what it takes to actually get it installed and use

00:29:28.120 --> 00:29:30.400
it for, some of the protocols that are required.

00:29:30.400 --> 00:29:34.700
So it's actually a pretty good, I've used it just a couple of times and I'm still playing

00:29:34.700 --> 00:29:38.360
around with it, but I think it's a, instead of using something else, if you're familiar with

00:29:38.360 --> 00:29:41.020
Python, this is a very comfortable transition.

00:29:41.020 --> 00:29:44.600
If you're curious about blockchain or Ethereum, so, yeah.

00:29:44.600 --> 00:29:49.740
So you could build your own platforms and your own integrations, not just own Ethereum

00:29:49.740 --> 00:29:50.260
coins.

00:29:50.260 --> 00:29:50.860
Right.

00:29:50.860 --> 00:29:52.700
And so you can be the old smart contract, right?

00:29:52.700 --> 00:29:58.740
We should just logic essentially, send ether or receive ether or, or if it's NFTs,

00:29:58.740 --> 00:30:03.320
again, how do you interface with the blockchain with, cartography?

00:30:03.320 --> 00:30:08.580
So, so, web three point web three point PY, I think is extremely helpful.

00:30:08.580 --> 00:30:09.860
Yeah.

00:30:09.860 --> 00:30:10.380
Yeah.

00:30:10.460 --> 00:30:13.080
It's neat to see Python applied in some different places.

00:30:13.080 --> 00:30:13.620
Yeah.

00:30:13.620 --> 00:30:14.180
Everywhere.

00:30:14.180 --> 00:30:15.020
Everywhere.

00:30:15.020 --> 00:30:15.340
Right.

00:30:15.340 --> 00:30:15.800
Yeah.

00:30:15.800 --> 00:30:16.120
Everywhere.

00:30:16.120 --> 00:30:18.020
Yep.

00:30:18.020 --> 00:30:18.500
Cool.

00:30:18.500 --> 00:30:19.140
All right.

00:30:19.140 --> 00:30:19.440
Awesome.

00:30:19.440 --> 00:30:19.620
Yeah.

00:30:19.620 --> 00:30:20.320
That's a great find.

00:30:20.320 --> 00:30:21.440
pretty cool.

00:30:21.440 --> 00:30:21.920
Yeah.

00:30:21.920 --> 00:30:22.300
Pretty cool.

00:30:22.300 --> 00:30:23.980
Brian, it's time for extras.

00:30:23.980 --> 00:30:24.580
Extra.

00:30:24.580 --> 00:30:25.420
What you got for us.

00:30:25.420 --> 00:30:26.320
What'd you line up for us here?

00:30:26.320 --> 00:30:28.780
I actually don't have any extras today.

00:30:28.780 --> 00:30:29.600
No extra.

00:30:29.600 --> 00:30:31.460
There's no extra, extra, extra read all about it.

00:30:31.460 --> 00:30:31.920
No.

00:30:31.920 --> 00:30:32.540
All right.

00:30:32.540 --> 00:30:33.800
I'll take care of it.

00:30:33.800 --> 00:30:36.800
I got you covered here as you might imagine.

00:30:36.800 --> 00:30:39.200
So I want to give people an update on McFly.

00:30:39.400 --> 00:30:42.620
I mentioned McFly a little while ago.

00:30:42.620 --> 00:30:43.520
McFly is sweet.

00:30:43.520 --> 00:30:46.560
it's allows you to install it.

00:30:46.560 --> 00:30:53.180
And it's kind of like reverse search of your shell commands, be that bash, Z shell, fish,

00:30:53.180 --> 00:30:54.700
whatever, but way better.

00:30:54.700 --> 00:30:55.120
Right.

00:30:55.160 --> 00:30:59.360
You get like an Emacs interface to your history and you can delete it.

00:30:59.360 --> 00:31:00.440
You can edit your history.

00:31:00.680 --> 00:31:05.040
So if you mistype something and you want to save it or you see like, Oh geez, put the password

00:31:05.040 --> 00:31:05.320
in there.

00:31:05.320 --> 00:31:06.620
I want to get that out of my history file.

00:31:06.620 --> 00:31:07.320
You can do that.

00:31:07.320 --> 00:31:09.200
So you just hit control R after you install it.

00:31:09.200 --> 00:31:12.120
And it gives you this, this awesome interactive view.

00:31:12.120 --> 00:31:16.600
I just want to tell people that I've been playing with this and totally loving it.

00:31:16.600 --> 00:31:19.800
Like now I've, I've taken it for a spin for a while and I really, really dig it.

00:31:19.800 --> 00:31:22.140
I've even set up the, fuzzy matching.

00:31:22.140 --> 00:31:25.920
So it doesn't have to exactly match what I've done in history, which is pretty cool.

00:31:25.920 --> 00:31:29.340
So I could now with some experience, give that a thumbs up.

00:31:29.340 --> 00:31:29.660
Nice.

00:31:29.660 --> 00:31:30.340
Nice.

00:31:30.340 --> 00:31:31.520
Nice.

00:31:31.520 --> 00:31:34.740
Also a couple of exciting things about Python web conference.

00:31:34.740 --> 00:31:38.380
If you're looking to speak somewhere and you want that somewhere to be on the internet,

00:31:38.380 --> 00:31:40.180
you should check out Python web conf.

00:31:40.180 --> 00:31:41.820
This is like a five day conference.

00:31:41.820 --> 00:31:46.280
It's one of the biggest virtual conferences going these days, I think.

00:31:46.280 --> 00:31:52.880
And it's interactive presentations or live presentations over the internet and then, chat and so

00:31:52.880 --> 00:31:53.040
on.

00:31:53.040 --> 00:31:57.260
So, we've had Calvin, one of the organizers of it on before.

00:31:57.260 --> 00:32:04.260
And the news is they've extended their call for papers out into November, November 15th.

00:32:04.260 --> 00:32:07.220
So you got 12 more days, maybe 11 if I'm slow releasing this one.

00:32:07.420 --> 00:32:11.960
And also I'm going to be talking about flask and HTMX over there.

00:32:11.960 --> 00:32:13.180
Cause I'm still psyched about that.

00:32:13.180 --> 00:32:16.840
So that's the next year, early next year, but now people can check that out.

00:32:16.840 --> 00:32:17.360
Nice.

00:32:17.360 --> 00:32:17.660
All right.

00:32:17.660 --> 00:32:18.960
What else have I got for us, Brian?

00:32:18.960 --> 00:32:24.480
So, the new MacBook pros, like the super expensive MacBook pros have come out.

00:32:24.480 --> 00:32:25.840
there's an interesting review.

00:32:25.840 --> 00:32:31.040
I'm not super thrilled with it, but over at ours, they usually do a pretty good job, but I do want to read a fun quote from it.

00:32:31.040 --> 00:32:37.400
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,

00:32:37.400 --> 00:32:40.260
this laptop feels like an explicit apology for all that.

00:32:40.260 --> 00:32:45.380
The result is it's the best lot, best laptop money can buy from any use cases, provided you have a lot of money.

00:32:45.380 --> 00:32:52.240
But one of the things that I found pretty interesting is the power supply for that thing is 140 Watts.

00:32:52.240 --> 00:32:53.140
Oh, wow.

00:32:53.140 --> 00:32:56.480
That's insane for a laptop that you carry around the power supply.

00:32:56.480 --> 00:32:57.100
Wow.

00:32:57.100 --> 00:33:01.560
So I came across this thing called anchor nano to 65 watt.

00:33:01.680 --> 00:33:07.780
And it's, it's, if you put it up next to, that's not, it's, it's, well, hold on.

00:33:07.780 --> 00:33:15.620
It's barely bigger than the brick that used to charge an iPhone, like an American brick, not a UK brick, which has got to be giant because the size of the plug.

00:33:15.620 --> 00:33:16.180
Right.

00:33:16.240 --> 00:33:18.320
But it's like super small and light.

00:33:18.320 --> 00:33:19.860
And yeah, it seems like it's not enough.

00:33:19.860 --> 00:33:27.100
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.

00:33:27.520 --> 00:33:39.620
So unless you're doing like machine learning or video exporting or something that completely nails it, like this will charge like 25% in an hour, even though it's supposed to take a 140 Watts, you can give it this little tiny thing.

00:33:39.620 --> 00:33:42.020
So I haven't done enough to really give it a hundred percent.

00:33:42.020 --> 00:33:42.860
Like absolutely.

00:33:42.860 --> 00:33:43.940
That's going to work all the time.

00:33:43.940 --> 00:33:49.780
But my new plan is to travel with this tiny little thing and like a long USB, C or Thunderbolt cable.

00:33:49.780 --> 00:33:50.420
Interesting.

00:33:50.420 --> 00:33:50.680
Right.

00:33:50.680 --> 00:33:51.880
That's pretty interesting.

00:33:51.880 --> 00:33:52.500
Yeah.

00:33:52.500 --> 00:33:54.120
Could you put two in there?

00:33:54.120 --> 00:33:57.300
I don't think maybe it'll catch fire if you do that.

00:33:57.340 --> 00:33:58.080
I'm not going to do that.

00:33:58.080 --> 00:34:03.860
But like here you have the picture, like it's like less than half the size of the charger, which is pretty interesting.

00:34:03.860 --> 00:34:04.340
Yeah.

00:34:04.340 --> 00:34:06.360
That's a 60 watt charger right there.

00:34:06.360 --> 00:34:07.940
Not the 140 watt charger.

00:34:07.940 --> 00:34:08.940
140.

00:34:08.940 --> 00:34:09.620
All right.

00:34:09.620 --> 00:34:18.580
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.

00:34:18.580 --> 00:34:23.980
Like as far as I can tell, my Mac mini and my much more expensive MacBook pro are exactly the same speed.

00:34:23.980 --> 00:34:24.700
Oh, really?

00:34:24.700 --> 00:34:25.140
Okay.

00:34:25.140 --> 00:34:26.880
I think almost always.

00:34:27.160 --> 00:34:30.840
Except one thing I found is for outputting video.

00:34:30.840 --> 00:34:36.500
I found that I could re-encode or I could encode the videos for TalkBiz on training more efficiently.

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

00:34:43.900 --> 00:34:46.600
It took 14 days of compute time.

00:34:46.600 --> 00:34:49.160
Not I got around to do it in 14 days.

00:34:49.160 --> 00:34:51.860
Like start, it finished 14 days later.

00:34:51.860 --> 00:34:57.760
And it's actually three over three times faster with the M1 max.

00:34:58.460 --> 00:35:00.240
So just like three or four days.

00:35:00.240 --> 00:35:00.760
Yeah.

00:35:00.760 --> 00:35:05.460
It's only five days, which is still a long time, but it's way better than 13, 14 days.

00:35:05.460 --> 00:35:06.040
Let me tell you.

00:35:06.040 --> 00:35:06.300
13, 14 days.

00:35:06.300 --> 00:35:06.840
Yeah.

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

00:35:11.220 --> 00:35:11.980
Right.

00:35:12.300 --> 00:35:15.900
It's got like the onboard machine learning block.

00:35:15.900 --> 00:35:17.640
And it's got a 32-core GPU.

00:35:17.640 --> 00:35:20.520
I think there's a lot of stuff that's going to be coming along that's pretty interesting there.

00:35:20.520 --> 00:35:20.860
What do you think?

00:35:20.860 --> 00:35:21.640
No, no, no.

00:35:21.640 --> 00:35:22.920
It's absolutely right.

00:35:22.980 --> 00:35:26.480
I have a friend that works for Google, does the same thing that I do.

00:35:26.480 --> 00:35:28.000
And him and I were talking.

00:35:28.000 --> 00:35:36.520
I have just the little version of MacBook Pro, and I wasn't going to wait for another one to come out.

00:35:36.520 --> 00:35:41.780
But it has a lot of the components and a lot of the capacity that I need to do my works.

00:35:41.780 --> 00:35:47.200
Instead of just putting your stuff on like AWS, and now you can run them locally, and it's extremely powerful.

00:35:47.200 --> 00:35:50.860
So this is extremely good, especially M1.

00:35:51.900 --> 00:35:53.720
The new stuff is quite neat.

00:35:53.720 --> 00:35:56.380
It's seriously impressive, as Sam has said out there.

00:35:56.380 --> 00:35:57.040
I totally agree.

00:35:57.040 --> 00:35:57.680
Fair pressure.

00:35:57.680 --> 00:35:58.280
Yeah.

00:35:58.280 --> 00:36:01.920
Morla, anything else you want to throw out for people while you got the mic?

00:36:01.920 --> 00:36:05.320
No, I just want to say thanks to you and Brian, right?

00:36:05.320 --> 00:36:11.240
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.

00:36:11.240 --> 00:36:12.140
Just the encouragement.

00:36:12.140 --> 00:36:18.360
I think you guys every day, every time I listen to you guys, you guys are talking to me, not to a large group of audience.

00:36:18.360 --> 00:36:21.580
I think it's extremely helpful to see you guys be part of the community.

00:36:22.140 --> 00:36:24.660
And shout out to Pi Bay in San Francisco.

00:36:24.660 --> 00:36:26.160
Those guys are real cool.

00:36:26.160 --> 00:36:28.620
And Michael, thanks for coming out there and talking to us.

00:36:28.620 --> 00:36:30.240
Yeah, that was a great trip a few weeks ago.

00:36:30.240 --> 00:36:31.280
That was a few weeks ago.

00:36:31.280 --> 00:36:31.960
So it was really good.

00:36:31.960 --> 00:36:34.280
So I want to thank you guys for the work that you guys do.

00:36:34.280 --> 00:36:38.300
And we'll continue to listen to you guys and be part of the community.

00:36:38.300 --> 00:36:39.160
Yeah, thanks.

00:36:39.160 --> 00:36:40.500
Yeah, I really appreciate that.

00:36:40.500 --> 00:36:40.840
Thank you.

00:36:40.920 --> 00:36:43.900
It's a lot of times we put stuff out there and there's not a lot of feedback.

00:36:43.900 --> 00:36:45.520
But you know, people are out there listening.

00:36:45.520 --> 00:36:47.160
Then you meet folks and talk to them.

00:36:47.160 --> 00:36:50.560
You're like, actually, it has an impact, which is really great.

00:36:50.560 --> 00:36:53.140
You know, for me, it has a particular impact, right?

00:36:53.220 --> 00:36:59.640
So like I took a journey and I am where I'm at today because, again, partly because of the work that you guys do.

00:36:59.640 --> 00:37:04.940
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.

00:37:05.060 --> 00:37:09.460
So it's taken me a long way because this is because I listen to you guys a lot.

00:37:09.460 --> 00:37:10.640
Thank you so much.

00:37:10.640 --> 00:37:11.140
Nice.

00:37:11.140 --> 00:37:13.340
All right, Brian, we ready for a joke?

00:37:13.340 --> 00:37:13.940
Yeah.

00:37:13.940 --> 00:37:14.800
To show up with a smile?

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

00:37:26.460 --> 00:37:28.200
Yeah, if it gets a 240 volt.

00:37:28.200 --> 00:37:28.860
Yeah, that's right.

00:37:28.860 --> 00:37:31.360
Yeah.

00:37:31.360 --> 00:37:34.560
But the thing is, it almost never runs at that, right?

00:37:34.560 --> 00:37:36.320
It'll go for like 14, 15 hours.

00:37:36.320 --> 00:37:38.200
It's only if you're doing like insane stuff.

00:37:38.200 --> 00:37:46.680
And also, you can plug in three Thunderbolt USB 3 things and each one of those, it'll provide up to 15 watts of output from the laptop.

00:37:46.680 --> 00:37:47.520
Oh, wow.

00:37:47.520 --> 00:37:49.440
So I think it's also trying to pass.

00:37:49.440 --> 00:37:52.440
Yeah, I think it's trying to pass through 45 watts.

00:37:52.440 --> 00:37:56.800
So it needs a charger that can account for how much does the Mac need plus 45 more watts?

00:37:56.800 --> 00:37:57.200
Right.

00:37:57.200 --> 00:38:00.240
Because you plugged it into all these Thunderbolt thingies.

00:38:00.240 --> 00:38:00.600
Okay.

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

00:38:04.060 --> 00:38:10.200
Chris May is going to hook us up to like a level three DC fast charger.

00:38:10.200 --> 00:38:12.340
Charge that thing up five minutes on the car.

00:38:12.340 --> 00:38:14.680
All right.

00:38:14.820 --> 00:38:19.460
So this one comes to us from the veritable XK CD.

00:38:20.460 --> 00:38:23.260
And it talks to us about programming standards.

00:38:23.260 --> 00:38:26.640
So how standards proliferate.

00:38:26.640 --> 00:38:28.060
See AC chargers.

00:38:28.060 --> 00:38:29.360
Very timely.

00:38:29.360 --> 00:38:30.980
Character encodings.

00:38:30.980 --> 00:38:31.960
Instant messaging.

00:38:31.960 --> 00:38:32.780
And so on.

00:38:32.780 --> 00:38:35.000
I'm thinking network protocols.

00:38:35.000 --> 00:38:39.140
Remember, this is a follow on from the joke of what is soap?

00:38:40.020 --> 00:38:41.020
And then rest.

00:38:41.020 --> 00:38:42.060
And then rest.

00:38:42.060 --> 00:38:43.560
What the heck was wrong with soap?

00:38:43.560 --> 00:38:46.060
I know GPRC is better than rest.

00:38:46.060 --> 00:38:48.360
Ah, the torture never ends.

00:38:48.360 --> 00:38:48.560
Okay.

00:38:48.560 --> 00:38:49.620
So this is a follow up from that.

00:38:49.620 --> 00:38:54.940
And here is a man and woman developer saying, talking, says situation.

00:38:54.940 --> 00:38:56.720
There are 14 competing standards.

00:38:56.720 --> 00:38:57.260
14.

00:38:57.260 --> 00:38:58.360
Ridiculous.

00:38:58.700 --> 00:39:02.600
We need to develop one universal standard that covers everyone's use cases.

00:39:02.600 --> 00:39:03.140
Yeah.

00:39:03.140 --> 00:39:03.960
Soon.

00:39:03.960 --> 00:39:04.980
Situation.

00:39:04.980 --> 00:39:06.620
There are 15 competing standards.

00:39:06.620 --> 00:39:09.140
Yeah.

00:39:09.140 --> 00:39:10.060
Yeah.

00:39:10.060 --> 00:39:10.740
Yeah.

00:39:10.740 --> 00:39:10.940
Yeah.

00:39:10.940 --> 00:39:14.820
The only thing going in the other direction is cellular standards.

00:39:14.820 --> 00:39:15.600
They seem to be.

00:39:15.600 --> 00:39:16.020
Oh, really?

00:39:16.020 --> 00:39:16.500
Lessing.

00:39:16.500 --> 00:39:17.560
So.

00:39:17.560 --> 00:39:19.160
But Wi-Fi is going crazy.

00:39:19.160 --> 00:39:24.160
But anyway, it's just one standard, but it comes out with a new version about every six months.

00:39:24.160 --> 00:39:27.920
Good thing they don't bake those into hardware and chips and stuff.

00:39:27.920 --> 00:39:28.360
Oh, wait.

00:39:28.360 --> 00:39:30.520
I think they write.

00:39:30.520 --> 00:39:31.540
That's a good thing they do.

00:39:31.540 --> 00:39:32.880
I'd be out of business if they didn't.

00:39:32.880 --> 00:39:33.400
Exactly.

00:39:33.400 --> 00:39:33.780
You got to.

00:39:33.780 --> 00:39:35.260
The testing never ends.

00:39:35.260 --> 00:39:35.680
Fantastic.

00:39:35.680 --> 00:39:36.360
Yeah.

00:39:36.360 --> 00:39:37.140
Thanks, Michael.

00:39:37.140 --> 00:39:38.160
Thanks, Morley.

00:39:38.160 --> 00:39:39.420
This was a really fun episode.

00:39:39.420 --> 00:39:39.980
Yep.

00:39:39.980 --> 00:39:40.620
Thank you very much.

00:39:40.620 --> 00:39:41.240
Thanks for the invite.

00:39:41.240 --> 00:39:42.000
Appreciate it.

00:39:42.000 --> 00:39:46.240
Thanks, everybody on the chat and on the stream for watching.

00:39:46.240 --> 00:39:46.780
Bye.

00:39:46.780 --> 00:39:47.160
Bye.

00:39:47.160 --> 00:39:47.700
Bye.

00:39:47.700 --> 00:39:49.580
Thanks for listening to Python Bytes.

00:39:49.580 --> 00:39:52.400
Follow the show on Twitter via at Python Bytes.

00:39:52.400 --> 00:39:55.520
That's Python Bytes as in B-Y-T-E-S.

00:39:55.520 --> 00:39:58.380
Get the full show notes over at pythonbytes.fm.

00:39:58.380 --> 00:40:03.280
If you have a news item we should cover, just visit pythonbytes.fm and click submit in the

00:40:03.280 --> 00:40:03.700
nav bar.

00:40:03.700 --> 00:40:05.820
We're always on the lookout for sharing something cool.

00:40:05.820 --> 00:40:10.360
If you want to join us for the live recording, just visit the website and click live stream

00:40:10.360 --> 00:40:13.240
to get notified of when our next episode goes live.

00:40:13.240 --> 00:40:17.620
That's usually happening at noon Pacific on Wednesdays over at YouTube.

00:40:17.880 --> 00:40:21.000
On behalf of myself and Brian Okken, this is Michael Kennedy.

00:40:21.000 --> 00:40:24.720
Thank you for listening and sharing this podcast with your friends and colleagues.

