Do you use Python in an academic setting?
Maybe you run a research lab or teach courses using Python.
Maybe you're even a student using Python.
Whichever it is, you'll find a ton of great advice in this episode.
I talked with Keelan Cooper about how he's using Python in his neuroscience lab at the
University of California, Irvine.
And Keelan wanted me to let you know that if any developers who are not themselves scientists
are interested in learning more about scientific research and ways you might be able to contribute,
please don't hesitate to reach out to him.
This is Talk Python to Me, episode 461, recorded March 14th, 2024.
Are you ready for your host?
There he is.
You're listening to Michael Kennedy on Talk Python to Me.
Live from Portland, Oregon, and this segment was made with Python.
Welcome to Talk Python to Me, a weekly podcast on Python.
This is your host, Michael Kennedy.
Follow me on Mastodon, where I'm @mkennedy, and follow the podcast using
at Talk Python, both on fosstodon.org.
Keep up with the show and listen to over seven years of past episodes at talkpython.fm.
We've started streaming most of our episodes live on YouTube.
Subscribe to our YouTube channel over at talkpython.fm/youtube to get notified about upcoming
shows and be part of that episode.
This episode is sponsored by Neo4j.
It's time to stop asking relational databases to do more than they were made for and simplify
complex data models with graphs.
Check out the sample FastAPI project and see what Neo4j, a native graph database, can do for you.
Find out more at talkpython.fm/Neo4j.
And it's brought to you by Posit Connect from the makers of Shiny.
Publish, share, and deploy all of your data projects that you're creating using Python.
Streamlit, Dash, Shiny, Bokeh, FastAPI, Flask, Quarto, Reports, Dashboards, and APIs.
Posit Connect supports all of them.
Try Posit Connect for free by going to talkpython.fm/Posit, P-O-S-I-T.
Hello, how are you?
I'm doing well.
So awesome to have you here on Talk Python and talking academics.
I didn't tell you before we hit record, but I spent a long time at universities and I just love them.
They're such cool places and it's going to be really fun to get a look inside how Python's
being used there.
Yeah, well, thank you so much for having me.
And yes, I too love universities.
It's kind of like all the coolest parts of humanity just kind of intermixing in one place.
So yeah, I'd love to kind of peel back the curtain on how things are going by.
Yeah, yeah.
Well, we're talking about how you and your colleagues use Python and data science inside of your
neurology research lab.
But before we dive into that, let's just get a bit of background on yourself.
Who are you?
How do you get into Python?
All those things.
So I'm Keelan Cooper.
I'm a neuroscientist at the University of California, Irvine.
So Southern California, 15 minutes from the beach and an hour from the mountains.
But I'm originally from the middle of nowhere, Indiana.
And I started playing with computers and code when I was young.
So like middle school ish, just ripping apart computers and seeing what was in them and then
trying to put them back together and feeling bad when they didn't work right after.
And then the typical, you know, tweaking the software when you don't like what it does
until you make it work.
And then probably my senior year of high school is when I started teaching myself Python.
And it was because we had to do some for some government class, actually.
Oh, wow.
Okay.
And we had to learn.
We were learning about the stock market.
And every day you'd have to spend like 15 minutes going to like some stock website and like filling
out your fake stocks.
And so I wrote a really small Python script that would just pull the data from the website
and populate like an Excel spreadsheet.
And so every day the kids in the class were just like going through and like spending 15,
20 minutes by handwriting it down.
And I would just sit there.
That's awesome.
And so that was kind of the first time I was like, wow, this whole automation thing is pretty
sweet from there.
I thought I just kind of caught the bug pretty early.
Python was definitely the way to go.
Was Python your first programming language?
First programming language was the Windows registry and trying to undo all of the mistakes
of the operating system.
It's been a while since I've been in the Windows registry, but good old reg edit.
I switched to Linux pretty quick.
Linux and Unix.
Are you still on Linux?
Mostly.
My desktops are all Linux.
My servers are obviously all Linux.
I like Mac for a laptop just because, you know, Linux has this thing where you tinker
with it.
And so then any small task you want to do, you end up like rewriting some deep script in
the operating system.
And like two hours later, you're like, what was that small thing I was trying to do again?
Yeah, exactly.
I got distracted.
I was rewriting something in there and off we go.
Yeah.
So Macs are nice because you still have all the same Unix like properties that are great,
but you pay a price for reliability.
You just sell a bit of your soul out, but boy, is that UI nice and those little menu
bar apps are handy.
You know, I was...
It's a little.
That's right.
I was...
I've been playing with running Ubuntu on my Mac M2 Pro, which it runs great, but it's
an ARM version of Mac, of Linux rather.
Well, both really.
But boy, is there a limited supply of applications for an ARM Linux distribution.
Linux.
Let me tell you, they're like, just download the Debian package.
I imagine that'll change pretty quick though.
Yeah.
They're like, just download the Debian package.
You just install it.
Like wrong platform.
Like again, over half.
But yeah, I think it will change as I think ARM's going to start to take over Windows a little
bit as well.
And obviously the Mac world is basically transitioning.
So anyone who has a Mac.
Yeah.
I think it's Qualcomm that just kind of started hinting that they were going to try and really
heavily compete with the M line of processors and have some pretty good specs.
So it'll be good.
I have an M3 and it's pretty nice.
It is really nice.
Like I said, I like to run more stuff on it, but it's still kind of Intel or x86 stuff
for Linux and Windows.
So it's a little hard to work with that, but still super fun.
That's a long way to say it's a very long time since I've been in a reg edit.
Personally, it sounds like you as well being not naming Windows too much.
I'm so bad at Windows now, like when I'm helping people with Python or something else and they
show me their computer, there's always that like 10 minute learning curve of like, okay,
how do I, how do I do anything basic on this machine?
Or even like the keyboard shortcuts you get so accustomed to when people don't have any of
those little things that you're just like, how do I, how do I select everything?
And that is it.
Like I did professional software development on Windows for a long, long time.
I even wrote a bunch of Windows apps.
It was, it was great.
But going back and forth too quickly, that or Linux, like just the hotkeys, I just get
broken.
Not just on Windows.
Also, when I come back to Mac, like I'm just completely out of sorts.
So yeah, it's fun.
All right.
Well, let's talk academics and Python from a, probably a OS, mostly agnostic perspective.
But yeah, just, you know, give us a sense of the kind of research you do.
You know, what is your field?
What do you study?
Those kinds of things.
So people get a sense of like, why am I talking?
Where are you coming from as you talk about doing all these things?
The core of my work is pure neuroscience.
So, so basic science.
What we do mainly in the lab is we take really tiny wires.
So they're like a fifth of the size of the human hair.
And now we're using something called silicon probes, which are, they're manufactured the
same way that computer chips are manufactured on silicon wafers using photolithography.
Do you get a higher density that way?
Do you get like a bunch of little sensors on one point or something?
Okay.
So we used to build these little drives.
I used to have one here, but I got rid of it.
Little drives by hand.
So you would just feed the wires in with, with forceps.
And so you'd get maybe 64 or 128 at most, depending on how much time you want to sit there and
feed the wires in.
Yeah.
But now you can just get the manufactured.
You pay a lot more, but you get twice, three times the sites.
And the whole point is the more sites you have, the more neurons you can actually record
from in the brain.
Yeah.
You're not just saying this part of the brain lit up, but you can have a much better picture,
right?
The constituent part of your brain is the neuron.
And so of the millions and billions of neurons, depending on the species you're recording from,
we can record maybe a few hundred of them.
But that's usually sufficient to actually, in the specific region you study, and I can talk
about that more, to discern some sort of information from it.
And so really the data type we really care about is this tiny little electrical voltages
that tell you what different neurons in the brain are talking about.
And so you put the wires in, you record the conversations of a bunch of neurons.
And then particularly we're interested in two brain regions that are critical for memory,
learning, and decision-making.
And this is the hippocampus, which in humans is about the size of your pinky and a few
inches in from your ear.
And the prefrontal cortex, which most people know about right behind your forehead, important
for learning, decision-making, and all those sorts of things.
Yeah.
So that's the core of my work is I'm in the lab doing the actual data collection and building
equipment to actually do that.
But once you have all of that data and the data keeps growing, like most other fields, you
got to do a lot of pre-processing, which takes Python.
You got to do a lot of post-processing, which takes a lot of Python.
And also we do something called neural decoding.
So not only do we just like say descriptively, what are these neurons doing?
But we can go one step further and say, what actual information are these cells representing?
So in the brain, we can kind of say, this is kind of the fundamental kind of information
transfer and how information is manipulated in the brain and how it ships information from
the environment into memory and how it uses that to make a decision.
All of those kinds of things we can use through fancy modeling and statistics and more recently,
deep learning and those sorts of things.
We'll have to come back to deep learning later.
That'll be fun.
Given your background.
So for this hardware, do you write the software that actually talks directly to the hardware
or is there something that just records it and you grab some sort of custom file format and
run with it?
Yeah.
More recently, it kind of depends on the lab.
So as time goes on, there's more and more companies that you can just buy off the shelf and
recording platforms, mostly for the electrical engineering people.
It's kind of like an audio amplifier because you're recording at millivolts in the brain.
So you have to amplify it, write it to, if you're plugged in with a wire, write it to the
computer.
So all that takes software in various forms.
And then we do a lot of animal research.
So the tasks that the animals do are pretty much all automated.
But recently in the lab, we've kind of had this resurgence of developing kind of novel hardware
and a lot of automation of behavior.
So I've kind of rewritten most of our entire behavioral stacks, which is a lot of just some
microcontroller programming, which not a lot of that's in Python.
A lot of that's just kind of like C++ and those sorts of things.
But we have cameras all over.
So I wrote this kind of like camera server that streams all of the camera footage from
a bunch of automated boxes to some like central server that just collects all of that data.
So yeah, a lot of the behavioral stuff nowadays, we're just building in-house to collect all
of the behavior data.
The EFIS stuff is now, especially because we're doing something called wireless recording.
So instead of just having a wire plugged into the head, it just writes it to like an SD card
or Bluetooth.
That's just kind of all on chip.
So it's just whatever the microcontroller language of the chip needs.
This portion of Talk Python to Me is brought to you by Neo4j.
Do you know Neo4j?
Neo4j is a native graph database.
And if the slowest part of your data access patterns involves computing relationships,
why not use a database that stores those relationships directly in the database, unlike your typical
relational one?
A graph database lets you model the data the way it looks in the real world, instead of forcing
it into rows and columns.
It's time to stop asking a relational database to do more than they were made for and simplify
complex data models with graphs.
If you haven't used a graph database before, you might be wondering.
About common use cases.
What's it for?
Here are just a few.
Detecting fraud.
Enhancing AI.
Managing supply chains.
Gaining a 360 degree view of your data.
And anywhere else you have highly connected data.
To use Neo4j from Python, it's a simple pip install Neo4j.
And to help you get started, their docs include a sample web app demonstrating how to use it
both from Flask and FastAPI.
Find it in their docs or search GitHub for Neo4j Movies Application Quick Start.
Developers are solving some of the world's biggest problems with graphs.
Now it's your turn.
Visit talkpython.fm/Neo4j to get started.
That's talkpython.fm/Neo4j.
And the letter J.
Thank you to Neo4j for supporting Talk Python to me.
I think it's surprising how much software and even hardware, but definitely software is involved
for something that doesn't sound like a software discipline.
Yeah.
You wouldn't think of what you guys are doing as inherently almost like a software team,
but there's a lot of software there.
Absolutely.
And it's growing.
So it used to be 10, 20 years ago, more biology, I'd say, like more wet lab stuff.
But 90% of what I do as kind of a neurobiologist is really just engineering style things.
Like I'm more recently designing PCBs and I'm in the shop a lot, just like with saws and
hammers and drills and like actually physically building things.
And obviously a lot of code.
And the coding part is becoming bigger and bigger to the point where in the field, I always say
that the neuroscience is like about three decades behind astrophysics.
Because all the problems that like neuroscientists, like say we're facing now as a field, they
have like three decades prior where in astrophysics, they're like, well, or neuroscience, we're
like, what do we do with all this data?
This is, I mean, I'm collecting a hundred gigabytes an hour, if not more, like what do we do?
That is a lot.
Yeah.
But relative to like some of those big telescopes that are collecting like almost petabyte scale.
I would say both ends of physics, like the very, very extreme ends of physics.
So astrophysics, the very large and then particle physics, right?
At CERN as well, they've got insane amounts of data.
Yeah.
And that's what we're starting to see.
I think in neuroscience too, is that kind of division of like, because the scale of data
collection is so big, you're starting to need not just a single lab, but teams.
So we have a few institutes now that are just pumping out terabytes of data.
And so you start to see that division between the neuroscientists who are really in the lab,
hands-on with actual neural tissue or the recording device, and the neuroscientists who
are just take the data and analyze it and develop new models and statistical models.
And also theory, there's always a dearth of theory in neuroscience, but the computational
modeling is certainly getting a lot bigger within the last few decades as well, where people's
entire job is just how do we model some of these things in code?
You probably run into different research groups, different teams that have different levels
of sophistication from a software side.
And do you see like a productivity or a quality difference jump out from like the kind of work
or the velocity of work that people are doing there?
Absolutely.
It makes me almost like a, it's a huge range.
There are like very sophisticated labs.
And usually those are the labs that have kind of just a pure software person on the team or
people who are very inclined towards software all the way to, and it makes me so sad when people
are spending like weeks in a spreadsheet, just manually doing things by hand.
Yeah, I know.
You could do this in five minutes and by a minute.
And not only could you do it faster, you could do it without any errors.
Yeah, more reliable.
None of those like, oh, I misread it and I shifted off by a cell or I typed in, I missed
something, right?
Because it just reads what's there.
Yeah.
A lot of like graduate programs are starting to wake up to this fact that it's going to
be almost impossible to do any science without some degree of proficiency in coding.
And I think a lot of, a lot of say grad students and postdocs and so on, when they actually sit
down and try and analyze their data, whether they're just in Excel or they need to write
a little Python script, that's kind of their first introduction is, oh, I have this data.
I need to do something with it.
I'm going to Google exactly how do I read in this data or how do I do a t-test in Python
or how do I plot something in matplotlib?
And that's kind of the level that they start getting into out of necessity.
But the sophistication and the speed, because that's, they're usually just teaching themselves.
That's most of academia.
It's just, you have a problem, spend a few days Googling and reading books until you find
it.
And once it works, you can kind of just leave it.
You don't have to clean it up or anything, right?
Yeah.
Okay.
Which results in a lot of, I mean, the progress of science doesn't go away, but the code is,
you know, not robust.
And so that's why you see things, especially in other fields of like psychology and such
like replication crises.
And people have done meta analysis of running the same software stack on like 12 different
data sets and you get different results.
And so you start to kind of see that shaky foundation is starting to bleed into the, like
you said, the reliability results.
And starting to have consequences, not just it's more work or something.
Exactly.
Maybe we could start a bit by just talking about maybe the history, you know, diving into this
a little bit more, just the history of programming in neuroscience.
I wasn't in neuroscience in any way, but I worked with a bunch of cognitive scientists studying,
you know, how people solve problems and thought about things at a lab for one of my first jobs.
And we studied all through eye tracking.
Yeah.
Not the iPhone, but actual eyes.
It was fascinating.
It was tons of data.
It was really cool.
And there were like, you described a lot of people who would do sort of Excel stuff and
they would take the data and they process it.
And over time, we just started to automate these things.
And their first thought was, you're programming me out of a job.
I'm like, no, no, no.
This is the crappy part of your job.
Like you're supposed to analyze the results and think about it and plan new stuff.
And now you can just focus on that.
Right.
And as the software got better, you know, we just tackled bigger problems.
So, you know, maybe give us a bit of a history of on your side.
So I love the cognitive science.
That's my more background is cognitive science.
I was my undergrad and grew up in science in a cognitive science department while also
doing some wet lab neuroscience stuff.
So it's fun.
Yeah, absolutely.
Did you start out with like MATLAB and that kind of stuff?
Is that where they told you you need to be?
Neuroscience has certainly had at least our branch of neuroscience just because by the nature
of recording voltages and you need to write to a computer.
So there has been kind of a long history of for as long as there's been even like punch
card computers.
People have kind of read in the data into the computer and done, you know, their statistics
on that rather than something else.
I'm just I'm actually recently writing a kind of a review article on kind of the history
of data science and neuroscience.
And I loved this paper.
It was from 1938.
And they took an EEG spectrum.
And so EEG is just the continuous time series of brain voltage.
So you're not in the brain recording.
And this is, I think, from humans.
And they took something called the Fourier transform, which I'll be as up to speed with that is you
basically just take some oscillating signal and you break it down into its constituent parts.
And most of you have seen it before.
If you've ever seen like an audio spectrogram, that's kind of the most notable visualization
where you can kind of see the high frequencies and the low frequencies.
Basically, it pulls the frequencies out of the signal, right?
Yeah.
But the way they did this, this is 1938.
There's no computers.
So they actually had mechanical device where they would just take this EEG trace that was
on tape and they would feed it into this like mechanical machine.
And it would basically read kind of this black line on the tape.
And so as it would crank the tape around this machine, depending on kind of the frequency that
the line went up and down, that would read out the Fourier transform.
So it was mechanical, like a lot of those cool devices back in the older days.
That's impressive.
Now you can get that same thing with in MATLAB.
You just type FFT, parentheses, parentheses, put your data in the middle and you get the
same thing in microseconds.
But neuroscience, at least my field, has kind of always had this kind of serendipitous relationship
with computing generally, coding generally.
And a lot of the code, I think earlier on was kind of was Fortran-ish and then it moved
towards MATLAB and MATLAB's kind of had its stake in the ground for a long time.
Just because that was the first kind of software that you could really do array manipulations
on well.
And it was kind of a higher level than some of the lower level programming.
So a lot of the older labs have their entire code base and stack and analysis software in
MATLAB.
And so it's only been within maybe five to six, seven years, it'll be a bit longer,
10 years that you've really seen Python start to supplant MATLAB as kind of the de facto
programming language in labs, just because of the cost of trying to transfer everything over.
And despite the fact that MATLAB isn't open source and it's extremely expensive, most universities
have licenses.
And so that kind of facilitates...
It's prepaid.
Yeah.
In a sense.
Yeah.
But it is still pretty expensive.
Especially if you get those little toolboxes, like wavelet decomposition toolbox, 2,000 bucks
instead of a pip install, you know?
And again, we do a lot of signal processing.
And so that's exactly the place you want to be.
And like MATLAB usually controls, because it has pretty good control over like external hardware,
you can run like your behavior, your task kind of in MATLAB codes.
You can kind of do everything in one language as you would like to do in Python.
But it's starting to kind of go away.
And I think a lot of that is just because the allure of Python, which is so many tools,
and because it's probably a lot easier to learn for most people than MATLAB.
We're kind of starting to see that switch now that there's kind of more to offer, I'd say,
a lot of scientists than MATLAB.
Yeah, you said 10, 12 years ago.
At least in our film.
Yeah, the difference in the external packages on PyPI you can get,
and especially the ones for data science have just exploded.
The choices and the stuff that's out there, it's pretty diverse.
It's pretty crazy.
The only other one that I think is still in pretty strong competition with Python
from the perspective of, we collaborate a lot with like mathematicians and statisticians,
and R is their usual favorite, just because statistics,
like all the best statistical packages are still pretty much in R.
And so that's where a lot of people live.
TG Plot's pretty good.
Pretty mixed plots.
Yeah, that's interesting.
It's really focused, and it's really good at what it does.
And one of the things that I think is worth just considering,
if somebody comes, let's say a brand new first year grad student comes into the lab,
and you're like, all right, what's your programming experience?
Like, well, program the clock on the VCR.
Like, okay, we're going to have to start you somewhere or something, right?
And you could teach them something really specific, like MATLAB, or something along those lines.
But if they learn something like Julia, not like Julia, like Python, not Julia, maybe even not really R, but R is closer somewhat,
is they learn not just a skill for the lab, but it's kind of almost any software job is potentially within reach,
with a little bit of learning about that area, right?
Like, if you know Python, you say, I want a job, there's a massive set of options out there.
If you say, I know MATLAB, or even Julia, it's like, okay, well, here's the few labs and the few research areas and the real,
I just think it's something that-
A lot of engineering firms.
Yeah, yeah.
I'm just thinking that, like, a lot of academic folks should consider what happens if the student doesn't necessarily become a professor.
You know what I mean?
Which actually is a lot of the time, right?
Or a professional researcher of some sort.
And that's a really awesome skill to have on top of your degree.
So I think that's just a big win for it.
I'm happy to see that.
And that literal situation just happened where a statistician that we were collaborating pretty closely with graduated,
brilliant guy, and got a job at Microsoft.
And so we were in a meeting after he was there, and they were like,
what's some advice that you have now that you've been, you know, in industry for a while?
And he's like, stop using R.
Learn Python, because everyone here uses Python.
And it took me a few months to kind of switch from the R worldview of, you know,
caret hyphen to equal sign to actually to work and collaborate with everyone, because everyone's just using Python.
Yeah.
From his perspective, and I'm sure it's not unique.
No, I'm sure that it's not either.
I think, yeah, I just think it's, it's not like a religious war.
It's not like, oh, I think Python is absolutely better.
You should just not use other stuff.
I just think it's preparing people for stuff beyond school.
It's a pretty interesting angle to take.
And it's not like you can't learn other things.
I think it's really good to learn other things, especially ones that are complementary, where R can be complementary, especially now that they have a lot of the, like, subsystem packages.
Or when I get R code, I usually just write, like, a subprocess.
I did this recently, just wrote, like, a subprocess line to call the R script, because I was too lazy to rewrite it.
Yeah, sure.
But there's other, like, I don't know, like, Rust is probably a good one to probably try and branch out.
Or, like, lower level languages, like C++.
Yeah.
If you need for what you're doing.
Yeah, and it sounds like you guys do for talking to hardware and stuff like that.
Yeah, occasionally.
Boy, there's not a lot of things Python can't do.
Break out some MicroPython when you got to get your microcontrollers and stuff.
This portion of Talk Python to Me is brought to you by Posit,
the makers of Shiny, formerly RStudio, and especially Shiny for Python.
Let me ask you a question.
Are you building awesome things?
Of course you are.
You're a developer or a data scientist.
That's what we do.
And you should check out Posit Connect.
Posit Connect is a way for you to publish, share, and deploy all the data products that you're building using Python.
People ask me the same question all the time.
Michael, I have some cool data science project or notebook that I built.
How do I share it with my users, stakeholders, teammates?
Do I need to learn FastAPI or Flask or maybe Vue or React.js?
Hold on now.
Those are cool technologies, and I'm sure you'd benefit from them, but maybe stay focused on the data project.
Let Posit Connect handle that side of things.
With Posit Connect, you can rapidly and securely deploy the things you build in Python.
Streamlit, Dash, Shiny, Bokeh, FastAPI, Flask, Quarto, ports, dashboards, and APIs.
Posit Connect supports all of them.
And Posit Connect comes with all the bells and whistles to satisfy IT and other enterprise requirements.
Make deployment the easiest step in your workflow with Posit Connect.
For a limited time, you can try Posit Connect for free for three months by going to talkpython.fm/posit.
That's talkpython.fm/P-O-S-I-T.
The link is in your podcast player show notes.
Thank you to the team at Posit for supporting Talk Python.
So another thing that's, I don't know how it's received.
I know it took a while to kind of really catch on.
And I think the thing that just broke the final barriers for open source being adopted, at least in business, was the AI stuff and the data science stuff.
People were like, oh, we can't use this open source stuff.
We've got to have a SLA and some company we can sue if our code doesn't work right or, you know, whatever, right?
Something crazy like that.
And they're like, but you understand all the AI and all the data science.
We have to use this open source stuff.
Like, all right, fine.
What's the open source story for you guys?
Academia is probably championed open source for a really long time just because, I mean, open source back, I mean, even when I first started, it was just if you read a paper and someone has some new fancy analysis.
Before it became a bigger push by, like, funding agencies to, like, actually post it to GitHub or some repository.
I mean, you could just email people and be like, hey, I saw your paper.
I want that script.
And they would just send you a MATLAB file.
And it would be, you know, just whatever they had written.
But it was in MATLAB and you'd have to kind of tear it apart yourself.
And there was little to no documentation.
You'd be lucky if there's comments and it's, you know, spaghetti code.
But, you know, you figure that out.
You kind of work backwards and deconstruct it.
And eventually you kind of have their code.
So that kind of ethos of just, you know, scientists are really good, by and large, of just sharing information and helping people out.
If you have a question, just ask.
It's kind of always been there.
At least in our field, it's not as competitive as some other ones where you're just kind of like racing to get the next project out.
It happens, but rarely.
But now a lot of funding agencies and just in general, people are just excited about when you publish a paper, you put a GitHub link in the bottom of the paper.
And then that links to the repository.
And, yeah, maybe it's not been updated in a while, but the code's there and you can just take it and grab it.
For the reproducibility.
How about using other things?
Is there SciPy?
I know for astronomy, there's AstroPy.
Is there Neuropy?
It's really still more analysis-dependent and pre-process-dependent.
So there's kind of this, it's still the early days where there's probably too many formats just because no one can agree on what's the best one.
So like even a lot of the data formats are written kind of in Python to take whatever data you have and reformat it to something shareable.
And there's five or six of them floating around.
There's probably two that are still duking it out to see which one will be the best.
And probably five years from now, there's going to be a better one.
So data formats, certainly there's kind of this, there's a few that are neck and neck.
Analysis pipelines, a lot of those are still done in-house, but they're starting to be a lot more toolkits and frameworks and packages.
There's some really good ones that have more documentation written.
They're on the PyPy repositories.
So you can just pip install them and you have them.
The computational neuroscience people are great at this.
So all the like neural simulation software, that is all really well documented, really well written.
A lot of good like example code and tutorials and so on.
So yeah, we're starting to see kind of this more robust kind of ecosystem where you can just kind of pull things.
It still just kind of varies.
There's probably still not one go-to place other than the standard data science toolkits.
Right, right.
The pandas and so on.
Yeah, NumPy, Matplotlib, pandas, scikit-learn, if you're doing deep learning, PyTorch or TensorFlow, all of those still apply to any data site stack.
Yeah, of course.
What's your day-to-day stack look like if you're sitting down to do some analysis?
I have a VS Code and like autocomplete where I just write import in and it just NumPy, Matplotlib, pandas.
Then I usually delete pandas because unless I have a CSV file, I'm not using it.
So NumPy, Matplotlib, I can probably do 75% of the things I want to do.
Scikit-learn and SciPy, obviously, if I'm doing any stats with those things, those libraries I might go to.
And then over the last few years, I kind of just have my own, just because you catch yourself writing the same functions over and over and over again.
And so I just started building my kind of internal framework of just things I know I need.
So if I'm working with LFP data, I have all my filters there.
If I have spike data, I have all my spikes there.
We do a lot of decoding, so developing deep learning algorithms to decode neural data.
All of those are kind of listed there.
Yeah, and then I started realizing, dude, internal tools make the difference between solving a problem in 10 minutes or solving it in an hour, where I can just sit down and have everything automated to come up.
So yeah, the standard data science stack I use pretty frequently.
Hardware stack, I mean, so VS Code, I just recently switched to just because everyone was talking about it from Sublime.
I usually just edit it in a terminal.
And I was like, oh, I'll try it out.
Everyone's talking about it.
It's one of the good things Microsoft has done.
It's pretty sweet.
Yeah, it is pretty sweet.
That's pretty nice.
And when you do the VS Code stuff, are you just writing straight Python scripts or are you doing VS Code on top of notebooks?
Yeah.
Because it has that kind of text view of a notebook type of thing, I think.
I used to use exclusively Python scripts, so just the .py.
Started seeing how great Jupyter was.
And so then you start doing everything in Jupyter, and then you start to have all these convoluted notebooks and notebook V1 through 7.
So then you realize that you've got to find a balance between, you know, notebooks are great for presentation and for quickly testing.
But the sooner you can get it into, like, a class structure or a package or something.
The sort of productized version of it, you wanted to get it down into Python code a lot of times, probably.
Exactly.
Like your internal tools you talked about.
You're like, all right, this is the library you just call stuff, right?
That just belongs more as a package and not a...
The sooner you can kind of condense, pull the code out of the notebook and just leave notebooks for presentation, it's probably the best.
Yeah.
It's a lot of pipelines.
So it's a lot of preprocessing pipelines.
So you don't want, you know, 50 cells of just moving data.
Preparing, yeah.
You talked about having quite a bit of data, some of that being image-based.
Sounds like a lot of work.
Do you have, like, a big compute cluster?
Do you just have, like, an ultra, an M3 ultra or whatever?
That's not even not yet.
It's M2s.
But do you have just a big machine or do you guys do cloud stuff?
What's compute look like?
Depends on what I'm doing, what I need.
Most things, let's be honest, I could probably just use my desktop computers, really a super micro server.
It just runs Linux.
But then for doing deep learning, you need GPUs.
And so we have a nice set of GPUs we can pull, too.
Yeah.
Do you do your own training on LLMs and other deep learning things?
The only LLM training I did was just for fun.
But it's all the deep learning stuff we have to train.
And it's on R, particularly.
So that's all GPUs for that.
A lot of the statistics we do are, like, permutations.
So you need to kind of, like, parallelize them out into CPUs.
So then I'll pull, like, a CPU cluster we have if I need it.
Do you see Irvine have, like, a big compute resource sort of thing you can grab?
They have a campus-wide one that you can get on.
And there's a few independent ones that I have access to.
So GPU is kind of in a different place than CPUs are.
So I can just kind of pick and choose.
And then I have a few servers in the lab that I've just kind of put together.
All my camera stuff, all my behavior, I kind of wrote it so it's cloud-based.
So I can kind of just pull up my phone and look at the videos of what animals are doing and stuff.
All that runs on just a server in the lab.
So, yeah, it's the compute is there when you need it.
And I think as I've matured, I've kind of learned when to use what compute when and when it's worth taking the extra time to use it when you don't need to.
And also when a lot of the times you don't even need it.
So I know a lot of people when I see their code and they complain that it takes like an hour to run.
I mean, just using multiprocessing in Python, that in and of itself is enough to not need to use a cluster.
They're just using a single thread for their analysis.
For sure.
Or just a bad programming patterns.
design patterns.
Like you're looping over the thing in the Pandas data frame instead of doing vector operations in the Pandas data frame.
Like that kind of stuff, right?
A hundred percent.
Yeah.
I mean, that was one of the first things that I usually teach.
I have this little example script that shows that like, why is it better to pre-allocate array rather than to just append to the bottom?
And it's like these things that we kind of take for granted now, but it's not intuitive unless you actually see it.
No, you learn it the hard way, but it sticks in your mind once you learn it.
Well, yeah, I think that's the issue.
It's like people just take it for granted.
Yeah, for sure.
Like, why didn't you know that?
How do you onboard new people?
It just kind of depends on the lab.
Every lab kind of has their own structure of just kind of this hierarchy of expertise where like I started as an undergrad and I just volunteered in a lab at a different university and just volunteered my time.
Eventually could get paid.
Just wanted to spend time in the lab and you could all the way up to grad students who are there to get a PhD and have more kind of autonomy over their projects.
A postdoc who has a PhD and five to eight years of experience.
And so it can pretty work well.
Then there's like staff scientists or even a lot of labs now are hiring just pure engineers or pure software people.
Okay.
Because there's such a need for that.
And so, yeah, it really just depends on the lab specific situation and what their focus is on and what they need.
Cool.
I guess if you have a good NSF grant and you got some extra money, it might be money well spent to hire some student who has good programming skills, right?
Absolutely.
Yeah.
You talked about the video stuff that you're doing, the streaming video.
Do you actually do analysis on that or is it just for you to go back and look at?
Oh, yeah.
Yeah.
We do analysis on that.
There's actually a pretty cool deep learning package out now.
We didn't write it.
Another lab did where you just give it the video frame and it can automatically segment kind of it's an animal.
So, like where their paws are or where their like nose is looking or in some cases people have like you're talking about eye tracking.
They do eye tracking in like mice now.
They do eye tracking on mice.
That was hard on humans in the 90s.
Yeah.
There's a lot of VR.
So, they put kind of mice in this like VR system.
Oh, wow.
And they can like see where their little mouse pupil is looking on like the VR screen.
Yeah.
And do they show them different scenarios and they can detect that and they react to it?
Oh, absolutely.
Incredible.
So, yeah.
And a lot of stuff, at least in our field, the Nobel Prize was awarded for you stick some electrodes in the hippocampus part of your brain that's important for learning and memory.
And then you have the animal kind of run around some environment.
And then you take some video data of kind of where they were running the environment.
And if you were only looking at the brain data, you can predict to like 90 some percent accuracy the location of the animal.
So, you can show this kind of this correspondence that inside the brain is a map of kind of the environment.
Our stuff, we're taking that a little one step further that says this map is not just for space.
It's for non-spatial and other things too.
There's this kind of network of information in the brain that the animal can kind of like navigate through, even if they're just standing still but thinking about some sort of problem.
But we use video data to validate what the animal's doing or check what kind of tasks they're doing and so on.
So, yeah, a lot of multimodal heterogeneous data that each needs its own funky pre-processing.
And depending on the task at hand, you're writing something new to ask that question.
So, is that OpenCV?
Yeah, my stuff is OpenCV and streamed over sockets and some Django webpage.
It's fun.
It's cool to build.
That sounds really cool.
Yeah, absolutely.
So, what kind of questions are you answering with the video?
Yeah.
Or is it just to correlate back with the time series of what you're measuring in the brain?
So, like I said, the Nobel Prize was for this spatial map.
We're doing this non-spatial stuff.
And so, we kind of do both in the lab where we have an animal kind of run around and then we have an animal just kind of sit still
and do some sort of mental task.
In our case, it's a – they have to memorize a sequence of odors and if the sequence gets shuffled, they make a different choice.
And so, we're basically showing how does the brain work for the spatial part versus the non-spatial part?
What's similar about these two things?
What's different about these things?
And we show that the – one of our recent papers was that the brain uses a lot of the similar mechanisms to navigate space as it does to navigate this kind of non-spatial odor task.
But we also showed that there's this mechanism that the brain uses to take kind of discrete memories and link them together into some kind of mirror hole.
Best case being like this talk we've been talking back and forth for 30-some minutes now.
Inside, there's kind of chunks of the conversation.
So, if tomorrow someone was to ask you, what did you and that neuroscience guy talk about on your podcast?
You would kind of rattle off this story of, oh, we talked about history of Python and this and this and this, right?
This, this, and this are each kind of discrete memories that in your brain you kind of lock together and store them.
So, you could use them, make decisions about them and so on and so on.
Think about it as a whole, not just the little ideas, every little idea, but like just the big concept of it, right?
Exactly, yeah.
And it's a fundamental thing that the brain does.
Like people say humans are storytellers and your life is kind of the sequence of events of stories.
And so, you use that every single day.
And across a bunch of diseases, that's one of the first things to actually be impaired, whether it's addiction or schizophrenia or Alzheimer's.
That kind of ability to link things in time and link them well and make decisions about them starts to get impaired.
That's not great when that happens, but that is what happens, right?
Absolutely, yeah.
But as with the software engineering practices, for lack of a better word, that you would recommend that maybe other grad students, professors who are feeling like they're not, they don't have their software game fully together, pay attention to it.
And maybe what should they ignore, right?
Like, should they pay attention to like source control and get up?
Should they have unit tests or, you know, what should they pay attention to or not?
First off, no one writes tests.
That is just only the very few, very well put together.
And usually people who just came from industry write tests.
Sure.
Which is an issue.
But yeah, first off, just learn Python.
I've said that hundreds of times and I'm preaching to the choir in this audience.
You are, for sure.
Learn Python is honestly, there's not much better you could learn.
And two, it's, you know, it's quintessential automation stuff.
So it's really just think about the things that you're doing, the spreadsheets or, you know, the simple things.
And really just ask yourself, if you find yourself doing any repetitive tasks, that's a software problem.
Those are the things to kind of look at first.
So you have your text editor in one window, Google in the other, and stack overflow your way to learning.
And so the way people, I think, really do kind of teach themselves Python is probably the best way to learn.
But nevertheless, I think there is a real need for, and again, we're starting to see more of it, just formal education.
Even if it's just a course, our program is really great that they started to teach a Python course just because the students requested it because they knew how important it was.
Like a Python for neuroscience?
Exactly.
Okay.
Yeah.
I mean, you just work your way through if statements for loops, data types.
You probably also, I'm just guessing you get a chance to work with some of these external libraries that are relevant to studies they're doing, right?
Rather than, here's an example of stock market data.
You're like, great, not a trader.
I don't want to be a programmer.
Why am I here, you know?
Yeah, it's really relevant.
And I think it's just kind of seeing like, oh, yeah, I would do that this way, but this is so much easier if I use Python.
And I can use it in Python.
And just seeing that, oh, it's not as bad as the mountain looks a lot higher when you're at the base than the summit.
So it does.
Seeing it done once is usually enough to kind of tell people it's not as bad as you originally think.
Yeah.
I feel like maybe I saw it this way.
I certainly know a lot of other people see it this way.
I mean, when I was younger.
But a lot of people see it this way as well.
Is it like you got to be crazy smart to do programming.
It's really challenging.
It's kind of one of those things that only a few people can do.
And then you get into it and you're like, oh, it's not a few really huge steps and things you've got to solve.
It's like a thousand small steps.
And each one of the little small steps, you're like, that was actually easy.
That's no big deal.
What's the next step?
And you get to the end, you're like, where was the big step?
Where was it really hard, right?
Yeah, absolutely.
Yeah.
Do you have some experience where people in the department or people that worked with you are like, oh, I'm not a programmer.
I don't want to do this stuff.
Then they kind of got into it and really found out that programming was something they really liked.
Any converts out there?
Yeah, I would say so.
I mean, I think there's kind of two kinds of people.
There's people who program just because, what is it?
The programming is an art book or whatever.
They love it just for the sake of loving.
And I'm probably closer to those kind of people, right?
I just think it's the coolest thing, like academic.
But then there's the people who just kind of see it as like it's a tool like anything else.
And so you could be an expert in a drill or you could just know to pick up a drill.
That's kind of the majority of people is that it's just another tool in their toolkit, especially for a scientist, just to answer the question that you're trying to answer.
And I would even flip the reverse where there's been some times where I've maybe even used Python too much.
In the sense that like I made a problem more because it's like the automation dilemma, right?
It's like, do I spend an hour automating this when I could do it in 10 minutes?
You got to do it a lot of times and all of a sudden the hour is worth it.
But if it turns out you don't.
It's like I might need this a year from now.
So I might as well just write the script.
Whereas I could just do it in Excel.
That's pretty standard.
Standard problems we all run into in programming.
It's like, write some code to do that.
Or I could just be done with it for sure.
All right.
I think we've got time for a couple more topics.
One thing that I think might be fun to talk about is publishing papers, right?
Obviously, if you're in academics, especially in labs, you got to publish papers.
Do you use notebooks and stuff like that for your papers?
Or is that just kind of separate?
What's...
Yeah, like I said, notebooks are great for presentation.
So yeah, I use notebooks kind of for development just because you can quickly run code and go
back up and move things around.
And so I kind of like that ability to kind of just a stream of consciousness, write code
until you kind of like see how it's kind of working the prototype and then refactor out
into an actual .py document or a package or something.
So that's kind of been my workflow and it works pretty well.
But then when you actually have the code and it works and it's robust, you actually want
to put...
There's a lot of figures.
That's usually the main thing.
So you kind of put all of that.
Here's the data.
Here's the pre-processing.
Here's the figure one.
Here's figure two, figure three in the notebook just so it's reproducible and other people
can download it and rerun your code and that sort of thing.
So I think that's slowly becoming kind of the standard approach for those labs that use
Python and they share their code openly.
That's kind of how they do it.
Anything like executable books or any of those things that kind of produce printable?
Output out of the notebooks?
Like publishable output out of the notebooks?
Not a lot.
But there's one of the journals, it's called eLife.
It's kind of...
It's trying to like push the boundaries of what it means to publish a scientific paper.
And so they kind of have...
Because most papers are really just on the web nowadays.
The journals aren't really physical journals as much anymore.
They kind of have like papers as executable code where you can like plot the figure in
the browser and kind of run through the notebook and just as an experiment.
But it's pretty cool to kind of see these like new alternative ways to still convey the same
findings.
But you can play with it.
You can come to CA out.
So the methods are kind of implicit in the...
What's the name of the journal?
That's eLife.
eLife.
Okay, cool.
Yeah, you probably, I suppose, need some way to capture the data output because you
might not have access to the compute to recompute it.
You know, somehow it's got to sort of be a static version.
But that sounds really cool.
Yeah.
And especially for like most recently, some of our like trained models, it's becoming more
important to just share the weights and share those sorts of things too.
You can't just share the code to train the thing if people don't have the compute to actually
train them themselves.
It's kind of growing to not just sharing your data, not just sharing your code, but
you need to share like the key derivatives of the preprocessing and those sorts of things.
Or even just sharing the version numbers because there's been psychology or fMRI literature.
There's like a bug in some version that like made a lot of the results null.
And so, you know, one person could use version 3.7 of a package, but that had a bug, but people
don't know that.
So they claim it's not reproducible, but it's really just not the same algorithms.
Yeah, yeah, yeah.
Or like across languages, like if you rerun the same analysis in MATLAB versus Python versus
R, especially complex ones, there's a lot of little design decisions under the hood that
might tweak exactly how that regression fits or exactly how that, if you're statistically
sampling, how the sampling works under the hood of those sorts of things.
Awesome.
Are you familiar with the Journal of Open Source Software?
Yeah.
I had the folks on from there.
Yeah.
I had them on quite a while ago.
And I think they're trying to solve the interesting problem of if you take the time to create a
really nice package for your area, you might have not taken your time writing the paper.
And so you wouldn't get credit because you don't have as many papers to publish.
So they let you publish like your open source work there, which I think is pretty cool.
What do you think about that?
We kind of had that same problem.
One of the, I run a nonprofit called Continual AI.
It does artificial intelligence and outreach and research, and we have conferences and all
sorts of events.
But one of the main things we've done is we built a deep learning library on top of PyTorch
called Avalanche.
And so like we had a really great community of mostly volunteers who just saw the need
in the field and put it together.
But then again, it's like a lot of us are academics.
How do you present this?
And so you write wrapper papers around kind of the framework.
So that's kind of been the de facto way of like, it's not really a paper, but you still
need to like, you know, share it and get credit for it and put your name on it.
It's certainly an issue.
I'm starting to see it not even just with software, but even with hardware, because hardware
is becoming more open source in our field.
And so you just kind of write like a paper about the hardware solution to some problem.
That's cool.
It's better than a patent.
Yeah, it's definitely better than a patent.
Patents, while they serve a purpose, are pretty evil.
Let's wrap things up with maybe just, you know, you mentioned Continual AI.
Tell people a bit about that.
It's the largest nonprofit for continual learning.
Continual learning in a nutshell is, say I have a neural network and I train my neural network
to classify cats.
And I classify cats to 90% accuracy.
And we're like, yeah, this is why neural networks are great.
I take that same trained neural network on cats and I train it on say dogs.
It does really well.
90% accuracy on dogs.
We're really excited why neural networks are so great.
But the issue is if I take that, again, the same network, I just trained it on dogs and
previously trained it on cats.
I try and test it on cats again.
It's going to forget pretty much everything it learned about cats.
And this is an old, old problem.
Back in like, you know, the good old days when neural networks were connectionist models and
it was computer scientists, it was the cognitive scientists.
They noticed.
Overtraining or something like that, right?
Kind of overfitting.
It's neurorelated.
Yeah, it's very similar.
Catastrophe forgetting.
They call it the sequential learning problem, which is why I'm really interested in it because
I'm really interested in, you know, continual learning and sequential memory.
Or in neuroscience, it's called the stability plasticity problem.
So when do you learn?
When do you remember?
And so over the last, since we started the organization 2018, the field has kind of exploded
just because there's such a need for overcoming this across a lot of use cases.
So like a lot of times you can only see the data once.
So the way you solve the problem generally is you just shuffle in cats and dogs into the
same data set and retrain your model.
But now the neural networks are getting bigger and bigger and bigger.
Retraining is getting costlier and costlier.
You can't just have, you can't train a network on petabytes every time you want to update it.
That's even if you have access to the data and the storage to save it and so on and so forth.
So clever ways to solve the problem.
And so we're kind of around that.
We have neuroscientists, we have computer scientists, AI researchers across academia,
industry, all that are just a bunch of people really interested in this problem to just come
together and share papers, share ideas.
We just had a conference.
We sponsor a lot of competitions for people to kind of put forward an idea to some problem
that we kind of put out every year.
So it's been really, really exciting to kind of see the community grow over the years and
all the tools and fun things that's kind of come out.
Well, it's definitely a hot topic right now.
Absolutely.
The cognitive scientists and neuroscientists studied neural networks and stuff.
And it was kind of like, well, maybe this model stuff.
And then now we're in the time of LLMs and the world has gone crazy.
Absolutely.
I said we were going to close out with a continual AI, but let me just ask, what are your thoughts
on LLMs?
Where the stuff's going?
I mean, we all have exposure to it in different ways, but you've got this understanding of what
they're trying to model it on quite a bit.
So what do you guys in your space think of it?
So the first lab I joined was, well, the first real lab I joined was a neuroscience lab where
we were sticking wires in brains and actually doing real neuroscience.
But I also started kind of simultaneously working with a cognitive scientist where we were working
on the original word to them.
So this is, in my mind, like the grandfather of the LLM.
So this is the model that like overnight took Google Translate from being meh to pretty good.
And it's just really at the heart of it, just an autoencoder.
But we were really excited then doing kind of semantic modeling of how much further kind
of deep learning could take language modeling.
And then we were actually using it to study catastrophic forgetting.
So does word to that catastrophically forget?
And the punchline is it does.
And that kind of got me jumped into really excited about continual learning and so on.
So I saw kind of that trajectory then, and then kind of stepped out of it for a few years
dug more deep into, you know, pure neuroscience and artificial intelligence from other angles.
But I'd always been just so fascinated by this idea of like, say you take an AI and it could
read every book or it could read the internet.
Like, what would you be able to get?
And that was kind of, you know, in my mind, like, well, seeing Word2Vec try and do the same
thing and training it on my laptop, like, well, you know, it's going to take, it's going to take a
minute till we get there.
And I underestimated that drastically.
It was like, almost no progress, almost no progress.
Wow, what just happened?
Right?
It's a testament to statistical learning more than anything, which is just how much information
can you just soak up and put together in a fancy new way and regurgitate back.
I think the next big leap is going to be adding more cognition to that progress.
So adding when an agent has a goal, when an agent kind of has to break down a series of
steps to get to that goal, those kinds of things we don't see as much of.
And that will kind of be the next big push.
I think that'll kind of take all the cool things that LLMs can do now and kind of blow everyone
away of just, if you can take the internet and put it on a seven gigabyte file, what can
that get you?
But what if you can take the internet, put it on a seven gigabyte file, but actually have
some sort of logic and direction and the agent itself can actually navigate through its
own thoughts?
That's going to take us, I think, right to the borderline of-
Terminator?
Yeah.
Not Terminator.
I'm just kidding.
It won't be Terminator.
No.
It won't be Terminator.
But it'll be really an intelligent system.
It's going to be super interesting.
You know, you've got all this prompt engineering and these clever ways to kind of get the current
LLMs in the right mindset, which is probably a personification.
But you can tell it things like, here, I want you to tell me how to do this.
And I'll come up with some answer.
You can say, I want you to think step by step.
And then all of a sudden you get a real different type of answer where it pulls out the pieces
and it thinks about how it does it.
And it's going to be interesting.
You know, it's kind of like kind of stuff, but it just, it already knows how to think.
You don't have to give it little weird clues.
Like you're an expert in this and you're really good at it.
Now I want to ask you a question about, oh, I'm good at it.
Okay.
I'll answer better.
My favorite definition of AI is it's whatever computers can't do yet.
Yeah.
Because like, you know, 30 years ago, if we had this conversation, it'd be like, so what
do you think of Deep Blue?
Do you think Deep Blue, the AI that becomes probably chess, can, you know, think and is
it going to take all our jobs?
Or it's going to be, what can Watson do?
Can it think and take all our jobs?
And, you know, that was solved with tree search, which, you know, undergraduates in
their second year CS class are learning.
It's just a standard, it's search.
People don't even think of search as AI.
What if we just loaded every possible outcome into the chess thing and the steps and we just
try to take, you know, traverse each step and see where it takes us, right?
There's always going to be a room to grow, but, you know, from a cognitive science perspective,
I think something far more interesting rather, you know, I think it's cool to see what computers
can actually do.
And I think they can do a hell of a lot more.
But I think it's more interesting to kind of ask the more philosophical question of what
does that actually mean for us?
Because at every step of the way, when we develop something new in artificial intelligence, it
tells us something a lot deeper about our own intelligence too, where back in the 50s and
60s, they thought the chess meant intelligence.
And so now we're kind of seeing with LLMs, if someone just reads a bunch of books and can
memorize a bunch of books, does that mean they're intelligent?
Because that's effectively what an LLM can do.
It comes across as intelligent, right?
It comes across that way to people like, oh, you have all the answers, but it doesn't
mean you're good at problem solving necessarily.
We're kind of peeling at this onion and we're kind of segmenting intelligence into its different
categories to really kind of break it apart just from this vague word of intelligence into
actually what are the parts that make something intelligent?
What does it really mean?
And what are still the things that like we thought were hard and are really easy or the
things that we thought were easy and really hard?
Because any LLM you have now can't chew gum and walk to the store and buy you something
to eat and then play you in chess.
And so the general and general AI isn't just there for to make it sound grander.
It's there because that's actually something that makes humans very, very unique is that I can
have this conversation with you, write code, prepare an omelet, walk a dog and do all of these
things all at once.
And I started as a babe.
And have feelings and thoughts and introspection about it and all that.
Hopes, dreams, like ketchup and not tomatoes and all sorts of other.
Yeah.
Super interesting.
So are you, are you pretty positive on, on where stuff's going?
I'm less concerned about the AI itself and I'm more concerned about just how we react to it.
And if we act, react intelligent, we react well.
We went through the industrial revolution.
We've went through the steel age.
We're starting to go through the cognitive revolution or whatever people are going to call this a hundred
years ago.
I think by and large, people are going to be okay.
I think we just need to, you know, have good policies, make sure that people do it responsibly,
people do it well.
And that's going to be the hard part is just how do we manage the transition?
Well, how do we take a whole labor force whose jobs will be gone?
Like there's no economic incentive to keep their jobs and retrain them in a really smart and sensible
way.
So people's livelihoods don't just go away to, to maximize the dollar.
Those are kind of problems that are going to need good policy and clever solutions and a
lot of research to actually sit down and handle well.
But AI isn't going to go anywhere.
Just like computers haven't went anywhere, but it's not Terminator that we should worry about.
No, absolutely.
It's certainly not.
I was joking.
We should worry about disinformation and politics and news and all that stuff.
I think people get so hung up on all the negatives that we kind of forget.
Like we're developing these tools for a reason.
Scientists are spending so much time and we're excited about them for a reason.
One being that I used to work on proteins, trying to find the structure of proteins.
And that was one protein a year.
It would take one year to find the structure of protein.
And now I can run this.
I took the same sequence that we found and ran it through AlphaFold, which is DeepMind's
protein folding software.
And I could do it in five minutes.
I mean, those are the things that will really like catalyze science and technology and healthcare
and actually solve the problems we want to solve.
So that's what I think we should do.
I think I heard even some AI stuff coming up with some new battery chemistry, potentially.
Everything.
How do you appropriately kind of harness like a fusion ring and like a tokamak reactor or something
like that?
Everything.
Even to how do you route a PCB with like millions of traces affected?
So it's a tool for the mind and it's not going to put our minds out of work.
Like you said a long time ago when you were in your eye track.
Yeah, exactly.
It's like a different view of that thing.
The same reason that none of us want to sit around and churn butter and go till the fields
and walk to work.
I don't dislike my clothes washer.
Not at all.
Yeah.
Awesome.
All right.
Well, thanks for giving us a look inside your lab, inside your research and the field.
And then just, you know, share what you're about and up to.
It's been great.
Yeah, yeah, yeah.
Thanks for having me.
Yeah, it's been really great to, at least for the years that I've been in research, seeing
how pivotal Python has been.
And I think that's one of the big things that probably goes unnoticed by a lot of developers
when they're actually writing their code to solve whatever problem they're solving is
that someone who's wrote the NumPy library or the Scikit-learn library or, you know, Jupyter
Notebooks has actively played a part in curing diseases and making people's lives better.
And those stories usually don't kind of come to the forefront.
It's not a direct line, right?
But the research was done and facilitated by these open source tools and then discoveries
were made.
Like you said, that's the difference between people getting cured in 10 years or getting
cured in a year.
And that's thousands of lives.
And so you might not think about it when you're sitting behind your desk, you know,
making something usable.
But for every day a PhD student doesn't have to like pull their hair out and debug some software
when it's well-written and it works well.
That's a day that they can find something new.
That's awesome.
Yeah.
Very inspiring.
Let's leave it there, Keelan.
Thank you for being on the show.
Absolutely.
Yeah.
It's been great to talk to you.
Thank you so much.
Yeah.
Thanks for coming.
This has been another episode of Talk Python to Me.
Thank you to our sponsors.
Be sure to check out what they're offering.
It really helps support the show.
It's time to stop asking relational databases to do more than they were made for and simplify
complex data models with graphs.
Check out the sample FastAPI project and see what Neo4j, a native graph database, can do
for you.
Find out more at talkpython.fm/Neo4j.
This episode is sponsored by Posit Connect from the makers of Shiny.
Publish, share, and deploy all of your data projects that you're creating using Python.
Streamlit, Dash, Shiny, Bokeh, FastAPI, Flask, Quarto, Reports, Dashboards, and APIs.
Posit Connect supports all of them.
Try Posit Connect for free by going to talkpython.fm/Posit, P-O-S-I-T.
Want to level up your Python?
We have one of the largest catalogs of Python video courses over at Talk Python.
Our content ranges from true beginners to deeply advanced topics like memory and async.
And best of all, there's not a subscription in sight.
Check it out for yourself at training.talkpython.fm.
Be sure to subscribe to the show.
Open your favorite podcast app and search for Python.
We should be right at the top.
You can also find the iTunes feed at /itunes, the Google Play feed at /play,
and the direct RSS feed at /rss on talkpython.fm.
We're live streaming most of our recordings these days.
If you want to be part of the show and have your comments featured on the air,
be sure to subscribe to our YouTube channel at talkpython.fm/youtube.
This is your host, Michael Kennedy.
Thanks so much for listening.
I really appreciate it.
Now get out there and write some Python code.
Bye.
you
Thank you.