If you're doing any sort of data exploration, you've likely heard about Jupyter Notebooks.
In fact, there are quite a few options for running and hosting your Jupyter Notebooks.
You may have also heard me rave about PyCharm as an editor. Well, on this episode,
you'll meet Adam Hood from the Datalore team at JetBrains. That's a new project that tries to
bring the power of PyCharm to notebooks and more. This is Talk Python to Me, episode 196,
recorded January 9, 2019.
Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the ecosystem,
and the personalities. This is your host, Michael Kennedy. Follow me on Twitter where I'm @mkennedy.
Keep up with the show and listen to past episodes at talkpython.fm and follow the show on Twitter via
at talkpython. This episode is sponsored by Linode and brilliant.org. Please check out what they're
offering during their segments. It really helps support the show. Adam, welcome to Talk Python.
Let's jump right in. How'd you get into programming?
How did I get into programming? I guess, well, originally my dad is a programmer,
so he tried to teach me when I was, I don't remember, 10 or 11. It didn't really take then,
but then I started taking classes in high school and college. Python, I didn't know anything
about Python or start learning Python until college. I took a few classes, but even then,
the bulk of my exposure to Python has been working on this project specifically. Before that,
it was just a couple of classes that I took.
Okay. So mostly college experience, you'd say, with getting into programming or like what,
did you go to college for computer science? What was the start there?
No, my degree is actually in math.
Okay.
I ended up going into programming partly to put off graduate school. And it was, I mean,
I had taken a number of programming classes and I also worked in a lab for two years and the bulk
of my work was programming in MATLAB granted, but still programming.
Yeah. I think that's how a lot of math people get into programming. They start there and they're
like, yeah, this is kind of crummy. What can I do other than this? What can I do other than MATLAB?
There you go.
Yeah. That's actually a real similar to my story. Actually, I started in math and got into programming.
And I spent some time writing MATLAB stuff as well, but bailed on it as soon as I could,
basically.
Right.
Nice. So when you joined the Datalore team or the team that's working on the project that became
Datalore, that's more or less when you got into Python.
I guess it was at first we weren't really working on a Python editor. So it was probably another year
or so before I actually got into Python.
Right. So you got to build the foundation of all the tooling and whatnot.
Right.
Before it matters. Yeah.
Working on this project, that's when I really started getting into Python, especially when I started,
I've went to a couple of conferences. I've demoed the tool a fair amount. So I've
certainly had some exposure to at least simple Python from that.
Yeah, sure. That's cool. So what do you do day to day at JetBrains?
I'm a developer. I'm working on building features, fixing bugs, and so on. I can say I've worked
around various different parts of the tool at various points in time. Maybe we could get into that later
once we talk more about the features that we actually have, I guess.
Yeah, yeah, sure. Well, let's just start there. Let's set the stage a little bit with what this
guys have created and you got here. And then we'll maybe take a step back. So what is Datalore?
Like what else is out there that's comparable or is it something totally new?
Well, it's a little bit new. Things that are comparable would be Jupyter Notebooks, especially
if you talk about Google Collaboratory, I guess. It's this computational notebook. In our case,
it's hosted in the cloud, it's hosted in the cloud, also completely collaborative. You can share with
coworkers, collaborators, whoever. In my limited experience working with Jupyter and also based on
talking to a lot of people, I get the impression that a lot of people, they'll use Jupyter, but they'll
use something else as well sometimes to write the code and then they execute in Jupyter. A lot of people
have come to our booth at a conference talking about how they use PyCharm and Jupyter together and so on.
So maybe one idea here is that this is a single unified tool, which kind of takes the ideas from
Jupyter as the computational notebook, but also from PyCharm as an IDE. Also the collaboration that you
might find in Google Docs are now in Collaboratory.
Okay. So let's come back to that collaboration stuff because I think that's super interesting,
but maybe let's just take a step back and just talk about notebooks in general, not the computers
with keyboards, but, you know, Jupyter and other computational notebook type things. There was a
recent article and I forget what it was. It was in the Atlantic and it's, I've maybe mentioned it at a
time or two on the show. And basically the title is that the scientific paper is obsolete. And it's
really kind of provocative. It has like this picture of like a scientific paper with 15 authors on it.
And it's literally on fire, right? Like it's crazy. And it's actually a super interesting look into the
history of where notebooks came from. And it looks a little bit at Mathematica and Wolfram and why that
really didn't take off in the scientific space in the same way. You know how a Jupyter and things like
DataLore and Google Collaboratory and whatnot are really redefining what it means for really to
present like computational work, like science, you know, hard science type stuff. Let me get your take
on that. What do you think about this positioning that like notebooks are the new scientific paper
for data science or for, you know, real science, like hard science, you know, chemistry, whatever.
Oh, it might take some doing to convince all the journals of that.
To be fair, they have a very strong financial vested interest in keeping their position. I think there's
actually something a little bit fairly wrong about these whole scientific journals because,
you know, so much of this research is funded by taxpayers and then is published in these private,
ultra expensive journals. Like, isn't that our research? Didn't we pay for that? So that's a whole
other angle, right? We mean, we shouldn't go down that too far, but there's also a lot of politics
involved in my experience, at least from what I've seen. But if we go come back to the idea of the
notebooks, I mean, I remember seeing Mathematica for the first time and I thought it was a really awesome
tool. Just and it's exactly like as pretty much what you were saying about the article, it was pretty
much exactly that. Everything that you have in the article, like you have this idea that you can have
the code and these nice visualizations or outputs, you can print out the mathematical formula and so on,
all just coming together in one thing. That was really, I thought that was really awesome when I
first was introduced to it. And yeah, in a lot of ways you can start to, I don't know if I want to say
replace papers because that's hard to do, but you do get to see the scientific process
when you look at a nice, well-organized notebook.
I mean, that does assume that it is put together for presentation, right? I mean,
you've probably seen a ton of notebooks that are just like the equivalent of spaghetti code,
just scrambled all through there. And you're like, what is this thing? And that doesn't actually help,
but like, at least it's the canvas upon which that could be built, right?
Right, exactly. And I think there's nothing wrong with this spaghetti code type notebook in the sense that,
you know, the first stage you have to do a lot of exploration or you're not going to get anywhere.
And it's not until you have to present it that you need to really think about it.
Yeah. So I agree that you look at the way people work with the notebooks and after people who don't,
you know, say like web developers that work in something like PyCharm or Visual Studio Code,
like this, that sort of iterative exploratory type of working with your tool.
You don't get that in these other tools, really. Not in the same way, right?
You've got to rerun them all from scratch. You can't just like, let me tweak this formula and rerun that cell
and see how that looks. Right? So I definitely think there's this interesting way of working
in this exploring data with notebooks. Yeah. Let's dig into data lore.
Sure.
Tell people what it is. Like, how do you guys, if you're at a conference, you know, be at PyCon or whatever,
and someone comes up and says, data lore, what's that? What do you tell them?
I've had a lot of different lines throughout the years, actually.
It's an online computational notebook in Python.
To me, it kind of looks like something that is really familiar to people that use Jupyter,
but has a lot of the features of, say, PyCharm.
That's definitely one of the ideas. Yeah.
A lot of the code smarts around understanding the code, suggesting fixes and improvements and whatnot,
like PyCharm does, but in notebook form, right?
Yes. And I mean, that's always been one of the big trademarks of the whole company,
this idea of understanding the code, helping you with your code. So it would be
kind of remiss on our part if we didn't include that.
Yeah. It definitely would look out of place if it wasn't there, right?
Yeah.
You have all these cool, like, code assistant, code intention tools. Like,
why are they not being brought over here? When you talk about building it,
who do you imagine your users are?
I can't really speak to specifics. I would just say, like, the whole realm of data scientists,
data analysts, anyone who works with data and works with data in Python in particular,
hopefully could use this tool.
Sure. Like, pretty similar to the folks that might choose Jupyter?
Yes.
Okay. Maybe it's worth doing, like, a compare and contrast between Jupyter and JupyterLab.
So how are they different? What does Jupyter have that you guys don't? What do you have
that Jupyter doesn't? Maybe position those two things for us.
Sure. I guess it's easier for me to talk about what we have that Jupyter doesn't.
Sure.
Not that I want to say Jupyter is awful. I mean, obviously, Jupyter is doing a great job of filling
the space right now. One of the big differences is the way that we work with the environment that
you have. In Jupyter, you have this one global environment. You execute the code in some cell,
and it executes on top of that environment.
So, like, basically, if I declare, like, a variable in a cell, it's just global to all the other cells,
and it's that kind of thing?
At least that's my understanding of Jupyter up to this point.
Okay.
Data lore is a bit different. You can almost think of it as after every cell,
you have a different environment. So you have whatever you write into the first cell,
you execute that, or by default, it executes automatically, and you have that environment.
But then you start adding to another cell. That'll execute on top of the environment from the previous
cell. Basically, the idea here is that, at least for me working with Jupyter, one thing that gets
confusing is if I start having to re-execute previous cells, the environment gets a little bit
confusing for me to keep track of just because, you know, I see this sequential code,
but that doesn't represent what we actually have in the environment.
Right. Like, maybe there's 10 cells, and you went back and you fiddled with number three and re-ran it,
but you didn't run four, which would have actually taken the output of three to make a difference.
You know, like that kind of thing, right?
Right. And for us, that's not the reality. For us, like,
if you go back and fiddle with three, you don't necessarily have to execute four,
five, and six right away. But if you do, that will, they will reflect what you had from three.
Okay.
So I guess that's one pretty big difference. I touched on it already, but we have
two different computation modes. By default, we have basically live computation. Like,
as you write the code, we're executing it.
Even before you say execute cell, like, just like if you write,
as you type lines out, it just, if it's valid syntax, it runs?
Yeah, pretty much.
Okay.
It's useful if you're doing lightweight stuff. The idea is, like, you're getting the feedback
right away. If you write something and you try to reference a variable that doesn't exist or
something, you know that right there. Of course, if you have something that's really long running,
you might not want to run it a million times, but we do have a more Jupyter-like computation mode
where you actually execute the cell. So I would say that's another kind of key difference.
Yeah. Probably the other one, I guess you might say, it's like, it's in the cloud, period, right?
It's in the cloud. Yes.
You can't just locally pip install Datalore.
Nope.
Datalore notebook sort of thing. So for both what the good and bad that comes with that,
right? But it's definitely a difference between the two.
Yeah. It's in the cloud. Some of the things that come with being in the cloud is, like, for one thing,
it's collaborative.
Right.
A lot like a Google Docs. I mean, you can share with coworkers, whoever, that you can have them just view it,
or they could also edit your workbooks.
On the collaborative bit, that sounds super interesting. And it's really cool. I think this is actually a trend
in a decent amount of the tooling to have this sort of collaborative live coding, right?
I know there's been so many folks who've done all sorts of tricks to get some sort of, like, real-time collaboration,
even so much as, like, going to Amazon, spinning up a virtual machine,
that you can both log into over remote desktop or something, and actually, like, we're going to both type on this.
And, like, that's probably not the right way to do it.
But, like, people were forced to do this, right?
Because we got Google Docs and cool stuff like that, but PyCharm doesn't do it. The other tooling doesn't do it.
But, for example, Microsoft announced this with Visual Studio, like, this year, where you can remotely share a session,
and you can even, like, remotely debug the other person's code on their machine.
I mean, it's pretty interesting. I think this is, you know, tapping into a trend that is making a lot of sense, yeah.
Anytime you have a project where you need multiple people to work on it together, you need some sort of tooling for collaboration.
Alternative has been check it into Git and merge it.
Yeah. I've only interacted with Git with Jupyter Notebooks once, and it was a painful process.
I can imagine. Well, and also the exploratory nature doesn't make a lot of sense.
Like, you're like, oh, I changed a variable, I checked it in, do a pull, right?
Like, it doesn't, I mean, that's, like, too quick of an iteration, right?
Like, it's, I added a feature, check it out. That's a different type of thing.
But Notebooks, like you said, sort of tend to be more iterative and exploratory, and I think that makes a lot of sense.
What does the collaboration look like?
So I've played with Datalore, but I haven't played with it with other people.
So how real time is it?
You know, is it every word, every character, every cell?
Pretty much every character that you type.
You could end up sending several characters at once.
I don't know exactly how that works.
But more or less every character, as you type it, it's getting synchronized to your collaborators and so on.
We have this mode where you can actually follow what your collaborator is doing.
Like, they have a little avatar in the top right corner.
If you click on it, you'll start tracking them.
So as they make edits, you'll see them real time.
That's pretty awesome.
Have you seen people do anything or heard of people, like, using this for teaching or, say, like, live presentations where everyone else can, like, come in and, like, I hear we're all sharing the notebook and all the students follow along or the participants follow along?
It's definitely something that you can do.
And that I think some people have done that.
It sounds so much better than slides over WebEx.
Right.
You know?
Like, here, open this in your browser and follow along as we do it.
Yeah.
I mean, one thing that was kind of cool was we had this little, like, internal workshop.
One of our data scientists did a presentation on data science, just, like, some overview stuff.
And he was doing it in data lore.
And there is, like, a big difference between just, like, watching what he's doing if he's screen sharing versus just being able to follow him as he moves along.
And that was really cool.
Yeah.
It seems like there's a lot of possibilities.
Yeah.
I think definitely.
Nice.
So I guess this puts it kind of in the realm of Google Collaboratory, which I actually haven't used very much.
I don't know if that has live collaboration, but I'm guessing by the name that it does.
Yeah.
I would assume so.
I haven't used it.
I have opened it.
It looks to have just a new format for Google Docs or Sheets or Slides, except it's a notebook instead of one of those things.
Pretty nice thing to have.
Yeah, that's cool.
So I haven't done much with Google Collaboratory, but I haven't heard a ton of people talking about it, but it does seem pretty nice.
Yeah.
Cool.
So maybe we could dig into some of the features that makes data lore cool.
So there's a few things that caught my attention.
Maybe I'll bring them up and then you can describe what they are and how they work and why they're cool or whatever.
So one of them is smart code completion.
Sort of context-aware code completion.
I mean, basically all the code completion you have in PyCharm, you also have over data lore, right?
In some ways, we could have even more because we're aware of everything that's in the environment already.
But yes.
Okay.
It feels like it's more of a real editor when you're working in the cells, to me.
That's the idea, at least.
That's the hope.
Yeah.
I think one of the cool things, just going between data lore and PyCharm for me, though, was in PyCharm, you're going to get all of the static inspections, completion, everything.
But you can even get runtime information as you go along and you edit in data lore because it is running as you go along.
Oh, I see.
So maybe a field was added to some object at runtime.
And because it's just hanging out there in the environment, you could get completion on that.
Whereas in PyCharm, it's got to be static analysis, right?
That's what you're saying?
Yeah.
I think so.
Yeah, yeah.
That's pretty awesome.
So then you have all the code inspection, like this thing has a type annotation that takes a list, but you're passing a string.
What gives here?
That kind of stuff, right?
As far as I know, we're still working on adding a bunch of those inspections.
So we only have a few.
I think one example is we have an inspection for unused variables.
If we see a variable that's just sitting around completely unused, we'll highlight it.
We probably have a couple of others.
I don't know all of them.
Sure.
Navigation.
So you can navigate, turn your parts of your notebook into hyperlinks that take you to like where the function is defined or the variable and things like that?
Yeah, yeah.
You can.
I've only used it a few times, but you definitely can do that.
I don't remember the shortcut even.
When I'm developing software, that's one of the most useful things that I use.
Like I always want to see the function.
Absolutely.
I mean, that's one of the things that drives me crazy about some of the more basic or, you know, not multifile type of editors that you can't just say, go to definition on this.
I don't care where it is, go find it and show me what it is.
You know what I mean?
Yeah.
This portion of Talk Python to me is brought to you by Linode.
Are you looking for hosting that's fast, simple, and incredibly affordable?
Well, look past that bookstore and check out Linode at talkpython.fm/Linode.
That's L-I-N-O-D-E.
Plans start at just $5 a month for a dedicated server with a gig of RAM.
They have 10 data centers across the globe.
So no matter where you are or where your users are, there's a data center for you.
Whether you want to run a Python web app, host a private Git server, or just a file server, you'll get native SSDs on all the machines, a newly upgraded 200 gigabit network, 24-7 friendly support, even on holidays, and a seven-day money-back guarantee.
Need a little help with your infrastructure?
They even offer professional services to help you with architecture, migrations, and more.
Do you want a dedicated server for free for the next four months?
Just visit talkpython.fm/Linode.
The other thing that we can do in terms of navigation is we have a find, basically like Command F or Control F in your browser, except it just searches the code that you have.
Okay, that's pretty cool.
You also have this code, or just intentions.
Tell us about that.
That looks pretty cool with like data sets and all sorts of things.
Right.
There are these context-aware suggestions for actions that you can take with your code.
By and large, they're trying to focus on the data science workflow.
Like if you have a completely empty workbook you just started, you can start out by adding some standard imports like pandas, numpy, matplotlib.
We also have this internal plotting library, I think.
You can also start by loading a data set.
You can upload something, or you can work with, we provide like 10 or 12 example data sets or something like that.
Well, we don't provide all of them, but you can load using this attention.
You can be loaded.
So like some of them might go and like suck it off of like a website or something, or off an API.
Right.
You can do that.
We do have this file uploader as well.
You can upload files from disk, or if you know...
Sure.
What format do they have to be in?
Can you just put whatever and you just read it?
Or is it like, does it get understood when you upload it?
You're going to end up reading it in the code.
So if you know how to read it, like programmatically, pretty much anything.
I see.
But it's not like you send it a CSV file and it like pre-parses it for you.
No, it won't do that.
Yeah.
Okay.
If you do upload a CSV or TSV file, it will get suggested by the intention.
So you said it has all these different data sources and some data sets.
Like what are some of the data sets that I could work with?
Well, we have a number of examples.
I can even give a full list.
So a lot of these are like just examples that are used, you know, teaching examples.
Iris, Boston Housing, Breast Cancer.
We have two different digits data sets.
One of them is small.
One of them is large.
Like the handwriting, you're trying to recognize handwriting digits.
Right.
So that's like an OCR, like machine learning one.
The Iris one is also like an optical image processing data set that's pretty commonly used, I think.
Yeah.
Sounds cool.
If you wanted to do like demonstrate some form of say machine learning around OCR, you could just go.
And we're just going to use the well-known data set from here, right?
Yeah.
Are you planning on adding more?
I'm not sure.
I think for now we're satisfied with it.
So basically you have the ability to upload.
So you just like upload your files.
I think for the most part, we're not even, we don't even have these uploaded internally.
It's just, we know how to call the functions that are, that will load these.
Like with Iris, you can get it directly from scikit-learn and same with a few others.
That sounds pretty cool.
What else happens with the intentions?
So it's not just about data sets, right?
Right.
It's not just about data sets.
So you start out by loading and then after you load the data set, you can, I guess, split it, extract out like X and Y where X is all the, what is it called?
The feature matrix or something like that.
And Y is your target.
We will do the train test split for me.
I remember when I, I always screw up the syntax for train test split.
Like is it X test, X train?
Or is it X test then Y test?
Or I don't know.
But data lore knows?
Data lore knows.
So I use the intention.
It'll split the data for me.
It'll create some set of models.
Like it knows how it'll create the object for various scikit-learn estimators.
It can also do a few pre-processing steps if you need to.
Like if you loaded Titanic, there's some missing values and some columns that like you have a couple of features that need to be transformed in some way.
So you can do like a one-hot encoding, you can impute, and there are intentions that will do these things for you.
Nice.
So how does that show up?
Does it show up like you type a word and hit tab and then it gives you like some big expanded thing?
Or what does it do?
Actually, they just manifest as buttons at the bottom of the cell.
Well, we call them blocks, but for the sake of Jupyter users, we can talk about cells.
There's just all these buttons that you have at the bottom.
And the buttons that you see exactly will depend on the context.
Like what variable do you have focused?
Or it could just depend on the context of like how far along are you in this machine learning process?
Like what have you done so far?
What would be the next step?
Okay.
You can just click the button.
You might have a dialogue with some options or it'll just do something.
And then it'll...
Yeah, that sounds really cool.
What machine learning libraries does it support?
Is it just scikit-learn?
Is it do like Keras or any others?
The intention specifically or Datalore as a whole?
Yeah.
When it suggests to do like some training, what does it, you know, where does that work with?
It's going to work by and large with scikit-learn.
Okay.
And I mean, it'll use like Pandas or NumPy to support the process.
Like I think it generally prefers to work with, we prefer to work with Pandas data frames.
So another thing that caught my attention, and I think you were touching on it before, is this idea of dependencies between the cells or blocks and the variables and like incremental computation.
So if you have something that defines like X somewhere and then something else that maybe passes X to a function, Datalore is aware of that relationship and can do like a partial re-execution to make it go back and sync.
Is that right?
Yeah.
Like if you update X way above, it'll know that you need to reevaluate that.
I think that's a pretty cool feature.
Like before you were talking about, you know, running the cells and say a Jupyter Notebook in different orders and getting different results.
Right.
Which it's not at all obvious how that happened.
I know it has like a little number along the side of like order of execution.
But like if you've got 20 cells, like do you really have that held in memory, in your memory of which order it is?
Not really, right?
I know from talking to people that for some people it isn't really a problem.
But I think like if you have a lot of experience working with Jupyter Notebooks, you're probably used to it and you know how to work with it well.
You know what trouble you can run into.
So you just don't do it, right?
Yeah, for me, it's always a problem.
Yeah.
Well, I'm not that experienced with Notebooks.
And I think I imagine for a lot of people trying to break in, it is, you know, a hurdle you have to get through.
Sure.
So I guess once you kind of built up your data, maybe train some models with these intentions, things like that, you probably want to look at it, right?
And so you talked about some libraries, you know, Matplotlib, for example.
But you also have some built-in plotting libraries, one for like two-dimensional plots and one for geographical ones.
So I guess what are those?
And then like why not just import Altair or something, you know, like some other thing, right?
Like why do you have your own?
What are the benefits?
I can't really compare and contrast with a lot of different libraries because I don't know them that well.
But yeah, we do have, I guess, datalore.plot.
That's the prefix for the library.
It's our internal graphics library.
It's based on the grammar of graphics.
So it's going to be very similar to like ggplot2 and R.
And I think there are some Python libraries that might also be based on the grammar of graphics.
Sure.
That I don't know about or I don't know the names of off the top of my head.
My impression is that matplotlib is definitely the most popular library in Python for graphics or plotting.
Yeah.
But I have, well, me personally, and I guess enough other people that we decided to develop this library
have this preference for the grammar of graphics for that different syntax.
I remember in my days of working with MATLAB, the general torture that was working with graphics in MATLAB.
And matplotlib is, as far as I understand, based on that or very similar.
So yeah, I guess the motivation originally was to bring the grammar of graphics to Python, at least within our tool.
Okay.
You can still use the others?
Like if I wanted to use some other library that typically works in Jupyter, I could install it, import it, run it?
Yeah, it should work.
If it doesn't, we appreciate the bug report.
Sure.
But the intention is that you can, right?
Yeah.
Okay.
So I guess another question that makes me start to think of is, what about dependencies?
Like how do I specify my Python dependencies, the other libraries I'm going to use?
And then how do I get them?
Like if it's running on your cloud, how do I get the five libraries off PyPI that I actually need to do my thing?
So we have a library manager.
Like we have a tool that lets you set up a custom environment.
We have some default environment and includes a lot of the basics that you probably want, like NumPy and Pandas and scikit-learn and matplotlib.
Right.
You might as well just start with those installed, right?
Right.
Exactly.
But then you have the option to use this library manager to add whichever libraries you like from Conda, from PIP.
Even if you have access to some GitHub repo.
Right.
Where you pip with the git command just to the repo base.
Yeah.
So you can install from GitHub.
Yeah, but basically you can install whatever you really need to to do your work, right?
Yeah.
For now, as we sort of started at the beginning, Datalore is a cloud thing.
I know there's a ton of people out there listening going, that's great, but my company won't let me upload my data to a cloud thing.
Is there a way to run it on premise?
Maybe even if that's not like pip installed Datalore, but maybe it's like, here's a virtual machine you can license from us internally.
Unfortunately, no, it's not possible right now.
It's something we're very much aware of because we've heard this feedback, this exact feedback from a number of users through various channels.
So it's very much something that's like on our radar, something that we could consider.
But unfortunately, right now it is not supported, no.
And if it's not, maybe that's fine, right?
Like Google Docs doesn't have an on-prem Google Docs.
Yeah.
Just don't do it, right?
I do think that a lot of the data science folks are analyzing data that's pretty closely guarded, right?
Yeah.
It would be good, but who knows?
As I said, it's not the first time we've heard it.
Yeah.
Is the source code for Datalore available or is it private?
Right now it's private.
Okay.
It doesn't surprise me.
Even for public, it's probably like deeply bound to your infrastructure.
You know what I mean?
Yeah.
I mean, I can't say if there are any plans to open source it or not.
We have open sourced some projects and other projects we've never open sourced.
It's not really my decision in the end either.
Sure.
So there's different ways, like different machines or computational units, whatever you can buy to like do your analysis.
So you start out, you can just play around with like some moderate virtual machine that it's running on, but you can get like a higher end computation or can you run it on, run your stuff on GPUs as well?
Yes, you can.
How's that work?
The only thing that's available.
So we have two different plans right now.
We have a free plan, a paid plan.
The only thing that's available on the free plan is just these medium, like these moderate instances, which work fine for just some general all-purpose stuff.
But if you upgrade, you have the opportunity to upgrade to larger, more powerful machines.
All of these right now are posted on AWS, so you can even look them up on AWS.
But one of them does include GPUs.
Right.
One of them is, I guess, in EC2 parlance, a P2X large, which would be a four CPU and single GPU machine with 61 gigs of RAM.
That's a pretty serious machine with 12 gigs of GPU RAM.
Yeah.
Maybe we talk about pricing as well.
So this is both a thing you can use for free and also something you can pay to get more for, right?
Right.
What do you get for free and then what do you have to pay for?
What you get for free is a monthly allowance on these moderate machines.
I think 120 hours per month across all your various computations.
Is that actual execution time or just like I'm working with my notebook?
The second one, like when you're working on the notebook.
Like if I have it open and I'm interacting with it rather than...
So like what if I leave my browser open and I go to lunch?
Does that count towards my hour?
It does.
Now, eventually we will shut it down if it's been idle for a really long time because we don't want you to just like run through your full allowance by accident without realizing it.
As long as it's open, we keep the instance running.
Right.
So 120 hours is like if you do that eight hours a day, that's 15 days a month.
I got still, you know, that's a lot of time for free.
So I just want to make sure people understand like what it is when you say hour, what you're actually talking about, right?
That's fair.
Then if you, so if you upgrade, you unlock the ability to use some of these larger, more powerful machines.
You still have to pay for them, I guess.
But like we have various different machines depending on what you need.
But you basically pay like the EC2 price of the machines if you select them?
It's marked up.
I mean, you can look up the EC2 prices, so it's not going to be exactly the same.
Sure.
But it's going to be based roughly on the EC2 prices.
The more expensive machines will obviously cost more.
The less expensive machines will cost less.
Well, that sounds pretty cool.
I mean, the fact that there's quite a bit of free space and computation and whatnot, I think that's what it takes to be interesting to everybody, right?
Yeah.
At the end of the day, we are competing with an open source thing, which will always be open source.
So we'd better do something more.
Yeah.
I think it makes sense.
It seems pretty fair.
This portion of Talk Python to Me is brought to you by Brilliant.org.
Many of you have come to software development and data science through paths that did not include a full-on computer science or mathematic degree.
Yet, in our technical field, you may find you need to learn exactly these topics.
You could go back to university.
But then again, this is the 21st century, and we do have the internet.
Why not take some engaging online courses to quickly get just the skills that you need?
That's where Brilliant.org comes in.
They believe that effective learning is active.
So master the concepts you need by solving fun, challenging problems yourself.
Get started today.
Just visit talkpython.fm/brilliant and sign up for free.
And don't wait either.
If you decide to upgrade to a paid account for guided courses and more practice exercises,
the first 200 people that sign up from Talk Python will get an extra 20% off an annual premium subscription.
That's talkpython.fm/brilliant.
I ask if it will run outside of your cloud.
And right now you say, no, it's hosted at EC2.
Can I pick where it runs in EC2?
Like, suppose I work on healthcare and it has to stay, you know, within Europe or has to stay within France or something.
At the moment, no.
You can't pick which cloud it runs in.
But basically, right now, we don't have like a dropdown.
Like, I want to do my work in Europe or I want to do my work in the US or something like that.
No, there's nothing like that.
Yeah.
Do you know if there's any plans for something like that?
I'm not sure, actually.
It's, I mean, one thing we always have to keep our eye on is all the different privacy laws and make sure that we're not doing something untoward with anyone's data.
Making sure that we're always complying.
Yeah, I mean, there's certainly value to the privacy laws, but man, they can be hard to keep straight.
Because it's not just one country, right?
It's all the countries.
Right.
And if you have users in one country, you have to comply with the laws for that country, for that user.
Yes, exactly.
It's, you know, welcome to the internet, right?
Yeah.
So if people want to go and play around or explore data lore, you have a set of pre-built notebooks that they can go play with.
You want to maybe talk us through some of those that they can explore?
Right.
We do have some sample workbooks.
I am not too up to date on what the exact sample workbooks are on, but we actually do have some set here, which is kind of nice.
So the first one, these links will be somewhere.
So yeah, the links are super long and crazy, and I'll put them in the show notes.
So don't worry about trying to say them.
They're like, you know, UUID type of things.
Yeah.
In any case, if I'm understanding correctly, I think if you create an account, these workbooks will be automatically created for you.
So you can see them for yourself.
Exactly.
Under your home, you've got like, when I log in, at least in my account, I haven't done really much.
So like, this has got to be what's coming with it.
You know, there's like a scikit learn section.
There's a map section and there's a plotting section.
And the plotting has the most actually.
Yeah.
I guess we're kind of proud of it.
We want to show it off.
Yeah, sure.
In any case, I guess the first one, we're basically showing, first of all, in pandas, you have this scatter matrix function.
It's very useful for like some exploration.
You can see distributions of the different features as well as their distributions with each other, whatever the right terminology is.
I feel like I'm butchering data science terminology as we go along.
But in any case, so first we're showing how you can generate the scatter matrix in pandas.
But then we also want to show how you can do it using data lore plot, using the internal plotting.
So first of all, you can create a scatter pretty easily for any pair of features that you have.
You can also create a histogram using the geom point and geom histogram functions.
You can update it to show density instead of just the counts of the different bins.
Yeah, nice.
So basically, like all the plotting that you, most plotting you want to do with like ggplot or the data lore plotting stuff, right?
Yeah.
So these are nice.
These graphs are pretty interactive.
Yeah.
I guess that's something I didn't even talk about yet.
They are interactive.
Like if you hover over them, you can see the different points on them, like the different coordinates, which is kind of cool.
I like it.
It's quite nice.
So you have another one on like Bayesian inference, which is pretty cool.
So one thing here that I'm seeing is, gosh, I'm not entirely sure what the syntax is.
I think it might be LaTeX.
So at the top, you've got basically really symbolically nice mathematics in here, right?
Yeah.
That's pretty cool that you can actually write the formulas in mathematical notation, not just trying to put, you know, ASCII characters to make like the integral sign look like an integral sign or something.
Yeah, basically we have support, we have these markdown cells or blocks as I guess we call them.
And you can include LaTeX into these cells as you can see there, which is always kind of fun.
It does make for a nice presentation.
Yeah.
I have totally mixed feelings about LaTeX coming from a math background.
Like I love the outcome.
I hate the creation of it.
It's so painful.
It's so not obvious.
I can fully understand.
But see, when I was in college, what made LaTeX bearable for me was I started discovering tools like, I don't remember if it was called Overleaf then and it's write LaTeX now or vice versa.
But it was basically this real-time LaTeX editor, which was collaborative.
Oh, interesting.
You could switch between modes like compile incrementally or just you press a button to compile.
But it gave you like the real-time feedback about exactly what you were writing, which was always really cool.
Yeah, that's pretty cool.
And for people who don't know, LaTeX is basically, it's been around for a while.
It's kind of like a markdown syntax, but for symbolic mathematics.
Like I want the sum from n equals 0 to 1, or for 100, you know, of like it'll actually do all the symbols, right?
And it used a lot in like math papers and whatnot.
So let's see, what else?
We got a lot of like a whole bunch of the data lore plot stuff, the geometry and whatnot.
And you have some California housing data as well graphed out, which has got some cool geometry stuff.
And it pulls in open street map and then like overlays it, right?
Something like that.
That's pretty nice.
So I guess that's just using the California housing data from Scikit-learn datasets.
Exactly.
It conveniently has the latitude and longitude coordinates.
So we can just plot every point on the map as we see it, which is kind of neat.
That's cool.
So one thing at the bottom that's pretty interesting is it's got a picture of airplanes flying along the Hudson.
And it overlays like animated flying airplanes using the geography plotting stuff, which is, that's pretty awesome.
I don't work on this myself, but I'm always amazed at the new features that keep coming out.
Like all the different things you can do with the maps and the plots.
I think this is one of my favorite little animations is showing the different routes.
You sit there and watch them fly along.
That's pretty cool.
Yeah.
So people can check out those shared notebooks on data lore and play with them.
Basically, like you said, if you create an account, you get all those like in your account.
Yep.
Yeah.
What about a version control, right?
Like if I have Jupyter Notebook local or specially if I have Python files locally, it's super easy to check that into GitHub, do a diff, do a branch, do a PR.
Like what does a version control look like over here?
We have our own integrated version control.
Basically, we have this thing called history.
Every now and then, if there's some inactivity, we'll just keep a checkpoint, kind of like a commit or something.
You can think of it.
Okay.
Or you can make your own as you need to.
And then you can compare the diffs.
You can revert to the previous version.
I think you can even revert specific changes, but you'd have to check me on that one.
Basically, like this internal version control.
That's pretty cool.
And how do I, like, can I branch?
Can I do stuff like that?
No, it's completely linear.
So no branching involved here.
So right now, basically, it just, I can go forward or backwards in time for now, right?
Yeah.
You can't really do branches or merges or anything like that.
So one thing I'm noticing is I can export a Datalore file, which is kind of cool, right?
So I theoretically could export the Datalore file and then check that into GitHub.
That's one possibility.
Yeah.
Right.
And then I do save points there.
You can also export Jupyter Notebook format, the IPYNV format.
Yeah.
Can you go the other way?
Can I import?
Yes.
Like, if I create a new notebook, can I say from this Jupyter Notebook or from someone else's Datalore notebook?
Yeah, I'm pretty sure you can.
If you go to the, if you're in the file system view, there should be a button.
It looks kind of like the button to create a workbook, but basically it lets you import a workbook.
It could have that Datalore format or it could have the IPNB, IPYNB, IPYNB, IPYNB, IPYNB, IPYNB.
So yeah, we can import Jupyter Notebooks into Datalore.
I think that would be a good place, a good way for people who are doing now, doing Jupyter and Explorer,
just like, hey, what does it look like if I were to do the same work, but over here?
Right.
Yeah.
I think that could be an interesting idea to try instead of just trying to start from scratch.
You try to take some established work from Jupyter and see what it looks like working with it in Datalore.
Right.
Grab some interesting notebook off of GitHub and throw it in there.
Okay.
That sounds pretty good.
I guess the final thing around Datalore would be, where is it going?
It's pretty new, right?
It just went 1.0 not long ago, right?
Yeah, I think in October.
What is that?
Four months, something like that.
So it's pretty new.
And now that your app has met users, I'm sure you got some feedback.
Yeah.
What are you thinking on working on next?
I can't really talk too much about the big features that we're working on, or big new features that we're working on.
Certainly one of the big things that we try to do is, as we get feedback, we want to act on that feedback.
We want users to get the sense that we actually care about what they're saying.
I can't think of specific features that were suggested by users.
I can certainly think of a lot of bugs that were reported, for example, and that they get that extra urgency because they're coming from the users and we want to fix it so that they can continue to work with the tool.
So that's certainly a big part of the, I guess, philosophy or something.
Okay.
I did see in the blog post that announced the release of 1.0, there was a bunch of feedback in the comments around there.
And one thing, I don't know how much my audience would care, but I know that they were asking, people were asking for Kotlin support, which Kotlin is a language JetBrains created.
That's like a better Java.
That's kind of the way I think of it.
I don't know what happened.
That's the idea.
So are you planning on adding other languages like Kotlin or JavaScript or R or whatever?
Or is it really focused on Python?
For now, the focus is on Python.
But the idea of supporting other languages, it's definitely something on our radar.
We've been asked about, I think, R, Scala, Kotlin, probably a few others.
So it's definitely something that's on our radar.
I can't say whether or not we're working directly on it right now.
Cool.
Well, it's definitely an interesting entry in this whole computational notebook space.
I think the smart editor features sort of borrowed from PyCharm is really cool.
I think the collaboration is really cool.
So hopefully people find it an interesting thing to consider.
I hope so, yeah.
All right.
So I guess before I let you out of here, let me ask you the final two questions I always ask folks.
So if you're going to write some Python code, what editor would you use?
I feel like I only have one correct answer.
I'm going to go ahead and say PyCharm.
Though realistically, technically, I'm using IntelliJ IDEA for all my Python editing, but it has the Python plugin, which gives me PyCharm, basically.
Yeah, exactly.
So effectively, more or less the same thing.
And then notable Python package that people might find interesting out there that maybe they don't know about.
I don't know if I can really name something that a lot of people won't know about.
I think my personal favorite.
I really like SymPy.
At least just the concept of SymPy is really neat to me, like the symbolic mathematics in Python.
Yeah, that's really cool.
I haven't used it.
I've heard of it before.
Maybe just tell really quick what it is.
It's bringing symbolic mathematics into Python.
Like you can define variables and build mathematical formulas, equations in SymPy.
Right.
So I could give it like a quadratic equation and say solve for Y and it'll or solve for X and it'll like express it in terms of, you know, things like that.
It will be able to do that.
I saw a demo, which was pretty neat, in which basically it was, you would define this partial differential equation and it would build a numeric solver for it.
Oh, wow.
Okay.
I don't remember how that happened, but I remember seeing that tutorial and I thought it was really neat.
That's pretty cool.
Basically, all I remember from partial differential equations is that they were hard and I would love a library to solve them for me.
Yeah.
So, yeah, I think for me, the appeal is mostly just like the mathematician in me likes the idea.
It sounds really cool and it ties in well with like all the other stuff that we're talking about here.
Great.
All right.
Well, final call to action.
People maybe are interested in Datalore.
What do they do?
Go to datalore.io and create an account and check it out if it sounds at all interesting.
You can play around with the samples that we have.
You can even upload your own notebooks, see what it's like to play with them in Datalore.
Awesome.
Well, Adam, thanks so much for being on the show and sharing your part of Datalore.
It's cool.
Thank you for having me.
You bet.
Bye.
This has been another episode of Talk Python to Me.
Our guest on this episode was Adam Hood and it's been brought to you by Linode and Brilliant.org.
Linode is your go-to hosting for whatever you're building with Python.
Get four months free at talkpython.fm/Linode.
That's L-I-N-O-D-E.
Brilliant.org wants to help you level up your math and science through fun, guided problem solving.
Get started for free at talkpython.fm/brilliant.
Want to level up your Python?
If you're just getting started, try my Python Jumpstart by Building 10 Apps course.
Or if you're looking for something more advanced, check out our new async course that digs into all the different types of async programming you can do in Python.
And of course, if you're interested in more than one of these, be sure to check out our Everything Bundle.
It's like a subscription that never expires.
Be sure to subscribe to the show.
Open your favorite podcatcher 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.
This is your host, Michael Kennedy.
Thanks so much for listening.
I really appreciate it.
Now get out there and write some Python code.
I'll see you next time.
Bye.
Thank you.