8 reasons you will definitely want to use Azure Notebooks

If you are a data scientist, or do machine learning, like me, you are probably writing most of the code in Jupyter Notebooks. For everyone else, I’ll explain: Jupyter is a wonderful system that allows you to combine executable code and text fragments based on Markdown in a single document that can be edited and executed directly through the browser. Such a document is called a laptop (now you know how to give a friend a laptop for my birthday, and not much to spend money)







Azure Notebooks Intro







Most data scientists usually install a Python environment on their computer (for example, Anaconda or Miniconda ), and then start the local Jupyter server and create laptops on their local computer. If you suddenly need a very high-performance computer, you can run Jupyter on the server, and work with it over the network through a browser.







The idea itself is to use a cloud service to provide ready-made Jupyter laptops with all the necessary environment. This is what Azure Notebooks is called - the publicly available Jupyter service in the Microsoft Azure cloud, which you can use from anywhere to write your code or documents.







Using Azure Notebooks is often much more convenient than using the Python environment on the local computer, and I’ll try to describe why.







1. You can immediately start programming



Whether you are starting to learn Python, or want to experiment a bit with F #, the first thing you need to do is set up a development environment, such as Visual Studio or Anaconda. This requires at least time and disk space. If you are going to engage in serious development - most likely these efforts will pay off, however if you just want to try a piece of code, or if you came to a party with your friends and want to brag about your latest program - most likely you will not have an extra couple of hours of installation time. In these cases, you can simply log in with your Microsoft Account at http://notebooks.azure.com and immediately start programming in one of the available languages: Python 2/3, R or F # .







2. Your code is available everywhere



Let's go back to the example when you wanted to show off your program at a party with friends. In this case, it would be great to have the code at hand, without having to copy it from a USB flash drive or even from OneDrive. In Azure Notebooks, all your files are stored online, they are organized into projects that resemble GitHub repositories, only without version control. Moreover, each project can be made private or public , in this case you can share the code.







3. Share code easily



Azure Notebooks is a great way to share code with other people. Each project has a unique link that you can send to friends (it is important that the project is publicly available). With this link, your friends will be able to:











Azure Notebooks Share







Unlike Google Colab, you share the whole project at once, which can include several laptops at once, as well as data, the README file, requirements.txt



environment configuration, etc.







If you need to configure the environment, for example, install some packages , this can be done using the configuration files , or by including pip install



commands at the beginning of the laptop (this is also useful if you want to achieve compatibility with Google Colab). Installing packages on F # laptops is done through the Paket



package manager, as described here .







4. Documented Code / Data Journalism



A laptop is a great way to add detailed instructions to the program code, or vice versa, add calculated fragments to the text. This can be useful in many scenarios:









5. Presentations



My favorite feature that sets Azure Notebooks apart from all similar solutions is the ability to use them for presentations using the pre-installed RISE extension . you can mark cells as separate slides, or as fragments (a continuation of previous slides) to create an animation. You can “hide” some cells - for example, if they contain some useful executable code that you don’t need to show to your listeners, or a long explanatory text visible in laptop mode but not in slide mode.









Azure Notebooks Present







Of course, Azure Notebooks are not designed to create beautiful marketing presentations, but for many cases where content is important, not design, this approach is more convenient. Especially great to use Azure Notebooks for academic and scientific presentations, since you can use LaTeX formulas. And don't forget that laptops are easy to share!







6. Executable code for the GitHub repository



If you support your Python project on GitHub, then using Azure Notebooks you can give visitors the opportunity to run your code. One way is to put the code in a Notebooks project in parallel and specify a link where visitors can clone examples and try them. However, it is even more convenient to use direct cloning from any GitHub repository - all you need to do is include the following code in the project description in Readme.md



:







 <a href="https://notebooks.azure.com/import/gh/<git_user>/<repo>"> <img src="https://notebooks.azure.com/launch.png" /></a>
      
      







Azure Notebooks Clone







7. Code execution on different servers



In deep learning tasks, very often we can begin to develop a training script and run it on a subset of the data on a regular machine, and then transfer the learning process to a computer with a GPU. Azure Notebooks make it very elegant. When you open a project, we launch it by default on a free computing resource (Free Compute), but if we have an Azure subscription tied to our account, we can also select any suitable virtual machine from the list (by the word “suitable” I mean Data Science Virtual Machine running Ubuntu).







Usually in my work I always start developing code on a free resource, and then switch to VM. At the same time, Azure Notebooks will automatically transfer (or rather mount ) the entire project environment (including laptops and data files from the project) to the selected virtual machine.







In fairness, it is worth noting that the virtual machine provided for free is very good, with 4 GB of memory and 1 GB of disk space.









Azure Notebooks Compute







8. Teaching



I speak a lot, and also teach a couple of courses at several universities, and personally find Azure Notebooks an extremely convenient teaching tool . Here's how you can use laptops:









I also use other cloud technologies for teaching with, for example, Azure Functions for obtaining laboratory results, but this is a completely different story, which I will probably share someday ...







Some features



Azure Notebooks is a great tool, but there are some things to keep in mind:









Examples



A good way to quickly get to know the various features of Azure Notebooks, such as graphing, installing packages, accessing external data, etc. - start with examples . Another great collection of examples for Jupyter is here . Remember: you can run any Jupyter Notebook in Azure simply by uploading the .ipynb



file to the project.







Conclusion



Azure Notebooks is a great tool to help you in a variety of life situations, some of which I described in an article. If you use laptops for something else - share your experience in the comments, it's interesting!







Despite the fact that there are other ways to run laptops in the cloud , including Google Colab and Binder , a comparison shows that Azure Notebooks includes the maximum number of extremely useful features.







I hope that Azure Notebooks will make your life better and more productive, and you will, like me, constantly use them!







PS The official documentation for Azure Notebooks is available here: http://aka.ms/aznb








All Articles