Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
This is episode 241, recorded July 7, 2021.
And I'm Brian Okken.
Hey, I'm Michael Kennedy.
And I'm new here. I'm Jay.
Hi, Jay. Thanks for coming.
So tell us a little bit about who you are.
Yeah, so I'm Jay Miller.
I'm a developer advocate for Elastic, a company that does search using Elasticsearch
and many other fine tools that we create.
And I spend a lot of time working on podcasts, shooting video, helping other podcasters,
which we'll talk about later, and yelling at Michael and Brian as they're podcasting and they can't hear me.
So, yeah, that's what I do.
I would totally love to hear one of those.
Just like record yourself yelling at our podcast at the same time.
That'd be great.
So welcome. Thanks.
You're kicking us off today, Michael.
So where are we starting?
Well, we're going to start with some automation here.
And I previously had covered that if you go over to GitHub, I'm not logged in.
I guess it's not going to work.
But if you go to GitHub and you forked a repo.
So, for example, if you forked CPython, if you forked FastAPI, you know, whatever project it is you forked, all of those things are under pretty active development.
And very quickly, your fork will get out of sync with what's called the upstream, the thing that it was forked from.
And GitHub recently added this ability, which we talked about.
To go to a repo and press a button, it says your fork is behind.
Would you like to catch it up?
And you can click a button and boom, it'll catch it up.
So, well, that's neat.
But wouldn't it be nicer if you didn't have to do that, if it just did that on its own?
Like sometimes you fork something and you're actively making a bunch of changes to it.
And there might be merge conflicts and all sorts of stuff.
But a lot of times, I would bet the majority of the time, people say, that's neat.
I want to save that for myself just so I'm sure I've got it and I can do whatever I want no matter what happens to it, right?
Maybe we depend on Flask.
And who knows what could happen with Flask?
Probably nothing.
But let's just fork it just in case, right?
And you just want that to stay in sync.
So here is an article or walkthrough by Yash Walia.
It says, three easy steps to auto-sync your forked repo with the upstream, the origin thing that it came from.
Now, of course, you could go to a command line and run a bunch of steps to do this.
But what this does is it uses GitHub Actions.
So you come down here and you can go to GitHub Actions.
And basically, when you're choosing a GitHub Action, there's like this marketplace or this catalog of pre-built actions that you can choose from as templates or whatever.
And then it opens up a text file that you basically type in the bits that you need changed.
So you go to the GitHub Actions and there's one called Fork Sync with Upstream Action from the Actions Marketplace.
And you can see it says on the schedule once every day at 7 a.m.
What we're going to do is we're going to run on Ubuntu, I'm guessing Docker image.
It's going to check out your project.
And then it's going to pull the upstream changes.
It's going to add the upstream origin.
It's going to line up the branches, do the checkout, and then just merge that in and push it back.
So pretty straightforward to do.
I ran this on some projects and, you know, one of the recent changes at GitHub and Moves is to get away from like master branch terminology.
And now it's all called main.
But I had some that when I forked it previously and it was master and it became main.
I had some challenges trying to like I think I just chose poor examples to try to work from.
So I didn't quite get this working perfectly.
But people with more GitHub Action experience than I have, I'm sure they can make it work.
So this seems like a really cool way to just say, yes, I want to fork something.
And please just stay up to date.
This is definitely neat for something where you're actively working on it a lot.
I think if you're just trying to train something out and forking it for a little like play yard thing, I definitely wouldn't turn this on.
But like with a team where you're all working on the same code, you definitely want something like this.
Oh, I hadn't really thought about it from the team perspective.
Right. Because a lot of the Git flow with teams thing is fork it, make changes and do a PR.
I mean, also, sometimes people just create feature branches and do a PR within the repo.
But if your mode is to create your own PR, your own repo and then do the PRs back to the main repo.
Yeah.
I can see that this being really helpful.
Yeah. We use a method in GitLab where it's on the we have to the main repo has to has to know where all the forks are.
But it does a push every time there's an update to protected branches.
I see. That's cool.
I was thinking about using something like this for some of the projects that I do where there are folks that will take data sets and they're just stored as CSV files and they're sitting in repos.
And I'm like, well, if I have access to this data and I want to do some project with Elon or another tool that I use, then I have to then go and just manually download their CSV file and update it every time I'm about to present on that data set.
Whereas if I just say, hey, I can fork their code and then build my project off of their repo and then set this up so that anytime they update that one area, it's it's just always up to date for me.
I don't have to think about it.
I don't have to go in and go, oh, hey, was there an update?
It's just like constantly running in the background.
And I know you mentioned, Mike, at the beginning, like GitHub is working to make a lot of this easier.
I mean, I feel like kind of their mission now that they control like 90 percent of the Git surface out there on the Internet is to just make lives easier for the people that are using their products.
So I think that, you know, stuff like this, stuff like having just a simple notification that says, hey, this, you know, your upstream branches, you know, ahead of you.
Click here and we'll we'll get everything merged in.
And the less GitHub commands I have to try to put in to remember that I am going to mess up 100 percent of the time, the better.
Yeah, it's so close to having this built in, right?
You've got the button that says right now, sync this.
If it just had a checkbox or something and just keep doing that, if you when you see these changes, you know, like basically install this automatically for me.
That'd be fantastic.
Maybe when you fork it, right?
I want to fork it and I want it to stay up to date.
I guess probably the hesitation is certain things.
It requires certain behaviors.
For example, you shouldn't be making direct changes to the branch that you're syncing with because you might end up with merge conflicts.
You have to work on a separate branch.
And I don't know, it probably gets complicated, but I would love to see this more automatic.
Yeah, it's cool.
I'm trying to remember what the next topic was.
My memory is not that good.
What do you you know, don't you?
Yeah.
Memory usage.
So you actually have a talk about this, don't you, about memory?
I do.
I've spoken about it before, for sure.
Yeah.
But so this is a cool article by Itamar.
I think his name is Itamar.
Is that right?
Yeah.
Anyway, it's a nice, easy to follow discussion.
But there's a cool example he goes through where it's just, it's kind of a neat one liner to allocate three gigs of memory.
I didn't, you know, it's kind of a neat thing with NumPy.
I'm just allocating a byte array or three, like a 1024 by 1024 by 1024 by three matrix.
So some clever math there.
You get three gigs.
But it actually works.
And then he goes through and uses psutil to read the memory and figure out how much is there.
So I had to, I actually, I paused at this point when I was reading the article to go and find out what all this stuff does.
So it's the, when allocating the, like a ones array, you can, NumPy has a way to just pre-allocate a bunch of ones, which is neat.
And you give it a shape of what, what the vector shape is that you, you want it in.
But then also this process stuff, I, it said RSS and I'm used to RSS being really simple syndication.
So no, RSS is, what is it?
Resident set size, which is essentially translates to the, to the resident memory, which is essentially how much RAM you're using.
So anyway, how much RAM are you using?
And, and we're using three gigs, a little bit more.
And then, and then he does something that I, I was like surprised by, goes out and just opens a couple of browsers and windows.
And then it goes back and checks again.
And suddenly it's down.
It's like way down.
And I tried this and I can get it to go really far down.
And that's because your computer is, is managing memory and taking some stuff out of RAM and putting it on disk and saving it till later.
So there's, this is kind of a, it's using the memory, but it's not currently actively loaded as, as RAM.
Yeah.
Gotcha.
Uh-huh.
Okay.
So, goes through, he, basically, this is a little bit of a tutorial on how memory works with your computer and what the difference between allocated memory is and peak allocated memory and resident memory.
And the allocated and peak allocated is like the max that's allocated at the time.
And, it's kind of too much to go into in this conversation, but, it's a really interesting discussion.
And he also talks about how to measure these using what the PSU till for one.
And then also, for the peak allocated memory, he used a profiler called fill.
Um, so it was, I thought I learned a lot in just a few minutes reading this.
So.
Yeah.
Very nice.
Yeah.
NMR is doing all sorts of cool stuff, stuff with, memory analysis and profilers and whatnot.
Um, there's a surprise in here of if, if you fill it with ones, you actually get three gigs.
But if you do the same thing with zeros, you get like nothing.
So, Python and NumPy figure, it's just zeros.
We'll just, we'll just remember that there are zeros and until you actually do something with it, we won't allocate it.
Oh, it's like a lazy allocation or something.
Yeah.
Interesting.
Yeah.
So what I was going to say is another thing that's tricky is like, this is using psutil.process.memory to analyze it.
It's just what, how much memory is the process using, which is not always the right way to think about how much memory you're sort of demanding.
Because the allocation in Python, you know, you allocate in blocks, big blocks of memory, and then the blocks are managed in pools.
And then the pools are managed in arenas.
And there's a lot of pre-allocation and then reuse, but you end up with like over-allocation and then eventually filling those up with things.
And so it gets pretty interesting about actually understanding precisely how much memory and what's using it.
It's not quite as straightforward as just how much process memory is being used.
But that's still a decent proxy, right?
I just want to know how I can subscribe to that RSS feed.
I know.
I had the same thought when I saw it.
Well.
All right.
Jay, you got the next one.
What do we got here?
All right.
So this originally came from a video that I saw trying to solve a problem that I had.
And I had to do some deep searching to figure out whether or not we talked about it before, if y'all talked about it before.
But we all know f-strings now.
We love f-strings.
f-strings are awesome.
f-strings can do a lot.
Sometimes folks don't realize how much f-strings can do.
Like, for instance, did you know if you put an equal sign after a value, it will actually give you the variable that you've provided, equals, and then whatever the value is, which I think is awesome when it comes to logging and figuring out other information.
But one thing I did not know is that you could use f-strings to format date time objects just right in the F string.
So you don't have to do, you know, like, date time dot string F time or, you know, string F format or all that stuff.
You can just do F string, the date time variable, and then the F string format code that you would use to format it normally.
And that's over here in this, you know, if I just scroll down, you can see here where, in this example, they use just date time, date time now, and then now colon the format.
And I saw that and my mind was blown because that means I now have to go back through a bunch of code and remove all of the string format, like parsing and just throw it directly into the date time field.
I'm kidding.
I'll also just throw out there sometimes you want to have that stuff separated so that it can be used elsewhere and you don't have to constantly rewrite it.
But we now have another way to format our date times.
But sadly, it still probably sucks with dealing with time zones because date times are hard.
They are hard.
I think it's totally non-obvious that you can have variable colon some format string and an F string.
But it's really nice.
The one that I use the most is colon comma for digit grouping.
I'm like, here's, you know, two million such and such.
And I wanted to do two comma, you know, three digits, comma, three digits.
I knew that you could do something like that.
I didn't know that that was how you did it.
So thank you for adding that to my list of things you can do with f-strings.
Yeah.
And I know one that you've spoken about, Brian, is to do like the variable equals, which Jay alluded to, where it prints out the name of the variable equals the value of the variable.
Do you use that often?
I use it all the time because I'm a kind of a printf debugger kind of person.
Yeah.
Let's see some comments from the live stream.
Magnus.
Hey, Magnus.
F string is cool.
I find selecting between repr and string and F string is really useful.
It's very neat.
Dean.
Hey, Dean.
How can I keep from, keep the formatting as a variable?
That's a good question.
Why don't you just assign it as a variable?
Can you use it in the F string?
Probably.
Maybe you've got to call stir of the variable.
I don't know.
Oh, man.
Well, that's where you start getting the bang art, like the exclamation point R to like just force it to do a repr on whatever you provided.
Again, not saying that you should do it that way, but I mean, probably could.
Yeah.
Definitely.
And Sam out there in live streams says, how have I never heard of these?
Yes, I know.
It's amazing.
Amazing.
All right.
I want to throw in a quick thing I want to add to that really quick.
f-strings.
If you find yourself with a bunch of code that has been around for years, pre three, six, and you're like, ah, it's got who knows how many variations of formatting strings in it.
And you just want them all to be f-strings.
You can use Flint, F L Y N T.
Run that against the top level of your directory.
Boom.
Everything's f-strings.
It looks great.
I did this on like a 20,000 lines of Python code project.
It had one error.
I submitted it to them.
They fixed it.
And yeah, it was really neat.
That's cool.
Cool.
Indeed.
All right.
What's the next one here?
I guess I got the next one.
Don't I, Brian?
Yeah.
Cool.
Well, this one, I went back a little bit back and forth on whether or not I actually wanted to feature this because it's a little bit recursive, I guess.
So I did a talk for Manning.
They had a developer productivity conference talk or a conference.
Jay, were you part of that?
I was not part.
I am hearing about this for the first time.
I feel like you should have been part of this.
I know.
How did you not get in here with your podcast and all?
So the conference was interesting.
There were some really neat talks.
There were some other talks that I'm not really sure abided by the theme of the conference.
They were just like, well, here's a random tech talk.
I was like, oh, okay.
Well, but that's not productivity.
Anyway, I tried to abide by the theme.
So I came up with a talk called 10 tips and tools you can adopt in 15 minutes or less to level up your developer productivity.
So really what I want to do is just give a quick shout out to like the 10 tips and people can go if they're really interested.
So they can seek around the video and go find that or email me and I'll send you the slides.
So one of them is to use a proper shell.
Like I find every now and then I run into people and they're just running, you know, the whatever comes out of terminal in macOS or they're just using cmd.exe on Windows.
And it's like, how can you go day to day?
Like there's so much possibility there, right?
So, you know, consider things like OhMyZShell or OhMyPosh.
I just installed OhMyPosh on the Windows terminal with the new PowerShell on Windows.
And that thing is so much nicer than what you had before.
That's cool.
So get a proper terminal with some of those options.
Use, if you're doing anything on the web, use secure.py, which just adds all the OWASP secure headers that you're supposed to do.
Like don't allow your site to be embedded in an iframe and cross-site scripting and stuff.
Automatically it supports like 10 different Python web frameworks.
And if you're on some other technology, there's things like inWebSec, which does the same thing for ASP.NET, or I'm sure you can Google another one.
Tip number three, pick a nice GUI for your Git work.
Sometimes it's fine to do stuff on the command shell or on the CLI, but it's really nice to have visual views of like branching and whatnot.
So think of like source tree or even PyCharm and VS Code.
Sync your GitHub forks.
Just talking about that.
So keeping that going.
Use a proper log framework like Loguru or even Sentry.
Use Let's Encrypt.
Number seven, you can go and just get your site map and request every URL at that destination.
And your site map.
And that's a way to just like make sure your site's not going to die.
So you could put that as an integration test.
Use PageSpeed Insights to make sure your SEO is good and your site's responding well.
Use Homebrew or Chocolaty on Windows.
And then the very last one is set up Dependabot or even some of the stuff that we talked about, Brian.
Start using pip compile with a .in file.
And you can tell it to upgrade the requirements whenever you run some CLI command.
And it'll regenerate your requirements.txt based on all the dependencies.
And it gives you a really nice organization like this subdependency is here because of these three things you've installed in your main requirements.in and so on.
Yeah.
There's 10 quick tips that people can go play with and they can check out that short video if they're interested.
I mean, I know 11 quick tips wouldn't have been, you know, an amazing brand.
But I feel like virtual environments, like not brought up at all.
That was.
Yeah, that's true.
That's a good point.
Yeah, I mean, you should have been in the conference, I'm pretty sure.
Oh, man.
Yeah.
Only had I known about it.
Do some people not use virtual environments?
Dean also has an 11.
They're maybe 12 now.
Close that Facebook tab.
Yeah.
I'm surprised at how many people don't use virtual environments still.
Or even I don't want to say something like using like Pipim or Poetry or anything like that.
Mostly just because I don't have a lot of experience with them.
But what is it?
Virtual environment wrapper or even Pyenv.
Yeah.
Just really great tools to make sure that everyone's operating on the same Python version.
And that, you know, if you need to run Python 3.5 on one thing because, you know, your code isn't set up for it yet.
And then you want to run 3.9 on something else.
Having tools like that, that once you learn them, they're so phenomenal and just so easy to use.
Yeah.
I wonder if the overlap of the people that have a Facebook tab up are the same people that don't use virtual environments.
Probably.
Notifications as well.
Turn off notifications.
Like, don't let Outlook or other things like that, like send you, like, don't let your email send you messages.
They're like pot toast, right?
Turn on do not disturb.
Yeah.
Oh, before we move on, Dean mentions in the chat for the F-string thing, you can put, you can put layers of curly braces in there.
What? Like F-string within F-string?
No way.
Yeah.
I feel like we're reaching a dangerous point.
No, that's awesome.
That's so cool.
Love it.
So for people who are listening, I'm not seeing this.
Yeah, yeah.
So for people listening, you would normally have an F-string, you say F, quote, you know, curly bracket variable, close curly.
And with the format as a colon, so Dean is saying that if you put as the format string curly variable that contains the format curly,
so like curlies within curlies, that'll do it.
That's awesome.
Thanks.
I had no idea and I have no idea how you found that out, but that's good.
Yo, dog, I heard you like curly braces.
I love them.
Very cool.
All right.
Let's see.
Oh, I'm next.
Cool.
I want to cover a cool article from Vitor called How to Start a Production Ready Django Project.
And this is sort of just a fun project article because it's focused on Django, definitely.
But I think this is a lot of this advice is just a good idea for any web app or I guess it's mostly web app stuff.
But anyway, it's worth a look even if you're using some other framework.
He starts out just said at the beginning when you get started project, just start it out right.
So one of the things that I thought was neat was making sure that you set up a local environment, a test environment, and a production environment.
And the easiest and most important is the local environment so that new developers can get up really quickly and just start, clone, and go.
And I think that's really important to make sure that that's working well and easy.
And then almost as important, and I would say maybe more important, but is a test environment.
So if you're swapping out like a different database or something for your test, making sure that that's configured and set up so that the developers, when they're contributing, can easily run the tests before they submit code to you.
So that's really important.
And then the production environment and the setup for that, that is an interesting argument that that can be more complicated.
That can be a different thing because most of the people involved in the project aren't really going to run that.
It's just a handful of experienced developers.
I think that's cool.
So after setting up the environment sort of stuff, it covers making sure that you have Git or some other version control set up and use virtual environments.
There you go, Jay.
Make sure that you're doing virtual environments.
But then there's a section on requirements.txt files that I think is amazing.
Maybe everybody knew this already, but it hadn't occurred to me, is to have a directory instead of just a file and have several of them.
And the example has a base one, a test one, a local one, and a production one, and they can include each other.
So all of them include the base.
And local also includes text.
So whatever environment is, you can just install one of these, and it's the right one.
And all the project stuff is all in the base.
So everybody uses that.
It's a pretty cool idea.
I've never done that.
Have you done that?
Either of you used that sort of a model before?
Yeah.
No.
I'm terrible.
I just put everything in environment variables, and then I never have to change my code.
I just have to change my environment variables depending on what area of system I'm in.
Yeah.
So that discussion was around the requirements, but there's also a similar discussion around the settings.
So the settings set up to make sure that you've got where the database is, where your server is, and all that stuff, and have those set up for and switched for local test and production.
And just getting all of that stuff set up ahead of time right at the beginning of the project.
And included a couple of things I was surprised to see was making sure that you've got a consistent set of linting and styling tools like Black or Flake 8 or iSort.
And then also editor configurations.
It might make the whole team more productive if you just go ahead and store your editor configurations in the project.
I never considered doing that.
Yeah, one thing that's really cool is for PyCharm.
I don't know how VS Code works.
There's maybe something for it as well.
But in PyCharm, you can go and customize the code cleanup and formatting and rules of what it inspects and how it'll fix them.
And then instead of saying, save that in my user profile, you can say, save this in the PyCharm project.
So if other people on the team open it up, it won't show squigglies if your convention is different than Pep 8 or if you format it, it won't jump around and stuff.
That's cool.
And then, of course, there's some Django-specific stuff like application structure and stuff.
But I think, like I said, even if you're not using Django, this is a good set of things to look through.
Yeah.
Yeah, cool.
I guess I do the thing with the requirements, have like a dev version that's based on the production version and whatnot.
But with settings, I hadn't really thought about that.
That's cool.
Indeed.
Indeed, indeed.
Let's see.
Jay, you got the next one?
I do.
And just as I always try to bring some type of productivity app, tip or trick, this time it's a Mac app.
Sorry, folks in Windows land.
It's Mac only.
But I'm sure you could do something similar with like AutoHotKey or one of the similar tools.
But I'm talking about a program that a friend of mine, Brett Turfstrom, made called Bunch.
It is interesting in how simple yet complex it can get.
So those that don't know, I work on, I help Mike out from time to time, more specifically with the Talk Python newsletter.
And this is literally the Bunch that I run every time I start working on the newsletter.
So the thing about Bunch that's really cool is one, it uses FrontMatter to set up a bunch of different settings within the program.
So that's what you see at the top.
But now here's the title of the thing.
I want it to run sequentially, not parallel.
Well, and then if I want to open an app, I just type the name of the app.
If I want to open Windows within that app, I just add a dash and provide the URLs or the file names for those files.
If I want to run.
So you've got like Safari and then it has three nested things that are URLs.
So what it does is it opens Safari and then launches those three tabs.
Yep.
Perfect.
And I actually don't even have to tell it to run Safari.
I just kind of do here so people reading it can make sense of it.
If I just put three URLs on there, it would just open up whatever the default browser is and then open those files.
But by putting Safari in front, I tell it specifically open these in Safari.
So if you work with Chrome or if you want to do something like testing on multiple browsers, you could put, you know, each browser and then dash whatever the URL is for that.
But the thing I like about this is it also supports things like X callback URLs, which are kind of a URL structure for running commands in applications that support it.
You can add system commands and commands to bunch itself like throwing a pause in.
If I wanted to actually go in and type like at the end, whenever I finish the newsletter, I open up messages.
I hit command F, which is that at sign and F pause for a second because sometimes my Mac is slow.
And then I type in Michael Kennedy and hit enter.
And you can even do some conditional stuff.
Like I have an Apple script that just checks the date.
If it's in the date range that I need to to make sure that I send bills off properly, then it also will open up, you know, Stripe and let me do my processing thing.
But it supports shell scripts, which means it supports Python.
I actually do have a couple that I'm running.
Well, I haven't ran in a while, but it just opens up and it kind of does similar to what we were talking about in the first topic of like just going in and making sure that projects are up to date because I will forget the commands or I will mess them up.
And it's easier if I can just follow along with what it's doing.
And there's a lot of different tools here.
I don't have enough time to talk about all the things it can do.
One of Michael's tips that he left off setting do not disturb.
I could do that by just typing in parentheses D&D like that.
And it'll set do not disturb whenever this runs.
And you said something like this as a part of your Z, your profile shell setup.
So when you log in, it like kicks off one of these to sort of configure your environment the way you like it.
So that's for example, I like want to log in and I want the first hour to have no notification.
So I can just focus when I got energy in the morning and then like turn off D&D later or something like that.
So that's the cool thing with front matter is like you could just say start on.
And if, you know, if I start my day at 7 a.m., I just put start on 7 a.m.
And, you know, I would just create a second bunch that says, you know, start on whatever I wanted to end.
And then it would turn it off like D&D off.
I think you can actually even do like a close on.
So I could even say like close on like 8 a.m.
Like that.
And I don't know about that last one.
I have to test that.
But there's start at.
So you can have it run on certain days of the week.
There is not a way natively to have it run on a certain day of the month.
It doesn't have cron support.
But there is a workaround that I've highlighted in another video, which speaking of, I talk about this on my YouTube channel, which is YouTube.com slash KJ Miller.
My handle on everything that I do.
That's cool.
You got a nice YouTube video that walks through this, right?
People can check that out.
Yeah.
And I break down everything that's happening in this particular bunch.
Like even the Apple script, which is actually JavaScript, but it's fine.
I would have expected D&D to like send out Dungeons and Dragons invites to random people.
Well, funny enough, if you had a bunch called D&D, you could just do D&D.bunch like that and it would just run it.
So that is doable.
We can make that happen.
Yeah.
All right.
Everybody gets a Mountain Dew, order a pizza, show up.
How's this going to go?
Exactly.
By the way, Bunch is free.
If you go to bunchapp.co, you can just install it and run it for free.
Again, the developer, it's a solo developer, Brett Terpstra.
He makes other mad science on the internet.
And I believe he works for Oracle now just recently.
So yeah.
And then if you're an Alfred user, which I can't really, I don't have a good way of showing you what Alfred is.
But if you know, you know.
I am the maintainer.
It's probably the command space for Mac or the PowerShell, like little pop-up search in Windows.
Yeah.
But like as a dedicated app that does more, right?
Exactly.
And I am the maintainer of the Bunch workflow, like the official unofficial Bunch workflow for Alfred.
So if you ever need help with that, you know who to yell at.
That'd be me.
Fantastic.
Oh, that's a cool one.
A nice find there.
Cool.
All right, Brian.
Is that it for us?
Our main items?
It's up.
That's up for our main items.
Do we have anything extra?
I was thinking no, and then actually yes.
So I just ran across this.
We talked about GitHub Copilot.
In fact, that was the title of last week.
Yeah.
It was like GitHub, your pilot speaking or something like that.
And how both mind-blowing and like good and possibly kind of crazy, not necessarily good ways that the Copilot was.
And it was pretty interesting, right?
Yeah.
So there's an article over on The Verge, and I had pointed out, like, what is the license?
What is the transitive license here?
What's the, if you have a GPL license and then you filter it through ML, is the transitive property applied to the GPL, basically was my question, right?
And so there's an article over on The Verge that says, GitHub's automatic coding tool, aka GitHub Copilot, rests on untested legal ground.
So there's one section in here that says, despite GitHub's assertion, there's no direct legal precedent in the United States that upholds publicly available training data as fair use.
So anyway, if people are interested in this, they can check it out.
I think there's also a caveat there, too, of what GitHub is doing is on untested ground, and your usage of what GitHub is doing is also on untested ground.
Not saying that you can or can't use this, but just know that even if GitHub, you know, wins a lawsuit saying that they're good, you may not want to be the person to have to test the lawsuit of whether or not you're going to be good.
So, and again, I'm not a lawyer, so I don't even pretend to be one.
Yeah.
I think it's a cool project, though.
Yeah.
It is quite cool.
It's quite cool.
All right.
Dean, I always appreciate the help in the comments.
So time for some extra, extra, extra, extra, extra.
This time, actually, no, I almost had no extras at all.
I was feeling bad.
But just the one.
Yeah.
Okay.
So I wanted to share something exciting.
So.
Also, one more thing.
I don't know if I clicked this or you clicked it.
But Magnus says, I also saw that Copilot spouted API keys.
So we've heard of Shugit and other Don't Put Secrets in here.
But here's yet another interesting way.
You want to connect to AWS?
Here.
Here's the API key.
That's awesome.
Go ahead and try it.
Why not?
You don't know who's paying for that.
It's free.
It's free for you.
Yeah.
So I'm continuing to work on the pytest book.
I just got the configuration chapter turned in.
It's not available in the beta yet.
But it will be within the next few days.
So configuration stuff.
It's all fun.
And then I'm excited to get working.
The next chapters, I'm going to start working on our talks and CI.
And the search path and debugging.
And those will be fun chapters.
So I just wanted to share where I'm at there.
Awesome.
You're almost there.
Yeah.
And then I had an extra too.
But it's so silly.
But it's just fun.
I have to stop sharing that.
And I have to share another window now.
Thanks.
Thanks, Streamy.
Thanks for that.
But I found a new tool to play with.
It's called Monodraw.
Which is a very, very interesting tool.
I don't know what most people would use it for.
But I've been using it as an outline and planning tool.
And I'm going to show you what I do with it.
I'm going to add a text here.
And it's going to say, I Python Bytes Crew.
And I'm going to hit Done.
So for people listening, this is like kind of drawing on graph paper.
Yeah.
Okay.
So what happens if I expand this out and I tell it I want it to be a banner?
Oh, that's pretty fun.
That was fun to be digital.
It turned it into like ASCII art and stuff.
Yeah.
So this is a way to actually build like ASCII art outlines.
And they have a bunch of different versions.
And I mean, I've used this on a couple of projects.
I'm trying to see if I have one that I can load up real quick for like a video that I've made.
And when I say it doesn't make sense why this works for my brain, like it truly doesn't.
But when it comes to, oh, did it, did it not move it to the, it didn't move it to the right window.
Hold on.
Thanks again, StreamYard.
Okay.
I want to use this for my next status report and just do the entire status report in ASCII art.
Yes.
So funny you mentioned that.
Put it as a comment and check it in.
Funny you mentioned that because when I do my video planning, I do it in this format.
And it's great because you can, you know, you can move stuff around, you can draw arrows, you can highlight different sections and, you know, know how everything is going to look there.
And when I, when I say like, I was able to, in a normal time, it would take for me to do a video.
I like cut that time in half by just drawing an outline out, using the different ASCII art to, to make things work.
I'm going to, I'm going to build like presentations with this.
I don't know.
I'm going to like give a conference talk using ASCII art one day.
Cool.
You could write a book like this.
You can copy and paste, but you can also export it as a PDF.
Let me see what options they have here.
You can export as PDF, scalable vector graphics, or, I'm sorry, ping, text, or SVG.
Those three.
For some reason, I thought there was a PDF version in there, but there is not.
Cool.
Sean out there was asking if you could export the art.
And hey, Sean, co-host of the Teaching Python podcast.
And I guess the thing is, it is $5.
And I have a link in the show notes for it as well.
But really fun tool.
I haven't figured out all of my use cases for it, but I know that creating outlines and stuff
has definitely been a very interesting and effective way of using it.
And it's called Monodraw.
And again, it's a Mac-only app.
I'm sorry, Windows folks.
But I'm sure that there's something out there.
And if not, build it.
Yeah.
Or get one of those weird macOS in the cloud as a service.
That's true.
That one was Mac-only to my knowledge.
Yeah.
All right.
I'm on a joke.
Yeah.
I think it's time for a joke.
Okay.
So imagine that we're here meeting for a startup and we're trying to figure out, we're going
to create some new API here and we're having a bit of trouble.
So let's see.
So this is like a little bit of a comic strip.
And I guess, Jay, you want to be the person at the computer?
I'll be the bearded dude.
And Brian, you can be the guy with the glasses.
Other guy with glasses.
All right.
Dude, they're trying to think of what to name this API, right?
Or this thing.
So data?
Nah, too generic.
How about data DB?
Unclear.
Well, let's say list completed.
Already used that.
Array list data completed then?
Nah.
We must choose now or the client might cancel the project.
Well, how about array list completed from form without duplicate?
Nah, it's too long.
And then the next panel has like a newspaper clipping that says unable to name variable,
they go bust.
Yeah, exactly.
Go out of business.
They couldn't choose naming.
That is one of the hard problems of computer science, right?
Is naming.
Yeah.
Yeah, definitely.
I didn't see completed form or completed form without duplicates.
Like that's what I see.
It's almost like the array list, which I mean, if you're making good, good, like readable
code, you would know that it's an array list.
So I would say, yeah.
You don't need this like type name.
Do completed form without duplicate.
Yeah.
Well, you would have saved them.
They'd still be in business.
Or unique.
Unique.
Like completed unique.
Just everybody.
Just use foo, bar, and baz, and then nobody will complain.
So do you remember those like those Microsoft-isms where they would like prefix types, variables
with their type names?
The Hungarian notation like SZ for string.
What the heck was the Z there for?
Size.
SZ for size.
Size.
That's right.
Yeah.
Oh my gosh.
That was dreadful.
Terrible.
Yeah.
With like three characters left over for the actual variable name.
Anyway.
Cool.
Well, this was fun.
Thanks, Jay, for showing up today.
And thanks, Michael, as always.
Yeah.
You bet.
Bye, you guys.
Thanks so much for listening.