# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# + [markdown] id="view-in-github" colab_type="text"
# <a href="https://colab.research.google.com/github/mihansari/codeql-uboot/blob/master/Notebooks/Jupyter%20Notebook.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>

# + [markdown] id="911_bsFKe0Oj"
# # Jupyter Notebook
#
# [Jupyter Notebook](https://jupyter.org) is an open-source web application that is widely used by data scientists and machine learning practitioners. Jupyter has a rich user interface to create formatted text, add images, high quality math markup, as well as live code in a variety of languages, including Python. Code within a notebook can produce rich, high quality output such as images, video, audio, and custom MIME types. Jupyter is designed to be interactive, which is particularly useful for data science and machine learning.
#
# Jupyter can be installed locally, or accessed through a variety of cloud services, such as [Google Colab](https://colab.research.google.com/), [Amazon Sagemaker](https://docs.aws.amazon.com/sagemaker/latest/dg/nbi.html), [Microsoft Azure](https://notebooks.azure.com/), [IBM Watson](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/notebooks-parent.html) and many others.

# + [markdown] id="fjqLEf-Oe0Om"
# ## Cells
#
# Notebooks have cells that can contain text, code, images, and more. Text cells can contain formatted text using [markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) syntax, which is lightweight and easy to learn. You can edit a cell by double-clicking.
#
# You can create headings, links, add emphasis with *italics*, **bold**, ~~strikethrough.~~, or syntax highlighted code:
#
# ```python
# for i in range(10):
#     print(i)
# ```
#
# You can add images:
#
# ![Hughes 500, Honolulu, HI](https://madhu.com/images/h500.gif "Hughes 500, Honolulu, HI")
#
# You can create lists:
#
# 1. This
# 2. That
# 3. The other thing
#
# Or tables:
#
# | Name              | Instrument    |
# |-------------------|---------------|
# | <NAME> | Rhythm guitar |
# | <NAME>      | Lead guitar   |
# | <NAME>      | Bass          |
# | TBD               | Drums         |

# + [markdown] id="OrjwyYpue0Oo"
# ## Code Cells
#
# Below are some code cell that you can run inside this notebook.

# + id="AWxcHiJTe0Oq" outputId="7b3326dd-ad60-4e6a-b0e2-a4d5dd8b4e4d"
print('My first notebook!')


# + id="RdkfKCsKe0Os"
def multiplicationTable(start, end):
    line = '   '
    for i in range(start, end):
        line = '%s %2d ' % (line, i)
    print(line)
    for i in range(start, end):
        line = '%2d ' % i
        for j in range(start, end):
            line = '%s %2d ' % (line, i*j)
        print(line)


# + id="VRG8PXe4e0Os" outputId="d6303662-e6df-4042-a66f-76b546886be6"
multiplicationTable(1, 10)

# + [markdown] id="yTtcq5F_e0Ou"
# ## Visualizations
#
# Code can produce a variety of content.

# + id="blpoJ8oie0Ox" outputId="ac8e282d-bd32-4ac3-cfcb-cc6a1a9b2d5f"
import math
import matplotlib.pyplot as plt

x = [0.1*i for i in range(64)]
sin = [math.sin(i) for i in x]
cos = [math.cos(i) for i in x]

plt.plot(x, sin, label='sin(x)', color='blue', linewidth=2.5)
plt.plot(x, cos, label='cos(x)', color='red', linewidth=0.5)
plt.ylabel('y')
plt.xlabel('x')
plt.legend(loc='upper right')
plt.show()

# + [markdown] id="G387BmKEe0O0"
# ## Math Notation
#
# Jupyter renders high quality math notation using [LaTeX](https://en.wikibooks.org/wiki/LaTeX/Mathematics) syntax. Here are some examples:
#
# $$ \epsilon = \frac{1}{m} \sum_{i=1}^{m} (a x_i + b - y_i)^2$$
#
# $$e^{i x} = cos x + i sin x$$
#
# $$ \begin{bmatrix}
# a \\
# b
# \end{bmatrix} = (A^T A)^{-1} A^T y$$

# + [markdown] id="SH6CRYbHe0O2"
# ## Magic Commands
#
# Jupyter supports a number of **magic commands**. These commands can appear in code cells and perform special operations.
#
# Below are a few magic commands, a more complete list is documented [here](https://ipython.readthedocs.io/en/stable/interactive/magics.html).
#
# * ```%system <command>``` or ```!<command>```
#   * Executes a system command
# * ```%run <file.py> [arguments]```
#   * Executes a python program
# * ```%time```
#   * Time execution of a cell
# * ```%whos```
#   * List all interactive variables
# * ```%load <file> or <url>```
#   * Loads this cell with contents of <file> or a <url>

# + [markdown] id="DrqNHCl3e0O3"
# ## Local Installation
#
# Jupyter can be installed locally. There are several ways to install Jupyter notebooks. If you have Python installed, you can install using pip:
#
# ```> pip install notebook```
#
# To start a notebook server, execute the following command from a terminal (Mac/Unix) or command prompt (Windows):
#
# ```jupyter notebook```
#
# Alternatively, you can install [Anaconda Python](https://www.anaconda.com/distribution), which includes Jupyter notebook. Anaconda Python for Windows adds Jupyter Notebook shortcuts to the start menu.

# + id="kDBid8ole0O3"


StarcoderdataJupyterScriptsDedupFiltered