Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
This is episode 323, recorded Valentine's Day, February 14th, 2023.
And I am Brian Okken.
I'm Michael Kennedy.
Hi, I'm Pamela Fox.
So thanks, Pamela, for joining us today.
So for people that don't know who you are, can you introduce yourself?
Yeah, I'm Pamela, and I currently work at Microsoft, where I am a cloud advocate in Python,
which means that I figure out how to get stuff working on Azure while using Python
and make sure that our code samples are nice and Pythonic and that we're doing things the Python way
and just trying to streamline the experience.
And yeah, that's really fun because it just means I get to write Python all day.
And actually, it just means I deploy all day.
I'm pretty much always doing something, which I guess is appropriate.
I once had an ex-boyfriend who named our Wi-Fi network, Don't Stop Deploying.
And the password was, I like to ship it.
And I guess it's because I deployed so much back then.
So I guess I've always been a deployer.
So it works.
But yeah, that's what I do now.
Before this, I was at UC Berkeley teaching Python.
And then before that was at Khan Academy and Coursera and all sorts of places,
programming in Python and JavaScript.
Ooh, neat.
That sounds like such a fun job.
I've always thought the developer advocate would be really cool because you get to do all the cool coding tech stuff.
You don't have to run so much production software.
So you're not on pager duty.
And you get to travel and talk to a lot of people.
Like, what else could you want, you know?
Yeah.
I think for you two, it probably would be a really good job too.
It's always just a really nice combination of programming and using the other parts of your brain too.
Yeah.
Excellent.
Well, we're happy to have you on the show.
So thanks for being here.
And unrelated to Pamela being here and working for Microsoft, this episode is also brought to you by Microsoft for Startups.
But we'll talk more about that later.
Brian, should we kick it off?
Yeah.
While we all love to be in this tech space and we're all big fans and that's why we're here.
Sometimes you just want to get away, right?
And especially in the American West, there's a lot of places that you could get away to.
The camping sites around here are magnificent.
There's one that I really like that has free roaming peacocks that just cruise through your camp while you're camping.
It's really nuts.
And eagles flying around.
However, that and all the other places are super hard to find for this exact same reason.
Okay.
So one of our listeners, oh gosh, I don't see his name here, but Justin is the name here.
Justin Flannery from Denver, also a place with great camping, put together this cool CLI, this terminal app called Camply.
So Camply is the campsite finder.
It's a tool to find campgrounds and campsites that are typically sold out through recreation.gov and Yellowstone and other sites.
Okay.
So, you know, it's all Python.
So the idea is basically you, it talks to all these different APIs.
You can either run it in Docker or just run it in Python, I believe.
PipX install Camply, which I love it.
PipX is exactly how CLI tools that are not part of your programming story should be installed coming from Python.
And so you would say like Camply, recreation areas, dash, you could do a search like dash, dash search, Glacier National Park.
Or have you ever wanted to stay in a fire lookout tower in California?
How cool would that be?
That'd be pretty neat.
Depends if there's a fire or not.
Yes, exactly.
Well, if there's no fire.
So maybe, maybe not September.
I don't know.
Yeah, you got a glacier and a fire.
So maybe you just use this to counter each other.
Have you ever wanted to go down a really long ladder to use the restroom?
Oh, you're so practical, Brian.
So practical.
Anyway, these things are not super easy to find potentially.
So you can say, I'm looking for campsites in some area, start date, end date, and search forever.
And it'll just sit there and just wait and hang out.
So it'll search at recreation.gov, Yellowstone, going to camp, Reserve California, some other places.
And yeah, it'll just sit there and pull that data for you.
And I think it's just a really cool app.
It's a cool use of Python.
And people, if they're interested in going camping.
The bit about this that I like is it has configurable notifications for if it finds something.
So if you're looking for a particular campground and you just got it running in the background,
you can have it hooked up to give you a Slack notification or an email or even a text message through Twilio.
And that's pretty darn cool to be able to just have it, you know, text you when you find something.
Yeah.
Just kick it off.
Let it run.
Let it keep watching.
Is it a cron job?
How does the search forever work?
I think you leave it.
I don't know for sure, but I think you just leave your terminal running.
It must have a sleep or something.
I don't know.
Yeah.
Yeah, yeah.
You would hope.
Otherwise, it's going to get banned pretty soon.
But no, I would think it just pulls every so often.
I think it's doing, I think there's some APIs in here.
If you look through, it talks about where the data is coming from.
You know, there's a recreational information database from recreation.gov.
And, you know, it's pulling some of that data.
And yeah, I do think it's really cool that it also does those different notifications.
I've just learned about push bullet and push over and realized I should probably figure out
what those are.
Those sound cool.
I know what Twilio is.
And one of the things I like about this is this could be like a SaaS app or something like
that.
Yes.
But I'm glad that somebody, but you don't have to.
If you have like a cool need that works for you and you think somebody else might have a
need for a similar thing.
So build something like this and share it.
You don't necessarily have to make money off the back of it.
There's a lot of, it's one of the things I've trained to be pushing more is software developers
have these skills that we can build things like this.
But a lot of people don't.
And being able to build things and share things is one of the great pleasures of doing what
we do.
So kudos to Justin.
Absolutely.
Yeah.
Well done, Justin.
Thanks for sending that in.
And one of our listeners, Kim, also been on the show before, points out that, you know,
he's from South Africa.
You should try camping in some places in South Africa.
Free roaming rhinos and elephants are slightly more concerning than peacocks.
Yeah.
I'm impressed with people that live in places that have, you know, free roaming rhinos
or pretty much all of Australia.
All of it.
Yeah.
Very impressed.
It's a lovely place, but I'm always a little nervous to be like out of the city there.
Anyway.
All of nature wants to kill you in Australia.
Exactly.
And it's good at it.
All right.
Off to you, Brian.
Okay.
Wow.
I'm not sharing anything yet.
So just one moment.
Share screen.
Sorry.
All of the people were listening and waiting for this.
Okay.
We've got fancy readmes.
So everybody loves you.
Hinnick points out that your fancy project needs a fancy PyPI readme.
Of course it does.
It's very nice.
There's lots of stuff.
So what sort of fancy stuff would you like?
So one example is the black readme.
So black is one of the ones that uses the same project that we're going to talk about.
But so what's fancy about it?
It's just got the normal standard readme stuff.
But one of the stuff that has things at the bottom is it's got a changelog listed here and
the authors and some other stuff, the highlights from different versions.
How do you do that within a readme without copy and pasting?
So that's where this comes in.
So this is a project called Hatch Fancy PyPI readme.
And Hinnick has used, apparently in the past, setup.py for generating for packaging.
And with that was the ability to do some code while you're running setup.py.
But pyproject.tomal based stuff is different, right?
So if you just have a flit thing and you point it to readme, it'll just point to a static readme.
Or you'd have generators outside of this.
But what this tool does is it has, apparently there's a hook system within Hatch that allowed this functionality.
So there's configuration that you can do things like, and there's configuration on this readme to tell you how to use it and everything.
But the things you'd want to use with it is these little fragments.
So you can add a text fragment, of course.
But, you know, that doesn't really help you much because you already have to write it down in your readme.
But this is actually what this is, is this will be part of your, in conjunction with pyproject.tomal and your readme to work together, which is cool.
So you can define some of the text fragments in your pyproject.tomal and have them show up in your readme.
You can also do files.
You can say, hey, I actually want the author's file in there also.
And the files have a start after and start before and stuff.
So some of the files that you include in there might have some boring stuff that you don't want to include in there, and you can cut that out.
So this is really exciting to be able to, because I've switched like all my project to pyproject.tomal-based projects.
But I do want some neat stuff in my readme.
So I'll start using this as well.
Okay, so you have files.
You also have pattern matching, which is neat with files.
But then down below, substitutions.
Substitutions.
So you've got like search and replace patterns that use regular expression substitutions.
And then I think that's all.
I'm not missing anything.
But some pretty neat things that you can do within your readme.
Yeah, and you've got a CLI interface.
It's lovely.
It's almost like Jinja, Chameleon, some templating language for your readme.
So here's the thing that I am always confused about is, do you, you know, there's the readme and then there's the read the docs, right?
And sometimes when I go to a package, I'm like, which one should I go?
Like, should I start in the readme and then see if there are more read the docs?
Like, so this blurs the line even more.
It's like, should it just all be in the readme?
When do you go to, you know, the external docs?
Well, okay.
So I've struggled with this on a couple of things.
And I've got one that's like on the line.
It's got a ton of functionality.
And so maybe it ought to be a read the docs thing.
But some people have really big readmes.
So which should you go to?
Well, the package.
So are you talking about the package maintainer or the person learning about the package?
Where should they go?
Well, I think you have both those questions, right?
Because one thing is I can't decide where should I link to.
Should I link to the PyPy page or should I link to their read the docs page, right?
It's just what is the canonical documentation?
And right now, I think as both a creator and a user of packages, it's not clear where to go.
Well, as a user, I always try to start at the PyPI page and whatever.
Hopefully there's either a homepage.
It's got like Black has homepage and changelog.
You can include a documentation link too.
So if it's just got a homepage, it's just probably the readme.
But the documentation, I think it's nice if people leave the homepage to go to their GitHub repo and add a documentation link if they've got a read the docs thing.
I think so.
I do like to see a lot of stuff in the readme.
Because if you're already there, you don't have to go track it down.
The time that I would see, Brian, maybe as if there's like a lot, a lot of different scenarios.
Here's this API function and here's a tutorial and here, you know, maybe there's a lot of navigation, I guess.
Maybe it makes sense for a read the docs.
Or if it fits on one file, then maybe make a copy.
I don't know.
And I've got a lot of like tiny little pytest plugins that I'm just not going to do a read the docs documentation tree.
It's just a little tool.
So small tools.
It's easy.
It's the in-between part that it's difficult.
So I don't know.
Yeah, for sure.
All right.
I love our audience.
They all have great things to add here.
Henry Schreiner says, GitHub dependency graphs now support PEP 621 as of yesterday.
So how's that for keeping on top of things?
So perfect time to switch.
If you haven't yet, nice readmes too.
And then Saro says, the docs link should always be at the top of the readme.
So excellent.
Yeah, I like that too.
Yep.
And one more piece of real-time follow-up.
Justin, author of Camply, is in the audience, says, yes.
Wait, no, wrong one.
I got out of sync there.
Thanks for featuring this.
You can leave it running in the background.
That's where the accompanying Docker image is from.
So you could just push it over to a Raspberry Pi and just let it cruise there, which is kind of cool.
So just to figure out, make sure I understand this,
if you close your laptop while a Docker image is running, is it going to keep?
It's probably going to stop.
Okay.
It depends on your sleep.
So that's why you want the Raspberry Pi?
Yeah.
Yeah, something you can just leave on.
Or, you know, something, I guess you could set your laptop to still running if the clamshell
bit is closed.
But generally, it would close.
You could even put it onto one of those little tiny Adafruit things, I would imagine.
I doubt that there's anything that platform-specific.
Probably just requests and stuff.
Or you could have a Mac Mini running.
Yes, you could definitely have a Mac Mini running, like the one I'm using right now.
All right.
Before we move on, let me tell you about our sponsor this week.
So, as I said before, this episode is brought to you by Microsoft for Startups, Founders Hub.
I'm here to tell you all about a fantastic opportunity for startup founders, especially those interested in AI.
With over six figures in benefits, this program is a game changer for startups.
You'll get $150,000 in Azure credits, so you can work with Pam a lot to deploy many, many things, which is the richest credit offering from any cloud provider.
Founders Hub is offering a unique chance to access open AIs, APIs, as well as the new Azure open AI service, so you can easily infuse generative AI capabilities into your applications.
The team at Microsoft will also provide you with one-on-one technical advice to help you with architectural plans, scalability, implementation, best practices, and security.
Plus, you'll have access to the network of mentors plugged into the startup world, which we've talked about a lot.
A huge asset for building your network.
The best part is the program is open to everyone and has no funding requirements.
Whether you're in idea phase or further along, it just takes five minutes to apply and you'll get all these benefits.
So, harness the power of AI in your startup.
Sign up for Microsoft for Startups, Founders Hub.
Today at pythonbytes.fm/foundershub 2022.
Link is in your show notes.
No-brainer opportunity for startup founders, so don't miss out.
And Brian, one more thing.
Just to make the point about how awesome some of these open AI APIs and different things that they're offering here is,
I asked that same AI to write this ad for us.
So, how cool is that?
If you want to do, I don't know if you've played with these things yet, but open AI is really incredible.
And if you want all these credits to be able to work with it, access to AI, different APIs that maybe people don't all have,
sign up at our link in the show notes.
So, thanks to Microsoft for supporting the show.
Nice.
And thanks to open AI for writing a cool ad for us.
Wow.
I still don't have access to open AI and I work for Microsoft.
So, I guess I just need to apply for that program.
Exactly.
I've been waiting.
Where's your startup idea?
Get in the game.
All right.
This next one comes to us from Pamphil.
Well, wait.
Oh, go ahead.
Don't we have one from Pamela?
How did I skip that?
Yes, we absolutely have one from Pamela.
Sorry.
All right.
Sweet.
So, I'm going to talk about something new in PyDyde.
I know PyDyde has been on this show before.
PyDyde is Python for the browser based on WebAssembly, a port of CPython to WebAssembly.
Now, the really cool thing, I've been using PyDyde for various projects for a while.
But the very cool thing that happened recently is that there's now 3.11 support in the latest.
So, in mains, there's 3.11 support.
This was the PR for it.
And so, it's not in stable yet.
It's in latest.
But that means you can actually, you know, try it out in their little REPL here.
I can't pick up 3.11 code off of that.
But you can see it says 3.11.
And what they're working on right now is, let's see, they're working on some benchmarks.
So, they did some benchmarks here to show, you know, there's...
Because 3.11 has a lot of speed up improvements.
So, they did a bunch of benchmark here.
But it looks like they're also interested in other benchmarks as well.
Yeah, it looks like some are getting faster though, which is really cool.
Yeah.
And I also...
So, I did my own benchmark.
I mean, I wrote a function called benchmark.
So, it must be a benchmark, right?
So, one thing that I use PyDyde for is recursionvisualizer.com.
This is something I built when I was teaching Python at Berkeley.
And we taught a lot of recursion in Python, which I know is a weird thing to teach in Python.
But this is academia.
So, we teach recursion in Python.
So, this is a tool that uses PyDyde in order to visualize the cloud graphs.
And so, you know, when you're doing recursive functions, they can take actually a long time.
It's actually going to take a while.
Here we go.
We got it.
That wasn't that bad.
Oh, my gosh.
It's a bit long.
Here we go.
It's amazing.
So, I enabled 3.11 for this yesterday in my local branch and did my own little benchmarking.
And it's like 15% faster, which is actually relevant for recursive functions because some of the recursive functions that you run here can actually take a long time.
All you have to do is increase this parameter a little bit more.
And it really takes a while.
So, it is definitely faster for at least this use case here.
So, that's cool.
It's not yet in the stable.
So, you can see what they're working on here.
It should be in the next release of PyDyde 2.23.
They're working on that.
So, I also tried it out in my other tool that uses PyDyde.
So, this is disthis.com.
So, this is a way to disassemble Python code in the browser because I love the dis module and I want everybody else to love it too.
So, disthis.com.
And the thing that I was able to do with this because of 3.11 is that 3.11 has the specializing adaptive interpreter, which actually replaces certain opcodes with other opcodes when it sees that it's hot code.
So, some code has been run, you know, at least like eight times and it's doing some particular operation that it can optimize.
It actually replaces the bytecode.
So, we can compare this to this and you see that when we have the adaptive interpreter, it's using different opcodes than it used before.
And it's also got this cache here.
So, this is cool that now you can actually see 3.11 and see the difference in how 3.11 can work versus 3.10.
So, yeah, I thought this was really fun.
This is amazing.
And your visualizer for the recursion is really cool.
Yeah.
That's really cool.
So, this one, this disthis and, you know, props for a good naming there.
That's funny.
But, wow, you even get the adaptive interpreter in Pyodide.
Yeah.
So, in order to do this, so I put this together yesterday since I wanted, you know, something cool to show.
So, to do, if you want to have the, if you want to have the latest Pyodide, if you want to try it out, if you're like me and for some reason have a huge number of Pyodide projects.
I'm sure you all are.
You just have to do slash dev, right?
So, instead of a hard version number.
And, of course, you shouldn't do this if you're using Pyodide for something production.
But I don't know who's using Pyodide for something production.
Because, to me, Pyodide is all about a great way for building educational tools in the browser.
I have no desire to replace JavaScript with Python.
I think you should use JavaScript if that's, you know, just trying to make it interactive site.
But for making educational Python tools in the browser, Pyodide is not, it's so good, right?
We don't have to run a sandbox server.
So, if you want to try out 3.11, you just do slash dev instead of a hard version number.
Nice.
Yeah.
This is very exciting stuff.
What are your thoughts on PyScript?
Did you play with that, Annie?
Right.
So, I think PyScript is exactly what I don't want, which is trying to replace JavaScript, right?
As far as I understand, I haven't played with it.
Yeah.
I think it might be.
Although, I think also it may offer some interesting alternatives, right?
Like, for example, if you've got a progressive web app or you've got an Electron.js thing and you want to write Python more locally.
You know, I think some of these are kind of interesting options.
Yeah.
So, for educational tools, for dev tools, but we really need, I mean, we already, even with JavaScript, we're making websites that are not very performant, even with JavaScript.
And when you bring in these Pyodide, Pyodide is huge.
It's a big old bundle.
You shouldn't be like this YOLO downloading Python, downloading Python into your webpage, right?
It's definitely too big for that.
That's for sure.
All right.
Also, I'm super impressed.
A lot of our guests will say, I found this cool thing and it was really neat.
But you're like, oh, I wanted to create this amazing website to demonstrate some stuff of a new feature.
So, well done on Disqus and other things.
That's awesome.
Cool examples.
Yeah.
All right.
Yeah, very cool.
We'll definitely put those links in the show notes for people to go check out.
All right, Brian.
Now, should I go?
Now it's your turn.
I can't believe I almost skipped all this amazing stuff.
All right.
So, going from really fun to slightly less fun, how about we talk about European law?
Is that good?
Sure.
That sounds exciting.
Yeah.
There's this, what is it called?
Let me pull up my notes here.
There's the Cyber Resilience Act, the CRA, which is a proposal to hold, I think the most important part is to hold companies that write and ship software liable for knowingly being really negligent about shipping vulnerable software.
So, for example, you sell a router.
It's like some cheap knockoff router.
You support it with updates maybe once, maybe never.
It has some huge vulnerability that people take over your home network if they run it, you know, RCE, remote code execution, really, really bad.
You just don't bother to fix it because it's not worth it, right?
We don't want to worry about that.
And I think that's the idea of this is to say, companies that do that, no, they can't sell us a device we put in our house or we put software systems that we put into our hospitals.
And just don't care about fixing them from a security perspective, right?
Not from a not working so well perspective.
However, the concern that Pamphil Roy pointed out and sent this over, and that's why I'm talking about it, is there's a concern that that also applies to open source.
So, if I made some open source project, somebody adopted it, there was some vulnerability in it.
Am I now facing, you know, fines and punishment from the European Union because I didn't patch my silly little program?
So, there's this organization called the Open Source Initiative.
And they, let me pull up my little heights here.
It says, this Cyber Resiliency Act is an interesting and important proposal for European law that tries to drive safety and integrity for software.
The proposal includes a requirement for self-certification of suppliers of software to attest that they conform to it for security, privacy, and the lack of CVEs, critical vulnerability events.
However, the European Commission has framed an exception for open source.
But they say, we've been doing this for a long time, drawing on two decades of experience.
We can clearly see the current text will cause extensive problems for open source.
Since the goal is to avoid harming open source software, we really need to make sure that certain wording of this basically gets replaced.
So, the thing I'm linking to is the feedback from the open source initiative around this project submitted by Simon Phillips.
So, people can check it out and see what they think.
But there's a lot of things out there that are well-intentioned that have unintended consequences.
And I'd hate to see open source get squashed because, you know, people are afraid of the security liability of it basically.
Is this related to that lawsuit against the crypto open source authors where they're trying to get lots of money from them, claiming that they should be able to recover their tokens?
Interesting.
It might have been inspired.
I think it's more of a general, kind of like the GDPR, a general law proposed in the EU.
Yeah.
Pretty interesting.
There's a lot of stuff up in the air.
We've got, you know, the GitHub co-pilot lawsuit.
And we've got the stable diffusion lawsuit with Getty.
You've got this kind of stuff.
In the U.S., everyone seems bent on destroying Section 230, which is the protection.
The protection to allow people to post their own stuff.
If you moderate it, it's, we'll see where it goes.
I have no idea what's going to happen with these things, but they're kind of, a lot of stuff's up in the air.
And here's one more bit.
Yeah.
All right.
Brian, over to you.
Okay.
So, that was deep.
I know.
So, I told you we were going from a really fun thing that Pamela did, like, oh, here's some law.
Well, let's go to something really simple.
Single quotes or double quotes on your strings.
What?
So, let's do a quick poll here.
Pamela, you got a preference?
I had to figure this out a couple days ago because I've been trying to make the Azure samples more Pythonic and by running black.
But black changes all the, what does it change?
I don't even know.
I think it's single to double, right?
Single to double.
I'm not totally sure.
It changes all the single to double, but it's such a big change.
I'm like, it's so arbitrary.
It doesn't matter.
So, I undid that change.
Luckily, there's a black option that you can do, which is, like, ignore string normalization.
So, I now run it with that.
Because I don't have, I think the only reason I would tend to do single quotes is that in case I was embedding HTML, I really want double quotes in HTML.
Of course, that means I'm a bad person that's embedding HTML in my Python.
So, shh, shh.
There's other reasons, too.
Well, similar, okay, Michael, do you have a preference?
I think I prefer single quotes because it's one fewer keys to press on the keyboard.
Yeah?
Oh, yeah, you don't have to do shift.
Given that I have, excuse me, that I have RSI issues and I got to be careful of and I have my super cool Microsoft ergonomic keyboard that makes a massive difference.
But I still always am thinking about what can I do to, like, type less, do less with my hands and accomplish the same thing.
But I have an exception.
And it's similar to Pamela's but not exactly the same.
If I'm doing anything where I want to put a quote.
So, if I have to say, it's the second day of the week, then I want to put an apostrophe for the its.
And I don't want to backslash that.
So, I put double quotes for the string so that I don't have to escape the single quote.
But if I was using double quotes in the string, then I would put single quotes.
So, if I'm using one that I'll use inside the string, I'll use the other so I don't have to use escape characters.
So, that's like the argument that Black has for why they chose the double quotes, I think, is because of the apostrophes.
But I'm not really writing a lot of prose within.
If I'm writing a lot of prose, it's a triple quoted string and it doesn't matter.
Usually.
Because I'm doing a block thing.
But, so this article is a single or double quotes in Python.
And this is coming from somebody that came from R and came to Python and similarly wanted to make sure they were doing things Pythonic-like.
And they ran across people using Black and, you know, what to do about that.
So, they looked into it a little bit more.
And, like, you know, what is, what's Pep8 say?
Well, Pep8 doesn't say anything about this.
And I don't think this article goes into it, but the other thing, not just Pep8, but if you try out Python itself, the REPL, if you define a string in the REPL and then, like, X equals hi there, and then say what's the value of X, the REPL uses single quotes.
So, that seems Pythonic to me unless we're saying the REPL is non-Pythonic.
So, the real answer in this article is it's up to you.
But it kind of isn't because people use Black in their projects.
And there's a lot of people that are Black fanatics and nothing against them.
I'm kind of one of them as well.
So, me personally, I am kind of a mix.
So, I use Black on almost all projects and I use, but I just type it in as single quotes and just let Black fix it for me.
And so, the RSI is solved and Black's happy.
But mostly, it's just I don't want to make that decision on a lot of projects.
But there are some projects that there's a lot of quotes in there and it really, or the tradition, or there's a ton of code already there.
And so, I wanted to point out that this, I guess, is a public service announcement.
If you're not really into Black or just this part of it, just Black is a great idea, but I just don't want to go with double-quoted strings.
There's blue.
So, everybody, just remember there's blues around.
Blue is just like Black, but there's three primary differences.
The single quote, it defaults to single quotes instead of double quotes.
So, for projects where it really makes sense to use most of the time single quotes, and I have several that we're sending strings to other APIs, and it's just tradition to use.
There's other parameters inside that use double quotes, and they can't be single quotes inside.
So, there's projects I use blue on that for that.
The other thing is black defaults to the line length of 88 characters, I think, which is a little weird.
I know there's logic around it, but it's still a little weird.
And if you're going with Pep8s or the traditional 79, I don't think Pep8s specifies 79, but a lot of people use 79.
So, blue defaults to 79.
And the other thing that I like is it preserves white space around hash marks.
So, if you've got comments along the right side of your code, like in multi-lines, and they're lined up by the hash marks, black will strip that out and says, ah, you only need two spaces there.
And blue says, you can align over there.
That's fine.
So, those are the three differences.
So, blue is pretty cool.
I like it.
Yeah.
Pamela, use blue, black.
Yeah.
Oh, my gosh.
There's too many options.
I am waiting for rough to implement formatting, and then I will have only one tool that I need to use for everything.
Because rough now supports eyesore and pi upgrade.
So, we're just waiting.
And Charlie says he's working on formatting.
So, I'll just do whatever rough does.
Rough is awesome.
Yeah.
Rough is really cool.
Some interesting angles from the audience I think we're throwing out here.
However, if you want to fix this, if you think black should use single quotes, just do a PR.
I'm sure they'll accept it.
I hear a thing like, no, we've decided.
Kim says, if you write both C and Python, you'll learn to stick with double quotes, or you'll wonder why C doesn't work.
And, yeah.
So, basically, David Poole says the same thing.
Like, if you're working in a language that treats or doesn't support single quotes for strings, like, you might want to.
It's not the only thing.
I keep trying to write print Fs in my Python code.
You do?
Wow.
You're so old school.
I use C out less than, less than.
For my C++ style there.
All right.
Yep.
All right.
So, who we got next?
Pamela.
This weekend, I decided that my personal website is overengineered.
So, my personal website is PamelaFox.org.
And it's super overengineered.
So, right now, it is a Docker.
So, it's containerized.
It's a Flask app running inside a Docker container on Azure container apps with a CDN in front.
And it pulls the data from a Google spreadsheet, an authenticated Google spreadsheet.
So, all this data is actually from a Google spreadsheet.
That's cool.
So, it's a little overengineered.
And part of the reason it's overengineered is because I ported it from App Engine, Python 2.7.
So, like old school App Engine.
And I was trying to port it to Azure.
And so, I was using Memcache before.
And I was trying.
So, that's why I put a CDN in front.
So, anyway, I realized, you know, it's not that fancy of a website.
And the data only updates like once a month or something, right?
So, why do I have this whole Flask app that's just running all the time using up cloud resources?
So, I wanted to be less wasteful.
And I also wanted to try out static web apps because I feel like everybody's talking about that all the time, at least around me.
So, I was like, okay, how could I make this into a static web app?
And people have recommended various things in Python like Pelican and Lector.
But I already had this Flask app.
So, I was like, there has to be an easy way to do this for Flask.
So, I found this frozen Flask.
And it takes a Flask application and turns into a set of static files.
So, you just put in this code here.
And then you just run this.
And it'll create a folder and put the HTML files in there.
And it just does it by looking at the routes and then looking at all the URL for and then recursively following URL for until it thinks it gets it all.
And then you can deploy it.
So, you could deploy to whatever static web apps.
So, I deployed to Azure.
But you could also probably deploy to Netlify or wherever the cool kids deploy their static web apps.
GitHub Pages, Netlify.
Yeah.
So, if you do GitHub Pages, then you do have to check it in, right?
So, that's the only thing is if you did GitHub Pages, you'd have to check it in.
So, now I see one of the advantages of using something other than GitHub Pages.
Because I usually use like Recursion Visualizer, Dish This, they're all GitHub Pages.
But I wanted to see, oh, what's it like when you're actually not just using GitHub Pages for everything?
So, I thought this was cool.
And it's not a recent thing.
But the thing that's relevant is that it recently lost its maintainer.
So, in December, there was this pull request where the current maintainer, the most recent maintainer, stepped down.
So, it currently has no maintainers.
So, that makes me sad.
And maybe somebody here to maintain it.
Because to me, it was a very useful project.
Because I was able to, here's the pull request, right?
And the pull request does way more than I actually had to change.
But, you know, I was able to do this freeze and then, you know, set up some infrastructure.
And boom, I've got a static website.
And I didn't have to do a big old port to mark down and Pelican and, you know, all sorts of things.
So, I think it's a cool project.
It could use a little love today on Valentine's Day.
Some maintainer love.
So, that's what I wanted to show it.
So, I like Kim's comment saying, surely personal websites are supposed to be over-engineered.
It's how you learn what not to do in your employer's production environment.
Yeah.
No, I know.
And so, you know, I'm glad I over-engineered it.
But then I saw the bill.
I was like, I really do not need to be paying this much for my personal website.
So, I did learn.
Yeah.
Thank you, Kim.
Yeah.
So, my personal stuff's on Netlify.
It's a Hugo.
Running Hugo as a generator.
And then running on Netlify.
And it's all free.
So, I like that.
But I like the work.
It's mostly the workflow.
So, the workflow of like, I want to write something new.
What does that workflow look like?
And right now, it's write a markdown file and commit it and push it.
And that's it.
So, I like that.
Yeah.
For me, it's I update my Google spreadsheet.
I'm debating I might move it to a JSON file.
Because, you know, then I could have like a CI that just makes sure the JSON is well formatted.
Maybe something like that.
But I'm kind of a freak for spreadsheets.
So, I've been using a Google spreadsheet for 15 years.
Spreadsheets for website content?
Actually, I love it.
It's so amazing.
You've got to have overflow wrap, though, on some of those columns, I'd imagine.
In the spreadsheet, right?
Yeah.
I know.
This looks like a really cool offering or a cool library for people who, for whatever reason, have a website written in Flask.
And it doesn't have to just be for a blog or a personal site.
You know, it could be someone's built a Flask site for like an e-commerce type of thing or some marketing type of thing.
And they realize, you know, we don't really change this.
We haven't changed this in a year and a half.
Why do we need to maintain servers and patch things, right?
No.
And this is kind of a neat project for somebody to take on as a new maintainer.
Yeah.
Looking to level up your open source game.
How about extras?
We got all of our main stuff done.
Pamela, do you have extras?
The extra that I was going to mention was already brought up in the chat was the fact that GitHub dependency graph now supports pyproject.toml.
And I think maybe Henry brought that up.
Yeah.
Henry brought that up in the chat.
But I was going to show, wait, where's my, okay.
So I found this Python package template from Microsoft for somebody at Microsoft.
So if you're starting a new Python project, this has like everything in it that's done the proper way, including the pyproject.toml.
Or, okay, maybe not proper.
The way that they think it could be done.
So if you use this, then, you know, then the GitHub dependency graph should pick up on your dependencies.
So that was my extra thing was just to talk about the pyproject.toml with the dependency support now.
Okay.
That's big news.
Very good one.
Brian?
I'll have to go take a look at that and see what all I disagree with.
I guess.
I was just...
The hemisaur structure.
You're halfway there to liken it.
That's good.
So I just was curious what everybody thought.
I don't know if this is new, but I just saw it.
The pricing structure for GitHub.
Is this a new thing?
I don't know.
So the individual user gets extra stuff for $48 a year, essentially.
It's not per month.
It's per year.
So that doesn't seem terrible.
But what do we get?
So this is basically the free tier is just always...
You still get everything for free.
But the co-pilot is, what, $10 a month or something?
So there's some extras that you can add on to other things.
Before the transition or whatever, a couple years ago, I was paying for GitHub Pro so that I could have private repos.
Now you can have private repos with the free one.
So I switched to the free.
Is there...
What do you guys...
Michael, do you have an opinion on this?
I guess I have an opinion since I pay GitHub every month for the Talk Python organization.
Because if you have an organization and you want to have people in your organization like Talk Python authors, then you have to pay to have them, which is different than an individual having private repos and things like that.
One of the things that looks interesting from the team perspective is the code spaces, which is basically a server to run your code on, right?
Is that right, Pamela?
Yeah.
But why are they...
This is what I actually just opened it up to look at that particular point and expanded it.
Because you can...
I use GitHub Codespaces constantly on free.
And you can use it on free as well.
So I'm trying to understand what the distinction between the free and the team is for code spaces.
Because I'm also a code spaces freak.
Looks like on free you've got 15 gigabytes max.
So...
I don't know.
You can just pay for a little bit more.
I just pay.
Because I go over.
And more CICD.
I mean, I guess I'm getting to the point where a lot of these extra things like GitHub Actions and more complex GitHub Actions.
And basically, I'm doing more.
If I ever hit some of these limits, I think I'd be happy with paying.
Yeah.
$40 a year is not the worst subscription that I pay yearly.
Yeah.
There's stuff I use way less and pay more for.
Oh, yeah.
Anyway.
Okay.
That was just my extra.
I was just curious about that.
Okay.
I've got a couple as well for us.
Okay.
Our transcripts are way better over here now.
So if people are interested in using the transcripts, which we have for every episode,
not entirely unrelated to OpenAI stuff, we have way better transcripts.
Like, for example, even when Brian said PyProject.toml, it got that perfectly right, which is amazing.
And that means our search.
We have search.
That doesn't just search.
You know, some people search on their site, like for podcasts and stuff.
Just search as the show notes.
Our search is every spoken word.
Right.
So if you looked for ChatGPT and PyProject, something like that, then check it out.
We're also live streamed, by the way.
But there it is.
Right.
That one.
Which neither of those, I believe, were listed in the show notes whatsoever.
So because we're getting much better, like, tech words in our search, in our transcripts,
that means our search should be way better for people who try that out.
Anyway.
So how did you make the transcripts?
What did you use?
Some of the OpenAI API stuff over there, I got a cool Mac app that, like, plugs into that.
Oh.
Yeah.
It's pretty.
If you need something that will make your Apple Silicon Mac that normally is cold to the touch,
and you put it on your lap, you're like, oh, that thing's a cold laptop.
You want it like a heater?
You can try to generate one of these transcripts.
It'll be warm for about half an hour.
All right.
And similar, not the same thing, but somewhat related, is the AI chat wars, I think, are really
taking off.
And I watched an interview with Satya Nadella, CEO of Microsoft.
He was just relishing.
He was just completely sitting back and smiling and rubbing his hands like, oh, this is going
to be good because, you know, Microsoft and OpenAI have that partnership.
I'll leave it at that.
I guess it's probably a little more complicated with partial owners and credit anyway.
But they're working very closely together.
And so Microsoft announces that Bing is going to have chat GDP integration as part of its
results.
And you can actually talk to it.
And GDP4, I believe, not just the one that's out.
And so as a result of that, like that day, Microsoft Bing rockets to the top of the app
store after announcing chat GDP integration.
Like, when was the last time you were like, oh, my God, where is Bing?
I've got to get it.
You know, this is just not something that has been happening lately.
Right.
And like, boom, overnight it switches.
The converse is the same day.
Maybe the next day.
I think that's the same day.
Google shares drop $100 billion after the company's AI chat bot flops in the door.
So contrast those two things.
And it's going to be an interesting next year or so in the big tech space.
Yeah.
So anyway, that's just put that out there as something interesting to check out.
Also, I worked with the folks at JetBrains to get our students at Talk Python training a free
copy of PyCharm Pro.
So for folks who want that, this only works for new users.
It doesn't work for renewals.
But if you don't have a PyCharm Pro account already, then just visit the link.
And you must be a customer at Talk Python training.
That's part of the deal with JetBrains.
I can't just hand them out randomly.
Anyway, if you are, there's like a little statement of what it needs.
But for many people, they can just check that out and get a free copy of PyCharm Pro, which
is fun.
And if you're not already a member, just go ahead and purchase the pytest course.
Yeah, exactly.
I think the pytest course, this guy named Aachen wrote it.
It's pretty good.
People should check that out.
The mobile apps last time or time before last, I mentioned I was looking for someone to help
me rewrite that.
The flutterification of our mobile app story is well underway.
And that's so thanks to the audience for helping get that going.
Yeah.
And then very last thing, Brian, is I did a Talk Python episode in the behind the scenes
at the Lawrence Livermore National Laboratory with the folks.
how Python was used to do the fusion ignition breakthrough that we all heard about like a month
and a half ago.
Wow.
That was a big deal.
So Python is a super important part of that.
Turns out, and I interviewed Jay Solomonson.
He's down at the bottom because of responsiveness.
But great story.
Look inside that whole thing.
So people should check that out.
I think it's kind of a unique story that this was in the news a lot, but not this aspect of it.
Cool.
All right.
That's all my extras.
So was the, we usually do a joke, but we forgot our joke last week.
Was, was the Bing story the joke or?
No, the Bing story is real.
We have, we have a couple of good jokes, I believe.
Yeah.
Okay.
Let's for some, let me pull them up here.
I think you've got one as well, but let me put my stuff back on the screen.
I didn't know we were supposed to have jokes.
Oh no.
We normally, we just have one.
We just screwed up last time.
So we only had a, we somehow skipped it.
So this, this is one of those, you know, you go to the fast food restaurants and you'll see
they've got these digital menus up on the screen.
Yeah.
So here we've got, there's a Mook chicken, all rights reserved little circle meal.
There's a Big Mac, all rights reserved meal.
There's a chicken McNuggets, 10 piece meal.
But do you see what's in the middle there, Brian?
Yeah.
The dollar bracket title bracket.
It's 1350.
What is it?
The dollar bracket title.
It's so amazing that it's up there.
I don't know if there's just supposed to be curly braces and they missed the shift or something,
but the comments folks, the comments are nonstop.
Some of them I can't read because, because it's, you know, not necessarily safe for work,
but it's like, you know, what the blank is happening to my menu.
And oh my gosh, it's so good.
It's funny.
Yeah.
Also the pricing is really high.
I don't know who pays, you know, what is that?
$13 for a McNugget meal or $10 for a cheeseburger, but that's a pricey burger.
I guess it's a meal includes a drink, but still whatever.
That's a lot.
Yeah.
That's funny.
Okay.
Well, I have something that I was laughing like so hard at, and I'm not going to go through
all of it, but it's, it's 59 hilariously infuriating examples of user interfaces.
and, I was like, couldn't, couldn't stop laughing.
The, the first one right off the bat, please enter your phone number.
It's just kind of plus sign.
You just walk up.
and then the second one's actually my favorite is, you got to press it like
7 million times.
The, angry birds version of a volume control.
so you just like pull it back and then shoot the ball to what volume you want.
Oh, I love it.
I want that actually.
That would be fun.
but there's 59 of these that are just terrible.
Please enter your phone number with a dial wheel.
A digital.
That sounds kind of fun though.
It's been so long to say, I kind of want to go out and just get an old phone just to do
that.
Yeah.
I, I, a volume slider.
That's just like, you have to like, make it level.
Yeah.
It's like a level.
It slides the volume to like balance it out.
Yeah.
So, is this your phone number?
It's a phone number entry that just guesses your phone number and you have to say if it's
right or not, anyway, these are, we won't go through all 59, but, this is, these
are worth a good laugh.
don't, it's probably not safe for work unless it's okay for you to be laughing at work.
there's nothing illicit.
There is just, you know, you're not allowed to laugh at work.
Well, this is work.
This is not for fun.
You're at work.
Remember that.
I had a manager once that like was sat across a long time ago.
That sat right across from me.
And every time I glanced over, he was playing solitaire on his computer.
Like, and like, I'm like, like six hours out of the day.
Every time I looked over, it was solitaire.
Like I want his job.
No, but anyway.
All right.
Brian, thanks a lot.
You just ruined the next hour of productivity for me with this, this article.
Anyway, I guess that wraps up all of our items.
thanks everybody on the, live stream for watching and everybody that watches it
later.
Super.
Thanks to Pamela for showing up today.
And thanks, Michael.
Yeah.
Thank you.
Great to have you on the show, Pamela.