>> Hey Friends, it's another episode of Azure Friday.
I'm here, I'm Shahrokh Mortazavi. How are you Sir?
>> Great, thank you.
>> You are in charge of what?
Because you're a big and important person.
>> I'm not sure about that. But I generally
run a few teams like a Python team,
for Python tools for Visual Studio, Azure Notebooks,
we used to do the Azure SDK for Python,
that we handed over for the SDK team,
and we also did the art in Visual Studio,
and most recently,
we are the new home for VS Code for Python.
>> Wow.
>> So we hired Don Jayamanne,
who was one of the extension authors,
and now he works at Marcus a full time on the extension.
>> All right. Would you say that's data science,
or it's more than that though?
>> It is more than that.
It covers the whole spectrum of what Python does,
which is anything from scripting,
to data science, to web, to IOT. Lots of stuff.
>> Very cool. It's nice to see
you at Microsoft loves Python.
>> At last.
>> So what do you have to show me today?
>> So today, I want to talk about Azure Notebooks.
So Jupyter Notebooks,
think of them as a repel on steroids.
It's got code, markdown,
interactive graphics and so on.
It was started by Fernando Perez and the Brian Granger.
And basically, we've turned it into a free service.
Azure Notebooks,
notebooks in general are available as part of
Azure Machine Learning Studio as part of HDInsight,
and we talked to the big cheeses and said,
"hey can we just turn this loose as a free service as well
as a thank you to the open source
in Python and Jupyter communities?"
>> Wow.
>> And they said, "Do it." So now,
it's a playground for running code,
publishing your experiments, teaching,
and it's free both for compute and storage.
>> That's amazing.That's a lot of free computer.
>> Yes it is. It's fantastic.
>> So you go to notebooks.azure.com,
and anybody can get started?
>> Anybody. It's for anyone to use,
most of the use currently has
been by academics and people who are
trying to learn Python or Data Science, but basically,
we see people like Harvard,
and Cambridge, and Stanford,
and all, putting their courses up there,
and teaching and lots of courses on EDICS as well.
>> What is it about Notebooks and Jupyter Notebooks that
make them just so great for education?
I mean, it mixes code and prose, doesn't it?
>> Exactly.
If you just want to go straight into an ID,
you usually have comments in code.
You don't have much visual cues,
and this, imagine Word documents
but with code cells as well.
So, if you take a typical scientific paper,
written in PDF,
it's not that much different than
an old Egyptian hieroglyphics paper, right?
Actually, that had more graphics in it
than a lot of papers today.
So this combines all those elements
to really tell a complete story.
And if you want to do,
for example, reproducible research,
you can just point at
the Notebook and say, if you don't believe me,
go run the Notebook,
point it at your own data and check out my claims.
So it's fantastic for a lot of scenarios in Academia.
>> It almost seems like Jupyter Notebooks
describe the way that
Tim Berners-Lee wanted the Web to be?
>> Exactly.
>> It's an active living academic book
that is shareable hypermedia.
>> Exactly.
And it's interesting to point out that like
for given that it's running on Python,
and underneath of it is the Anaconda Destro
like for Azure and most studio, the front end,
and like our system,
the Notebook system is runs on Linux,
their back end runs on Windows.
Nobody knows, nobody cares.
>> That's cool. So what kind of people are putting
these books together and making
them available to Academia?
>> So, we have people like,
here, there's a professor at
Cambridge University that has put
essentially the Engineering 101 Course
that are taught where Newton used to teach.
>> Oh, wow.
>> Right there, and people just can go and learn Python,
and lots of courses material on Engineering 101.
We have others like O'Reilly that have put
their very famous books like
Python Data Science Handbook by Jake VanderPlas.
The entire book is written
as Jupyter Notebooks and anybody can go in there,
and clone it and run it,
and- I'm just clicking
on random chapters of the Notebook.
And here it is. It happens to be on some-.
>> It looks like a book.
But each piece of code can be run.
>> It's executable. And you don't even have to log in.
You can just look at the HTML captures of the Notebook,
and you're good to go.
If you want to go actually, run the code you just log in,
you can even edit it,
and then tomorrow when you re-log back in,
all your edits and changes right there as well.
>> I noticed at the top of just that you pick
just a random chapter 500
and 19 clones of just that random chapter.
>> Exactly. It happened
to somebody on Hacker News noticed,
put it up there and lots of people descended on it,
and started cloning it and using it.
>> Kind of makes you wonder why
every language isn't taught in this way.
>> It's a good question.
Like we see thousands of people
from EDICS courses that Eric Camplin has
put on Azure Notebooks
come in and a lot of them are just learning Python,
learning A- many people are interested in F# actually,
so we a.net-Fsharp support as well.
And so, it hits,
it resonates with a lot of people
from a teaching perspective. Absolutely.
>> Do I do all of my work in the browser?
Or are there any other ways that
I might write this kind of code?
>> So you can- Jupyter runs as a client locally?
This is just happens to be the hosted version.
So if you have Notebooks locally,
you can upload and you can download them and so on.
And then, there's rumors that's
an Electronic version of this is coming as well.
>> Oh well.
>> Yeah. So, should I
just give you a quick overview of Notebooks, or?
>> Please.
>> Do you think, okay. All right.
So, if you create a library,
essentially think of it as a repo.
You'll have a collection of Notebooks
and data on whatever you want to put up there.
So here I happened to have a Notebook created.
So, in cells can be generally
classified as markdown cells or code cells.
>> Okay. >> And when I hit "Shift Enter"
or click this little "Run" button,
this code gets executed,
meaning it gets sent to an interpreter of
some sort and it sends the results back.
>> Okay.
>> So, I happen to have a markdown to show
these cool Channel nine, logo.
You can do math equations using low-tech,
and I'm going to bother to run these one by one,
I'm going to do "Cell" "Run All Below".
So anything that was below
my current position is going to get executed.
>> Do some create
prerequisites that other cells below it depend on?
>> Exactly. You can have a sequence,
you end up going up and
down in a random sequence and that's why
I'll talk about Jupyter lab which is the follow on
to Notebooks that gives
you a little bit more random access.
So here, you can get
beautiful graphs in whatever discipline you might be in.
You can also do escapes into shelves.
So here, you see bang who am I
are print working directory,
this gets sent to the whatever show is,
if you happen to be on Windows,
it gets to command.exe or
PowerShell whatever you've set up as your shell,
or you can run it here on Linux.
There's a bunch of magic commands
that you can essentially again,
they're interpreted specially, and
you can get their responses,
here's a collection of them.
If you do %%, you can do execute
an entire cell by a interpreter,
and finally, you can use cURL to download data frames,
and then do some data science and so on.
>> Another cool thing that people use,
you were talking about what scenarios
people are interested in,
we see people turn blogs
into complete executable notebooks.
So this is a blog that the Cosmos team did.
And it basically points at a read-only database,
and you can essentially check out
all the key features of Cosmos directly
in a notebook without installing anything,
and that's the beauty of it.
It's zero friction to actually
get something and learn from it.
>> It's amazing. Again, it gets to my point of
why are we doing this in 2017?
Why have we not always had an executable living web?
>> Exactly, I would almost
encourage anybody at Microsoft or other
places that are writing
blogs that have code embedded in them to
consider using Azure Notebooks and just putting
them up there and let thousands of people use them,
run them, and learn about their product
whether it's Microsoft or somebody else's product.
And then, we'll do automatically
all the machine management, resource management,
keeping the machines patched,
and scaling as thousands of people come in.
>> This is a slightly orthogonal question,
but how do you keep people from abusing this?
If I post this on my blog,
what if someone decides to mine
Bitcoin with Azure Notebooks?
>> Right. So, we do keep an eye on things.
We make sure there are guards in place to avoid DDoS-ing.
If people did a little bit of Bitcoin mining and so on,
we will eventually notice and block them.
But generally, so far,
there hasn't been much abuse to the point.
>> So the occasional for-loop might go wild
but for the most part, it's handled.
>> It's been okay.
Another resource to look at is nbviewer.org.
This is a collection,
sort of a repo for thousands and thousands,
let's call it millions at this point.
There are two million notebooks
available just on GitHub alone.
And this doesn't count other place.
Just like a wealth of high quality
notebooks that you can peruse,
download, and immediately run it on Azure Notebook.
>> Just to be clear,
there's the notebook file that you can share.
And then there's the notebook
when it has a URL on Azure Notebooks,
or other online Jupyter Notebook, right?
So, you're sharing the file.
>> Yes. If you're sharing it through Azure Notebooks,
there's a URL like, for example,
for this discussion today is notebooks@azure.com/smortaz,
which is my log in,
libraries, which is
all my collection libraries, Channel9 Chat.
>> And then within that, there is "ipynb".
>> Yes, "ipynb" is essentially
the notebook format file and you can share
either the notebook directly or
you can share the higher level library
that contains all of them.
>> So then if I go to nbviewer,
I can take those notebooks,
I could copy them into my own personal library,
I could clone them.
>> Correct.
>> Share them however I like.
Then take those text files and give them a URL.
>> Exactly. You can have
local notebooks that you've uploaded.
You can download them,
you can share them.
You can have private libraries and public libraries.
Another O'Reilly book that I should mention is
Wes McKinney's Python Pydata book.
He is the author of
pandas which is the standard package you use
for manipulating data frames and it's very, very popular.
And last but not least,
I'd like to mention that
something that might be of interest to you is,
so what I just clicked on,
it just started a docker container
somewhere in Azure on a Linux VM and put me in there.
One of the cool features of Jupyter Notebooks,
for people that give a lot of talks,
just like I use PowerPoint which is cool,
but it's mostly static.
Now imagine if you had PowerPoint
and you could still use like the right,
left, up and down and so on to navigate through.
But imagine your PowerPoint executed code.
>> That's pretty cool.
And RISE is the library?
Look at that. That's crazy.
>> So, for somebody that gives a lot of
talks or webinars and so on which is,
by the way, another very,
very popular scenario is,
we see a lot of local groups or
people that give talks at conferences.
Suddenly, like a thousand people or hundreds of
people come in and they're listening to it.
Generally, you spend half an hour
just setting up your 200 students and says,
"Oh, this didn't install.
That didn't install." All of that goes away.
>> People could use an iPad or a Chromebook.
>> Exactly. Just give them the URL,
they click on it,
they say clone, they have
their own copy of your library, and you're good to go.
>> That's fantastic.
>> Let's see.
Do I have any? Let's see it.
And then, some of the things,
like some of the more advanced features
of notebooks that I was going to get to,
let's just do a quick run all for the sake of time,
is essentially, you can have interactive widgets.
>> I see. So, you have a function that you create
and then you make the input have a UI.
>> Exactly, and for
a little bit more advanced version of them is
the networks library that I can
basically select
different algorithms from other networks.
It's manipulated. And oh,
look, who's this guy?
So, embedding web pages and videos.
For tutorials and webinars
and classes given by professors,
essentially, it's become the ideal canvas.
And last but not least,
I'd like to point out
the next version of Jupyter Notebooks.
It's called Jupyter Lab.
So, Jupyter Lab itself.
>> This looks like an IDE version of Jupyter.
>> Exactly. After a few years
of using Jupyter Notebooks alone,
which essentially is just this pane over here,
people came to the conclusion, "Look,
you need a file manager much like
VS code and open folder on Visual Studio."
And then you need to be able to essentially manipulate
Windows and move things around and play around with them.
It also has a text editor.
It's got a launcher that I can go and
have a terminal that
I can do all my machinery management.
The good thing here is,
the editor that you can actually do like
VS code style writing is going to become Monaco.
>> The code name for
the editor that powers VS code itself.
>> Exactly. The rich editor,
the VS code team,
also the editor that they've built,
will become the editor here.
And one thing that you probably
have noticed by now is like,
I didn't show you any debugging.
Jupyter environment is completely missing the debugger.
The good thing is our team has committed to
actually providing the debugger API,
the protocol multilingual,
and we're going to do the first implementation
for the Python version and that other people
can clone that and use it for their own languages.
>> Very cool. Well, that is just a taste of
the power and the cool stuff that you can
do with Azure Notebooks. Thanks so much for sharing.
>> My pleasure.
>> You have got to go and check out Azure Notebooks,
and all the great things that are happening around
Python that we learned about here on Azure Friday.
No comments:
Post a Comment