 So good afternoon and welcome. My name is Sagar and me and Ashish will be presenting this topic on How is visual studio code and the combination of Python is the next level of awesomeness, right? We all are developers here and we basically are from Microsoft. We work with the partner team and we have both solution architects We have a special liking for AI and machine learning as well. That's why we are here amongst you guys So let's get started. So if you just see those are our Twitter handles Ashish A underscore and Sagar JMS. That's our Twitter handles if you like to tweet to us after the session So let's see, you know, what has been Microsoft's OS's journey till today, right? I mean which drastically changed after 2014. Dotnet framework used to be a core product And we also outsource that sorry open source that into something called as dotnet core, right? And if you see that is where our journey actually started when we put dotnet core on the open source platform Which is on GitHub and then we 2015 we realized that Since the advent of the cloud which is Microsoft Azure We also realized that people are not going to only write dotnet code. They're going to write Python code. They're going to write Rust code. They're going to write go code. They're going to write node.js type script JavaScript everything So we wanted a ID which would which would be number one class cross-platform light weight and also extends the capability Rather than just begin development editor To a debugger or you know an ecosystem of sorts That is where we thought about VS code and then you know you the ecosystem has grown so much because of extensions of the contributions It's really touching new heights and then in 2016 We realized release the first version of our dotnet core product and you know We also announced sequels around Linux, you know, so a lot of cool things going on fast forward to 2018 Which was last year You know half of our we're trending towards a lot of our virtual machines when I just running Linux, you know, we acquired GitHub to And then we also have a lot of cool thing going on with VS code just in matter of three to four years It has reached as a number one ID in the market, right for all the developers It's not only a certain set of developers, but all the developers So this is our open source journey started because Python being an open source It's really important for us to come and tell you what our journey has been And if you see I was looking at the stack or flow insights from last year 2018 and Over 34% of of the developer community had said That we just record was their number one ID of choice and then I happened to look up the 2019 survey which actually came out already and 50% of you the developers actually said they we just record is their favorite ID of choice You know, so thanks for that and the ecosystem keeps growing on so that is the reason If you are Python developer with combination of VS code and our cloud platform You can do really cool things, you know, the number of problems which Python developers face Not from a capability perspective, but everything outside of the ML model, right versioning Hosting scaling Dev Ops now called as ML Ops that is where we with our IDE and our platform Come in and really help you guys out, right? And we also have a boot outside if you want to come Chat with us about your scenario So just you know just a minute about Why is as your machine learning really helpful for developers, right? if you see we on the first line we have a lot of APIs as you will to make ready-made pre-built API calls right to cognitive services, which are our AI AI services, so you don't need to really write code But you can leverage our APIs if you are in the region and you want to do rapid development Then we have a lot of tools which are very familiar to you like no You can use your Jupyter notebooks with IDE Which is VS code and you can bring it to Azure and will give you an environment to To to let you not first maybe install a Jupyter server and you know do all the plumbing and managing We'll just give you a ready-made Jupyter You know server out of box and then you can use your environment right there Obviously we just do the code will see a lot of demos and and trust me This is my last slide and after that we'll jump right into the demos which me and Ashish will take over and We do support a lot of popular frameworks You know being on the cloud it's imperative that people are doing different things some of you Might be developing for TensorFlow some of you might be developing for PyTorch And and you might have heard about Onyx So it's really important that you as developers be be really successful on the cloud while using our platform Hence we support the plethora of these Host of services which really makes your life really easier You guys are the best in writing Python code and what we bring to the table is to help you become more productive How can your platform? How can your code or how can your? Model be scalable. How can your model? Be versioned right? How can your model be? You know, let's say the different versions can be hosted on to the cloud without you having to really learn Some of the technologies which are around and go deep like for example How much of how much of Docker do you need to learn right? Maybe a little bit but not all of it because you know hey It's a world where micro services are becoming really really mainstream and The next two lines are you know the hardware and What what is the ecosystem of services that we have today on the cloud? Which really helps you to run your models very efficiently and the biggest thing is in the bottom, right? The capabilities are very similar to whatever you would try to run on the edge Like your mobile is an edge my mobile is an edge and a Raspberry Pi is an edge to the super powerful cloud It's sort of trying to streamline the capability across right so you being a Python developer You will come across a scenario whether you're working for a company or your individual that sometime you might need to need a You know your let's say your inference model on a mobile very limited resources, right? So how do we enable you to do that with our SDK and obviously you can run the training on the cloud Which requires a lot of GPUs CPUs and FDGA But the similar capabilities are available to you on the cloud So we were trying to cover end-to-end spectrum of that, right? So demo time as I promised that was my last slide. I won't bore you with a lot of slides So let's see what do we have here, right? So basically, you know, this is VS code and There are some cool features that I'm going to display to you right here So for example, this is a very simple file, right? It doesn't have anything I'm just trying to print a number But one good thing I wanted to show you is the intelligence capabilities We invested a lot of a lot of energy into something called as a Python server and when you go to the output of VS code You can see there's a Python language server, which the extension has installed So, you know, when you use VS code, we give you a Python language server, you know, which which is in the back end And then it actually tries to give you intelligence like what kind of intelligence right for example I'll move here A is just number here and then I say, you know a dot something it gives me An integer specific properties, right? And maybe I just initialize a later to Let's say something called as a string, right? And I just say solder So without even saving the file, it's going to You know, give me an intelligence saying that You actually change something and then The Jupyter server tries to run some modeling So it's an AI within an AI and then tries to give you very specific recommendations to with respect to your code So this is where, you know, uh, this is a tip of the iceberg Where you get good intelligence so that you can write code faster If you write your own functions, you hit f12, it will go traverse and go take you to the function as well Right? So that was one part Now the other part of the story is How do you run this? You know, I can come here write Python and then, you know, this is integrated terminal and run Or what I can do is since it's already detected, I have a Python code I can just right click and say Run in the Python code and you know, that's my output right here Right, that's the number that it's trying to print So very simple for you to go and you know, we also have debugging capabilities. So if you see, I have a Um, I have a break point here. I can go and start debugging. So it's actually going to ask me. Okay. What configuration do you want? Right, and it's going to Immediately go and start debugging for you Right there in the ID So it's more more than just an editor. It's it's an ecosystem Now let's go further and try to see some other things that I've done now. This was This is python 3.7 running on my own machine You know, directly at the root Now I went ahead and sort of took the liberty of installing Uh, a virtual environment and in that virtual environment, I I sort of went ahead and you know, I'm trying to go do jupyter notebooks, right? So if I come here Okay, perfect. Now what I'm going to try to do here Is show you a little bit more advanced capability of the python extension for visual studio code, right? Uh, this is simple, you know, uh It will try to print what are the path variables available to my code Uh, what I'm going to also show you now, how does how can I make it into a a notebook? Right and jupyter notebook is more interactive So what I'm going to do is just insert a code snippet here Which actually, you know shows you a uh, uh A matplotlib You know graphs, so if I just run this you will see that, you know on the screen This is a graph that I see right very simple file in a code but you know Uh real world programs are much more complex and you require a continuous sync between Let's say the graphs because you know, you'll use complex things like data frames and You know and pandas frame and stuff like that. So what we thought was, you know, why not give you something cool So if I want to change this again to let's say 20, I have to You know, maybe save this file I have to I have to save this file And run again, right? And then it will show me. Okay. This is now how my new graphs is going to look like, right? I think I did a typo there. Maybe I forgot the comma Let me go back a little bit So this was my original snippet, right? And then if I just try to do 20 Wow, something's funny happening with my mouse here. Okay. Let me go back I think there's some problem So let's say the capability I wanted to show is you keep changing that and then, you know, you have to pop up the Output again What I wanted to show you is, you know, how you can Instantly bring up a A jupyter notebook kind of environment here by just typing a hash and double percent And then it gives an option to say, you know, run the cell So what happens is in the same window on the right hand side, you get an interactive python Window running, right? And if you see right here, oh, yes, this is this is how I can now toggle between the two windows I can just close this And then see in the side saying that this is how I can actually work together And then convert my plain python code Into an interactive python code, right? And then, uh, you are you are free to sort of, you know, toggle between the These two things as you go along at any point in time You want to write more code or if you want to, you know, uh, not do these things, you can just remove this, you know And the shell goes away, right? Because it says, okay, no, you're not you're not using the interactive shell anymore And then you don't need it The other way of converting something to uh, uh, to a interactive python notebook is you can actually Run the current file in an interactive window. So again, it will go and pop up the same way in the previous versions of Our python tooling, we didn't have this option, but today we do have those options So if you see first, it will try to print the path And then it will Also try to show the graph. So it's very easy for you to toggle between, you know, back and forth, right? So that was another demo of, you know, how you how you do stuff with visual studio code if you haven't actually used it And the last thing I wanted to show you Is, uh, you know, the last thing is how do you run? Uh, uh, you know python in a serverless fashion, right? When you write a python code, you need to have some machine somewhere, right? But serverless is the new new mantra in the microservices world So what we actually give you is a way to run this in a serverless way if you see I have a python code right here In the in the trigger function and this is just going to take, you know It's not flask. It's not any of the frameworks. It's Microsoft as your functions It's just trying to do something and I can just package this up Put it on the cloud without having to create a machine. So what this actually does is helps me, uh, you know Run python code in a serverless fashion without having to install anything And this is the local emulator that I'm running, right? So if you see Uh, so much of so much of inbuilt tooling that you get right here, right? And on top of it, I can just go and start browsing the api, right? So I can just click this It goes into the eye. It will give an error because I haven't passed the parameter yet. So if I go to the end If I go to the end and say Name equal to sj and it will start printing it out You know all running locally and a great debugging support because uh, once you come back to The vs code you see all the logging right here. So python plus plus vs code plus serverless Will make you do awesome things. So I'll be hanging around This is end of my part of the demo and ashish will come and tell you more about how The ml side of things looks much more better on On the tooling side with vs code and microsoft as your so ashish over to you So good morning, everyone You can hear me, right? Okay, great. So good morning. My name is ashish. I do the same stuff You know as saga does and one thing that i'm not going to do today is you know, show you any slides So we will directly get into the demos here, right? So this is a function app that we just created right the saga talked about it So what you can do is you can simply press f5 in vs code and start running it and you know, it does the usual stuff It basically uh So I have the functions runtime and the functions extensions, you know installed in my vs code And that's what is actually making all this magic happen So my code is running locally and you know, you can test it out. You can do whatever you want to do with your functions Like, you know, he showed it, you know, it's a pretty basic function sttp trigger so that What you can do is you can call it In your applications using the sttp client as simple as that right and How do you run it? You do the control click and you get this Option here and it's expecting the name parameters. Let me know just Do this, right? We have already seen this demo, right? What we are going to do next is we are just going to Uh, you know extend it a little bit, right? So When saga was going through the slides, he talked about the services like, you know, pre-built AI models and as well as the ML services, right? Uh, so what we are going to do is, you know, we are going to take a look at that How do you take a plain vanilla function and try to infuse, you know A little bit of pre pre trend AIs into the function and you know get something more interesting going, right? So what I'm going to do is I'm just going to change all my name parameters. So to say a text, right? And then what I'm going to do is I'm just going to take a little bit of technical liberty here and Press the snippet which is already there in the keyboard in my Clipboard, right? And then what I'm going to do is I am just going to print the output that I'm going to get from The api calls So what's happening here is that I already have the azure cognitive service called tactics analytics provisioned, you know, right? So what I'm doing is I'm just creating a endpoint here. I have my key Mentioned right here and I'm going to change it after the session so that you know, you don't make a note of it I get building up for that. So So that's what is happening and I'm just printing out the function this function here, right? So I'm just going to change the stakes to Sentiments because that's what my output is, right? And I'm just going to Run it right here And then the function that I was just running, you know a few seconds ago Is going to be doing some additional stuff and which is to basically make a call to the text analytics and Do the you know bunch of the AI stuff on it and shows the output. So let's try that Let me launch it in my browser Right. So right now it doesn't have anything So I'm going to do this and say Then what happens is it's actually making a call to the text analytics api Which you can come here And also see here And I did not get an output here Okay, so I see one error here, right? So the name request is not defined here So what did I miss here is that I have not installed the Requests module here. So what I need to do is Either I can come back here And add it to my requirements file Right, which is going to be as simple as this or I come back here and I show you the function that I have already Put anything and everything is running. So let me run that function and show you how it works Right. Same stuff. It passes through the requirements dot txt installs all my modules libraries and then Everything is ready Right, so I've got two functions in this particular project and I'm just going to run this one And before it shows me an error, I'm just going to type something Which looks like a review for a hotel room kind of thing, right? And this time that should work, right? So this is my Output that is coming from the text analytics api and I'm just printing printing it raw So just to make it, you know A little bit more easier to the eyes. I'm going to go to jsonlin.com and put it here and Validate now what's happening here is You see the output here, right? So the 10 sentiment in this particular text that I had Which was This one I would recommend this place And this is the one I didn't want to show only for my enemies, you know. Yeah, it was a Fun we were actually, you know, I'm doing sorry to do that. But now since we have the output, let's go through that So if you take a look at the sentiment here, right? It shows, you know, it's a mixed sentiment thing, right? So I've we've got you know, 50 percent of the document, which is basically the entire review Towards the positive side and the 49 percent of this text was actually Negative side, right? That's what we see if there were any neutral sentences We would have seen that as well And what is happening furthermore is that, you know, it's actually breaking down the Text that I gave to the API into sentences And then it's giving me the Score of the positivity and negativity here, right? So you can see the first sentence is 99 percent positive And the second one is actually 98 percent negative. So that's what the Making the entire complete document score as something, you know, which is 50 percent positive and 50 percent negative, right? So that's what it did now. That's one example what we should also do is let's take a look at Another function that I already have running and let me just show you the code Here, so let me close this one And what I'm doing in this one is that I am calling another a pre-built AI Service called computer vision here, right? And what I'm going to do here is I'm just going to take this URL Which is basically an image and I'm going to Do the same stuff and this is already running. So I'm just going to change this to The second function and change the parameter to URL And give the path to that image URL, which I have already copied in You know from my code So what it is doing this time is actually making call to the computer vision API and trying to analyze the image To fetch the you know information that we can have, you know And let's take a look at that also So again same stuff just in length and Right. So here that is doing bunch of things, you know, it's trying to detect the let me, you know, walk you through the code a little bit here right, so these are the four Or four or five, you know different kinds of analysis that we are doing we are trying to, you know, describe the image We're trying to extract the Categories of the contents that we have in the image then colors brands faces and objects, right? So if you take a look at the output here Right, we have Categories people because in that photo, which is this one Right. This is Brandon Burns And then he's obviously talking in a conference So we see that you know that you were actually able to categorize this image as people then it did the color stuff They're also trying to you know, it also built a description for us and then we have the faces So we also did the face detection and that is the location and you know the gender of the person that we detected there And then we also have the objects, right? So there's a bottle There's a laptop And there's a person here, right? So that we all you know, can I definitely see here What it is also doing additionally is that it also detected a brand there in the image, you know, which is apple Should have taken a different image But yeah, you have an apple macbook here, right? So that you see here now let's try this and Let me take another image Because what I did is you know that I want to show you the celebrity recognition that we do from this API, right? So what I'm going to do is I'm just going to take this Same API call and give it a different image right now Right, this is the output Let's do the same stuff here Right, we have everything you know things like that and then we have got the description Right, you can already that now and then there's also celebrity recognition. So we have this and then Let's go and try to look at the image that I actually gave it and that's This one Right, and then it also does based on this photo. I mean we all know About him, right, but let's do this thing Uh, where is that output So we did the celebrity recognition anyway, right? But what we did also in the we were also trying to analyze the phases that we did it detecting the image, right? So that's what we did and if you come here and take a look at this, you know This will come as a surprising but if you look at the photo, right? It doesn't look in a very far phase, right? So that's what it is doing Now that was the pre built is that we did right and then The other thing that we also do I mean you can also do with the vs code is actually, you know, take it a step further and start utilizing it When you are, you know Actually building the custom models, right? So unfortunately, we are, you know, slightly out of time So I think it's time for a question and answer. But one thing I would like to show you is the Okay, I have to change my resolution Okay There's the one So what you can do is you can actually use the vs code also vs code along with the azure machine learning service to also do your team data science project So which actually is, you know, uh, your Complete life cycle of a data science project, you know, like you do the application life cycle management You can also do the data science life cycle management using the vs code and Uh, we're short of time. So I couldn't show you the demo But you can do things like, you know, training your models locally or in the cloud Register your models with the service, you know, host it in a single place and analyze how your models are performing across, you know Everybody's, you know Data science environment in a single place to understand which model works, you know, better or not and all that stuff So with that Thanks any questions if we have the time for, please go ahead, you know, pick the mic and let us know And then we also have a booth outside the mics are both so, you know, you can always come and talk to us there as well um Do you have any extensions that you'd recommend? Um, so what kind of development do you do? I mean python python, right? So there's a python extension So if you other than the main python extension and the language server I mean as a developer, do you recommend anything? Okay, so, um These are the two things that we have used so far. So we haven't, you know, needed anything else But if you go there and you don't search for python here, you know, you have a bunch of these things, you know, that you can Possibly find useful So basically you can use the azure Functions extension as well and the azure extension as well. So those are two things that will do a lot of work for you already So those are the official ones that we have and we highly recommend that Not the only official ones. These are also the community built ones Yeah Hi, um So whatever you showed, uh, means I actually use vscode for a lot of things But the second part that you showed it's just a rest API, right? I can do it in paicham I can do it in anything. Anyway, yes. So what uh, like, how do you think a leveraging vscode would help in that case? So in this case, you know, what you saw using the functions extensions. I was actually running that code locally Right, so I mean you can do that in paicham But you know, if you want to push it, you know, you will have to basically use any additional tools, you know to do that Develop stuff there, right? So what I can do is, you know, I can come back to this code right here right now Right here and push it to my functions app. So it kind of gives an end to end experience, you know Developing locally testing locally and deploying it to your production Yeah, also, uh, the azure ml deep learning sdk and you know the python sdk for Vscode that actually gives you a lot of flexibility where, you know, you're the you're the boss of the code anyways But the peripheral things right makes super easy for you to Interact with the code and he was supposed to show that but I'm happy to run you through On the booth. Yeah, thanks everyone. You've been wonderful audience. Thank you