Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
This is episode 234, and it's May 19th, 2021. I'm Michael Kennedy.
And I'm Brian Okken.
And we have our special guest, Dr. Becky Smethers. Welcome.
Hi. I wasn't sure whether I was supposed to introduce myself then. I was like, should I jump in? Should I wait?
This is standard fare for our podcast. We do a bad job preparing our guests for jumping in. Welcome.
I love casual podcasts. They're my favorite to listen to, and they're now my favorite to be a part of as well.
Yeah. Absolutely.
Yeah. So it's really good to have you here. And, you know, you're doing so many neat things out on the Internet.
First of all, you're an astrophysicist at University of Oxford.
That is my day job, technically.
Yeah, yeah, yeah. You've written some books. You can tell folks about that.
You are doing quite a bunch of interesting things over on YouTube, which is how I came to know you.
Your work on YouTube is really neat. And yeah, maybe just tell people real quickly about yourself.
Yeah, sure. So I'm an astrophysicist.
My day job is essentially to study supermassive black holes and figure out the effect that they have on their galaxies
and how they might stop their galaxies from forming stars, which is kind of awesome.
I'm living the dream that I had as an eight-year-old to become like an actual space scientist.
And yeah, I just love talking about science and space with people as well.
And I've sort of found my niche a little bit on YouTube, really, that I can put out videos each week about fun things in space
or even react to old sci-fi and stuff like that about what they got right and what they got wrong necessarily.
And it's just a great platform to communicate with people and respond to people's questions that they've never been able to Google.
The tagline is, you're friendly neighborhood astrophysicist.
Yeah, I absolutely recommend that people check out your YouTube channel.
It is super neat. And yeah, there's a ton of fun videos there.
They're very good sort of general science, just like interested in science, not scientists type of presentations.
So super cool, super cool.
All right, Brian, you got the first item, right? You want to take it away?
Yeah, sure.
Dustin Ingram just recently released an updated version of an article called Powering the Python Package Index in 2021.
Apparently, there was one, I think, like in the name, Donald Stuff did one about five years ago to list how this was going on.
So this is kind of amazing to read.
There's just some cool information here.
There were three maintainers, but it was mostly Donald five years ago.
And now there are still three maintainers, but there's it's Donald, Ernest Durbin and Dustin Ingram all doing the maintainers.
But there's also more people.
So there's more people involved.
There's five different moderators and three committers that that help with the project.
So that's neat.
And we've all seen it.
It's just people are using it a lot more.
And it's a it's more central part of our everyday life.
So, yeah.
So what are some of the you know, I remember one of the really interesting things was just how much it costs to run PyPI dot.
The whole like all the data transfer behind the scenes and stuff like that.
Yeah.
So let's let's jump to some of the data.
The the data that they showed was just sort of mind blowing.
We've got one.
We're up to one point seven billion requests on PyPI per day, sometimes in fifty five point four terabytes.
Every day.
Five times more than even from twenty eighteen.
Yeah.
So this is amazing amount of data goes through there.
And then they have they have data on files dot Python hosted dot org.
Also, there's some data on there.
The the money that goes into it fastly takes care of a lot of the brunt of the work.
So fastly apparently is donating about what's the number?
One point eight million dollars of services a month.
If we were to have to pay for the fastly services directly.
Oh, my gosh.
And they give give PyPI a hundred percent discount.
So that's great.
And about ten ten thousand dollars worth of services a month from Google and seven thousand from AWS.
And then a whole slew of other people that help out to like data dog and which is cool.
And then there's some other funding sources that we've had some grants and we've talked about some of the grants that came through.
But these are funding some amazing projects like the rewrite of rewrite of PyPI localization, some malware detection, which is really needed when everybody's depending on this.
And now it supports some support staff.
They're hiring a project project manager soon.
So, yeah, that's fantastic.
Google came on as a visionary sponsor specifically to work on this and the security side of that, I believe.
Yeah, the one of the things I didn't know about, which we're going to provide a link to is the team maintains a thing called a fundables markdown page, which is a non exhaustive wish list of large projects they'd like to see happen.
So nice.
Because if you're kind of it's sort of like, you know, looking forward, what are we going to do?
But it's if we can do it, we'd like to do this.
So that's kind of neat.
That's amazing.
I'd never stop to think about how much work and how many people must use PyPI by PI.
I don't know how I say PyPI.
But like every time I type in pip now, I'm going to think differently.
Like it's just to me, it's just been there.
Thank you.
Yeah.
Now I feel like I should go to this fundables list and like pay.
I don't know, like give something back for all the types I've used it.
Probably in frustration as well, because something hasn't worked and not appreciated all the behind the scenes stuff.
So, yeah, the first time I learned about this, I was blown away at how much it takes to keep it going.
And how much you think about how much we all depend upon this as people working in Python.
What if it went away tomorrow?
Yeah, it was terrible.
I can't even think about that.
Most scientific research would probably collapse.
So please don't.
You know what I wanted to ask you, Dr. Becky, is I suspect that you use Conda.
Do you use Conda a lot in the data science space or are you a pip person?
I'm a pip person.
I don't really use Conda.
Some of my colleagues do.
It's all just personal preferences, really.
I remember for a long time on the departmental computers, the ones that were owned by the physics department, they didn't give you like install control.
And so pip wouldn't work.
And it drove me insane.
Oh, wow.
I was like, I was like, no, you can only install like software that has been approved like by the IT department.
And I was just like, oh, God.
It's not going to work.
No.
Yeah.
That's really rough.
All right.
Super cool.
Well, I wanted to try to bring in some astronomy type things that have to do with Python.
Because, of course, you're here, Dr. Becky.
And Shaharin Ahmed didn't really know that he contributed this to today, but just more of a general conversation item put out on Twitter.
Like, hey, I was looking for a Python generated at a star atlas, like the Leuven star atlas.
Have you heard of this thing?
No, I haven't.
The Herschel star atlas is the most famous one, but I'm guessing Leuven is a bit of an update.
It's a project by, I'm forgetting their name.
Let's see if I can.
Yeah.
They just say, I have to go back and pull that up later.
Sure.
So they wrote this.
I doesn't know me.
I'm sorry.
So it's the goal is to make a publication quality stellar atlas from scratch using Python.
So it's pretty neat.
And the project's not finished.
And who knows what the timeline is on it.
But I wanted to just give it a shout out more as a way to think about what are the tools that people are using for astronomy and Python and also just building maps.
You know, maybe you want to build a map of something completely different.
Maybe you're really into river floating.
And you want to build like amazing maps of like river floating or whatever.
Like you could take the public data and like overlay the things kind of like they did here.
So with this, I'll go and find some pictures down here at the end.
It's quite a long article talking about how all this works.
But there's some really neat graphics that we can find.
There we go.
So they've got pictures of stars, variable stars, galaxies, nebula, planetary nebula, and all kinds of things that you might care about.
Fast moving stars.
I suspect a lot of those might be looping around black holes.
What do you think?
I mean, yeah.
You probably wouldn't see those astrometrically.
But you'll probably get all those variable stars that vary in brightness.
Yeah.
They call those out, particularly with like a double circle type of icon.
Yeah.
So astrometrically means like the astronomy position.
So like incredibly precise.
So those kind of like what you just described, like a wobble from a black hole orbiting it, you probably wouldn't see on a star list like this.
It'd be like too fine of a detail, like too much, too small of a change.
Yeah.
Cool.
So talks about how do you go and create this thing.
Says there's a one plot map dot py that's 1,500 lines long.
Trying to write all this together.
They talk about using the different libraries.
So it was NumPy for all kinds of data handling.
It was PyLab and Matplotlib.
So all the graphics that you see here are just layers of Matplotlib renderings over and over and over.
Yeah.
And then there was this library called Basemap, which takes care of projections and transformations.
Because I think one of the challenges was how do you project this onto paper when it's on a spherical thing?
I think they said they used stereographic projections.
I don't know.
I think that sounds about right.
Yeah.
That sounds right.
Yeah.
SciPy.
And then, of course, AstroPy, which I know Dr. Becky used a lot.
And then.
Round of applause for AstroPy.
And then PyEFEM for celestial coordinate transformations.
So, yeah.
A lot of neat libraries on there.
Yeah.
It sounds like you, I'm sure you use AstroPy.
Like any of the others sound familiar?
All of them.
I've used every single one of those packages before.
Especially AstroPy.
Like I have the same problem with like I've taken an image with a telescope and it's been taken by a flat digital detector.
But there's coordinates that are sort of overlaid on that that come from the sort of the surface of a sphere.
You can think of it as, right?
And so you project that down using AstroPy and PyEFEM as well.
Because sometimes people work in different coordinates.
So you can work in sky coordinates.
Which is sort of how high you are above the horizon and how far around you are.
Or you can work in galactic coordinates.
Like with respect to the center of the Milky Way.
Like how far out are you and round?
And I don't ever work in those.
But people who are Milky Way astronomers do.
And then you've got to like.
So some objects, their coordinates are given in Milky Way coordinates and not sky coordinates.
So they'll have to have done so many transformations to get maps like this.
What's cool about this map, it's the constellation Cygnus.
If you can see that there.
So that's the swan.
It looks like a big cross in the northern sky.
But that is the constellation or the area of the sky that the Kepler Space Telescope stared at.
Oh, nice.
So that's where the exoplanets have been discovered.
Yeah.
Pretty much, yeah.
All of the exoplanets we know of.
So some like 5,000 of them will pretty much be in that patch of sky.
So I'm really glad they chose that constellation to show in this piece.
Yeah.
How neat.
Yeah.
And then over here, let's see if I can find it.
Talked about the sources of data.
There's all these different public sources of data that they put together.
But then if you read through the article, you'll find that they were talking about,
well, I think they spent a month and a half getting this far on the project.
And they're like, well, I went through here and I had to correct all these things because they were,
this data was a little bit off here and that data was a little bit off there.
And then I had to label them.
And another thing that was talked about a lot is how do you create these pictures without text that overlaps?
So you mentioned this thing's called adjust text and where it'll actually take a matplotlib thing with labels
and then rearrange the labels on the graph so that the text doesn't overlap, which is really cool.
And it has a nice.
You've just changed my life.
Really?
Yes.
This is like a huge problem.
And it's been solved.
It exists.
And it's just Python code.
God, I love that this stuff happens.
Isn't this cool?
It's awesome.
I'm just starting to like jaw on the floor, like, oh, someone figured it out.
Super cool.
That's awesome.
So yeah, there's a bunch of stuff.
And one of the things that I really took away from this was it reminds me of this quote that in the whole data science,
scientific computing world, like data cleaning isn't the grunt work.
It is the orc sort of thing because it's so much about, oh, yeah, I could just run these together.
But then I spent a month fixing this and correcting that and offsetting that.
And yeah, so pretty neat.
That's really cool.
Yeah, I guess the final.
Yeah, go ahead, Brian.
I want to know where I am in galactic coordinates.
I can't remember off the top of my head.
But yeah, it does have galactic coordinates.
I just don't know what they are.
So is the supermassive black hole at the center of the universe?
Is that at zero, zero, zero?
The center of our galaxy.
Yeah.
Yes.
So there's many galaxies in the universe.
Our galaxy is the Milky Way.
The supermassive black hole at the center of it would be, yes, L equals zero, B equals zero.
Okay.
Awesome.
Yeah, I guess final thought is they say it takes about four hours to generate this map running,
using four cores running in parallel to actually render it because it has so much data and whatnot.
But anyway, pretty neat.
If you're looking to build maps with Python, here's a bit of a case study, I suspect.
Is it open source?
Is it on GitHub?
Can you grab it yourself and have a play around?
I wish.
No, it's not.
I looked around.
I couldn't find much of the code.
There's little snippets of code shown.
But yeah, that's all.
I was thinking like, can I get a section of sky?
I'm going to print it out.
I'm going to frame it.
It's going to look really cool.
Yeah.
This is the one I want to put on the wall.
Yes.
Millennials love maps on walls.
That's what I'm going to do.
All right.
Before we move on this, just a quick shout out to Dr. Becky from Pride Fund on the live stream.
Yay.
Dr. Becky is back.
Bought your book after watching the live stream with Michael.
Really enjoyed it, even though you don't have a space background.
So very cool.
That's awesome.
I'm so glad you enjoyed it.
Yeah.
All right.
Speaking of things that we couldn't all enjoy and can take us back, calculators.
Yes.
Tell us about it.
I was thinking about how I haven't thought about my graphical calculator in a long time.
I swear I was attached at the hip to that thing throughout high school and then a little
bit into university, but not so much because they were banned in our university exams because
they thought that it was help us cheat, I guess.
I don't know.
It was so weird going from high school where they were like, use your graphical calculators.
And then at university, they said, no, don't use them.
And I remember thinking like after that, I barely even thought about, I don't even use
it in my everyday like work or life anymore.
When a lot of the things I do, I can just use Spotlight on my Mac to do a quick calculation
or whatever.
I'll do it in terminal or something like that.
And then I saw this the other day and was just amazed by it because I remember this graphical
calculator showing you, you could get up graphs of, you know, like E to the X or sine X or
cos X or something on your calculator.
But the screen like was, it was like an old Game Boy or like a Nokia 3310, right?
It was the most pixelated screen in the world.
And making those graphs was so frustrating.
Like it just wasn't intuitive.
It wasn't fun.
I didn't think.
And then I saw this the other day where look at what like kids can use these days.
They have this graphical calculator that has this, you know, proper, beautiful, actual color
screen.
And that you can use Python on to make plots and do calculations.
And I just think this is such a fantastic idea because teaching kids to code early is so important.
Like it can be used in so many different areas of work and life and science and everything like
that.
But I always find learning to code without a purpose necessarily is really difficult.
Like just deciding one day, I'm going to learn how to code.
Where do you start?
Like unless you've got a project, like what do you do?
So the idea of learning as you're going through and actually learning the maths or learning the
science with your graphical calculator is so good because then it just starts to come naturally to you.
It's like the first thing you think of to do to solve a problem is to use Python.
So I'm just so excited that this is a thing.
And I hope it becomes like the calculator that kids have to buy.
Like if they're going to do maths at like a higher level or something.
Yeah, it's so cool.
Instead of those weird programming languages that come, you know, like Polish notation,
reverse Polish notation and stuff like this is preparing them for proper programming.
Exactly.
Yeah.
And I think that if you learn it in this way, it will just become so second nature that then
it's not a barrier for you to go on and do anything else.
Right.
It just becomes a tool that you can use to solve problems like in science or in, you know,
sort of development or software development or something like that.
As you get into university and wider world, like having that knowledge from that age is so good.
I mean, I got mine at like 16.
I don't know about if you guys remember when you got your graphical calculator,
but I feel like at that age I was impressionable and it stuck with me.
Exactly.
Yeah.
I, I think I might've gotten mine.
It really was a decent one right when I got to college.
But yeah, I had even had one of the TI 93s that had a full Cordy keyboard on it for a while.
It was that big one.
Yeah.
That was, that was fancy when I was a TA in grad school.
Yeah.
That's the thing.
I think I got them early because we specialize early in the UK.
So like I was only doing maths and science by 16 and eight, like 16 to 18.
So that's why I got mine earlier.
But yeah, like learning Python then would have been so helpful because I got to university and
they were like, oh, okay, now term to learn Python.
But let's do it while we learn general relativity.
And let's code up some general relativity.
I was like, oh yeah, I'm still printing.
Hello world.
Like one thing at a time.
Yeah.
So the fact that you can learn it there here is so cool.
How do you type into this thing though?
Like a calculator.
Very slowly.
First of all.
Yeah.
I imagine it probably just has like an old phone keyboard.
So, you know, three letters per number, but it might have one of the full queries like
Michael was talking about.
So I think, I think it's the more skinny, tall ones.
It's the more like an old phone.
You know, it'd be awesome if you could transfer Python files over, but yeah, it has like a
REPL and everything.
Just pretty interesting.
I hope it'd have autocomplete.
Yes.
Oh.
That would be great.
Oh yeah.
I hadn't even thought about that, but yes, it had better.
A couple of comments from the live stream.
Marcel says, Polish notation is the opposite of method chain.
Yeah.
And Kim says, graphical calculators would have been really handy in high school.
I never even seen one before I got into engineering.
Python and reverse Polish notation.
Sounds tricky.
Then Pamphil Roy from the SciPy world.
He says, oh yeah.
He also told me he can't put things like SciPy on there, sadly, but hopefully, hopefully soon.
Maybe this is just, you know, V1.
But yeah, I guess packages in general, right?
They talk about having turtle and stuff, but you know, I'm not sure how much they have added modules.
How cool would it be to have SciPy on there?
Because then you could like plot a function and then you could like optimize and you could like find the solutions to a function that way.
Probably skipping the differential equations that you're supposed to be learning in math.
Exactly.
I just partial differential equations are easy.
I just say like solve and give it the number.
Yeah.
I would check your answers with SciPy.
Kind of neat.
I think turtle's kind of neat on there also because I, I mean, I programmed a sub hunt on my single line reverse Polish notation HP calculator just because I could sort of thing.
So I think doing some games in there might be kind of neat.
Yeah.
People definitely agree with you about how cool that would be.
Yeah.
Awesome.
All right.
Before we move on to the next one, let me tell you about our sponsor this week.
So this episode of Python Bytes is brought to you by Sentry.
I love Sentry.
We use Sentry.
So how would you like to remove a little stress from your life?
Do you worry that users might be having difficulties or encountering errors with your app right now?
Would you even know if they did until they send that email?
How much better would it be to have error or performance details immediately sent to you, including call stacks, tracebacks, values of local variables, and even the logged in user that ran into the error?
With Sentry, it's not just possible, but it's simple.
We use Sentry, like I said, on all of our web apps on Python Bytes and Talk Python, Talk Python training courses.
And I actually had somebody run into an error.
I got a Sentry notification that this user had a problem doing this thing.
I fixed it and sent them an email.
And they said, oh, that is incredible.
I was about to email you about this problem I had, but it was late.
So I was going to do it tomorrow.
And you already fixed it.
So what a surprise.
So surprise and delight your users today.
Create your Sentry account at pythonbytes.fm/sentry.
And when you sign up, please, there's a button that says get a promo code.
Make sure that you enter Python Bytes, all caps, all one word.
And then you'll get the team plan, which gives you more features and more errors and so on.
Not that you want more errors, but maybe more features is good.
So pythonbytes.fm/sentry and promo code pythonbytes.
Brian, you got the next one.
Okay.
I got to say, though, that the artwork on that Git Sentry page was great.
That is very cool.
Well done.
So I've been trying to shift doing a little bit more work with GitHub Actions on my projects.
But, you know, there's probably great documentation somewhere.
I just don't know where it is.
And I'm impatient.
So I kind of want somebody to just say, for Python, this is what you do.
So there's a few of these walkthroughs, but I like this one that I just saw recently.
This one's Python package CI CD with GitHub Actions.
Just write what it says on the tin.
But this is kind of a nice walkthrough of some of the different things.
And they're going through an example project, of course.
But it's nice.
First off, it talks about kind of when you want actions to happen.
So in talking about when they happen, this project happens on pull request and on push to certain branches.
So in this case, main branch.
But really, you can pick several branches that you can do this on and to have actions happen on those.
I kind of like having a couple different development branches, especially on things that I'm active on and don't want to release yet.
So these are nice.
And then what else?
I'm going through a matrix of stuff.
So most of the article is talking about syntax checking on different things.
I don't know if really that's important, but I would probably do a pie test on multiple matrices.
But the notion of a matrix is kind of interesting, having the different environments.
So in this case, this person is talking about maybe running on multiple versions of Python across Ubuntu, macOS, and Windows.
And that's exactly what I want.
Those sorts of combinations to make sure something's working.
With all the devices and stuff that you have, do you see this maybe even something at work as well,
like with all the hardware devices and the different ways it's configured?
Well, couldn't use GitHub Actions, but we definitely use matrices to figure out which tests have to run on different configurations and different hardware.
And it's just exploding.
But, yeah, that's a different nightmare.
But this one is taken care of for you.
So it's a neat thing to test across all those.
And, you know, I knew how to do it on Tox.
I knew how to do it on Travis.
And getting it to work on GitHub Actions is just different.
It's not harder.
It's just different.
So I appreciate this walkthrough.
And then what?
Going through running example of running tests, of course, and checking artifacts, which is interesting.
I hadn't thought about that.
There's, you know, your build might generate, you know, documents or other artifacts that you want to keep around.
Having some checks around those is a good idea, too.
And then the last couple of bits, and really why I'm highlighting this is because I didn't really know how to do this,
is doing auto merges on some branches.
So there's some branches that you, like maybe you're maintaining and nobody else has access to.
But if you push to that, you want tests to run and then automatically to merge to something.
And setting up auto merge, there's some steps around that, which is pretty darn cool.
And the last bit is pushing to PyPI.
So releasing, release automation so you can automatically, in this case, setting up a rule so that if you push the tag that starts with a V,
that means you've updated the version and you want that to push automatically out to PyPI.
So hooking that up with GitHub Actions.
Oh, that's clever.
I'd never thought about triggering it off of a tag name.
I've always thought of it just certain branch means go.
But yeah, this is, that's clever.
Yeah.
So that way you can even, even have like a main branch that has updated workflow, updated things, but it's not,
it doesn't get pushed until there's a new version, which makes sense.
Yeah.
Dr. Becky, what's the story with GitHub Actions and all of your colleagues, people use it?
I don't think I even know what GitHub Actions is to be quite, I had a drink and I spared you from hearing me gulp before.
Yeah.
I don't even think I know what, I've used GitHub Actions to be quite honest.
I'm sure some of my colleagues, I use GitHub all the time, obviously, but GitHub Actions, try to remember.
I don't think so.
I'm sure somebody has though, but no.
Yeah.
I'm sure some people maintain some of the packages and stuff.
That's what I was thinking.
Yeah.
I don't think I have anything like that to maintain.
A lot of my colleagues put out stuff, but really my code is for sort of my use and for any specific colleague that has like a science case use for it.
But GitHub, I mean, I love GitHub because one of the things I love doing with it is committing when I've written like a scientific paper.
I'll even put the latex on GitHub, what we sort of code our scientific writing in, right?
And the PDF is included in your commits.
And then you can make a GIF from your commit history of like your PDF, like building up, like adding parts and all the words adding.
It's one of my favorite things to do once I finish because it feels like it's like, oh, I've done this project.
And now I can like see it fully take form.
And I remember I wrote my thesis, my entire PhD thesis in about two months because I got a job and I had to finish my PhD and I had to write it up.
And I don't remember much from that whole two months time.
It's a huge blur, except one vivid memory of the fire alarm going off in the department.
And being like, panic, Git, commit, Git, push.
I was just, remember this, I've got this one commit message in my thesis repo that's basically just, I just mullered the keyboard because I was just like the fire alarm's going off.
Git, commit, anything.
And Git, push.
Because I was like, what if, like, what if I don't have a backup of like the past eight hours of writing I've just done?
It was a huge bulk and I was just like, I'm not losing this.
And people were like pulling me out of the room.
You've got to run away.
Oh my gosh, that's so fun.
It was totally fine.
But.
Yeah.
That reminds me of a sign I saw once.
Yes.
Exactly.
In case of fire.
One, Git, commit.
Two, Git, push.
Three, leap building.
I actually went through this, but during a PhD thesis write-up, which I would never recommend to anybody.
I'm amazed that you found this image so fast.
Oh yeah.
No problem.
I'm on.
I got you.
A couple of comments from the live stream.
Justin Boyce says, love being able to use GitHub actions for deployment.
Keeps me from botching deployment by making mistakes.
I agree.
Do it more often if it's automatic.
And then Jared Chung says, looks great.
Definitely going to hook this up to the packages I maintain, but which change infrequently so you don't have to remember the workflow and so on.
And then finally, Marcel Milsent says, I heard GitHub is now offering free tier for institutions with unlimited contributors for private repos and $2,000 or $2,000 actions a month for $0.
That goes alongside with the academics package as well, right?
For students.
It's not just students.
It's also anybody with like a .edu email or .ac.uk, which is the universities over here.
So I have like loads of free repos and stuff like that, which is great.
It's so good of them.
Yeah.
Fantastic.
Well, cool.
All right.
Moving on to number five.
Not this one.
This one.
Another spacey one.
Garrett Dunn gave us a shout out saying SpaceX is now using Python for prototyping their Starlink satellite software, which I don't know how you feel about Starlink, Dr. Becky.
I mean, as an astronomer, it's like in your way, but as a way to empower people in remote places, it's kind of cool.
I'm really split about it, to be honest, because I want it to go ahead.
I think it's a really cool project, but I think there's more compromises need to be made in order for it to work in the way that it could, like the most efficiently the way that it could.
And I know like even before this launched, I'd take an image, you know, and I'll end up with a satellite trail and, you know, at least one of 10 I've taken, you know, a telescope that evening.
And there's going to be more, right?
Exactly.
Yeah.
And it's not like something you can remove.
People are like, oh, just remove it as a source of noise.
If that thing goes like right over your, you know, 15 minute exposure of a galaxy that's millions of light years away and this massive bright thing just goes right over the middle, it ruins it, right?
There's no rescuing that.
So I do want it to go ahead.
I do want it to work, but it's really cool that they're going to use Python.
Like that could be something we could get warnings from, you know, like if it's something as accessible as Python, so to say, something's going over, pause observation, carry on or something like that, you know?
Yeah, I would actually love to see SpaceX work more closely with all the satellite locations and observatories and say, all right, here's how we're going to help you solve this problem.
Yeah.
That would be great.
Yeah.
Diving into this.
So Stack Overflow actually did a four-part series on the software that SpaceX used to build all their things in space.
And this one in particular is about the network protocols.
So if you look at how the Starlink system works, it turns out that most of the stuff is C++, both on the ground systems and the things in the sky.
So they talk about that their software breaks into two parts, software that flies and software that supports the things that fly.
So the software that flies is all C++ that's on embedded chips on the satellites.
But then on the ground, there's a whole bunch of communication APIs and coordination APIs.
If you look over at where these satellites are and where they're covering, there's these cool real-time maps.
I'll put one on the screen here.
You can actually see them flying by here where Brian and I are.
Please zoom in on that area.
And you can see the overlap of the signals of the different ones and how they're oriented and all kinds of stuff.
So they need to adjust and move these satellites around in orchestration and orchestrate them, basically.
So the software that does that, it's in production version in C++.
But they do a lot of simulations and prototyping in Python to figure out how that works.
Because, you know, think about the in-body problem.
But for thousands or hundreds of thousands of these things to keep them all working together, the combinatorics of it get out of control really quick, they say.
So there's a lot of simulations that need to be done.
And they do that in Python.
And once they get the working version, then they rewrite that in C++.
What do you two think?
That's a cool picture, right?
Yeah, that's really cool.
That is neat.
Yeah.
And speaking of GitHub Actions, they probably are actually using GitHub for this.
But it doesn't explicitly say.
But you think of organizations that have a hard time deploying their code.
Like, you'll go to a website.
Like, our website is down all of Sunday because we're deploying a new version.
Like, are you kidding me?
This is 2021.
Like, this should be Git push, wait a few seconds, and it's now the new version.
Anyway, this is pretty interesting because they say the software is developed in a continuous integration environment.
With teams merging into the master development branch often and deploying to all of the satellites weekly.
That adds an extra level of panic to you get pushed, doesn't it?
It definitely does.
Oh, whoops, I wasn't ready.
All the satellites stopped responding.
Whoops.
So, yeah.
It says the Python version allows them for rapid iteration during the design phase.
And once it's all happy, they write in C++.
So, yeah.
Anyway, pretty cool.
I'll link to some of these maps that track it and the four-part series and so on.
So, Garrett, thank you for that.
It's really cool to see because it's very similar to what Space Telescope are doing for the James Webb Space Telescope.
Sorry, Space Telescope is the institution in Baltimore that manages, like, the Hubble Space Telescope.
And the new one that's going to hopefully launch in October is called the James Webb Space Telescope.
And I think that's a similar sort of platform in that a lot of the spacecraft sort of mechanics is done with sort of the usual comms that they have, possibly C++.
But a lot of the tools they put together for astronomers who are planning observations, like where to point, how long that will take, and all those kind of things when they're sort of deciding, I want to use this to do this science.
That's all been done in Python.
And, like, all of the sort of tutorials of, like, how to figure out how much, like, James Webb Space Telescope will be able to see if this thing you want to look at is all done in, like, iPython notebooks.
Jupyter, I guess we should call them now.
Yeah.
So, it's really cool to see that, like, it's, you know, it's not just, like, these major academic institutions that are picking up Python because they know it's the academics that use that.
But it's companies like SpaceX as well, I guess, because they know their employees, like, work well with Python.
Yeah.
So.
Oh, that's really cool.
I knew a lot of the telescopes were using Python, but.
And that's going to be a massive new telescope.
The James Webb Telescope is going to be a big deal, right?
Yeah.
It's going to be a huge deal.
We've all got fingers crossed that launch actually happens because it was originally planned for 10 years ago and three years ago and five years ago.
Oh, my gosh.
Yeah.
Fingers crossed, I guess, for coming soon.
All right.
Dr. Becky, you got the next one.
Yeah.
So I feel like I've done the scientist thing of bringing a scientific paper to a Python podcast, but I'm bringing what I know.
So I found this paper a while back when I was sort of, you know, doing the thing of like, you're an expert in something because you know what to Google.
I was looking for something and I found this paper, the beginner's guide to working with astronomical data.
And it's very much written as if you're, you know, a poor PhD student that's come in and your professor said, hey, here's a lot of data.
Please analyze it.
And you're like, I don't know where to start.
So that's kind of who it's written for.
And I think if you are a really keen amateur astronomer, and I know a lot of people do want to get into astrophotography and possibly did during the pandemic with lockdowns and stay at home orders.
And perhaps might have set up something with like a Raspberry Pi, you know, to control a telescope, to know where it's pointing, something like that, or even to adapt it with a camera as well.
And then they have all these images that they then want to remove noise and get like a beautiful color image of something as well.
And they're not entirely sure how to do it, but they might know Python.
I use Python to, you know, analyze the images that come off the back of professional telescopes.
So you could do it with amateur telescopes or amateur, you know, just an SLR camera you've set up in your back garden to take an image of something.
But you want to see fainter and fainter things.
You have to take lots and lots of like short images so you don't get, you know, motion blur and stuff like that with the, with actually the rotation of the earth.
But they're all the wrong coordinates.
So what do you do?
Because they're not all in the same place.
So you use AstroPy to figure out, you know, how to do this.
Does it like realign the images to adjust for that rotation?
Exactly.
Yeah, yeah, you can do that.
And so, but there's obviously lots of other steps that you need to do, like taking out noise.
So this actually talks through like all of the steps that would go into what a professional would do.
And I, reading it, I think it's so well written that I think someone who is a really keen amateur and who wants to get into astrophotography and do the, you know,
as we call it, as we call it, of the images, you know, make them look extra pretty by the end of it with Python because they're a keen Python person.
I think this would be the thing to be like, right, I'm going to make this my bedtime reading.
It's very, very long.
But I think you could definitely make this like a project if someone was keen enough to do.
And so that's why I thought I'd bring it.
And I feel like obviously we need a huge shout out to AstroPy and Map.Lib and everything like that for making these kind of things possible with, you know, images that you can take in your back garden and stuff that you can get at.
But, you know, this, you know, someone in a month or so, if they're really keen on Python and they're really keen on taking photos of the night sky, you could be getting images of galaxies and nebula that look amazing, you know.
So that's why I thought I'd bring it.
Print them out.
Yeah, print it out and put it up as artwork in your house or something.
That'd be fantastic.
It didn't, instead of just saying that's a, that's a cool picture of a galaxy.
Like I took that picture of that galaxy.
That's totally different.
Exactly.
Yeah.
You know, I can imagine someone getting an amazing picture of Andromeda, you know, and following these steps that it outlies.
And I think it's easier because, especially if you know Python, there's no learning curve with a new tool or a new, or like frustration with a GUI, right?
That's just this like, ah, interface, what's going on?
I don't know how to use it.
Because it's just pure Python, I think if you already know Python, it's definitely the easiest way to get into this because it'd be something familiar with something new.
So even though it's a scientific paper, I think it would pass.
Yeah, it looks super interesting.
The code doesn't look terribly challenging, but, you know, it's exactly what you need to solve the problems, right?
Exactly.
Yeah.
Cool.
All right.
I think that's it for our six items.
Brian, you got anything?
No, I just apologize to the stream people.
For some reason, my video stream is frozen.
I think that you might just be really, really zen and still.
I thought he was just really interested in the paper, but he was like, wow, look at that.
You've mesmerized him.
Absolutely.
All right.
So before we move on, actually, Justin Boyce says, thanks for bringing this, Dr. Becky.
I did pick up astrophotography.
Barely as a hobby during the pandemic, and it looks good.
So, yeah.
Already.
I already got one person into it.
Taking that, like, biggest step to go from like, oh, cool.
Like, I managed to photograph some stars to getting, like, the galaxy's nebula.
I think this will help people take that step, I think.
So.
Yeah, for sure.
I'm glad it helped.
All right.
I got a couple of quick shout outs at the end.
First, I want to point out that if you like this conversation, check out episode 303 of
Talk Python, where Dr. Becky and I dive all into the Python astronomy world.
That was fun.
And then I just met with one of the founders of this company called Kubuntu Focus, which
I thought was a pretty interesting idea.
So, what they're going for is, you know, the way that Apple works is, right, you know,
they make the Mac and then they make macOS and that tight integration of those two things
works better than just, you know, bringing pieces together and building your own sort of
thing, right?
So, that's sort of the same idea, but for Linux.
And so, it's really focused on people who do AI type of work or just want to have a really
good desktop Linux environment.
So, for example, down here at the bottom, keeping it in the space world, we have Chris
Matman, who, if I refresh it, it'll come up at the right time, maybe.
It's supposed to cycle out.
Anyway, Chris Matman said, he, who works at JPL, who, he did some machine learning training
on his MacBook Pro and it took like 37 hours.
And on this thing, because they have these crazy GPUs, these like GeForce 3080s and stuff
in the laptop, they did it in like an hour and a half instead of 37 hours or whatever it
was.
So, and by the way, you can actually buy it.
Like these, these new GeForce chips are cards.
They're basically unobtainium, right?
You can't get to them.
So, yeah, anyway, pretty, pretty interesting.
If you're looking for a desktop Linux world, check that out.
Dr. Becky, anything you would like to give a shout out to?
Maybe I could throw out your Amazon page.
Yeah, sure.
Yeah.
So I've written a book.
So it's got different names everywhere in the world, just to confuse everybody.
So in the US and Canada, it's called Space at the Speed of Light.
In the UK and pretty much everywhere else in the world, it's Space, 10 Things You Should
Know.
And then there's also the German edition as well, which I'm not trying to butcher.
Das kleine Buch von Größen Knaal.
Größen Knaal.
Yeah, exactly.
It's a good book title.
It's, it's essentially, it's written for, I think anyone who is a complete beginner in
space, but has always maybe been a little bit curious, would love this book.
It's like the 10 things that if you were going to be at a dinner party and you'd be like,
hey, did you know this?
Like, these are the things you should know about space, right?
But I also think that anybody who's-
Dr. Becky told me about it.
Yeah.
I also think anybody who's been keen on space as well will also get a kick out of it because
it takes ideas that you might have heard before, but then just adds an intellectual level of
like where we are right now on the edge of like our understanding of this thing.
So it's a really short read as well.
It's not heavy.
It's not a big, heavy thing.
It's really skinny.
My laptop's currently propped on top of it.
Otherwise, I would show you how skinny it is, but I disrupt everything.
So yeah, if people want to check that out, please do.
Or if you have like, I don't know, an uncle or an aunt or a nephew or a niece or whatever
that you think would like that.
Yeah, fantastic.
I've been told it's a good gift.
Yeah.
Rahen asks, is it really big?
Nope.
It's not that big.
It's about 200 pages or so.
Yeah.
Pradvan says, I can vouch for the book.
Yeah.
Absolutely.
Thank you, Pradvan.
And then also says that Brian imported Zen.
Which is very cute.
I like that.
Well, I've got a close friend that has a telescope and he always wants to talk about
space and I know nothing.
So I'm definitely going to read this book so I can talk to him.
There you go.
Fantastic.
Perfect for that.
All right.
I have, we always close out the show with a joke, but I went and found some space memes
because Dr. Becky is here and you've done a couple of videos on reacting to space memes.
And so I thought maybe some space memes would be appropriate as our jokes for the week.
Yeah, that's so fun because people click on them and they're like, I just learned more
in this 15 minute video about space memes that I did in my entire high school career in physics.
And I'm like, that was always my intention.
Wah ha ha.
I draw you in with the memes and then I hit you with the science.
Exactly.
It's so good.
Yeah.
So maybe we can link to some of the proper ones you've done.
There's a lot.
So I'm going to throw out four quick little space memes.
I think four is it.
I got to remember what the names.
I gave them each a title.
So the first one is Uber.
So there's Matt Damon sitting on ours alone.
Remember he gets abandoned there and he says, where's my Uber?
And then there's the Elon Musk roadster he shot into spaces.
I'll be there in a minute.
I mean, I don't know whose definition of minute that is.
It's going to be wild.
Seriously.
Why did they launch a Tesla into space?
Every time I'm reminded that they did this, I'm like, but why?
Yes, I know.
But why?
There's no reason.
Because they could.
Exactly.
I think that was just because they could.
They never stopped to think whether they should.
Yeah.
Well, it's the same company that is rocking Dogecoin.
So, you know.
All right.
Next one.
This one is called Flaws.
Spaceship design.
Here's a picture of a spaceship with a cutout so you can see inside.
It says, when building a spaceship, the tiniest details are crucial.
For example, this spaceship may be flawed because it has a giant hole in the side.
Brian's like squeak laughing.
That's the level he's reading.
That's awesome.
And yet he's still very still.
I do love these like, they're like a hybrid between a really scientific diagram and then
something you would put out to the public or use in a talk or something like that.
And I remember the ELT, the extremely large telescope that we're building, which I know is a stupid name.
They used emperor penguins for scale next to it in like the public image.
I was like, first of all, who knows how big an emperor penguin is?
Is that like a knee height?
Is that a waist?
What are we talking here?
Apparently it was because on average an emperor penguin is a meter high.
So they were like, oh, perfect.
It's a meter.
It's like a meter rule.
And I was like, yeah, but nobody knows that.
Like, just put a human.
Dean links him out there and the live stream says, boy, the mileage on that Tesla would make it really hard to resell.
I agree.
I like that.
All right.
The next one is distracted.
There's a cat in a space suit staring.
It says, mesmerized by the red dot on the wall.
Missed space launch.
I'm now wondering if there's been any like catstronauts in previous.
There's been dogstronauts.
There have, yeah.
And there's been monkeystronauts.
But I don't know if we've ever sent a cat to space.
I propose a new thing.
Like maybe a cat could spend some time on the International Space Station.
Just think of all the memes and all the funny videos.
I don't think it would have a good time.
Can you imagine like it constantly tries to like have its like hackles raised?
But it can't because it's in zero G.
It just goes in a small circle really slowly.
Yeah.
Maybe you know how they there's those videos online where they put like sellotape on the back of a cat and it constantly like crouches to go under something that's not there.
Maybe it would do something like that.
I don't know.
I'm really intrigued now.
A cat in zero G.
What would it do?
Babefield says Congo tried to send a rat.
Once they've sent a rat, they're going to need a cat to solve the rat in space problem.
And they said also Justin says space toilets are hard.
Space litter boxes are nearly impossible.
And Sam Worley is like, you really think they could get a cat to go into a space rocket?
The minute they open the door of the space rocket, the cat will just dart onto the bed.
But you can't get it.
Like when you take it to the vet.
All right.
Let's round it out.
The last one.
Space Vegas.
It's a black hole.
What happens in a black hole stays in a black hole.
Nice.
Space Vegas.
I like it.
That's right.
Yeah.
I know we talked about this one before, but it made it in a second time.
I guess instead of Sin City, would it be like Bend City?
Yeah.
Spin City.
Yeah.
Spin City.
Yeah.
Maybe.
Something like that.
Things rotate as they go into the black hole.
They don't just go straight.
Do they?
Yeah.
It's actually really, really hard to grow a black hole and make stuff fall in, which everyone's
always really surprised at because they think they're like Hoopers.
But most stuff just orbits them like the Earth orbits the sun.
It's just a kind of a heavier sun that we can't see.
Right.
So most stuff orbits.
It doesn't fall in.
And it takes a lot of effort to make stuff fall in.
So.
Nice.
Once it's in, it stays there.
Yeah.
I'm getting it out.
Fantastic.
All right.
Well, Dr. Becky, thanks for being here.
It was really great to have you.
And Brian, thanks.
As always, good to be with you.
Yeah, you bet.
Bye, everyone.