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


Transcript #212: SQLite as a file format (like docx)

Return to episode page view on github
Recorded on Wednesday, Dec 16, 2020.

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

00:06 This is episode 212.

00:08 I can't believe the numbers keep going up.

00:10 - I know.

00:11 - We're recording this December 16th, 2020.

00:14 I'm Brian Okken, of course.

00:15 - I'm Michael Kennedy.

00:17 - I'm Sherry Eskenaz.

00:18 - Yay, we have a guest.

00:20 So. - Yes, welcome Sherry.

00:24 Yeah, it's great to have you here.

00:25 Thanks for coming. - Thank you so much for having me.

00:27 Great to be here.

00:28 - Yeah, yeah, you got some cool projects and you wrote to us and said, "Hey, here's a project I'm working on." And we're like, "Well, why don't you just come on the show "and tell people about it?" So we'll get to that later.

00:38 And it'll be a lot of fun.

00:39 - Yeah.

00:40 - Brian, you should do something with pytest.

00:41 I heard it's popular.

00:43 - Yeah, so yeah, it might not be a surprise.

00:45 I am a fan of pytest.

00:47 But I wanted to shout out because the people at pytest have been working pretty hard at making things better.

00:54 And they've got, so right now we've got Python 6.2, I think we're at 6.2.1 now, but 6.2 came up recently.

01:03 Ooh, neat.

01:04 Look, change log.

01:06 Cool.

01:06 So there's a few things that I really like that came up with the 6.2 release.

01:14 So pytester, there used to be, I mean, plugin authors are gonna be the only ones that really care about this, maybe, but there was a fixture called Tester that works fine to test your plugins, but pytester is a way better name.

01:31 And it also uses Python path.lib instead of the old file system.

01:37 - The OS path.

01:39 - Well, it was a PyPath thing.

01:41 It was similar to Pathlib, but their own thing.

01:44 So this is better. - That's cool.

01:46 Yeah, unless Claire would use what's built in.

01:49 - Yeah, a couple other features I like, verbose mode, well, there used to be a way to, you had to, if you had a test that was skipped or X failed or X passed, you could add a reason, but to get the reason was a little extra work.

02:07 And now you can just turn it into verb.

02:09 If you pass verbose mode, you get those reasons out.

02:11 That's pretty cool.

02:12 And the last one I wanted to highlight, last feature that came up is a change to the monkey patch.

02:20 - So, MonkeyPatch is a way, it's kind of like mocking.

02:25 It's a little kind of like a way to easily mock.

02:30 But the thing that changed was a context manager.

02:34 So they added a context manager.

02:36 And so either within a test, you can just for part of the test, do the patch change, or it's also exposed in at the pipe test namespace level.

02:50 So you can even use a monkey patches in helper functions and stuff like that.

02:54 So that's pretty neat.

02:56 - How's that compared to like the patching with context block?

03:02 - Well, yeah, it's exactly like that.

03:04 So you could use a with block to patch it.

03:07 So.

03:08 - Fantastic.

03:09 Cool.

03:10 I think this is great.

03:11 Like it's cool to see pytest moving along and there aren't really that many challengers these days.

03:16 It's pretty much the leading way to go.

03:20 >> Yeah, I mean, there's still projects that use unit test, and I don't know why they're still using it, but by just as there.

03:28 >> The only one that makes sense to me is I don't want a dependency.

03:30 I just want to be able to run it.

03:32 >> Okay. But yeah, sure.

03:35 >> You're not convinced?

03:37 >> Well, I mean, how many projects don't have dependencies?

03:40 >> Yeah, that's true.

03:43 - The other bit, I kind of like it being outside of Python because you can, like, let's say you upgrade your Python.

03:51 You don't, I don't think you really want to upgrade your test runner at the same time you're upgrading.

03:57 - Well, and also you get a lot higher velocity, right?

03:59 Like the reason they didn't bring requests in to replace the internal URL, HTTP stuff in Python was like, it's going to slow requests down.

04:07 - Yeah.

04:08 - Yeah, so it would slow pytest down too.

04:10 And then I got a ping kind of on a related note from somebody that was using a plugin I wrote called pytest-check and said, "Hey, I'm having trouble running this with pytest 6." I'm like, oh my gosh, people are using that?

04:24 So yeah, apparently there are some people using it.

04:27 So I updated it to run with-

04:29 - Now it's compatible?

04:30 - Yeah.

04:31 - Sweet.

04:32 Sherry, do you do any testing?

04:34 - Not with pytest.

04:37 I don't have experience with that yet.

04:39 - Yeah. - Cool.

04:41 - Definitely a good one.

04:43 - I know of a good book if you wanna learn, so.

04:45 - That's right, that's right.

04:48 Well, the next thing I wanna talk about, it takes a minute for this to sink in here, and it's SQLite as an application file format.

04:58 So we've all heard of SQLite, right?

05:00 It's a database, but it's not a server, it's just the file, and it's embedded into your application, so it's in process, which actually makes it incredibly fast, right?

05:11 It also, SQLite ships with Python.

05:16 So you don't have to have any dependencies even to use it.

05:19 You just, you know, connect to it.

05:21 You probably do wanna have dependencies like say SQLAlchemy or something like that, but you don't have to, right?

05:27 So there's a cool thing that's actually part of the documentation more or less for SQLite, but it was brought to my attention by over here.

05:37 Let me pull up my notes by John Boltmeier.

05:42 John Boltmeier, thanks for letting us know about this one.

05:45 And the idea is that we so often, if we have some kind of custom file format for our application, whether it's a command line tool or a GUI, or maybe even a website, although those often default to databases anyway, you have to think about how am I gonna store this file?

06:02 Should we put it in JSON?

06:04 And we could use some XML, Brian.

06:06 Does that sound good?

06:07 No.

06:10 - No, no XML.

06:11 - But you know, JSON is super popular, right?

06:13 But even with JSON, you've got to figure out, okay, well, these are the blocks and here's how you read it.

06:18 And if some other application wants to talk to it, they need to work with it.

06:22 And there's all these really interesting advantages of saying, well, let's just have a single binary file that is a SQLite database, and just that's our file format.

06:32 Much like doc X has it, you know, is the file format for Word or XLSX for Excel, or you name it, right?

06:43 All these different apps have their own file format.

06:45 Camtasia has its own and so on.

06:47 That could easily just be a SQLite file.

06:50 So if you go down here in this thing, there's a bunch of things that are highlights.

06:53 It says, look, simplified app development.

06:57 You don't have to write any code to figure out how to work with this file, right?

07:01 Like you've already got the SQLite built into Python.

07:05 Everything's contained into a single file, right?

07:08 So you can just easily move it around.

07:11 It becomes queryable because it's SQL, right?

07:14 So you just select star from table where such and such.

07:17 And now your app has search built in.

07:21 That's pretty cool.

07:22 Bunch of tools like we've talked about, Beekeeper Studio and things like that.

07:28 They would just load this up and work with it, right?

07:30 So anything that works with SQL light is now working on it.

07:35 Cross-platform, right?

07:37 32-bit, 64-bit, Windows, macOS, Atomic, right?

07:42 So multiple things can be working with it concurrently.

07:46 If you make changes to it, you could do like three changes and something goes wrong, an exception, just rolls it back.

07:53 These things are all pretty cool, right?

07:55 - Yeah.

07:56 - Yeah, so let's see.

07:58 Incremental updates.

07:59 This is another one that's interesting is with say, something like a JSON file, you'd have to load the whole thing up unless you're doing something really intense.

08:09 You would change something small about the file then you'd write the whole thing back.

08:13 But the way SQLite works is you just make changes to little spots in the binary file as you insert stuff.

08:19 So writes are a lot simpler, super extensible.

08:24 And what else?

08:26 Performance, right?

08:27 It's a lot faster than, you know, They have, compare some other styles.

08:30 Like you could have a pile of files like Git or something like that.

08:34 It's multi-threaded safe, so multiple processes can access it, multiple languages, all sorts of stuff.

08:39 And also finally, documentation.

08:41 Like you want to document how your file format works, you just describe what the tables are and what the columns mean, and that's it.

08:48 What do you think?

08:49 - I actually really like using single file database styles like SQLite.

08:58 - Yeah.

08:58 - For persistence layers, because you don't really have to think about it at this point.

09:03 I've also used TinyDB for a similar reason, but.

09:07 - Yeah, yeah, TinyDB is interesting.

09:09 I think that uses JSON blocks, little bunch of JSON files it kind of organizes, right?

09:14 - Yeah.

09:15 - Something like that.

09:16 Shari, what do you think of this?

09:18 - Yeah, it's, this is actually new material for me.

09:22 So I'm--

09:23 - Well, honestly, me too.

09:24 I looked at it and I was like, well, of course I know I can use SQLite, I just hadn't really put it together.

09:28 Like, well, this is actually a really cool use of a file format that other people can use.

09:33 - Yeah.

09:34 - Yeah.

09:36 There's also a really cool project called Datasette.

09:40 D-A-T-A-S-E-T-T-E, something like that.

09:45 And another one related to it called Dog Sheep, which is a really interesting project that takes all these SQLite and SQL-oriented data inputs and allows you to bring them together and do reporting and analysis on them.

10:03 So I did an interview recently with Simon, guy behind the project over on Talk Python.

10:09 It's not out yet, but it's already recorded and it will be out.

10:13 And there's just all these interesting things you can do once data gets into these common formats.

10:17 So this just is another example.

10:20 And he also pointed out that there's all these different SQLite databases already on your machine, like the photos library for macOS, that's a SQLite file.

10:31 - Wow.

10:32 - Yeah, so there's like hundreds of these on your computer and you just didn't know it.

10:36 So anyway, this is hopefully, solves some problems for people trying to create, what are we gonna do for our app format, our equivalent of Doc X, what's that gonna be?

10:46 Well, it definitely could be one of these.

10:48 - Yeah, that's pretty cool.

10:52 - Yeah, definitely.

10:53 All right, next up, Sherry, tell us about your project.

11:01 This is the one I mentioned before.

11:04 - Yeah, so I'll start off by saying, I noticed that kids' programming books are either really abstract or they don't teach the reader how to write a simple program or it's either that or they're too intensive in the format of a textbook or a book made up of a lot of tutorials with step-by-step instructions.

11:21 And so that's why I thought of taking a different approach by creating a programming book in the form of a picture book that tells a story with complete computer programs that represent real life situations.

11:30 So my latest book is called "A Day in Code Python" and it's now live on Kickstarter.

11:35 It tells a story using Python programs that describe real life situations in the code.

11:39 And so for each two page spread in the story, there's a code page that has a complete Python program that describes a situation in the story and a full page illustration next to it that shows the scene that's being described.

11:51 So in that way, the book is presenting Python code examples in a continuous story, and the code is explained below each program.

11:59 And each program presents a new Python concept.

12:02 And so you might be wondering, like, why did I choose a picture book?

12:06 And so there's a few main reasons why I thought of doing that.

12:10 And so of course, the most obvious is that a picture book is fun and colorful, and who doesn't like a picture book?

12:16 But I also wanted to show that everyday events can be described with the logic of code.

12:21 And I think the programming concepts can be better understood by making the code relatable.

12:26 And I also wanted the book to be compact and show code examples conveniently.

12:30 So as a beginner, you don't need to dig through a big book looking for basic code examples.

12:35 And also by having nice full page illustrations, my aim is that the reader and kids especially will enjoy the book in the same way as a normal picture book that is flipped through again and again.

12:47 And while they're enjoying the pictures, they'll be looking at the code too.

12:51 And their understanding of the programming concepts will be reinforced.

12:56 And so this book will be in the same format as my first book, "A Day in Code," which is written in the C programming language.

13:03 And that book was actually released a few weeks ago on Amazon.

13:07 And I had previously launched a Kickstarter campaign for it.

13:10 And after delivering the book, I got a great response from kids to college students to adults, so it's really for all ages.

13:18 And so now I'm focused on creating a Python version of that book, and you can preorder it.

13:24 - Yeah, I think a Python book makes a lot of sense because it's the most popular learning programming language these days, right?

13:32 - Yeah, it's definitely been gaining in popularity.

13:35 Yeah, very popular, it's everywhere.

13:38 - I like the idea of just sort of letting it wash over kids, right?

13:44 You don't necessarily, maybe the goal isn't necessarily, might not be to teach them programming and have them come out the other side of interacting with the book, actually writing code, but kind of seeing the examples and just making code something that you kind of talk about, like reading or like writing or like history or anything.

14:02 So it's a cool format.

14:03 What do you think, Brian?

14:04 - I think this is great.

14:05 So do you have like a target age in mind?

14:10 - So that's why I say like, Well, of course, being a picture book, it's great for kids, but I've also gotten a lot of people, adults who say that they enjoy it too.

14:19 It's just a fun format for anyone to enjoy starting to learn programming, or even just looking at it as a reference.

14:28 Even if you're experienced in programming or maybe you want to refresh your memory, it's just a convenient way to look back at simple code examples that go over all the basics of Python.

14:40 So functions, dictionaries, lists, tuples, and all that stuff.

14:44 Yeah.

14:45 And it's almost funded on Kickstarter.

14:48 So it sounds like you're going to make it happen.

14:50 You're like $1,000 away.

14:52 And I'm sure that people are interested.

14:55 Well, I'm going to like order one.

14:57 So thank you.

15:00 This looks great.

15:01 Yeah.

15:02 So once you get it funded, when do they come out?

15:06 - So right now the estimated delivery time is in April and it'll be a special edition book.

15:11 So I'm actually getting it printed at a US-based facility that allows me to print with glossy paper, 100 pound paper and have a feature of having printed end sheets at the front and back of the book, which, and so these features aren't available once the book goes on Amazon, so.

15:30 - Cool, yeah.

15:33 Great project, happy to see it gaining some traction.

15:37 Hopefully people can make it happen, 'cause it'll be neat.

15:40 - Yeah, thank you so much.

15:41 - Yeah, absolutely.

15:43 So, Brian, before we move on to the next one, speaking of books, maybe tell people about what we're up to, so they can support us if they wish.

15:51 - Yeah, well, the best way to support, let's say, me is by picking up a copy of Python Testing with pytest.

16:01 I still get feedback all the time of people thanking me for writing this because it helps them in their job, helps them get stuff done better.

16:08 So it's really awesome.

16:10 - Yeah, absolutely.

16:12 - And then if they want to learn some more about all sorts of types of Python, they should probably check out training.

16:19 - They should, like we've got a couple of new courses.

16:21 I just released the FastAPI course a couple of weeks ago, and that is such a neat framework.

16:26 We also have our Excel to Python and the Python memory management tips, a deep dive course.

16:31 So those and many more are out there for people to take.

16:35 They're interested and they wanna learn Python.

16:38 There's a whole bunch of ways, the day in the code, pytest, and then these courses as well.

16:42 - I always forget that you have a memory management one.

16:45 - Yeah, that's ironic, isn't it?

16:47 (laughing)

16:50 Yes, Barry.

16:55 - Are we doing this next?

16:57 Okay, cool.

16:58 - This is what's next, yeah.

16:59 - Nice.

17:00 So I can't believe we haven't done this, but actually partly because I can't believe I just noticed this.

17:07 So I didn't know about this.

17:10 Yes, Barry, there is a Python labs.

17:11 So it's pretty funny.

17:17 So this is at azure.pythonlabs.com and it used to be just normally at www.pythonlabs.com.

17:27 So it's moved, but this is back from, This is kind of an inside Python joke.

17:32 Tim Peters posted it in 2004.

17:37 And apparently there was a question from Barry, it just says Barry, I'm assuming it's Barry Warsaw.

17:44 - Yeah, I would guess.

17:45 - Asked the question, what is Python Labs now?

17:48 Or is there a Python Labs now?

17:50 I don't know, Guido owns the domain name, which is probably the biggest claim to Python Lab hood there is.

17:58 And then Tim Peters replies with a very, yes Virginia, there is a Santa Claus-esque answer.

18:05 And I just encourage people to go read it.

18:07 It's hilarious.

18:08 There's stuff like, Barry, your little friends are wrong.

18:12 They've been affected by the skepticism of a skeptical age.

18:16 Yes, Barry, there is a Python Labs.

18:19 It exists as certainly as love and generosity and devotion exist.

18:23 Alas, how dreary it would be a world with no Python Labs.

18:27 So it goes on like that and it's pretty funny.

18:30 So I encourage people to check it out.

18:31 And it, you know.

18:32 - How funny.

18:33 - Have you seen this before?

18:36 - I've never seen this.

18:37 And apparently it's from 2004 originally.

18:40 But now it's on Microsoft Azure.

18:41 And I'm wondering if this has anything to do with Peter Van Rossum moving over to Microsoft.

18:48 - Yeah, I assume so.

18:49 It's just, I don't, I was gonna try to look at where I found this and I think just somebody mentioned that it moved to Azure like a couple months ago or recently.

18:58 - Yeah, yeah, funny.

18:59 You know, another piece of news I caught that was not officially on the radar, but a friend of the show and our friend, Anthony Shaw, he is headed towards Guido as well.

19:11 You hear that?

19:13 - I did.

19:13 - Yeah, he joined Microsoft as some kind of Python specialist, I'm not sure.

19:19 - So I hope they throw some money on him to try to move him to the Northwest.

19:24 That would be cool.

19:25 - That would be cool.

19:26 Yeah, then we could hang out with him more.

19:27 He's far away.

19:28 He's in Australia, which is a long way.

19:29 But it's gonna be hard for him to leave.

19:30 He lives on the beach in a picture.

19:33 - Yeah.

19:35 - Yeah, anyway.

19:36 - He always posts his surfing report and stuff like that.

19:40 - Exactly, 'cause life's hard sometimes.

19:42 - We surf in Oregon.

19:44 - Yeah.

19:45 - With wetsuits. - For about five seconds.

19:46 And then we change color, and then we come out.

19:48 (laughing)

19:50 All right, let's see, what's the next one here?

19:54 Think, yeah, so remember, Brian, I did an extra, extra, extra, extra the other day?

19:59 - Yeah, let's do more of that.

20:01 - 'Cause I had so much stuff.

20:02 Well, let's do an extra, extra, extra, extra, extra, extra this time because, oh my goodness, there is so much stuff.

20:10 I'm not just gonna turn this into another element here of the show.

20:14 So first of all, we spoke about NumPy in installing, I think it was on Big Sur, it was having some problems.

20:20 it wouldn't install correctly.

20:23 I don't remember if it was Windows or Linux or macOS.

20:27 I think it felt like it was macOS.

20:28 But anyway, it was a problem with one of the platforms.

20:31 But what was interesting is I got a message from Bryce that, "Hey, quick follow up on episode 208.

20:38 "Did you know," I didn't know, "Did you know that in your requirements TXT file, "you can say numpy == 1.19.3; And then platforms you could say platform underscore system equal equal windows.

20:55 Then another different version of NumPy platform equals Linux.

20:59 Another one platform equals Darwin.

21:01 Isn't that cool?

21:04 Yeah I had no idea you could kind of split the requirements file to say the Windows install gets this and the Linux install gets that.

21:12 Oh that's cool.

21:14 Yeah.

21:15 Yeah I'd never seen this but the problem was NumPy was not.

21:19 It was Windows Update that broke NumPy, that's what it was.

21:22 And so here's a way to pin the Windows version to an older NumPy, but let the other stuff be newer.

21:29 That's what it was.

21:31 So here's a really simple way to fix that, huh?

21:33 - Yeah, I hope I never need this trick.

21:36 - Yes, exactly.

21:37 And then I got another message from William Silva, and he said, "Hey, check this thing out.

21:47 You probably heard of material design, the way that Google styles some of their apps and so on.

21:53 And we've all heard of probably the best way to build cross-platform apps with sort of native widgets.

22:00 Maybe Electron's the best way, but native widgets would be with Qt and PySide 6 and probably PyQt, I don't know if it's upgraded yet, but there's this cool theme that you can put on to make it look material.

22:17 Doesn't that look neat?

22:18 - Oh, that is neat.

22:19 I like it.

22:20 - Yeah, yeah.

22:21 So often these cross-platform apps, they just look, boy, I don't know.

22:25 They just look like they're standing out weird, but this looks really nice here.

22:29 I totally like it.

22:31 So I'll put that in the show notes.

22:33 People can check that out.

22:35 Number three, I just announced this.

22:37 I thought it was pretty neat.

22:38 I wrote a blog post that talked Python hit 20 million downloads and is the number two developer podcast out there.

22:46 I just found out.

22:47 I wrote a blog post to sort of celebrating that.

22:50 - You're, that's very impressive.

22:52 Yeah, good job. - That's crazy, yeah.

22:54 Thanks, thanks.

22:55 And by the way, Python bytes is around 6 million and going, so we're pretty strong over here as well.

23:00 - Nice. - Yeah.

23:02 Awesome.

23:03 Pyramid, Pyramid 2, the web framework is coming out, and I actually tested it, Talk Python Training, which is about 25,000 lines of Python is written in it.

23:12 Just upgraded it, ran everything, all the Py tests pass, Everything else is good, so pyramid two's looking solid.

23:20 Not too much change, but it's good to see how it's going.

23:23 Ooh, Python 3.9.1 is out with 282 changes from, that's a lot.

23:30 - Well, let's go through them all.

23:32 - Yeah, okay, well, I'm gonna say it like 10x speed, if you don't mind.

23:36 Now, the other notable thing, almost the reason I'm bringing this out, is that the Python on macOS also ships as a universal binary, which means it has an Intel version and an Apple M1 version.

23:46 - Oh, nice. - Which leads to all sorts of interesting weirdness when you pip install things that expect Intel.

23:53 But nonetheless, it's out there and people can start playing with it.

23:57 I actually did a stream, livestream number six, with Paul Everett from JetBrains.

24:04 Sort of exploring what's the Python experience on the Apple M1 Mac Mini.

24:07 So that's like an hour-long video he and I did last Friday.

24:12 And I will link to that, you can check it out.

24:14 - Well, what's the punchline, though?

24:16 The punchline is almost everything works, but we couldn't get JupyterLab to work for some reason.

24:20 - Oh, okay.

24:22 - But everything else seemed to be pretty much fine.

24:24 But the trick is, you kinda need, a lot of times you're gonna work with something that maybe doesn't have an M1 version of the package or the wheel.

24:35 But if you go to the terminal and you create a copy of it, and then you tell it to run under Rosetta, Every Python command you issue becomes a Intel Python command.

24:47 So if you pip install something, it'll use the wheels for the Intel version of Mac, not the M1 version of Mac and stuff like that.

24:56 So it's kind of your escape hatch.

24:58 Like once you open up that terminal, you've fallen back into the Intel world.

25:03 So you don't have compatibility issues there.

25:05 - Okay.

25:07 - Anyway, we did a ton of that with stuff.

25:10 Sherry, do you have an M1 Mac?

25:12 Are you on?

25:13 - Are you excited about these?

25:14 - I'm not on a Mac, I'm not on that.

25:17 - What's your OS of choice?

25:18 - Well, Microsoft.

25:24 - Yeah, Windows?

25:24 - Yeah. - Awesome.

25:26 Yeah, they're doing good stuff.

25:28 There's a ton of Python things happening over there.

25:30 That's pretty exciting.

25:30 All right, and then last thing, this is brand shiny new, is we have the Python steering council selected.

25:39 We have Pablo Galindo, We have Carol Willing, Brett Cannon, Barry Warsaw, and last one, T. Wooters, were all selected to be the new steering council folks.

25:56 So that's exciting.

25:58 And yeah, that's it.

26:00 Those are my extra, extra six X extras.

26:03 - Well, cool.

26:05 - Yeah, awesome.

26:07 And I guess last thing to talk about is a little computer vision.

26:12 - Yeah, so this is like a really cool product I found out about a few years ago.

26:18 And it's called OpenMV-CAM H7 is the latest one.

26:22 It's a microcontroller development board with an onboard camera that runs machine vision algorithms with MicroPython.

26:28 The OpenMV IDE and libraries make it really easy to run complex machine vision algorithms with simple Python code for things like color tracking, face detection, eye tracking.

26:39 One particular application that I really like, which I did, is detecting April tags, which are like QR codes in that they're 2D binary pattern squares, but they encode a much smaller amount of bits between 4 and 12 bits rather than a QR code which can store up to 3 kilobytes.

26:58 By encoding a smaller amount of data, it makes them easier to detect and be able to be robustly detected with variations in the camera, viewing angle, and the lighting conditions, and they can be detected from a longer distance.

27:13 So it's just so convenient because the OpenMV IDE has an April tag generator, so you can easily create the tags and print them out.

27:22 It has an April tag, MicroPython library so you can easily implement the algorithm, and the code will return the rotation and the ID code among other information about it.

27:35 And the company OpenMV has said they want to be the Arduino of machine vision because they have such an Arduino-like user interface and you can view the output of the camera in the IDE.

27:47 And they actually just announced a few weeks ago that they're now partnered with Arduino to support computer vision on a new wireless Arduino board called Portenta H7 with OpenMV firmware and the OpenMV IDE programmed in MicroPython.

28:03 So it's really cool to be able to easily implement these complex machine vision algorithms with just a few lines of Python code on a plug and play STM32 microcontroller board.

28:14 - Yeah, do you know what it costs?

28:17 - The latest one, I think it's, I thought it was like 60, around $60.

28:23 I'm trying to remember now.

28:24 - Yeah, 65.

28:25 Yeah, yeah, 65.

28:26 That's to set up a little computer vision system for 65 bucks, that's cool.

28:32 - Yeah, I mean, I was very impressed how just taking out of the box and running this example code that came with the IDE and was able to detect these April tags and it's interesting to see how it compares to QR codes and they're more robust in detecting.

28:49 - Yeah, okay, yeah, and they have a little code example here that's quite straightforward, right?

28:55 You just set the pixel format, how many frames, and then take a snapshot and run things like image.findBlobs and like magic happens on that line.

29:06 - Yeah.

29:08 - Yeah, that's super cool.

29:11 So one of the things that I've always wanted to do, and I don't know if I'll ever do, but I wanna create an IoT course, and I would like the final exercise of the course to be setting up a camera So you can have a multiplayer or a computer against human game, but have the computer do it through computer vision.

29:32 So over like a checkers board or a tic-tac-toe, like you draw on it, the computer looks at it, says, I want to go there or something.

29:39 That would be so funny.

29:40 It looks like this might be something I could use to make that happen.

29:43 - Yeah, definitely.

29:46 I read that you can run TensorFlow Lite on it too.

29:49 So you can train AI, and train models for AI with TensorFlow running on this.

29:56 - Run it right on the device, not shipping it to the cloud.

29:59 - Yeah.

30:00 - Yeah, that'd make it really responsive.

30:02 That's cool.

30:02 Brian, what do you think?

30:04 What would you do with it?

30:06 - I think you should run with the board thing and do a chess thing and then have a, and actually have the, you should get into robotics also and have the, have it just move it, yeah.

30:18 - The arm, eh, eh, eh.

30:19 The claw comes out, grabs it.

30:21 (laughing)

30:23 - You know, how about Settlers of Catan?

30:26 Come on, if we could automate Settlers of Catan, and it would be even better actually, would be not just have the computer play, but in this like whole weird social distancing, bizarro world we live in, like you could set it up so you and your friends just play and like both have a board and the thing just tells you, oh, your friend moved here, you gotta move that over.

30:48 That'd be great.

30:49 I've never even got through the instructions on Settlers of Catan yet.

30:53 - One of my daughters loves it and one of them hates it.

30:55 They're like, "Please, we can't play.

30:56 "It takes so long, we can't do that." Yeah, it's funny.

31:00 But anyway, I think this is a cool device and it'd be really fun to play around with it.

31:06 And 65 bucks for the whole thing, that seems pretty affordable.

31:10 - Yeah. - Yeah, definitely.

31:12 - Yeah, awesome.

31:13 All right, well, what else have we got?

31:19 I don't have any extras, Brian.

31:20 I've already gone through my six extras.

31:22 You got any extras?

31:23 - I just have one shout out to, I guess the Python community on Twitter, I just want to say, I don't know.

31:30 I'm getting a little cheesy today near Christmas, but this is a sort of a silly thing, but I saw there was a discussion on Twitter that happened last night and today.

31:40 There was somebody named Nicole Carlson that started this question of, Do you say it for K-W-A-R-G-S?

31:51 Do you pronounce that keyword arguments or do you pronounce it quargs?

31:55 - Oh my gosh.

31:56 - And I had never considered pronouncing it quargs before.

32:01 How about you, Michael?

32:02 - I think I did.

32:03 I think I do say quargs.

32:05 No, no, I say K-W-R-G-S.

32:07 That's what I say. - K-W-R-G-S, okay.

32:08 Yeah, so that was brought up by a couple of people that they used that.

32:11 - Yeah, K-W-R-G-S, that's what I say.

32:14 - And so I just, I'd never even considered, I like quargs.

32:16 I'm going to start using that now.

32:18 - Sounds like it comes from Star Trek.

32:20 - But yeah.

32:21 - Klingon word, I don't know.

32:23 - Or yeah, or quark from Deep Space Nine.

32:27 - Yeah.

32:28 - So Vicky Boyka said, "I've never even considered not saying quarks." And a whole bunch of other people had different comments.

32:36 And I just wanted to bring this up 'cause it reminded me of like a conversation we'd have over beer or something at PyCon or in the hallway or something like that.

32:47 And that little bit of just stupid conversation around Python, I just really appreciate it.

32:55 And I like that that little bit is alive on Twitter at least a little bit, so.

33:01 - Yeah, funny.

33:03 Sherry, how do you say it?

33:05 - Oh gosh, I am actually, I don't normally say that.

33:08 (laughs)

33:09 - You know what's funny is like when you, There's all these different little acronym-y words in programming and it's funny when people, they've mostly just read them the whole time and all of a sudden they have to say them, right?

33:22 Like, pypi.org, right?

33:27 Some people say pi-pi and some people say i-pi and so on.

33:32 I'm on the pi-pi side, but it's just, you know, sometimes you don't have to pronounce it, but sometimes you do.

33:38 - Yeah, I'm not sure what to take on this issue.

33:41 - This changed my life though.

33:42 I'm in quarks all the time now.

33:45 - Right on, sounds good.

33:47 Cher, anything else you want to give a shout out to while we're here?

33:50 - I don't know, I mean, just thank you so much for listening and thank you for checking out my Kickstarter campaign for a Dane Coon Python.

33:59 - Yeah, yeah, it's good to have you here this time.

34:01 All right, Brian, I think we should finish it with a joke.

34:04 What do you think?

34:05 - Sure.

34:06 - All right, so I'm having this problem.

34:09 I lived in this apartment complex, the fourth floor, the fourth apartment on that floor.

34:17 And yeah, the number of the apartment was 404, but what's the problem?

34:22 - 404 apartment not found.

34:26 - Exactly, every time I order a pizza, the delivery guy tells me he couldn't find the place.

34:31 - Was that really your apartment?

34:33 - No, I wish it was.

34:34 - Okay. - That would've been awesome.

34:35 No, I lived on 214.

34:38 I don't know if that's an HTTP status code, but that's as close as been 108.

34:43 I don't know what 100 is even really doing.

34:45 I know they are their status codes, but I haven't, I don't know.

34:47 When I went outside my head either, but this one, this is a good one.

34:51 I like it a lot.

34:51 I like that too.

34:53 Well, I got one last joke.

34:56 Okay.

34:57 So why do software developers or many of them prefer dark mode?

35:05 Why tell us because bugs are attracted to light.

35:08 Oh yes.

35:10 Awesome.

35:11 I heard this on Twitter.

35:12 It's terrible.

35:12 But, and I told them my family, it's one of those, you tell it sometimes some jokes you tell your family and they just stare at you.

35:20 so yeah, yeah, they don't, they don't get it.

35:23 I really quick.

35:24 I want to follow up with one comment.

35:26 From the live stream.

35:27 And if you're not listening, not interested, you don't know about yet the live stream.

35:31 We're also streaming this onto YouTube now.

35:33 So check out pythonbytes.fm/youtube and you can subscribe to the upcoming live streams.

35:38 But Brian, there's a question here.

35:40 When's your second edition coming out?

35:45 Come on, man.

35:46 >> There is no plan to date.

35:48 >> Okay.

35:49 And then also we have the German version of KW-Args.

35:53 I say K-V-Args.

35:57 >> K-V-Args.

35:59 - That's just like saying K-W, the German pronunciation, args.

36:05 - Yeah.

36:05 - Awesome.

36:06 All right, well, thanks so much.

36:08 Sherry, thanks for being here.

36:09 - Yes, thank you so much.

36:11 - Thank you.

36:12 - Yeah, it was really fun.

36:13 - Yeah, you bet.

36:14 Bye.

Back to show page