<jupyter_start><jupyter_text>1. Introduction to Jupyter WelcomeWelcome to ENG 122. In this course, we'll be using Jupyter notebooks to experiment with and analyze mechanical systems that vibrate using computation. This first notebook serves as an introduction to the JupyterHub service set up for this class and covers some of the basics of Jupyter notebooks.After working through this notebook, you will be able to:-   navigate to [bicycle.ucdavis.edu](https://bicycle.ucdavis.edu) to start a JupyterHub notebook server-   open Jupyter notebooks on the JupyterHub and operate the notebook interface-   fetch, validate, and submit assignments-   create well-formatted, fully operational notebooks  Tour de JupyterHubOur computational home for the quarter can be found at [bicycle.ucdavis.edu](https://bicycle.ucdavis.edu). If you are enrolled in the course, you should be able to log in. Start by clicking the button that says "Sign in with UC Davis".This should direct you to a Google page in which you should enter your **UC Davis email**.This will in turn direct you to the UC Davis Central Authentication System (CAS). Here, you can enter your UCD username and password.You're now presented with the Jupyter interface. This is the screen from which you will create notebooks, launch existing notebooks, and work with assignments.  Fetching NotebooksLet's start by getting ahold of this very notebook so you can open it, modify it, and submit it during class.1.  Go to the "Assignments" tab near the top of the Jupyter interface.2.  Under the "Released assignments" section, you should see `eng122_cw01`. Go ahead and fetch this assignment.3.  Now there are two ways to open the notebooks in this assignment.      1.  If you go back to the "Files" tab of the Jupyter interface, you should see a folder named `eng122_cw01` which contains the fetched notebooks.    2.  Alternatively, you can see the notebooks from the "Assignments" tab in the "Downloaded assignments" section.    **NOTE** that you will need to refresh your browser before the new folder appears on your "Files" tab.4.  Go ahead and open up the notebook `eng122_cw01/01-intro-jupyter.ipynb` and navigate to this point.----  Notebook Basics Working with CellsThroughout the course, we will be using Jupyter notebooks to perform, demonstrate, and explain computational analyses of vibrational systems. These notebooks are a nice medium for this kind of work because they display and run the analysis code, allow for rich text formatting including nicely typeset equations, and enable interactive plotting. Let's walk through some of the main features of the notebook to get started.Notebooks are made up of *cells*, of which there are a couple different types. *Markdown cells* handle text, equations, and images. *Code cells* handle Python code. These four elements--text, equations, images, and code--are the four ingredients that constitute a notebook.What you're reading now is a Markdown cell. You can select a Markdown cell by clicking on it once--you should see a blue border around the cell indicating it is selected.With a cell selected (blue border), you can insert a new cell below by clicking the plus icon () at the top of the notebook interface or by pressing the "b" key. Go ahead and try it. You can also delete a cell by selecting it and clicking the scissors icon () or pressing the "x" key. By default, the type of cell that's added is a code cell, which we'll talk about a bit more later. You can change the type of a cell by selecting it and then selecting "Markdown" in the dropdown box near the top of the notebook interface. A nifty keyboard shortcut for changing a cell to Markdown is to press "m".*Note*: You can view all of the keyboard shortcuts available by clicking the keyboard icon () at the top of the notebook interface. You can rearrange the order of cells using the arrow buttons ( and ).  Notebook Ingredient 1: TextAll of the cells you've seen so far have been *Markdown cells*. What you're looking at now is the Markdown cell after it has been *run* by clicking the "run cell" button () or using a keyboard shortcut like `Ctrl-Enter`. To see the *source* of this cell and to edit its contents, double-click on it or select it and hit `Enter`. Now you should see that to make **bold text**, you surround it with two asterisks `**`.Here are a few other things you might want to do in a Markdown cell. Remember you can edit a cell to see how these things are achieved.Bulleted lists:- bulleted lists can use several different characters to denote an item- hyphens `-`* asterisks `*`+ plus signs `+`Enumerated lists:1. enumerated lists2. use numbersHeadings are denoted with one or more `` symbols. Using these headings is helpful for structuring a notebook and making it clear that sections are nested within one another.  MathAnother nice feature of Markdown cells is that you can typeset mathematical expressions. The syntax for writing equations is based on LaTeX (pronounced "LAH-tek" or "LAY-tek"). You can write LaTeX in the middle of a sentence (inline) by surrounding it with single dollar signs, for example the text `"$Ax = \lambda x$"` produces $Ax = \lambda x$. You can also place an equation on its own line (displayed) by putting it on a new line and surrounding it with double dollar signs.$$e^{i\pi} + 1 = 0$$A few LaTeX tips:- Greek letters start with a backslash and are spelled out, e.g. $\delta$- capital Greek leters are the same but capitalized, e.g. $\Delta$- fractions use a syntax like `\frac{numerator}{denominator}`, e.g. $\frac{1}{n}$- use `\cos{}`, `\sin{}`, etc. for $\sin{\theta}$, otherwise it looks like $sin(\theta)$- integrals $\int x^2 dx$, and with limits $\int_0^\infty e^{-x} dx$- surround exponents and subscripts with curly brackets `{}` or only the first character will be raised/lowered, e.g. $e^{ax}$ vs. $e^ax$Some additional resources:-   -     ImagesAs shown above with the screenshots of logging in to the JupyterHub server, you can display images in a notebook using the syntax```markdown![alt text here](path/to/image_file.ext)```or using HTML directly, like```html```If you want to include any hand-written content in your notebooks to help illustrate your analysis in an assignment, you can upload the image file to the JupyterHub server and include it in your notebook as above.If you have a tablet or touch screen, the simplest option is to use freehand drawing software like [Krita](https://krita.org) to create an image file.If you would like to put some extra effort in, you can use a vector graphics program like [Inkscape](https://inkscape.org) to create professional-quality figures. The best way to include these types of graphics is to save in SVG format and include them directly. You can also save it as a rastered format (PNG preferred).A third option is to draw neatly on paper and take a good photo or scan. By "good," a couple things are implied about the end result (i.e. what you see in the notebook): it is *legible* and it is *understandable*. When taking a photo of a drawing, take into account the angle you take the photo from, the lighting, and the image resolution.To upload an image to the server, you can go into the assignment folder, click the "Upload" button, locate the file on your computer, click the blue "Upload" button, and then include the file in your notebook.  CodeThe other type of cell we'll be using extensively is the *code cell*. This is the default cell type that is added when you click the plus icon near the top of the notebook interface to insert a new cell. Here's an example:<jupyter_code>print('hello')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.06113365623772745, 'fraction_numerical': 0.004581751538159445, 'mean_word_length': 4.418439716312057, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '362021', 'license': 'MIT', 'n_tokens_mistral': 1963, 'n_tokens_neox': 1880, 'n_words': 1203, 'path': 'notebooks/01/01_intro_jupyter.ipynb', 'repo_name': 'gbrault/resonance', 'size': '7639'}