{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "1bdd91d6",
   "metadata": {},
   "source": [
    "Hello World! We try to learn Python Jupyter NoteBook!\n",
    "\n",
    "# Introduction\n",
    "\n",
    "How do this work?\n",
    "\n",
    "1. **Markdown** <https://daringfireball.net/projects/markdown/syntax>\n",
    "2. **Jupiter-Nootebook** <https://webdevblog.ru/jupyter-notebook-dlya-nachinajushhih-uchebnik/>\n",
    "3. **Pandas** <https://pandas.pydata.org/docs/user_guide/10min.html#plotting>\n",
    "3. **Seaborn** <https://seaborn.pydata.org/examples/index.html>\n",
    "\n",
    "***\n",
    "\n",
    "### 1.1 HotKeys\n",
    "\n",
    "- `P` HELP (open the command palette)\n",
    "\n",
    "- `Shift + Enter` run the current cell, select below\n",
    "- `Ctrl + Enter` run selected cells\n",
    "- `Alt + Enter` run the current cell, insert below\n",
    "- `Ctrl + S` save and checkpoint\n",
    "\n",
    "While in command mode (press Esc to activate):\n",
    "\n",
    "- `Enter` ENTER (EDIT MODE)\n",
    "- `Esc` ESC (COMMAND MODE)\n",
    "- `M` CELL MARKDOWN \n",
    "- `Y` CELL CODE\n",
    "\n",
    "- `A` CELL ADD ABOVE\n",
    "- `B` CELL ADD BELOW\n",
    "- `D, D` CELL DELETE (press the key twice)\n",
    "- `Shift + Up` extend selected cells above\n",
    "- `Shift + Down` extend selected cells below\n",
    "\n",
    "- `H` show all shortcuts\n",
    "- `Up` select cell above\n",
    "- `Down` select cell below\n",
    "\n",
    "- `X` cut selected cells\n",
    "- `C` copy selected cells\n",
    "- `V` paste cells below\n",
    "- `Shift + V` paste cells above\n",
    "- `Z` undo cell deletion\n",
    "- `S` Save and Checkpoint\n",
    "\n",
    "- `Shift + Space` SCROLL UP\n",
    "- `Space` SCROLL DOWN\n",
    "\n",
    "\n",
    "### 2.1 Font\n",
    "**Badary** __Siberian__ *Solar Radio* _Spectropolarimeter_\n",
    "\n",
    "### 2.2 Text and List\n",
    "Paragraphs must be separated by an empty line.\n",
    "* Sometimes we want to include lists.\n",
    "Which can be indented.\n",
    "1. Lists can also be numbered.\n",
    "2. For ordered lists.\n",
    "\n",
    "### 2.3 Links and Code\n",
    " - It is possible to include hyperlinks - [Badary web site][]\n",
    " - You can use locallinks. How do work with html pictures to look [Alt text][]\n",
    "\n",
    "[Badary web site]: http://badary.iszf.irk.ru \"Here you can add Title\"\n",
    "[Alt text]: https://habr.com/ru/post/341810 \"HarbPost\"\n",
    "\n",
    "Inline code uses single backticks: `help()`, and code blocks use triple backticks:\n",
    "```\n",
    "python3\n",
    "help()\n",
    "exit()\n",
    "```\n",
    "or can be indented by 4 spaces:    \n",
    "     \n",
    "    python3\n",
    "    help()\n",
    "    exit()\n",
    "\n",
    "### 2.4 Pictures\n",
    "\n",
    "Adding images: [Click: BBMS daily dynamic spectrum](http://badary.iszf.irk.ru/spectrometer_4_8/20210910.png) or `![texttitle](link)`\n",
    "\n",
    "![BBMS daily dynamic spectrum](http://badary.iszf.irk.ru/spectrometer_4_8/20210910.png \"BBMS daily dynamic spectrum\")\n",
    "\n",
    "&copy; _BadarychPy_\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4977fcda",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "66eac442",
   "metadata": {},
   "outputs": [],
   "source": [
    "import time\n",
    "time.sleep(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "3b7a22e5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hello, Man!\n",
      "Hello, Man!\n"
     ]
    }
   ],
   "source": [
    "out = 'Man!'\n",
    "print('Hello, {}'.format(out))\n",
    "print('Hello, %s' % (out))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "1fdabd84",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Hello, World!'"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def say_hello_world(out):\n",
    "    return 'Hello, {}!'.format(out)\n",
    "say_hello_world('World')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "18b4eed0",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Coordinates: -115.81W, 37.24N\n",
      "Coordinates: 37.24N, -115.81W\n",
      "Coordinates: 1000m, 37.24N, -115.81W\n",
      "Coordinates: el. = 1000m\n"
     ]
    }
   ],
   "source": [
    "print('Coordinates: {0[1]}, {0[0]}'.format(('37.24N','-115.81W'))) # here array()\n",
    "print('Coordinates: {latitude}, {longitude}'.format(latitude='37.24N', longitude='-115.81W'))\n",
    "print('Coordinates: {elevation}, {}, {}'.format('37.24N', '-115.81W', elevation ='1000m'))\n",
    "print('Coordinates: {0}{1}. {10} {12}{13}{14}{15}{16}'.format(*'elevation = 1000m'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "57e4e999",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0'3.1\n",
      "03.14\n",
      "03.1\n",
      "3.14\n",
      "GT TIME: 2021-10-05T02:48:22.000\n"
     ]
    }
   ],
   "source": [
    "print('{!r:0>5.4}'.format('3.143'))\n",
    "print('{!s:0>5.4}'.format('3.143'))\n",
    "print('{0:0=4.2}'.format(3.143))\n",
    "print('{!r:.4}'.format(3.143))\n",
    "import time \n",
    "gtm = time.gmtime()\n",
    "print('GT TIME: {:0>4}-{:0>2}-{:0>2}T{:0>2}:{:0>2}:{:0>2}.000'\n",
    "      .format(gtm.tm_year, gtm.tm_mon, gtm.tm_mday, gtm.tm_hour, gtm.tm_min, gtm.tm_sec))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "97958422",
   "metadata": {},
   "source": [
    "***\n",
    "### 3.2 Import Libs\n",
    "Motto _The NoteBook - one Kernel - one Libs - one variables._"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "24c073ab",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "def square(x):\n",
    "    return x * x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fafe7c32",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "c26e7f05",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3 squared is 9\n"
     ]
    }
   ],
   "source": [
    "x = np.random.randint(1, 10)\n",
    "y = square(x)\n",
    "print('%d squared is %d' % (x, y))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b41fb695",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "e21bae85",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'FSFS' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[0;32m/tmp/ipykernel_135596/3583643279.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mFSFS\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      2\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mNameError\u001b[0m: name 'FSFS' is not defined"
     ]
    }
   ],
   "source": [
    "FSFS\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "27db330d",
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'DD' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[0;32m/tmp/ipykernel_135596/4157857728.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mDD\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;31mNameError\u001b[0m: name 'DD' is not defined"
     ]
    }
   ],
   "source": [
    "DD\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
