In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "what a tool Jupyter Notebook is". The content is simple and clear. I hope it can help you solve your doubts. Let the editor lead you to study and learn this article "what is Jupyter Notebook?"
Jupyter Notebook is a free, open source interactive web tool. Researchers can use this tool to combine software code, computational output, explanatory text, and multimedia resources into one document. Laptop computing has been developed for decades, but in the past few years, Jupyter has been particularly popular and has become the tool of choice for data scientists and machine learning researchers.
According to an analysis by GitHub (Nature,30 OCTOBER 2018), there were more than 2.5 million public Jupyter Notebook as of September 2018, up from about 200000 in 2015. The main reason why Jupyter Notebook is so popular is its demonstration and visualization, and we can see the output and running effect of each piece of code.
This visualization is very important for data science and machine learning research because we need the current model characteristics to make decisions. In addition, because of this intuitive visual output, we often use it as a model tutorial, and Colab, a platform that provides free GPU computing power, also uses Jupyter Notebook.
So generally speaking, the main features of Jupyter are:
Inline code execution
A simple conceptual structure
A good display of pictures and data frames
However, Jupyter Notebook also has some disadvantages, it is difficult for us to use it for version control, and it is also difficult to use it in engineering practice. One of the more important is version control, Jupyter Notebook uses the JSON structure, the readability is relatively poor. Version control allows us to find potentially good code, and we can pay attention to changes in the code and discover what is important.
Until now, version control and Jupyter Notebook are people from different worlds, and there is little relationship between them. Although there are some efforts to try to combine the two, the results are very limited and unfriendly for developers.
Here comes Jupytext.
Now that Jupytext is here, we can convert the Jupyter Notebook code into plain text and open it with our favorite IDE. Importantly, Jupytext can clearly view the code's change records for better version control, which Jupyter Notebook could not do before. Is this kind of Jupytext the tool you are looking for?
In the video above, the project author shows how to use Jupytext quickly, and we can use our favorite plain text editor or IDE to edit Jupyter Notebook. In this way, Jupyter Notebook can also be written at a fast speed, because IDE is easier to navigate, edit or execute units of code, debug code, and so on.
Of course, if you want to use other IDE,Jupyter Notebook formats, you still have to convert them. Currently, Jupytext can convert Jupyter Notebook to the following formats:
Markdown and R Markdown documents
Julia, Python, R, Bash, Scheme, Clojure, Matlab, Octave, C++ and qmax kdb+ scripts
If we save Jupyter Notebook as a Python script, we can import the Python file into the Git repository and track changes and changes to the code. Interestingly, changes to the Python code are done in Jupyter Notebook, which previously could not be tracked directly.
More interestingly, if we need to use IDE to ReFactor code or other operations, we can edit and save the Python file directly in PyCharm. After refreshing Notebook, we can continue to easily update the code on Jupyter. In other words, the combination of Jupyter and PyCharm is convenient.
Jupytext uses posture
The installation of Jupytext is very simple, just install it directly with pip or conda. In addition, we have a variety of ways to use Jupytext, which are briefly shown below and the user interface.
Use directly in Jupyter Notebook or JupyterLab: Jupytext provides a content manager that allows Jupyter to save notebook in your preferred format to supplement or replace traditional .ipynb files. You can border the text representation in your favorite editor. After editing, refresh the notebook in Jupyter: the input unit is loaded from the text file, and the output unit is reloaded from the. ipynb file The "refresh" action saves the kernel variables so that you can continue to work in notebook and run the modified unit without rerunning notebook.
Use: Jupytext on the command line to convert Jupyter notebook to a text representation. Command line tools can be run on notebook in a variety of ways. It can synchronously process multiple representations of notebook and feed notebook to reformatting tools such as black. It can also be used as a pre-commit hook if you want to update the text representation automatically when you submit an .ipynb file.
Use in Vim: edit your Jupyter notebook and use jupytext.vim to represent it as an Markdown document or Python script.
The Jupytext menu in Jupyter Notebook looks like this:
Picture
Opening the MarkDown script as Notebook in JupyterLab looks like this:
The above is all the content of this article "what is Jupyter Notebook?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.