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


Transcript #160: Your JSON shall be streamed

Return to episode page view on github
Recorded on Wednesday, Dec 4, 2019.

00:00 Hello and welcome to Python Bytes where we deliver Python news and headlines directly to your earbuds. This is episode 160 recorded December 4th, 2019. I'm Michael Kennedy.

00:10 And I'm Brian Okken.

00:11 And this episode is brought to you by DigitalOcean. Check them out at pythonbytes.fm/digitalocean.

00:16 $50 credit for new users. Let's start with a topic that we've covered quite a bit, Brian, type hints, or do you call them type annotations?

00:24 I usually call them type hints.

00:27 Yeah, I go back and forth and the article you're going to mention actually says you can call them both. But yeah, it's kind of funky that they don't have like a definitive name. Maybe they do and I just don't have certainty around it. Yeah, one of them's wrong and whatever the one I'm using is probably the wrong one. So we have covered it a lot and there's a lot of tools that we've talked about like mypy and others. So hopefully we've convinced everybody that they should at least do a little bit of type hinting. If you're in that boat, then this article is perfect for you. Al Paul Swigert wrote an article called Type Hints for Busy Python Programmers.

00:59 And that's everybody, right?

01:00 I mean, We're all busy.

01:02 We're all busy.

01:03 I really like the article.

01:05 It's a kind of a, when I first went to it, I was a little shocked because there's a lot of words there, but it reads like a conversation.

01:12 It's a conversational thing as if it's a programmer talking to an expert.

01:16 So that sort of tone of, I think I should do this, but what do I do?

01:21 And so he just sort of walks through a whole bunch of questions with it.

01:24 He covers using mypy and typing as the two modules you need and how to use those.

01:30 And there are other tools, but really most people are using mypy.

01:34 And that's what, that's El's saying that.

01:37 I don't know if most people are using mypy or some of the other tools.

01:40 We don't, I don't think there's any way to gain statistics on that, but I think mypy is a good way to start.

01:46 And a reminder that using types doesn't affect runtime.

01:50 It's, you have to run a tool like mypy to get it to work.

01:54 And so I don't think he covers this, but I think that people should hook a running mypy into their talks system or into their continuous integration pipeline to make sure that these are met.

02:09 - Yeah, everything's hanging together, yeah.

02:10 - Yeah, there isn't any compiler to catch you.

02:14 So one of the things I liked about it is that it gets you started and it covers some of the basics, but there's, as I've started running it, started using type hints, The exact things that I've run into, ALT covers.

02:26 For instance, you got a function that takes an integer, but it also could be none, or the default is none, or it's optional or something.

02:34 How do you deal with that?

02:35 There is stuff built in the type int system for union.

02:39 So you can say it's either an int or none, and there's optional parameters.

02:44 And then a shout out to stuff that, if you kind of get into it and you might, like if you're passing callables or sequences around, yes, there are ways to type that.

02:53 And so I think this is actually just a really great quick read and it'll get you started pretty fast.

02:59 - Yeah, I really like it.

03:00 I love the conversational style.

03:01 It seems super approachable and it's kind of from the skeptics perspective.

03:06 It seems a little bit like, oh, I wanna do this, but what about, I don't know if I'm sure about this.

03:10 Why can I do this?

03:11 And yeah, it seems like a lot of fun.

03:13 I'm definitely a fan of type hints these days, not for the mypy reasons.

03:18 I understand that makes sense for very large projects, But for me, the editors are just so much better if you can just give them these little hints here and there.

03:28 I'll give you an example.

03:29 For the database for Python bytes, we are talking to MongoDB with Mongo engine.

03:35 And the way you specify it is much like SQLAlchemy or even maybe more so like Django or M-Way.

03:40 You say, this column is a Mongo engine column of type such and such.

03:46 Well, the type editor, the editors think the type is like a column, But it's not a column, it's probably a date time.

03:51 Or it's a string, or it's a list, or it's anything but whatever they think it is.

03:55 And so you can use type-ins to say, "This column is an integer, and it's equal to one of these column things." That'll tell all the editors, "When I hit dot on this, don't tell me it's one of these column things.

04:05 I don't want to know that.

04:06 I want to know what its value is, because that's what I program against when I run it." So there's just all these different angles that make it super valuable.

04:12 Wow, to take a look at how you're using that, that's pretty cool.

04:14 Yeah, for sure.

04:15 Speaking of cool, another thing that we have beaten to death but is very tough and leathery and has not died is the ability to create an application out of Python code.

04:25 Right?

04:26 Yes.

04:27 Well, I stumbled across this thing.

04:28 I don't believe it is new, but it actually is interesting on layers.

04:34 Layers of interest here.

04:35 Called auto-py-2-exe.

04:36 Auto-py-2-exe.

04:37 Okay.

04:38 Okay, so this is a GUI, and it's built with EEL.

04:44 First of all, what?

04:45 It's a GUI Python thing built with EEL.

04:48 Remember EEL?

04:48 I know.

04:49 Remind me.

04:49 Yeah.

04:50 It lives in the ocean.

04:51 Some of them are electrical.

04:52 You shouldn't touch them.

04:53 No, wait.

04:53 Hold on.

04:53 It's a library for making electron-like HTML and JavaScript GUI apps with Python.

04:59 OK.

04:59 It says electric snake.

05:01 Got it.

05:02 Yeah, electron-- yeah, exactly.

05:03 So it's very much like that.

05:05 I think it's for kind of simplistic ones, but it certainly works for this app, which is pretty cool.

05:10 So here's a Python app built in EEL.

05:12 That's cool.

05:13 And it's kind of meta in the sense that its job is to make other Python applications out of native Python code.

05:20 - Okay, interesting.

05:21 - Okay, yeah.

05:22 So what it does is basically this is automation over top PyInstaller.

05:26 And you might think, okay, well I could just pass the command line arguments and just do that.

05:30 But there's something really nice about having a GUI say here's the icon, I just put the icon into the happen, here's the name I want for the title and such and such.

05:40 and here are the additional binary files or additional resource files I want bundled and shipped with my application.

05:47 We're using this JSON file and we're using this, I don't know, this image that we're gonna embed somewhere.

05:53 Just include those.

05:54 So there's all sorts of settings in this autopy.exe where you can just pick all that stuff out and you don't really have to be an expert at all with PyInstaller, but you can build pretty nice stuff.

06:03 Like there's a checkbox.

06:04 Do you want just a loose set of files or do you want it bundled into a single .exe that I can just give and it'll contain Python and the dependencies and all that.

06:11 - Okay, this does sound neat.

06:13 - It's pretty neat, right?

06:14 Yeah, and so really people wanna, if this sounds interesting to you and you wanna find out, hey, is this cool?

06:20 Is this interesting?

06:21 There's a three minute YouTube video.

06:23 You can just check that out.

06:24 - Okay, cool.

06:25 - So I put the link to the three minute video at the end.

06:26 People can click on that and watch it.

06:28 And then within three minutes, you'll decide whether or not this is useful for you.

06:31 But some of the conversation I saw, people saying, yeah, I know it just automates PyInstaller and that's cool, but there were things I couldn't get to work with PyInstaller, but doing it here, it worked fine.

06:40 So I feel like there's a lot of value in this.

06:42 - Yeah, nice.

06:43 - Yeah, speaking of value, DigitalOcean, they are adding a lot of value to all the hosted things of the world, including our stuff that's hosted there, across all the different sites and whatever.

06:52 I believe we're doing like 15 terabytes of traffic a month through DigitalOcean. - Wow.

06:56 - That is not messing around, that's a lot.

06:59 So been rock solid.

07:00 The other thing that they have that they're just launching is the Kubernetes, their own container registry for things like their Kubernetes service.

07:09 So we've got Docker Hub and places that you can put your containers, but that's on the public internet and things like that.

07:16 It'd be nice to have a private little one for your private code that you want to make sure doesn't somehow leak with making it public or private on accident or whatever.

07:24 So you can use their DigitalOcean container registry and have nice private container definitions, which is pretty cool, among other things.

07:32 So check them out at pythonbytes.fm/digitalocean.

07:33 Like I said, $50 credit for new users to get started and play around with this.

07:38 Speaking of playing around, I've never played with Sphinx.

07:41 - Oh, you never have?

07:42 - I haven't, I've had no reason to do it, but it seems like something that's useful.

07:46 Maybe I should learn about it.

07:46 - Yeah, so one of the things, so what I've wanted to use Sphinx for, so Sphinx can be used for building up documentation and makes a documentation website based on either REST or Markdown, or not, the REST in that-- - Restructured text.

08:00 - Restructured text.

08:02 Yeah, thanks a lot, programming world, for having two things that could be abbreviated REST.

08:07 In the C++ land, there was some auto documentation tools to where you can take, and I know other programming languages have this too, where you can take information about the structure of a program and automatically generate some web documentation about how to use it and what the parameters are for different functions and stuff like that.

08:27 So you can do that with Sphinx and that's the thing I've been wanting to do and I've tried several times and failed.

08:34 And it's usually because, probably on my part, but the tutorials get me part of way and then they reference a bunch of documentation and stuff and I don't want to become a Sphinx expert.

08:44 That's kind of the point of this.

08:46 I want to be able to just point it at my code and go do it.

08:49 And like for instance, I'm pulling out, so what does a function do?

08:53 What do different tests do?

08:55 I'd like that to be embedded in the doc string so that when I'm coding, I can make sure that that's correct and then that's just automatically generated.

09:03 So what I'm highlighting today is an article called how to document Python code with Sphinx.

09:09 It's a short tutorial by Mosh Zadka.

09:13 That's a cool name.

09:14 And so walks through, it has a little example of a little module with the doc string, and then the small example of how to set up your index.rst.

09:25 And I like Markdown better, but this is so short, I'd probably just use the restructured checks version.

09:31 Points out that you need a few extensions, you need auto-doc, Napoleon and view code.

09:35 And then it just gives you the conf.py file you need to make this work.

09:40 And then how do you generate this stuff?

09:42 Well, there's this long, weird command.

09:44 It's not that weird, but I don't wanna memorize it.

09:47 So this tutorial also shows you how to set up a toxini file with this Sphinx built in, so you can just say tox and your docs get rebuilt.

09:56 So I like this tutorial and I'm gonna give it a shot.

09:59 - Yeah, it's a really cool thing and automatically generating your documentation.

10:03 Not terrible at all.

10:04 Of course, it doesn't cover like, okay, well now that you've generated it, it's a bunch of web pages and stuff.

10:09 Where do you put that?

10:10 But for internal documentation within a team, you got your own way to do it, whether you're pushing it into a small web server or just leaving it with your code or whatever.

10:20 So leave that to the user.

10:22 - Yeah, or put it on DigitalOcean, or not DigitalOcean, GitHub Pages, right?

10:26 - Yeah. - That's one thing you do.

10:27 You put it on Netlify, a lot of options for just hosting HTML. - Yeah, or throw it into a GitHub cluster, a Kubernetes cluster, maybe not.

10:37 - That's right.

10:38 So, you know, something that's always amused me is the association of Python ecosystem and language with snakes.

10:46 Because that's not what the origin, right?

10:48 That's not what Python is named after.

10:50 It's named after Monty Python.

10:52 All these apps and stuff should have like medieval knight type of names, but they don't.

10:56 So I'm gonna tell you about one that is called snake.

10:59 Snek, S-N-E-K, Snek.

11:02 (laughs)

11:04 Don't quite know the right accent to put on it to pull that off, but Snek.

11:08 It's pretty awesome.

11:09 So it's a PowerShell module for integrating standard CPython, just Python code, and various packages with PowerShell.

11:17 So if you're doing anything on Windows, any sort of automation or advanced shell stuff, you're probably using PowerShell, although the regular terminal's getting better as well.

11:27 And you know, the story of Python on Windows has always had a little caveat, or maybe a little star, like, yeah, you always do this, except for on Windows, you type this other thing.

11:37 And it's slowly getting better, right?

11:38 Steve Dower's done a lot of work to improve that.

11:41 - Yeah. - With, say, the Python installer that comes off the Windows 10 store has Python 3 as a command, and not just Python, and so on.

11:49 But here's one more thing that you can do to make working on Windows with Python better.

11:55 If you do anything with PowerShell, you can write scripts now that have sections of those scripts or libraries for PowerShell written in Python.

12:03 And it uses this library called Python for .NET, which is a new modern way to share the entire Flask library of .NET and all the objects you might create there with Python code.

12:17 And similarly, say, this Python thing returns some funky .NET type that can be converted so it looks normal to the rest of the PowerShell land, which is generally .NET stuff.

12:27 So if you're doing stuff with PowerShell, check this out, it's pretty cool.

12:31 The syntax is funky, but it's PowerShell syntax, so there you have it.

12:36 - Yeah, well, okay.

12:37 So I think that people can't be blamed for doing the snake thing, because our logo is two snakes.

12:43 - I know.

12:44 I think that that is absolutely true.

12:46 - I think it should be maybe some cheese.

12:48 - Yeah, exactly, or maybe a shield, or yeah, I don't know, whatever.

12:51 I don't mind having it being snake.

12:52 Snake is cool and there's the Python snake.

12:55 It's just funny that that's not actually the name.

12:57 - No, Killer Rabbit would be nice.

12:58 - Yes, the Killer Rabbit would be fantastic.

13:02 If you just got an exception and that appeared as an emoji, that would be beautiful.

13:06 Or maybe a failed test in pytest, right?

13:08 You could write a plugin.

13:09 Unleashes the Killer Rabbit and all that.

13:13 All right, we're going down a bit of a hole.

13:14 So maybe get us out and talk, get us back to the databases.

13:17 - Okay, so databases.

13:19 since in Python world, one of the things we like to do is use pandas because pandas makes dealing with data like so much easier with data frames and stuff.

13:29 And also one of the things with databases that we can use is SQLAlchemy if it's a SQL-based database, and most of them are.

13:37 So you can just take pandas and put it together with SQLAlchemy and put it together with your database and just slurp your entire data tables into Pandas data frames and then manipulate them there.

13:49 So you're good to go, right?

13:51 - Right, unless you have like five gigs of data, then you're good to swap and be very slow.

13:55 - Yeah, or if terabytes of data, that'd be bad.

13:58 - Yeah, very bad.

13:59 - So all hope is not lost because I'm gonna guess Irina Tron wrote this article called "How to Use Pandas to Access Databases" and it's really great.

14:09 One of the recommendations she uses is don't be afraid of the command line for SQL because you can play around with queries and look to see how big the shape of your data is to start with, which is a good thing.

14:22 But then goes on to tips on how to put this together correctly, like, and I'm just gonna read out the highlights, but there's examples of all of these, so I think it's great to have a look.

14:33 Don't grab a whole table, limit to just the fields that you care about that you're gonna actually use.

14:38 Tables often have a lot of columns that you don't need, so don't grab everything.

14:42 Limit the number of records.

14:44 you can either use the limit field to say, I only want to grab like a thousand elements or something.

14:49 You can also combine that with just the number of fields, but also you can also pick out, say I know I'm going to already throw away all the rows that don't have a particular value in this one field.

15:01 So you can limit that in your query.

15:04 One of the things you'll often run into with SQL databases, of course, is the need to use joins.

15:10 And the quick recommendation there is let the database do that, put it in your query, don't do the join within pandas, because you can do it with pandas and SQL coming together, but don't.

15:21 It's gonna be slower.

15:23 - Right, load it all into memory and have the data table merge it.

15:27 That seems probably not like the best way to do it.

15:29 - Right.

15:30 - Databases are pretty good at joining stuff.

15:32 - Yeah, and I mean, if you find, of course, it didn't talk about this, but if you find you're doing that a lot, you can kind of restructure some of your queries within.

15:40 I think you can build that and make a join be faster.

15:44 I don't know, I'm not a database person.

15:46 - You could put indexes, you could write a store procedure and call that, there's a couple options.

15:50 - Okay, ask Michael how to do it.

15:52 Anyway, maybe not.

15:54 So a lot of this is we're caring about memory, so how do you figure it out?

15:58 Like how much memory are you gonna use?

15:59 And I didn't know you could do this, but she has a tip of using query called memory_usage and then summing it.

16:07 This is, I don't know what the field comes back.

16:09 but you can do a query and grab the memory, but you do like a small query, like just a hundred rows or something, and then take that, and then you can use that to estimate the total size if when you're going to read out like a thousand or 2000 or something.

16:25 And then the last one I'm actually didn't quite follow, but I think I kind of followed.

16:31 The tip is to talk that the types get converted, like integer types get converted to like 64 bit types, I think, and you don't really need that for a lot of stuff.

16:42 So there's a, I'm calling this out because it's definitely for the user, read this if you need it, but there's a little bit on using chunking and then combining that with specifying what types, pandas types to use so that you get smaller data footprints.

17:01 - Yeah, yeah, so for example, maybe one of the columns in the data frame that just the way it came back from the database is a 64-bit typed integer, and you know everything that actually fit into an untyped, an unsigned 16-bit integer, well, that'll save you, it'll be a quarter of the size of the data if you'd make that conversion, right?

17:20 So, got a million of them, a quarter of the size of a million is possibly meaningful.

17:24 - Yeah, I mean, a lot of stuff that, like for instance, a lot of stuff, one of the tables I deal with has a number, numbers for the different, specifying which kind of result we're looking at, for instance, and they each have like a number code.

17:40 There's only like six, so the number can be one through six.

17:44 I don't need 64 bits to store that.

17:46 - Yeah, for sure.

17:47 - So it's good.

17:48 Do you use Pandas with SQLAlchemy in any of our--

17:51 - No. - When you're doing it?

17:52 - Not really.

17:53 There's a few times I've been thinking I should probably try to do some BI, like graphing type stuff, maybe about popularity of episodes or things like that.

18:02 you know, figure out what day I should release our podcast on, but I haven't done anything, so no.

18:06 - Okay, but you do use the SQLAlchemy though, right?

18:08 - Some, but not for the main site, because that's MongoDB.

18:13 - Oh, right, yeah.

18:13 - I'm using something equivalent, like we're using MongoAgent, which is super equivalent.

18:16 - Okay. - Yeah.

18:17 - Nice. - Cool.

18:18 Yeah, I suspect there's probably some interesting MongoDB integration with Pandas that I just don't know about, but I don't know any equivalent there.

18:25 Well, this next one I'm gonna cover is very similar to what you talked about.

18:29 It talks about how do I basically efficiently work with data from this one source databases.

18:34 And how do I not just select star from all the tables into pandas and work on it?

18:41 Another problem you might have is you might have JSON data.

18:45 JSON is sweet, but one thing JSON is not very obviously good at is streaming data, right?

18:51 Because how do you know where the closing curly braces?

18:55 Maybe you've got some key and then it's got an array of stuff and the closing bit of that array is not until you know, maybe 500 megabytes down the file.

19:04 That's a problem, potentially, right?

19:06 So if you just load up a import JSON and do a JSON load and give it a file pointer, it's just gonna hoover that all up and jam it to one giant dictionary and spit it out.

19:18 But if it's huge, obviously what you wanna do is iterate over it and process it item by item.

19:24 Yeah, I mean, that's what you would do for a regular file if you could take it line by line, but because it's this formatted thing, it's much harder.

19:30 And something I ran across last time, time before, we were talking about some other project, and it said, "Oh, this project uses iJSON." I'm like, "Wait a minute, what is iJSON?

19:41 That's interesting." - Yeah.

19:43 - Yeah, so iJSON is an iterative JSON parser with the standard Python iterator interface.

19:49 So what you can do is basically point it at a file stream, some search expression, kind of, in the JSON document, and then it will stream those back to you, generator style, one at a time.

20:02 - That's so cool.

20:03 - Yeah, so there's a little example I put in the show notes.

20:06 It says, "Imagine we've got some object called earth "in our JSON document, and it has a bunch of continents, "and within each continent, it lists out, say, "cities and states and so on." If that was huge, probably it's not, but if it were, you would want to iterate over it.

20:21 So you just go to the iJSON and go, "Give me the items from this file for earth.europe.item." an item is just a way to say, stop there.

20:31 And then what you do is you just say, for thing in, you know, whatever came back from that load that you did, and you just iterate over it in a for in loop.

20:39 - That's really neat.

20:39 - Yeah.

20:40 - And it's doing, like, I was looking at the website.

20:43 There's an example with grabbing it from like a URL, 'cause that's, you might be getting it from an API endpoint.

20:50 - Yeah.

20:51 - So I'm guessing that it's not grabbing everything from the endpoint at first.

20:55 - It probably depends on how the endpoint is set up, or even maybe how the object that's querying it back.

21:02 So I think they're using URL lib or something like that there.

21:05 If you would set that up to do streaming, then you pass the stream over to iJSON, then it would probably stream it from the server and never keep it all in memory at once anyway.

21:13 That'd be cool.

21:14 - Yeah, that'd be cool.

21:15 - Yeah, but there's probably several layers you gotta set that up as.

21:17 - I'm using generators and iterators more and more because doing lazy work is awesome.

21:24 It speeds things up quite a bit sometimes.

21:26 It's so awesome and you basically no longer have a memory issue, no matter how much data you have.

21:30 You might still have a time issue, but you're not going to run out of memory, right?

21:34 You're just going to blast through it one at a time instead of blasting through them all and then working on them.

21:37 >> Oh, nice. I got to check this out.

21:39 Cool.

21:39 >> Yeah. So, people, if you have large JSON, bring out the iJSON.

21:43 >> Bring out the iJSON.

21:44 Yep.

21:45 >> For sure.

21:46 All right.

21:46 Well, that's it for all of our main items, Brian.

21:49 I have, for some reason, it's like a crazy news week and I actually decided to not throw a bunch of stuff in here, but to save it till next time because I just don't want to overwhelm everyone.

21:58 But yeah, I've got a bunch of stuff to talk about.

22:00 How about you?

22:01 I am just kind of in a lull after Thanksgiving.

22:07 Still in the turkey coma?

22:08 Turkey coma, yeah.

22:09 My head's spinning.

22:10 There's a lot of stuff coming up in the next couple months, and I'm pretty excited about it.

22:15 That's awesome.

22:15 Yeah, I'm trying to juggle between getting over that holiday break, doing all the Black Friday stuff at Talk Python Training, and then getting ready for vacation.

22:24 It's a lot.

22:24 But in that little gap where I'm really still paying attention, there's a bunch of stuff that I ran across this week.

22:29 So first of all, let's start with this.

22:32 Django 3 was released.

22:34 >> Oh, sweet.

22:35 >> Yeah, so that's pretty cool.

22:36 And Django 3, there's a couple of things that are important about it.

22:39 One is it has official support for MariaDB, which is pretty cool.

22:44 The other one is that it begins the journey to the async world.

22:48 >> Dun, dun, dun.

22:49 >> Dun, dun, we'll cross over to the ASGI world.

22:53 - Yeah, so things like async and await are now making their way to Django.

22:58 I saw some messages from some of the developers there saying that this is not like the full story, this is the first steps.

23:04 So we've got a long ways to go, but it's first steps, right?

23:06 It's great to see them moving that way so that you get super high scalability if you need it.

23:13 Most people actually don't need it, but if you do, it's cool to say the answer is not, well, now you moved to Go or Node, it's you put the async keyword in front of your view method and you're good again.

23:23 - Yeah, I'm excited to watch this.

23:24 And actually the Django 3 release, I dipped my toes in Django before and I wanted to sort of wait until, I knew the 3 was coming, so I was sort of waiting for this to be official before I started up again.

23:37 So now I got no excuse, I can get started again.

23:40 - Yeah, that's awesome.

23:41 Speaking of excuses running out, the death clock does toll, doesn't it?

23:45 - Yeah.

23:45 - Pretty soon, the death clock is gonna toll for Python 2.7 or 2 in general, in particular, 2.7.

23:52 And as part of that, Python 2 will be removed from Homebrew.

23:56 - Wow, that's big.

23:57 - Yeah, that's pretty, it's just another sign that you know, you probably shouldn't be using this.

24:00 It used to be installable, Homebrew install Python at 2 or 2 or whatever the keyword was.

24:06 Yeah, that doesn't work.

24:08 Not yet, very soon that's gonna stop working.

24:10 So, that's cool.

24:11 Big news, although not really sure what's been put on it, so I'll just give you the news, is Guido is stepping down from the steering council.

24:20 And this came to us from Vincent Polio.

24:21 - Great.

24:22 It's a thing.

24:23 I don't really know how to spin it other than that.

24:25 - Well, yeah, I mean, basically, from what I got out of doing a little bit of reading is there were new elections to reelect people to the steering council.

24:33 And Hito didn't put his name in the hat.

24:36 And people said, "He didn't put his name in the hat.

24:38 "Here, let me put it in there for him." And then there was a conversation that followed.

24:41 Like, you know, a lot of people are enjoying being part of the steering council.

24:44 I've been on that part of Python for a long time, and it's just not fun for me right now.

24:49 I've earned some fun in the programming world.

24:53 So I want to work on projects and not politics and all that kind of stuff.

24:57 So I'm going to let someone else take it.

24:58 And he also said, the reason I'm comfortable doing this is it's in good hands.

25:02 The people already, the other council members there are great.

25:06 So y'all don't need me.

25:07 I'm still going to be around and working on stuff, but I just don't want to be on the steering council.

25:10 So anyway, thanks Vincent for sending that over.

25:12 That's big news, but that's about all I got to say.

25:14 There wasn't a whole lot written about it really.

25:16 - Okay.

25:17 is freezing open source for hundreds of thousands of years to preserve it for humanity, that's pretty awesome.

25:26 - Yeah, so the GitHub Archive Program, I watched this video.

25:29 - It's well done, right?

25:30 It's like a polished little video.

25:32 - Yeah, so I don't know what to make of it other than it's a thing.

25:36 They're gonna put a whole bunch, all the, as of, like, they've already put a bunch of stuff in there, but I guess next spring they're gonna, or when, next summer or something, they're gonna go up and take all open source code on GitHub and digitize it into these weird--

25:54 - Microfish code.

25:55 - Yeah.

25:56 - Digital microfiche or something that'll last for very long.

25:58 - Yeah, it's supposed to last a thousand years or something like that.

26:00 And they're gonna put it in some cave on an island somewhere.

26:05 - Greenland, Iceland, one of those two, I can't remember.

26:07 - Right, so why?

26:09 - To preserve it, I don't know.

26:11 I'm pretty excited, I have over 100 public repos that are gonna be up there, that's gonna be awesome.

26:15 I'm excited for them to get cold.

26:16 - Yeah, if all of civilization collapses, we're counting on future civilizations to be able to find this cave and figure out some technology to read these microfish things.

26:29 - Wow, those ancient creatures wrote in a very weird symbol form.

26:34 - Yeah, okay, well good luck future selves.

26:37 - Yeah, good luck future selves.

26:38 Hopefully they got some hints.

26:40 But anyway, that's pretty cool.

26:41 And the last thing, I had talked about this Python for Decision Makers course that I'm working on.

26:48 And basically it's a high level of why Python, when to use it, what it's good for, what it's not good for.

26:54 I'm also gonna do a live webcast that people can check out after the winter break.

26:58 So mid-January, I'm doing just a free webcast.

27:01 People can sign up and come ask questions and we can just share our thoughts on whether Python makes sense for whatever they're doing.

27:07 So people can check that out.

27:09 Click the link and register for free.

27:10 - Cool, that's a lot of stuff, man.

27:12 - It is.

27:13 I think we should wrap it up with a joke, though.

27:14 - Yeah, let's do that.

27:15 - As is our tradition now.

27:17 All right, you go first.

27:18 - Okay, so, okay, web developer walks into a restaurant.

27:23 He immediately leaves in disgust as the restaurant is laid out in tables.

27:27 - Oh, must have been a NoSQL web developer.

27:30 Doesn't want that relational stuff in there.

27:33 Yeah, that's pretty funny.

27:34 That comes from a joke API that Shinjitsu sent over, and so I appreciate that.

27:39 And this next one as well is from there, but I kind of like it, so I'm gonna cover it.

27:42 So last time when we were talking about Pint, You talked about using prefixes and suffixes for variable names.

27:47 Like, if I'm going to have something in meters, I'd use an underscore m, potentially, or centimeters, underscore cm, whatever convention you use.

27:55 So what is the best prefix for global variables?

27:59 I'm not sure.

27:59 What?

28:00 Maybe g?

28:01 That would be g.

28:02 G underscore, something like that.

28:03 It's global.

28:04 Or hash.

28:08 Like, you shouldn't have global variables.

28:10 So let's just comment those babies out.

28:11 Comment those out.

28:12 Pretty sweet.

28:12 - Yeah, thanks Shinjitsu for sending those in.

28:14 Those are funny.

28:15 All right, Brian, well, thanks as always.

28:17 - Thank you, bye.

28:18 - Yep, bye.

28:19 Thank you for listening to Python Bytes.

28:20 Follow the show on Twitter via @PythonBytes.

28:23 That's Python Bytes as in B-Y-T-E-S.

28:26 And get the full show notes at pythonbytes.fm.

28:29 If you have a news item you want featured, just visit pythonbytes.fm and send it our way.

28:33 We're always on the lookout for sharing something cool.

28:36 On behalf of myself and Brian Aukin, this is Michael Kennedy.

28:39 Thank you for listening and sharing this podcast with your friends and colleagues.

Back to show page