<jupyter_start><jupyter_text>Introduction to Jupyter Notebook ![Jupyter logo](https://www.appliedis.com/wp-content/uploads/2017/08/Project-Jupyter-logo-300x272.png) This notebook is this first of a series that makes up a short course on computational skills for Materials Science students. The aim is to introduce you to the powerful tools of scientific computing so that you can use them to be a better, more efficient student and become a confident quantitative materials scientist. This course uses [Python](https://www.python.org) as the programming language and [Jupyter notebooks](https://www.jupyter.org) as an interactive computing platform. Jupyter notebooks make computation similar to using the commercial packages [Mathematica](http://www.wolfram.com/mathematica/) and [MATLAB](http://uk.mathworks.com/products/matlab/) but are [open source](https://en.wikipedia.org/wiki/Open-source_software), as is Python.These notebooks follow the structure of our computing sessions in the MATS15501 Computation and Comunication unit but they will not teach you all you should know about programming Python or using Jupyter. There a lot of useful resources out there and you should use them to develop your proficiency. A few of my favourite resources are:-[The Python documentation](https://docs.python.org/)-[Beginners guide for non-programmers](https://wiki.python.org/moin/BeginnersGuide/NonProgrammers)-[The Jupyter notebook documentation](https://jupyter-notebook.readthedocs.io/en/stable/)-[Stack overflow](https://stackoverflow.com/)And don't forget [Google](https://www.google.com). Typing "how do I do .... in Python" in Google is very effective.   Getting started We will use the Anaconda distributions available on the cluster computers. If you wan to use Jupyter on your own computer you will need to install a scientific python distribution like [Anaconda](https://www.anaconda.com/download/). You can also use the notebooks available via Microsoft Azure Notebooks. You should be able to log in with your Office365 login. You will need to create a new Library and then click on `+ New` to add files and notebooks. These could be new files or can be uploaded from your computer.Running Jupyter is easy. Open a terminal (or cmd.exe in Windows) and type:    jupyter notebookThis will start the notebook service and launch a web browser with Jupyter running and a directory tree, from which you can open existing notebooks or start a new one. If you are running this notebook on a university cluster computer, type `P:` before entering the `jupyter notebook` command. This moves the working directory to the P: drive, so you can keep your files after you have logged out.   Tasks: Play with this notebook  Jupyter notebooks are made up of cells containing code which can be run in place. To edit a cell, you just double click on in. Double click on _this text_ to edit the cell. This is a Markdown cell and it uses a language called Markdown to render text.    Task 1: Executing code cells Now, play around in the cells below, first by clicking on them and changing the numbers and then by adding and deleting cells. Try out the different cell types and try to use it them as a calculator. What works and what doesn't?To run a cell you are currently editing, you can click on the menu `Cell` at the top of the workbook and then `Run Cells`. Alternatively, you can run a cell by pressing Shift and Enter together. Try running this cell using both methods.Tip: Press Esc to enter command mode and h to see a cheat sheet of commands. To run Python code, we need to use **Code cells**. The code cell below contains a simple calculation. Run the cell (by pressing Shift and Enter) to see the reult. Then modify the calculation and run it again.<jupyter_code>77*5+9<jupyter_output><empty_output><jupyter_text>As you can see, using jupyter, each code cell can be used as "calculator". The calculation in this notebook is done using the programming language Python, which is the programming language you will use in this course. It is possible to use other languages by using other kernels. See the [Jupyter documentation](https://jupyter-notebook.readthedocs.io/en/stable/) if you are interested.With Python you can do much more than calculations, as you will find out during the course. Below is a classic first Python program with a twist. Click on the cell below and run it<jupyter_code>print("Goodbye, COVID!")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.061164830222621994, 'fraction_numerical': 0.005621767483696874, 'mean_word_length': 4.731958762886598, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 11, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '82992', 'license': 'MIT', 'n_tokens_mistral': 1149, 'n_tokens_neox': 1103, 'n_words': 631, 'path': '0-Intro_to_Jupyter/Intro_to_Jupyter_Notebook.ipynb', 'repo_name': 'JQFonseca/computing_materials_science', 'size': '4447'}