Commit ad54ac4c authored by Emilio Ambite's avatar Emilio Ambite

Repositorio de notebooks de python para SCW 2019

parent e7783177
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Errors and Exceptions\n",
"\n",
"Two main questions to be answered\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li>How Python report errors?\n",
"\n",
"<li>How I can handle errors in Python programs?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Every programmer makes Errors\n",
"\n",
"Errors in Python have a very specific form called <b>\"traceback\"</b>. Traceback are made of levels wich are marked with special symbol <b>--></b>"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"ename": "IndexError",
"evalue": "list index out of range",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mIndexError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-1-c34fcf537534>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 9\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mice_creams\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 10\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 11\u001b[1;33m \u001b[0mfavorite_ice_cream\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;32m<ipython-input-1-c34fcf537534>\u001b[0m in \u001b[0;36mfavorite_ice_cream\u001b[1;34m()\u001b[0m\n\u001b[0;32m 7\u001b[0m \u001b[1;34m\"strawberry\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 8\u001b[0m ]\n\u001b[1;32m----> 9\u001b[1;33m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mice_creams\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 10\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 11\u001b[0m \u001b[0mfavorite_ice_cream\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mIndexError\u001b[0m: list index out of range"
]
}
],
"source": [
"# This code has an intentional error. You can type it directly or\n",
"# use it for reference to understand the error message below.\n",
"def favorite_ice_cream():\n",
" ice_creams = [\n",
" \"chocolate\",\n",
" \"vanilla\",\n",
" \"strawberry\"\n",
" ]\n",
" print(ice_creams[3])\n",
"\n",
"favorite_ice_cream()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Traceback with two levels. Are read from bottom to top:\n",
"<li> 1) Last level is the line with the error actually is\n",
"\n",
"<li> 2) Upper level(s) show what function was executed to get the next level down"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Tracebacks could be very long but important info is usually at the bottom"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Error categories"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"All errors at the end of a traceback, are usually in the form:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<code>Category: Some more info</code>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Where Categories are:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Syntax Errors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You forget a colon, add too many spaces, forget a parenthesis etc... Makes Python not to know how to read your program. That gives you:\n",
"<code>SyntaxError</code>"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"ename": "SyntaxError",
"evalue": "invalid syntax (<ipython-input-2-dbf32ad5d3e8>, line 1)",
"output_type": "error",
"traceback": [
"\u001b[1;36m File \u001b[1;32m\"<ipython-input-2-dbf32ad5d3e8>\"\u001b[1;36m, line \u001b[1;32m1\u001b[0m\n\u001b[1;33m def some_function()\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
]
}
],
"source": [
"def some_function()\n",
" msg = \"hello, world!\"\n",
" print(msg)\n",
" return msg"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"ename": "IndentationError",
"evalue": "unexpected indent (<ipython-input-3-e169556d667b>, line 4)",
"output_type": "error",
"traceback": [
"\u001b[1;36m File \u001b[1;32m\"<ipython-input-3-e169556d667b>\"\u001b[1;36m, line \u001b[1;32m4\u001b[0m\n\u001b[1;33m return msg\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mIndentationError\u001b[0m\u001b[1;31m:\u001b[0m unexpected indent\n"
]
}
],
"source": [
"def some_function():\n",
" msg = \"hello, world!\"\n",
" print(msg)\n",
" return msg"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li>Remember: Both SyntaxError and IntentationError indicate a problem with the syntax of the program"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Variable Name Errors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Difficult to state a general case but common mistakes are:\n",
"<li> You meant to use a string but forgot quotes\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'hello' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-1-43a14fcd4265>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mhello\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;31mNameError\u001b[0m: name 'hello' is not defined"
]
}
],
"source": [
"print(hello)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li> You forgot to create a variable before using it\n"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'count' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-6-3cc942c225b7>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mnumber\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[0mcount\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcount\u001b[0m \u001b[1;33m+\u001b[0m \u001b[0mnumber\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 3\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"The count is:\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcount\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mNameError\u001b[0m: name 'count' is not defined"
]
}
],
"source": [
"for number in range(10):\n",
" count = count + number\n",
"print(\"The count is:\", count)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li> There is a typo in a variable name (maybe because Python's Case Sensitivity)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'count' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-7-79d2bb4fcc22>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[0mCount\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;36m0\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mnumber\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mcount\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcount\u001b[0m \u001b[1;33m+\u001b[0m \u001b[0mnumber\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"The count is:\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcount\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mNameError\u001b[0m: name 'count' is not defined"
]
}
],
"source": [
"Count = 0\n",
"for number in range(10):\n",
" count = count + number\n",
"print(\"The count is:\", count)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### IndexErrors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Typically you try to access something out of bounds:"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Letter #1 is a\n",
"Letter #2 is b\n",
"Letter #3 is c\n"
]
},
{
"ename": "IndexError",
"evalue": "list index out of range",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mIndexError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-9-656a22fa6ec5>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"Letter #2 is\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mletters\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"Letter #3 is\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mletters\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 5\u001b[1;33m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"Letter #4 is\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mletters\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;31mIndexError\u001b[0m: list index out of range"
]
}
],
"source": [
"letters = ['a', 'b', 'c']\n",
"print(\"Letter #1 is\", letters[0])\n",
"print(\"Letter #2 is\", letters[1])\n",
"print(\"Letter #3 is\", letters[2])\n",
"print(\"Letter #4 is\", letters[3])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### File Errors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Typically two:\n",
"<li> Trying to access a file that does not exist:"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"ename": "FileNotFoundError",
"evalue": "[Errno 2] No such file or directory: 'myfile.txt'",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mFileNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-10-f6e1ac4aee96>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mfile_handle\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mopen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'myfile.txt'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'r'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: 'myfile.txt'"
]
}
],
"source": [
"file_handle = open('myfile.txt', 'r')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li> You try to read(write) a write-only(read-only) file:"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"ename": "UnsupportedOperation",
"evalue": "not readable",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mUnsupportedOperation\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-12-02e2f546ed29>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[0mfile_handle\u001b[0m\u001b[1;33m=\u001b[0m \u001b[0mopen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'myfile.txt'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'w'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[0mfile_handle\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mread\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;31mUnsupportedOperation\u001b[0m: not readable"
]
}
],
"source": [
"file_handle= open('myfile.txt', 'w')\n",
"file_handle.read()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercises\n",
"\n",
"### Reading Error Messages "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Read the python code and the resulting traceback below, and answer the following questions:\n",
"\n",
"* How many levels does the traceback have? **3 levels**\n",
"* What is the function name where the error occurred? **print_message**\n",
"* On which line number in this function did the error occurr? **11**\n",
"* What is the type of error? **Keyerror**\n",
"* What is the error message? **'Friday'**"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```\n",
"# This code has an intentional error. Do not type it directly;\n",
"# use it for reference to understand the error message below.\n",
"def print_message(day):\n",
" messages = {\n",
" \"monday\": \"Hello, world!\",\n",
" \"tuesday\": \"Today is tuesday!\",\n",
" \"wednesday\": \"It is the middle of the week.\",\n",
" \"thursday\": \"Today is Donnerstag in German!\",\n",
" \"friday\": \"Last day of the week!\",\n",
" \"saturday\": \"Hooray for the weekend!\",\n",
" \"sunday\": \"Aw, the weekend is almost over.\"\n",
" }\n",
" print(messages[day])\n",
"\n",
"def print_friday_message():\n",
" print_message(\"Friday\")\n",
"\n",
"print_friday_message()\n",
"---------------------------------------------------------------------------\n",
"KeyError Traceback (most recent call last)\n",
"<ipython-input-1-4be1945adbe2> in <module>()\n",
" 14 print_message(\"Friday\")\n",
" 15\n",
"---> 16 print_friday_message()\n",
"\n",
"<ipython-input-1-4be1945adbe2> in print_friday_message()\n",
" 12\n",
" 13 def print_friday_message():\n",
"---> 14 print_message(\"Friday\")\n",
" 15\n",
" 16 print_friday_message()\n",
"\n",
"<ipython-input-1-4be1945adbe2> in print_message(day)\n",
" 9 \"sunday\": \"Aw, the weekend is almost over.\"\n",
" 10 }\n",
"---> 11 print(messages[day])\n",
" 12\n",
" 13 def print_friday_message():\n",
"\n",
"KeyError: 'Friday'```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Identifying Syntax Errors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Read the code below, and (without running it) try to identify what the errors are.\n",
"\n",
"Run the code, and read the error message. Is it a SyntaxError or an IndentationError?\n",
"Fix the error.\n",
"Repeat steps 2 and 3, until you have fixed all the errors.\n",
"```\n",
"def another_function # Falta ():\n",
" print(\"Syntax errors are annoying.\")\n",
" print(\"But at least python tells us about them!\") # Mala indentación\n",
" print(\"So they are usually not too hard to fix.\")```"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Syntax errors are annoying.\n",
"But at least python tells us about them!\n",
"So they are usually not too hard to fix.\n"
]
}
],
"source": [
"def another_function():\n",
" print(\"Syntax errors are annoying.\")\n",
" print(\"But at least python tells us about them!\")\n",
" print(\"So they are usually not too hard to fix.\")\n",
"another_function()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Errors and Exceptions\n",
"\n",
"Two main questions to be answered\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li>How Python report errors?\n",
"\n",
"<li>How I can handle errors in Python programs?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Every programmer makes Errors\n",
"\n",
"Errors in Python have a very specific form called <b>\"traceback\"</b>. Traceback are made of levels wich are marked with special symbol <b>--></b>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# This code has an intentional error. You can type it directly or\n",
"# use it for reference to understand the error message below.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Traceback with two levels. Are read from bottom to top:\n",
"<li> 1) Last level is the line with the error actually is\n",
"\n",
"<li> 2) Upper level(s) show what function was executed to get the next level down"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Tracebacks could be very long but important info is usually at the bottom"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Error categories"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"All errors at the end of a traceback, are usually in the form:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<code>Category: Some more info</code>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Where Categories are:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Syntax Errors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You forget a colon, add too many spaces, forget a parenthesis etc... Makes Python not to know how to read your program. That gives you:\n",
"<code>SyntaxError</code>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li>Remember: Both SyntaxError and IntentationError indicate a problem with the syntax of the program"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Variable Name Errors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Difficult to state a general case but common mistakes are:\n",
"<li> You meant to use a string but forgot quotes\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li> You forgot to create a variable before using it\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li> There is a typo in a variable name (maybe because Python's Case Sensitivity)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### IndexErrors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Typically you try to access something out of bounds:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### File Errors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Typically two:\n",
"<li> Trying to access a file that does not exist:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li> You try to read(write) a write-only(read-only) file:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercises\n",
"\n",
"### Reading Error Messages "
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"Read the python code and the resulting traceback below, and answer the following questions:\n",
"\n",
"How many levels does the traceback have?\n",
"What is the function name where the error occurred?\n",
"On which line number in this function did the error occurr?\n",
"What is the type of error?\n",
"What is the error message?\n",
"How to fix it?\n",
"\n",
"# This code has an intentional error. Do not type it directly;\n",
"# use it for reference to understand the error message below.\n",
"def print_message(day):\n",
" messages = {\n",
" \"monday\": \"Hello, world!\",\n",
" \"tuesday\": \"Today is tuesday!\",\n",
" \"wednesday\": \"It is the middle of the week.\",\n",
" \"thursday\": \"Today is Donnerstag in German!\",\n",
" \"friday\": \"Last day of the week!\",\n",
" \"saturday\": \"Hooray for the weekend!\",\n",
" \"sunday\": \"Aw, the weekend is almost over.\"\n",
" }\n",
" print(messages[day])\n",
"\n",
"def print_friday_message():\n",
" print_message(\"Friday\")\n",
"\n",
"print_friday_message()\n",
"---------------------------------------------------------------------------\n",
"KeyError Traceback (most recent call last)\n",
"<ipython-input-1-4be1945adbe2> in <module>()\n",
" 14 print_message(\"Friday\")\n",
" 15\n",
"---> 16 print_friday_message()\n",
"\n",
"<ipython-input-1-4be1945adbe2> in print_friday_message()\n",
" 12\n",
" 13 def print_friday_message():\n",
"---> 14 print_message(\"Friday\")\n",
" 15\n",
" 16 print_friday_message()\n",
"\n",
"<ipython-input-1-4be1945adbe2> in print_message(day)\n",
" 9 \"sunday\": \"Aw, the weekend is almost over.\"\n",
" 10 }\n",
"---> 11 print(messages[day])\n",
" 12\n",
" 13 def print_friday_message():\n",
"\n",
"KeyError: 'Friday'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Identifying Syntax Errors"
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"Read the code below, and (without running it) try to identify what the errors are.\n",
"Run the code, and read the error message. Is it a SyntaxError or an IndentationError?\n",
"Fix the error.\n",
"Repeat steps 2 and 3, until you have fixed all the errors.\n",
"\n",
"def another_function \n",
" print(\"Syntax errors are annoying.\")\n",
" print(\"But at least python tells us about them!\")\n",
" print(\"So they are usually not too hard to fix.\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Part1: Patient data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
" ## 1. Check Your Understanding\n",
"\n",
" Draw diagrams showing what variables refer to what values after each statement in the following program:\n",
"\n",
" mass = 47.5\n",
" age = 122\n",
" mass = mass * 2.0\n",
" age = age - 20\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 2. Sorting Out References\n",
"\n",
"What does the following program print out?\n",
"```python\n",
"first, second = 'Grace', 'Hopper'\n",
"third, fourth = second, first\n",
"print(third, fourth)\n",
"```\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 3. Slicing Strings\n",
"\n",
"A section of an array is called a slice. We can take slices of character strings as well:\n",
"```python\n",
"element = 'oxygen'\n",
"print('first three characters:', element[0:3])\n",
"print('last three characters:', element[3:6])\n",
"\n",
"first three characters: oxy\n",
"last three characters: gen\n",
"```\n",
"What is the value of element[:4]? What about element[4:]? Or element[:]?\n",
"\n",
"What is element[-1]? What is element[-2]?\n",
"\n",
"Given those answers, explain what element[1:-1] does."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 4.Thin Slices\n",
"\n",
"The expression element[3:3] produces an empty string, i.e., a string that contains no characters. If data holds our array of patient data, what does data[3:3, 4:4] produce? What about data[3:3, :]?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 5. Make Your Own Plot\n",
"\n",
"Create a plot showing the standard deviation (numpy.std) of the inflammation data for each day across all patients."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 6. Moving Plots Around\n",
"\n",
"Modify the program to display the three plots on top of one another instead of side by side."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 7. Stacking Arrays\n",
"\n",
"Arrays can be concatenated and stacked on top of one another, using NumPy’s vstack and hstack functions for vertical and horizontal stacking, respectively.\n",
"```python\n",
"import numpy\n",
"\n",
"A = numpy.array([[1,2,3], [4,5,6], [7, 8, 9]])\n",
"print('A = ')\n",
"print(A)\n",
"\n",
"B = numpy.hstack([A, A])\n",
"print('B = ')\n",
"print(B)\n",
"\n",
"C = numpy.vstack([A, A])\n",
"print('C = ')\n",
"print(C)\n",
"```\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The output is:\n",
"\n",
"```python\n",
"A =\n",
"[[1 2 3]\n",
" [4 5 6]\n",
" [7 8 9]]\n",
"B =\n",
"[[1 2 3 1 2 3]\n",
" [4 5 6 4 5 6]\n",
" [7 8 9 7 8 9]]\n",
"C =\n",
"[[1 2 3]\n",
" [4 5 6]\n",
" [7 8 9]\n",
" [1 2 3]\n",
" [4 5 6]\n",
" [7 8 9]]\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Write some additional code that slices the first and last columns of A, and stacks them into a 3x2 array. Make sure to print the results to verify your solution."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 7. Change In Inflammation\n",
"\n",
"This patient data is longitudinal in the sense that each row represents a series of observations relating to one individual. This means that the change in inflammation over time is a meaningful concept.\n",
"\n",
"The numpy.diff() function takes a NumPy array and returns the differences between two successive values along a specified axis. For example, a NumPy array that looks like this:\n",
"\n",
"```python\n",
" npdiff = numpy.array([ 0, 2, 5, 9, 14])\n",
"\n",
" Calling numpy.diff(npdiff) would do the following calculations and put the answers in another array.\n",
"\n",
" [ 2 - 0, 5 - 2, 9 - 5, 14 - 9 ]\n",
"\n",
" numpy.diff(npdiff)\n",
"\n",
" array([2, 3, 4, 5])\n",
"```\n",
"Which axis would it make sense to use this function along?\n",
"\n",
"If the shape of an individual data file is (60, 40) (60 rows and 40 columns), what would the shape of the array be after you run the diff() function and why?\n",
"\n",
"How would you find the largest change in inflammation for each patient? Does it matter if the change in inflammation is an increase or a decrease?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Part2: Loops"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 8. From 1 to N\n",
"\n",
"Python has a built-in function called range that creates a sequence of numbers. range can accept 1, 2, or 3 parameters.\n",
"\n",
"If one parameter is given, range creates an array of that length, starting at zero and incrementing by 1. For example, range(3) produces the numbers 0, 1, 2.\n",
"If two parameters are given, range starts at the first and ends just before the second, incrementing by one. For example, range(2, 5) produces 2, 3, 4.\n",
"If range is given 3 parameters, it starts at the first one, ends just before the second one, and increments by the third one. For exmaple range(3, 10, 2) produces 3, 5, 7, 9.\n",
"\n",
"Using range, write a loop that uses range to print the first 3 natural numbers."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 9. Computing Powers With Loops\n",
"\n",
"Exponentiation is built into Python:\n",
"```python\n",
"print(5 ** 3)\n",
"\n",
"125\n",
"```\n",
"Write a loop that calculates the same result as 5 ** 3 using multiplication (and without exponentiation)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 10. Reverse a String\n",
"\n",
"Knowing that two strings can be concatenated using the + operator, write a loop that takes a string and produces a new string with the characters in reverse order, so 'Newton' becomes 'notweN'."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Part3: Lists"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 11. Turn a String Into a List\n",
"\n",
"Use a for-loop to convert the string “hello” into a list of letters:\n",
"\n",
"[\"h\", \"e\", \"l\", \"l\", \"o\"]\n",
"\n",
"Hint: You can create an empty list like this:\n",
"\n",
"my_list = []\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 12. Slicing From the End\n",
"\n",
"Use slicing to access only the last four characters of a string or entries of a list.\n",
"```python\n",
"string_for_slicing = \"Observation date: 02-Feb-2013\"\n",
"list_for_slicing = [[\"fluorine\", \"F\"], [\"chlorine\", \"Cl\"], [\"bromine\", \"Br\"], [\"iodine\", \"I\"], [\"astatine\", \"At\"]]\n",
"\n",
"\"2013\"\n",
"[[\"chlorine\", \"Cl\"], [\"bromine\", \"Br\"], [\"iodine\", \"I\"], [\"astatine\", \"At\"]]\n",
"```\n",
"Would your solution work regardless of whether you knew beforehand the length of the string or list (e.g. if you wanted to apply the solution to a set of lists of different lengths)? If not, try to change your approach to make it more robust."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 13. Non-Continuous Slices\n",
"\n",
"So far we’ve seen how to use slicing to take single blocks of successive entries from a sequence. But what if we want to take a subset of entries that aren’t next to each other in the sequence?\n",
"\n",
"You can achieve this by providing a third argument to the range within the brackets, called the step size. The example below shows how you can take every third entry in a list:\n",
"```python\n",
"primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]\n",
"subset = primes[0:12:3]\n",
"print(\"subset\", subset)\n",
"\n",
"subset [2, 7, 17, 29]\n",
"```\n",
"Notice that the slice taken begins with the first entry in the range, followed by entries taken at equally-spaced intervals (the steps) thereafter. If you wanted to begin the subset with the third entry, you would need to specify that as the starting point of the sliced range:\n",
"```python\n",
"primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]\n",
"subset = primes[2:12:3]\n",
"print(\"subset\", subset)\n",
"\n",
"subset [5, 13, 23, 37]\n",
"```\n",
"Use the step size argument to create a new string that contains only every other character in the string “In an octopus’s garden in the shade”\n",
"```python\n",
"beatles = \"In an octopus's garden in the shade\"\n",
"\n",
"I notpssgre ntesae\n",
"```\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 14. Overloading\n",
"\n",
"'+' usually means addition, but when used on strings or lists, it means “concatenate”. Given that, what do you think the multiplication operator * does on lists? In particular, what will be the output of the following code?\n",
"```python\n",
"counts = [2, 4, 6, 8, 10]\n",
"repeats = counts * 2\n",
"print(repeats)\n",
"```\n",
"Possible answers:\n",
"```python\n",
" [2, 4, 6, 8, 10, 2, 4, 6, 8, 10]\n",
" [4, 8, 12, 16, 20]\n",
" [[2, 4, 6, 8, 10],[2, 4, 6, 8, 10]]\n",
" [2, 4, 6, 8, 10, 4, 8, 12, 16, 20]\n",
"```\n",
"The technical term for this is operator overloading: a single operator, like + or *, can do different things depending on what it’s applied to."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Part4: Multiple Files"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 15. Generate Composite Statistics\n",
"\n",
"Use each of the files once to generate a dataset containing values averaged over all patients. This is the structure you should be using:\n",
"```python\n",
"filenames = glob.glob('inflammation*.csv')\n",
"composite_data = numpy.zeros((60,40))\n",
"for f in filenames:\n",
" # sum each new file's data into composite_data as it's read\n",
" #\n",
"# and then divide the composite_data by number of samples\n",
"composite_data /= len(filenames)\n",
"```\n",
"Then use pyplot to generate average, max, and min for all patients."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Part5: Conditionals"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 16. How Many Paths?\n",
"\n",
"Consider this code:\n",
"```python\n",
"if 4 > 5:\n",
" print('A')\n",
"elif 4 == 5:\n",
" print('B')\n",
"elif 4 < 5:\n",
" print('C')\n",
"```\n",
"Which of the following would be printed if you were to run this code? Why did you pick this answer?\n",
"\n",
" A\n",
" B\n",
" C\n",
" B and C\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 17. What Is Truth?\n",
"\n",
"True and False booleans are not the only values in Python that are true and false. In fact, any value can be used in an if or elif. After reading and running the code below, explain what the rule is for which values are considered true and which are considered false.\n",
"```python\n",
" if '':\n",
" print('empty string is true')\n",
" if 'word':\n",
" print('word is true')\n",
" if []:\n",
" print('empty list is true')\n",
" if [1, 2, 3]:\n",
" print('non-empty list is true')\n",
" if 0:\n",
" print('zero is true')\n",
" if 1:\n",
" print('one is true')\n",
"```\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 18. That’s Not Not What I Meant\n",
"\n",
"Sometimes it is useful to check whether some condition is not true. The Boolean operator not can do this explicitly. After reading and running the code below, write some if statements that use not to test the rule that you formulated in the previous challenge.\n",
"```python\n",
" if not '':\n",
" print('empty string is not true')\n",
" if not 'word':\n",
" print('word is not true')\n",
" if not not True:\n",
" print('not not True is true')\n",
"```\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 19. Close Enough\n",
"\n",
"Write some conditions that print True if the variable a is within 10% of the variable b and False otherwise. Compare your implementation with your partner’s: do you get the same answer for all possible pairs of numbers?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 20. In-Place Operators\n",
"\n",
"Python (and most other languages in the C family) provides in-place operators that work like this:\n",
"```python\n",
"x = 1 # original value\n",
"x += 1 # add one to x, assigning result back to x\n",
"x *= 3 # multiply x by 3\n",
"print(x)\n",
"```\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 21. Counting Vowels\n",
"\n",
"Write a loop that counts the number of vowels in a character string.\n",
"Test it on a few individual words and full sentences.\n",
"Once you are done, compare your solution to your neighbor’s. Did you make the same decisions about how to handle the letter ‘y’ (which some people think is a vowel, and some do not)?\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Analyzing Patient Data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We are studying inflammation in patients who have been given a new treatment for arthritis, and need to analyze the first dozen data sets of their daily inflammation. The data sets are stored in comma-separated values (CSV) format: each row holds information for a single patient, and the columns represent successive days"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We want to:\n",
"\n",
" * load that data into memory,\n",
" * calculate the average inflammation per day across all patients, and\n",
" * plot the result.\n",
"\n",
"To do all that, we’ll have to learn a little bit about programming."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Python as a calculator\n",
"\n",
"Any Python interpreter can be used as a calculator:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Here you have an overview of math operators:\n",
"\n",
"| Operators | Operations | Examples |\n",
"| :--------:| :---------------- | ---------- |\n",
"| + | Addition | 2 + 3 = 5 |\n",
"| - | Substraction | 3 - 2 = 1 |\n",
"| * | Multiplication | 2 * 3 = 6 |\n",
"| / | Division | 3 / 2 = 1.5|\n",
"| // | Integer division | 7 // 3 = 2 |\n",
"| % | remainder division| 7 % 2 = 1 |\n",
"| ** | Exponent | 2**3 = 8 |"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Variables"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This only outputs a value. To use values in any manner, we have to access them in memory by using a variable.\n",
"\n",
"In Python, variable names:\n",
"\n",
"* can include letters, digits, and underscores\n",
"* cannot start with a digit\n",
"* are case sensitive.\n",
"\n",
"\n",
"Let's assign a value 55 to variable named ``weight_kg``:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
" "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We use ``print`` to output the value of a variable. Is a built-in function:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can do some arithmetics with variables:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What the ...?? why is not simply giving 121.0??? <br>\n",
"\n",
"Well it looks 121 enought to me.... Ok let's continue. \n",
"\n",
"We can change the value of a variable by re-assigning it:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Variables as sticky notes with the name put in a particular value.<br>\n",
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-sticky-note-variables-01.svg\">\n",
"\n",
"We can create new variables from others:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-sticky-note-variables-02.svg\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What happens to ``weight_lb`` if you change ``weight_kg``?:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-sticky-note-variables-03.svg\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<br>\n",
"Command <code>%whos</code> shows memory stored variables defined along the notebook:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"What does the following program print out?\n",
"\n",
"<code>\n",
"first, second = 'Grace', 'Hopper'\n",
"third, fourth = second, first\n",
"print(third, fourth)\n",
"<code/>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Using libraries (modules)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First, we will load a library. Let's import Numpy. Numpy is important for fancy number manipulations:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Libraries provide additional functionality to the basic Python package. Importing too many libraries can sometimes complicate and slow down your programs - so we only import what we need for each program.\n",
"\n",
"Now we read the first file where patient data are stored. \n",
"\n",
"We will use functions which belong to a certain library and perform \"something\" for us. In this case we want to load a data file"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The expression ``numpy.loadtxt(...)`` is a function call that asks Python to run the function loadtxt which belongs to the numpy library. This dotted notation is used everywhere in Python: the thing that appears before the dot contains the thing that appears after."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"``numpy.loadtxt`` has two parameters: the name of the file we want to read, and the delimiter that separates values on a line. These both need to be character strings (or strings for short), so we put them in quotes."
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"We did not assign the output of the function to any variable, so the notebook just dumped the ouptut to an ``Out[]`` cell. But, just the same way we asigned values to a variable, we can assing the array of values to an variable using the same syntax:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"No output here, as we just assigned, as we did before with ``weight_kg``. To print out the variable value:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's check what type of \"thing\" ``data`` variable refers to:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"When we create a variable, <strong>we also create information about it</strong>, as the attribute shape! That's very important!!\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"So we have 60 rows and 40 columns in ``data`` variable."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In order to get a single number from the array we provide an index in square brackets, just as we do in maths"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"Selecting intervals of data by using ranges : . <strong>Caution here!:</strong>ranges seem closed but they are [) "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This is how index is assigned by python:\n",
"<img width=\"700px\" src=\"http://swcarpentry.github.io/python-novice-inflammation/fig/python-zero-index.png\">\n",
"<br>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"There is no need to include upper and lower bounds:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"what does ``data[3:3, 4:4]`` produce? \n",
"What about ``data[3:3, :]``?\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Some array math\n",
"Basic arithmetics: The operation is performed in <strong>every element</strong> of the array"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Array to Array operations: The operation is made on <strong>each corresponding element</strong> of the arrays:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"More complex operations:\n",
"<br>The following is a method. Method are actions that can be made on the variable, Python knows how to!. <strong> The actions available depend on the variable type</strong>:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"panel panel-info\">\n",
"<div class=\"panel-heading\">\n",
"<h3 class=\"panel-title\">\n",
"Reminder: method vs attribute\n",
"</h3>\n",
"</div>\n",
"<div class=\"panel-body\">\n",
"<ul>\n",
"<li> attributes are descriptions of variable properties\n",
"<li> methods are actions that Python knows to perform on the variable\n",
"</ul>\n",
"</div>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Several important methods for numpy variables:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sometimes is useful to make some partial statistics. For instance max inflammation for first patient of all days: "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Oh wait... maybe I am creating to many variables... let's check:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sometimes we can avoid the use of some variables:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What if we need max inflammation for all patients at once?. Operations along all columns or rows at once:<br>\n",
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-operations-across-axes.png\">\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Then the calculation for the average inflammation over all patients per day is:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"A quick check that the array is ok:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Or if preferred, the average inflammation over all days per patient:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Data visualization"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Ploting is great for insight! Matplotlib is <em>the facto</em> standar. Some basics:\n",
"<br>\n",
"Just pick the pyplot library of Matplotlib:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"panel panel-info\">\n",
"<div class=\"panel-heading\">\n",
"<h3 class=\"panel-title\">\n",
"IPython Magic!\n",
"</h3>\n",
"</div>\n",
"<div class=\"panel-body\">\n",
"The % indicates an IPython magic function - a funciton that is valid only within the notebook environment.\n",
"</div>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's plot data array (the average inflammation per day):"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Average inflammation over time. Linear plot:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This plot does not correspond with the expected. The model predices a smooth sharper rise and a slower after fall. Let's have a look to the other statistics:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"None of them seems very likely to fit the model. <strong> Something could be wrong with the data</strong>\n",
"<br>\n",
"<br>\n",
"We can further improve the visualization by grouping plots in a multiplot:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Additional Exercises \n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Slicing strings"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What is the value of element[:4]? What about element[4:]? Or element[:]?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What is element[-1]? What is element[-2]?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Given those answers, explain what element[1:-1] does."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Analyzing Patient Data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We are studying inflammation in patients who have been given a new treatment for arthritis, and need to analyze the first dozen data sets of their daily inflammation. The data sets are stored in comma-separated values (CSV) format: each row holds information for a single patient, and the columns represent successive days"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We want to:\n",
"\n",
" * load that data into memory,\n",
" * calculate the average inflammation per day across all patients, and\n",
" * plot the result.\n",
"\n",
"To do all that, we’ll have to learn a little bit about programming."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Python as a calculator\n",
"\n",
"Any Python interpreter can be used as a calculator:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"23"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"3 + 5 * 4"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Here you have an overview of math operators:\n",
"\n",
"| Operators | Operations | Examples |\n",
"| :--------:| :---------------- | ---------- |\n",
"| + | Addition | 2 + 3 = 5 |\n",
"| - | Substraction | 3 - 2 = 1 |\n",
"| * | Multiplication | 2 * 3 = 6 |\n",
"| / | Division | 3 / 2 = 1.5|\n",
"| // | Integer division | 7 // 3 = 2 |\n",
"| % | remainder division| 7 % 2 = 1 |\n",
"| ** | Exponent | 2**3 = 8 |"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Variables"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This only outputs a value. To use values in any manner, we have to access them in memory by using a variable.\n",
"\n",
"In Python, variable names:\n",
"\n",
"* can include letters, digits, and underscores\n",
"* cannot start with a digit\n",
"* are case sensitive.\n",
"\n",
"Let's assign a value 55 to variable named ``weight_kg``:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"weight_kg = 55 # we assign the value 55 to the variable weight_kg using ="
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We use ``print`` to output the value of a variable. Is a built-in function:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"55\n"
]
}
],
"source": [
"print(weight_kg) "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can do some arithmetics with variables:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Weight in pounds: 121.00000000000001\n"
]
}
],
"source": [
"print(\"Weight in pounds: \", 2.2 * weight_kg) # Don't forget to explain about printing\n",
" # types, strings and comma separation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What the ...?? why is not simply giving 121.0??? <br>\n",
"(<strong>Pro tip:</strong> <em>Because 2.2 is a number with no exact float representation, so it multiplies by the closest number with a float representation. That produces a 1 at the last decimal position so Python realices that there is something non-zero at the end and plots it.</em>)<br><br>\n",
"Well it looks 121 enought to me.... Ok let's continue. \n",
"\n",
"We can change the value of a variable by re-assigning it:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Weight in kilograms is now: 57.5\n"
]
}
],
"source": [
"weight_kg = 57.5\n",
"print('Weight in kilograms is now:', weight_kg)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Variables as sticky notes with the name put in a particular value.<br>\n",
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-sticky-note-variables-01.svg\">\n",
"\n",
"We can create new variables from others:"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"weight in kilograms: 57.5 and in pounds: 126.50000000000001\n"
]
}
],
"source": [
"weight_lb = 2.2 * weight_kg\n",
"\n",
"print( 'weight in kilograms: ', weight_kg, 'and in pounds: ', weight_lb) #concatenating complex expressions"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-sticky-note-variables-02.svg\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What happens to ``weight_lb`` if you change ``weight_kg``?:"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"weight in kilograms: 100 and in pounds: 126.50\n"
]
}
],
"source": [
"weight_kg = 100 # we change the sticky note of weight to 100 \n",
"print( 'weight in kilograms: ', weight_kg, 'and in pounds: %.2f' %weight_lb) #Do it as an exercise"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-sticky-note-variables-03.svg\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<br>\n",
"Command <code>%whos</code> shows memory stored variables defined along the notebook:"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Variable Type Data/Info\n",
"------------------------------\n",
"weight_kg int 100\n",
"weight_lb float 126.50000000000001\n"
]
}
],
"source": [
"%whos"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"What does the following program print out?\n",
"\n",
"<code>\n",
"first, second = 'Grace', 'Hopper'\n",
"third, fourth = second, first\n",
"print(third, fourth)\n",
"<code/>"
]
},
{
"cell_type": "code",
"execution_count": 53,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Hopper Grace\n"
]
}
],
"source": [
"first, second = 'Grace', 'Hopper'\n",
"third, fourth = second, first\n",
"print(third, fourth)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Using libraries (modules)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First, we will load a library. Let's import Numpy. Numpy is important for fancy number manipulations:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import numpy"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Libraries provide additional functionality to the basic Python package. Importing too many libraries can sometimes complicate and slow down your programs - so we only import what we need for each program.\n",
"\n",
"Now we read the first file where patient data are stored. \n",
"\n",
"We will use functions which belong to a certain library and perform \"something\" for us. In this case we want to load a data file"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"array([[ 0., 0., 1., ..., 3., 0., 0.],\n",
" [ 0., 1., 2., ..., 1., 0., 1.],\n",
" [ 0., 1., 1., ..., 2., 1., 1.],\n",
" ..., \n",
" [ 0., 1., 1., ..., 1., 1., 1.],\n",
" [ 0., 0., 0., ..., 0., 2., 0.],\n",
" [ 0., 0., 1., ..., 1., 1., 0.]])"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"numpy.loadtxt(fname=\"inflammation-01.csv\", delimiter=\",\") #Explain what is a function call\n",
" # and what are parameters briefly\n",
"# Do not forget to explain why the elipsis below "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The expression ``numpy.loadtxt(...)`` is a function call that asks Python to run the function loadtxt which belongs to the numpy library. This dotted notation is used everywhere in Python: the thing that appears before the dot contains the thing that appears after."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"``numpy.loadtxt`` has two parameters: the name of the file we want to read, and the delimiter that separates values on a line. These both need to be character strings (or strings for short), so we put them in quotes."
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"We did not assign the output of the function to any variable, so the notebook just dumped the ouptut to an ``Out[]`` cell. But, just the same way we asigned values to a variable, we can assing the array of values to an variable using the same syntax:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"data = numpy.loadtxt(fname='inflammation-01.csv', delimiter=',') "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"No output here, as we just assigned, as we did before with ``weight_kg``. To print out the variable value:"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[ 0. 0. 1. ..., 3. 0. 0.]\n",
" [ 0. 1. 2. ..., 1. 0. 1.]\n",
" [ 0. 1. 1. ..., 2. 1. 1.]\n",
" ..., \n",
" [ 0. 1. 1. ..., 1. 1. 1.]\n",
" [ 0. 0. 0. ..., 0. 2. 0.]\n",
" [ 0. 0. 1. ..., 1. 1. 0.]]\n"
]
}
],
"source": [
"print(data)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's check what type of \"thing\" ``data`` variable refers to:"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'numpy.ndarray'>\n"
]
}
],
"source": [
"print(type(data)) #You should explain numpy arrays at this point"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"When we create a variable, <strong>we also create information about it</strong>, as the attribute shape! That's very important!!\n"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(60, 40)\n"
]
}
],
"source": [
"print(data.shape) # Explain here that once we created \n",
" # data we also created a information about \n",
" # the array called members or attributes that describe \n",
" # data in the same way an adjetive describes a noun"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"So we have 60 rows and 40 columns in ``data`` variable."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In order to get a single number from the array we provide an index in square brackets, just as we do in maths"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"first value in data: 0.0\n"
]
}
],
"source": [
"print('first value in data:', data[0,0]) # You should explain here than in many \n",
" # languages arrays start by 0"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"middle value in data: 13.0\n"
]
}
],
"source": [
"print('middle value in data:', data[30,20])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"Selecting intervals of data by using ranges : . <strong>Caution here!:</strong>ranges seem closed but they are [) "
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[ 0. 0. 1. 2. 2. 4. 2. 1. 6. 4.]\n",
" [ 0. 0. 2. 2. 4. 2. 2. 5. 5. 8.]\n",
" [ 0. 0. 1. 2. 3. 1. 2. 3. 5. 3.]\n",
" [ 0. 0. 0. 3. 1. 5. 6. 5. 5. 8.]\n",
" [ 0. 1. 1. 2. 1. 3. 5. 3. 5. 8.]]\n"
]
}
],
"source": [
"print(data[5:10, 0:10]) # Selecting rows 0,1,2,3 and cols from 0 to 9. Important! notice upper limits are not \n",
" # included in the counting\n",
" # You don't have to start slices at 0"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This is how index is assigned by python:\n",
"<img width=\"700px\" src=\"http://swcarpentry.github.io/python-novice-inflammation/fig/python-zero-index.png\">\n",
"<br>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"There is no need to include upper and lower bounds:"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"small is: \n",
"[[ 2. 3. 0. 0.]\n",
" [ 1. 1. 0. 1.]\n",
" [ 2. 2. 1. 1.]]\n"
]
}
],
"source": [
"small = data[:3, 36:] # There is no need to include upper and lower bounds\n",
"print ('small is: ')\n",
"print (small)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"what does ``data[3:3, 4:4]`` produce? \n",
"What about ``data[3:3, :]``?\n"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[]\n",
"[]\n"
]
}
],
"source": [
"print(data[3:3, 4:4])\n",
"print(data[3:3, :])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Some array math\n",
"Basic arithmetics: The operation is performed in <strong>every element</strong> of the array"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"original:\n",
"[[ 2. 3. 0. 0.]\n",
" [ 1. 1. 0. 1.]\n",
" [ 2. 2. 1. 1.]]\n",
"doubledata: \n",
"[[ 4. 6. 0. 0.]\n",
" [ 2. 2. 0. 2.]\n",
" [ 4. 4. 2. 2.]]\n"
]
}
],
"source": [
"doubledata = 2 * data # The x2 operation is made in every element of the array\n",
"print('original:')\n",
"print(data[:3,36:])\n",
"print('doubledata: ')\n",
"print(doubledata[:3,36:])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Array to Array operations: The operation is made on <strong>each corresponding element</strong> of the arrays:"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"tripledata:\n",
"[[ 6. 9. 0. 0.]\n",
" [ 3. 3. 0. 3.]\n",
" [ 6. 6. 3. 3.]]\n"
]
}
],
"source": [
"tripledata = doubledata + data #Array-Array operations are made on each corresponding element\n",
"print('tripledata:')\n",
"print(tripledata[:3,36:])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"More complex operations:\n",
"<br>The following is a method. Method are actions that can be made on the variable, Python knows how to!. <strong> The actions available depend on the variable type</strong>:"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"6.14875\n"
]
}
],
"source": [
"print(data.mean()) # method: Difference with attribute->\n",
" # they can take parameters that modify the behavior\n",
" # Note the parenthesis. They are \n",
" # actions related to the object, whereas the attributes \n",
" # are descriptions of the object in \n",
" # question. Maybe is better to explain tab completion here...!!"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"panel panel-info\">\n",
"<div class=\"panel-heading\">\n",
"<h3 class=\"panel-title\">\n",
"Reminder: method vs attribute\n",
"</h3>\n",
"</div>\n",
"<div class=\"panel-body\">\n",
"<ul>\n",
"<li> attributes are descriptions of variable properties\n",
"<li> methods are actions that Python knows to perform on the variable\n",
"</ul>\n",
"</div>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Several important methods for numpy variables:"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"maximum inflammation: 20.0\n",
"minimum inflammation: 0.0\n",
"standard deviation: 4.61383319712\n"
]
}
],
"source": [
"print('maximum inflammation:', data.max())\n",
"print('minimum inflammation:', data.min())\n",
"print('standard deviation:', data.std())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sometimes is useful to make some partial statistics. For instance max inflammation for first patient of all days: "
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"maximum inflammation for patient 0: 18.0\n"
]
}
],
"source": [
"patient_0 = data[0,:] #One possibility is creating an array\n",
"print('maximum inflammation for patient 0:', patient_0.max())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Oh wait... maybe I am creating to many variables... let's check:"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Variable Type Data/Info\n",
"---------------------------------\n",
"data ndarray 60x40: 2400 elems, type `float64`, 19200 bytes\n",
"doubledata ndarray 60x40: 2400 elems, type `float64`, 19200 bytes\n",
"numpy module <module 'numpy' from '/ho<...>kages/numpy/__init__.py'>\n",
"patient_0 ndarray 40: 40 elems, type `float64`, 320 bytes\n",
"small ndarray 3x4: 12 elems, type `float64`, 96 bytes\n",
"weight_kg int 100\n",
"weight_lb float 126.50000000000001\n"
]
}
],
"source": [
"%whos"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sometimes we can avoid the use of some variables:"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"maximum inflamation for patient 2: 19.0\n"
]
}
],
"source": [
"print('maximum inflamation for patient 2:', data[2, :].max())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What if we need max inflammation for all patients at once?. Operations along all columns or rows at once:<br>\n",
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-operations-across-axes.png\">\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Then the calculation for the average inflammation over all patients per day is:"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[ 0. 0.45 1.11666667 1.75 2.43333333 3.15\n",
" 3.8 3.88333333 5.23333333 5.51666667 5.95 5.9\n",
" 8.35 7.73333333 8.36666667 9.5 9.58333333\n",
" 10.63333333 11.56666667 12.35 13.25 11.96666667\n",
" 11.03333333 10.16666667 10. 8.66666667 9.15 7.25\n",
" 7.33333333 6.58333333 6.06666667 5.95 5.11666667 3.6\n",
" 3.3 3.56666667 2.48333333 1.5 1.13333333\n",
" 0.56666667]\n"
]
}
],
"source": [
"print(data.mean(axis=0)) #columns"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"A quick check that the array is ok:"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(40,)\n"
]
}
],
"source": [
"print(data.mean(axis=0).shape) #Quick check everything if fine"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Or if preferred, the average inflammation over all days per patient:"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[ 5.45 5.425 6.1 5.9 5.55 6.225 5.975 6.65 6.625 6.525\n",
" 6.775 5.8 6.225 5.75 5.225 6.3 6.55 5.7 5.85 6.55\n",
" 5.775 5.825 6.175 6.1 5.8 6.425 6.05 6.025 6.175 6.55\n",
" 6.175 6.35 6.725 6.125 7.075 5.725 5.925 6.15 6.075 5.75\n",
" 5.975 5.725 6.3 5.9 6.75 5.925 7.225 6.15 5.95 6.275 5.7\n",
" 6.1 6.825 5.975 6.725 5.7 6.25 6.4 7.05 5.9 ]\n"
]
}
],
"source": [
"print(data.mean(axis=1)) # mean of each row"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(60,)\n"
]
}
],
"source": [
"print(data.mean(axis=1).shape)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Data visualization"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Ploting is great for insight! Matplotlib is <em>the facto</em> standar. Some basics:\n",
"<br>\n",
"Just pick the pyplot library of Matplotlib:"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import matplotlib.pyplot # Diffrence with numpy: Matplotlib is a extense package.\n",
" # We only want pyplot at the moment\n",
" # You may get a warning here about rendering fonts. If we re-run it not htere anymore."
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"panel panel-info\">\n",
"<div class=\"panel-heading\">\n",
"<h3 class=\"panel-title\">\n",
"IPython Magic!\n",
"</h3>\n",
"</div>\n",
"<div class=\"panel-body\">\n",
"The % indicates an IPython magic function - a funciton that is valid only within the notebook environment.\n",
"</div>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's plot data array (the average inflammation per day):"
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAALYAAAD8CAYAAADaM14OAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXt0leW9578/SAK6wyUIBAIigqClHkG8K3hp9Sy0tdXT\ng5dp5yjLirNGXbbHM15npnXNSNVz2ums6pwjPa3aZdVKW61YpQUXFMEeRFGspUgIIgIhEU2QhEoS\neOaPbPfz+303+80mxGSvl99nLZfPk2df3v3uh3d/399VQghwnLTRr68PwHE+C3xjO6nEN7aTSnxj\nO6nEN7aTSnxjO6n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seDeCdvjiu7Pv/BsBFpXBMAI4EsAbAGaVw\nPAfzX29KkTEA3lfzrdm/lQLVIYT67HgHOpu29joiMh7AyQBW9eUxiUh/EXkTnW3EF4cQ+vR4uoPf\nPBKh85LU66YiEakE8CsA3wohmNjW3j6mEMK+EMI0AGMBnC4iJ9J6n5yjg6E3N/Y2AEer+djs30qB\nBhEZDQDZ/zf25puLSDk6N/XPQwif1i7r02MCgBBCM4Cl6Lwn6fPjORh6c2OvBjBJRI4VkQoAVwF4\nrhffP4nnAFyTHV+DTp3bK0hnk/qfAPhLCOEHfX1MIjJCRIZmx0egU++v76vj6Ta9fDNyCYANAOoA\n3N0XNxUAngRQD6AdnTr/OgBHofNOvxbAEgDDevF4ZqDzZ/0tAG9m/7ukr44JwEkA3sgez9sA/mf2\n7312jrrzn3senVTiN49OKvGN7aQS39hOKvGN7aQS39hOKvGN7aQS39hOKvGN7aSS/w+XOkyfWnt+\nTQAAAABJRU5ErkJggg==\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x7f77beaa4860>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"image = matplotlib.pyplot.imshow(data) # Remider: explain %matplotlib inline Note: Ipython!!\n",
" # otherwise matplotlib.pyplot.show() is mandatory!!"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Average inflammation over time. Linear plot:"
]
},
{
"cell_type": "code",
"execution_count": 51,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4VuX9x/H3N3svMkhIQoAEgowwIipTRFQEHPWHFWer\nFfeoWqvVVmuXbbW1VrHFYh04qBvcqCCiMhIIhE1YGYQMQsgi+/79kUdEBDKeJznP+L6uKxfJyZOc\nT4/Jpyf3Oee+xRiDUkop1+dldQCllFKOoYWulFJuQgtdKaXchBa6Ukq5CS10pZR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4rgdL5sTHLdxwAW2a2+vAWeJyAIcdMxcodCddjFqEQm2XahC\nRIKBc4CNJ/+qHrcIuMb2/jXAuxZm+Z5vf4BtLsaiY2e7gDYf2GKM+dtRn7L82J0omzMcOxGJEZEI\n2/uBtN24sBXnOG7HzWb1cTPG3G+MSTTGpNDWZZ8bY67EUcfMGOP0b8D5tN3pshN4wOo8R+XqD6y3\nvW2yOhvwKm1/RjbRdq3hOqAX8BmwA/gUiHKibC8BucAG2w90vEXZxtP2J+4GIMf2dr4zHLuTZLP8\n2AHDgXW2DBuB39i2O8NxO1E2y4/bURnPBN5z5DFz+tsWlVJKdYwrDLkopZTqAC10pZRyE1roSinl\nJrTQlVLKTWihK6WUm9BCV0opN6GFrpRSbkILXSml3MT/A28p6Ke22pdeAAAAAElFTkSuQmCC\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x7f77bea78048>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"ave_inflammation = data.mean(axis=0)\n",
"ave_plot = matplotlib.pyplot.plot(ave_inflammation)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This plot does not correspond with the expected. The model predices a smooth sharper rise and a slower after fall. Let's have a look to the other statistics:"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEACAYAAACj0I2EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFOBJREFUeJzt3X+sV/V9x/HX26oN1s7RbkoyV7tmzWXrtKgZmIjpd+3a\nsplesENXYhZpFuEPmc2aLHX6B9QsQQHvQEyT2msXNTArllb8SyDuxtjLCv4AFZU2abR1UwpoN2jJ\n0njf++Ocr3y5fM/9/jrnez6fc56PhPTy5XK/7xzL5577/H6+55i7CwAQv7PKHgAAkA8WdACoCBZ0\nAKgIFnQAqAgWdACoCBZ0AKiIjgu6mV1sZk+Z2UEze8nMbk0fn21mO83skJk9aW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1/P7i9LHguPtb6f8ekfQDJbkoVIfN7CLp/db6y5Lnacvdj7Tc1eQ7kv68zHmazOxs\nJYvkw+7+ePpwcMe03ZyhHlN3/19JE5IWKcBj2dQ6Z4DH8mpJo+nref8u6bNm9rCkt3s9nkUt6Psk\n/bGZXWJm50r6iqQdBT1X38zsvPRMSGb2IUlfkPRyuVOdxnT6d+wdkpanH98k6fHpf6Ekp82Z/p+v\n6csK55h+V9Ir7r6p5bEQj+kZc4Z0TM3s95qZwsxmSfq8ktYf1LHMmPO1kI6lJLn77e7+MXf/hJK1\n8il3/ztJT6jX4+nuhfxS8h37kKSfSrqtqOcZcMY/krRf0guSXgppTklblewQ+j9JP1eyG2O2pN3p\ncd0p6XcDnfMhSS+mx/aHSlpg2XNeLem9lv/ez6f/H/1ISMd0hjmDOaaSLk3n2p/OdEf6eGjHMmvO\nYI5lm5k/I2lHv8eTNxYBQEXwoigAVAQLOgBUBAs6AFQECzoAVAQLOgBUBAs6AFQECzoAVAQLOgBU\nxP8DpFAe9vF8qV0AAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x77e6050>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"max_plot = matplotlib.pyplot.plot(data.max(axis=0))"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAW0AAAEACAYAAAB4ayemAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFJNJREFUeJzt3W2MXPV1x/HfsdcGY2MDNsbAxhiCiMHBXrAwIFA6TWlw\nYgWq9kVJ6VNeJJECJSJSVJQieaWq0FRRI1BpXhQoDyq0IoJAFKQYAlOFNHWs4l3WYGNIeawfC/Ya\n22Ab+/TFnaVre2fnPt/7n/l+pBXrYZh7+Hv3t3fPvf8z5u4CAIRhStUFAADiI7QBICCENgAEhNAG\ngIAQ2gAQEEIbAALSF+dJZvampFFJR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JuTuO8e9x9w/Sbqsynokycz6FAXhw+7+ZOvh2q3nRHXW\ncT3HuPseSU1JK1XD9Rwzvs6aredVkq5rXVt7VNLnzexhSduSrmXW0F4n6XwzO8fMpku6QdJTGV8z\nd2Z2UuusRmY2U9IXJNXpDYVMR//0fUrSn7c+/zNJTx77H1TkqDpbX2Rjfl/1WNP7Jb3i7neNe6yO\n63lcnXVbTzObN9ZSMLMZkn5XUf+9VuvZps5NdVpPd/+uuy909/MU5eRz7v4nkn6ipGvp7pk+FP3k\nfVXSa5Juy/p6RXxIOlfSkKT1kkbqVKekRxTdeXNA0tuK7nQ4VdKzrXVdI+mUmtb5kKSXWmv7Y0X9\nuSprvErS4XF/1y+2vj5Pq9N6TlJn3dbz4lZtQ626/qr1eN3Ws12dtVrPcfX+lqSn0q4lm2sAICC9\ndCESAIJHaANAQAhtAAgIoQ0AASG0ASAghDYABITQBoCAENoAEJD/A05hwmP+LPV6AAAAAElFTkSu\nQmCC\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x7805410>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"min_plot = matplotlib.pyplot.plot(data.min(axis=0))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"None of them seems very likely to fit the model. <strong> Something could be wrong with the data</strong>\n",
"<br>\n",
"<br>\n",
"We can further improve the visualization by grouping plots in a multiplot:"
]
},
{
"cell_type": "code",
"execution_count": 52,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsgAAADQCAYAAAAasZepAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl81PW1//HXyZ4JIWRjCSETEAQBATWCilpwRXFve69r\ntbW1i7fV21Zra3vb3l5te6ut7W2vSqutrf3V3atVFHFBsVolIArIDklIWLJByELWOb8/ZgYjsswk\nM/Od78x5Ph55kExmOUA+mc985vM5b1FVjDHGGGOMMX4pThdgjDHGGGNMPLEJs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E2RjjDHGGGP6+f8skxfhNmbXPwAAAABJRU5ErkJggg==\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x7f77bea35668>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig = matplotlib.pyplot.figure(figsize=(10.0, 3.0)) # Figure canvas, size in inches!!\n",
"\n",
"\n",
"axes1 = fig.add_subplot(1,3,1) # Means: add subplot to a 1x3 grid in the first place\n",
"axes2 = fig.add_subplot(1,3,2) # Means: add subplot to a 1x3 grid in the second place\n",
"axes3 = fig.add_subplot(1,3,3) # Means: add subplot to a 1x3 grid in the third place\n",
"\n",
"axes1.set_ylabel('average')\n",
"axes1.plot(data.mean(axis=0))\n",
"axes2.set_ylabel('max')\n",
"axes2.plot(data.max(axis=0))\n",
"axes3.set_ylabel('min')\n",
"axes3.plot(data.min(axis=0))\n",
"\n",
"fig.tight_layout() # Adjust the subplots to fit the margins\n",
"\n",
"matplotlib.pyplot.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Additional Exercises "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Slicing strings"
]
},
{
"cell_type": "code",
"execution_count": 54,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"first three characters: oxi\n",
"last three characters: gen\n"
]
}
],
"source": [
"element = 'oxigen'\n",
"print('first three characters:', element[0:3])\n",
"print('last three characters:', element[-3:])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What is the value of element[:4]? What about element[4:]? Or element[:]?"
]
},
{
"cell_type": "code",
"execution_count": 55,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'en'"
]
},
"execution_count": 55,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"element[4:]"
]
},
{
"cell_type": "code",
"execution_count": 56,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'oxig'"
]
},
"execution_count": 56,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"element[:4]\n"
]
},
{
"cell_type": "code",
"execution_count": 58,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'oxigen'"
]
},
"execution_count": 58,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"element[:]\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What is element[-1]? What is element[-2]?"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'n'"
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"element[-1]"
]
},
{
"cell_type": "code",
"execution_count": 59,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'e'"
]
},
"execution_count": 59,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"element[-2]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Given those answers, explain what element[1:-1] does."
]
},
{
"cell_type": "code",
"execution_count": 60,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'xige'"
]
},
"execution_count": 60,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"element[1:-1]"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Lists\n",
"They are used to store many values. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Difference with array?\n",
"<li>They are very similar but they do not belong to numpy, and do not have some of the attributes of numpy arrays, such as mean sd max min etc... Beside this they are pretty similar in concept\n",
"<li>We create a list the same "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Selecting elements of a list:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can loop over a list:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"List are also pretty similar to strings. There is an <strong>IMPORTANT</strong> difference between strings and lists: Elements in a list can be modified but not ones in a string:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"But:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### List of Lists or nested lists\n",
"Making a list whose elements are also lists."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Example: Products in the shelves of a shop. We can print the results of the index operations in the images:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can print the first element of the list <code>x</code>:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Printing first element of <code>x[0]</code> list:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Modifying list contents\n",
"Many ways to change a string"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<strong>Caution here!</strong>: List are treated slightly conterintuitive:<br>\n",
"<em>Pro-tip: Technically it is said that lists are copied \"by reference\" instead of \"by value\"</em>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"#### Turn string into a list\n",
"\n",
"Use a for-loop to convert the string “hello” into a list of letters:\n",
"\n",
"<code>\n",
"[\"h\", \"e\", \"l\", \"l\", \"o\"]\n",
"<code/>\n",
"\n",
"Hint: You can create an empty list like this:\n",
"\n",
"``my_list = []``"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can make a single copy of the original list using list built-in"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"panel panel-info\">\n",
"<div class=\"panel panel-heading\">\n",
"<h3>Reminder: When not to use \"list\" method?</h3>\n",
"</div>\n",
"<div class=\"panel panel-body\">\n",
"<li>Reference copy uses less resources \n",
"<li>Is the default when relating lists through assignment\n",
"<li>But whether you need to do a reference or a copy is your choice!!\n",
"</div>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"#### Overloading\n",
"\n",
"`+` usually means addition, but when used on strings or lists, it means “concatenate”. Given that, what do you think the multiplication operator * does on lists? In particular, what will be the output of the following code?\n",
"\n",
"<code>\n",
"counts = [2, 4, 6, 8, 10]\n",
"repeats = counts * 2\n",
"<code/>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Lists\n",
"They are used to store many values. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Difference with array?\n",
"<li>They are very similar but they do not belong to numpy, and do not have some of the attributes of numpy arrays, such as mean sd max min etc... Beside this they are pretty similar in concept\n",
"<li>We create a list the same "
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"odds are: [1, 3, 5, 7]\n"
]
}
],
"source": [
"odds = [1, 3, 5, 7]\n",
"print('odds are:', odds)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Selecting elements of a list:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"first and last: 1 7\n"
]
}
],
"source": [
"print('first and last:', odds[0], odds[-1])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can loop over a list:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1\n",
"3\n",
"5\n",
"7\n"
]
}
],
"source": [
"for number in odds: #explain iterables\n",
" print(number)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"List are also pretty similar to strings. There is an <strong>IMPORTANT</strong> difference between strings and lists: Elements in a list can be modified but not ones in a string:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"names originally: ['Newton', 'Darwing', 'Turing']\n",
"names corrected: ['Newton', 'Darwin', 'Turing']\n"
]
}
],
"source": [
"names = ['Newton', 'Darwing', 'Turing']\n",
"print('names originally:', names)\n",
"names[1]='Darwin'\n",
"print('names corrected:', names)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"But:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"ename": "TypeError",
"evalue": "'str' object does not support item assignment",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-5-7d3b982a1b78>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mname\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'Bell'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mname\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'a'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mTypeError\u001b[0m: 'str' object does not support item assignment"
]
}
],
"source": [
"name = 'Bell' #Explain mutability\n",
"name[1] = 'a'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### List of Lists or nested lists\n",
"Making a list whose elements are also lists."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Example: Products in the shelves of a shop. We can print the results of the index operations in the images:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"x = [['salt', 'zuchini', 'onion'], ['cabbage', 'lettuce', 'garlic'],['apple','pear','banana']]"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[['salt', 'zuchini', 'onion']]\n"
]
}
],
"source": [
"print([x[0]])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can print the first element of the list <code>x</code>:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['salt', 'zuchini', 'onion']\n"
]
}
],
"source": [
"print(x[0]) # Prints x's first element, in this case again a list"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Printing first element of <code>x[0]</code> list:"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"salt\n"
]
}
],
"source": [
"print(x[0][0]) # Prints x's first element's first element. In this case a string"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Modifying list contents\n",
"Many ways to change a string"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1, 3, 5, 7, 11]\n"
]
}
],
"source": [
"odds.append(11) # Add 11 at the end of the list. Also written as +=[] \n",
"print(odds) # Explain that operators have different effects depending on the nature of the operands"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[3, 5, 7, 11]\n"
]
}
],
"source": [
"del odds[0]\n",
"print(odds)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"reversed odds: [11, 7, 5, 3]\n"
]
}
],
"source": [
"odds.reverse()\n",
"print('reversed odds:', odds)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"#### Turn string into a list\n",
"\n",
"Use a for-loop to convert the string “hello” into a list of letters:\n",
"\n",
"<code>\n",
"[\"h\", \"e\", \"l\", \"l\", \"o\"]\n",
"<code/>\n",
"\n",
"Hint: You can create an empty list like this:\n",
"\n",
"``my_list = []``"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"the list: ['h', 'e', 'l', 'l', 'o']\n"
]
}
],
"source": [
"my_list = []\n",
"\n",
"for letter in 'hello':\n",
" my_list +=[letter] \n",
"print('the list:', my_list)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<strong>Caution here!</strong>: List are treated slightly conterintuitive:<br>\n",
"<em>Pro-tip: Technically it is said that lists are copied \"by reference\" instead of \"by value\"</em>"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"primes: [1, 3, 5, 7, 2]\n",
"odds: [1, 3, 5, 7, 2]\n"
]
}
],
"source": [
"odds = [1, 3, 5, 7]\n",
"primes = odds # list do not behave has simple variables, \n",
" # when assigning it does not copy the whole list, but adds\n",
" # a reference to the list odds named primes\n",
"primes += [2] \n",
"print('primes:', primes)\n",
"print('odds:', odds)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can make a single copy of the original list using list built-in"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"primes: [1, 3, 5, 7, 2]\n",
"odds: [1, 3, 5, 7]\n"
]
}
],
"source": [
"odds = [1, 3, 5, 7]\n",
"primes = list(odds) # This time a new copy of the list is done\n",
"primes += [2]\n",
"print('primes:', primes)\n",
"print('odds:', odds)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"panel panel-info\">\n",
"<div class=\"panel panel-heading\">\n",
"<h3>Reminder: When not to use \"list\" method?</h3>\n",
"</div>\n",
"<div class=\"panel panel-body\">\n",
"<li>Reference copy uses less resources \n",
"<li>Is the default when relating lists through assignment\n",
"<li>But whether you need to do a reference or a copy is your choice!!\n",
"</div>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"#### Overloading\n",
"\n",
"`+` usually means addition, but when used on strings or lists, it means “concatenate”. Given that, what do you think the multiplication operator * does on lists? In particular, what will be the output of the following code?\n",
"\n",
"<code>\n",
"counts = [2, 4, 6, 8, 10]\n",
"repeats = counts * 2\n",
"<code/>"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[2, 4, 6, 8, 10, 2, 4, 6, 8, 10]\n"
]
}
],
"source": [
"counts = [2, 4, 6, 8, 10]\n",
"repeats = counts * 2 # The * operator applied to lists replicates the elements in it a given number of times\n",
"print(repeats)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Repeating Actions with Loops"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We found some suspicious features in our firs dataset \"inflammation-01.csv\". It is possible that other datasets are also affected by this?? We would like to check... Fast!"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Repeat tasks:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We have a lot of data sets and we have to tell the computer how to repeat things.\n",
"<br>\n",
"Let's first do something simpler: Show each character in a string!"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Bad approach: tedious and if the string is larger it misses some characters, and if it shorter:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### There is a better approach: Recursion\n",
"Recursion is made by for loops:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Example 1. A better way:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The method supports strings of any lenght:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's see it in action:\n",
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/loops_image.png\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### General form of a for-loop:\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img width=\"800px\" src=\"https://www.safaribooksonline.com/library/view/head-first-python/9781449397524/httpatomoreillycomsourceoreillyimages1368346.png.jpg\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can choose any name we want for variables. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Example 2. This loop repeatedly updates a variable that acts as counter. It is very usual to find this structure:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The for body is executed 5 times\n",
"<ul>\n",
"<li>1st: vowel eqs a; lenght eqs 1\n",
"<li>2st: vowel eqs e; lenght eqs 2\n",
"<li>etc.."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Example 3. This loop overrides the value of a external variable:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Off-topic tip: Some loops frecuently used are wraped inside very useful methods, such as <code>len</code> which returns the length of the variable. The methods avaiable by default in Python without import a thing are called <em>built-in</em> methods"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercises"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### From 1 to N"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Python has a built-in function called range that creates a sequence of numbers. Using range, write a loop that uses range to print the first 3 odd natural numbers. Use the builtin help!"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Repeating Actions with Loops"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We found some suspicious features in our firs dataset \"inflammation-01.csv\". It is possible that other datasets are also affected by this?? We would like to check... Fast!"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Repeat tasks:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We have a lot of data sets and we have to tell the computer how to repeat things.\n",
"<br>\n",
"Let's first do something simpler: Show each character in a string!"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"l\n",
"e\n",
"a\n",
"d\n"
]
}
],
"source": [
"word = 'lead' # From wich number to wich number we had to go? Ask people\n",
"print(word[0])\n",
"print(word[1])\n",
"print(word[2])\n",
"print(word[3])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Bad approach: tedious and if the string is larger it misses some characters, and if it shorter:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"t\n",
"i\n",
"n\n"
]
},
{
"ename": "IndexError",
"evalue": "string index out of range",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-2-61757d5ac451>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mword\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mword\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 5\u001b[0;31m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mword\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mIndexError\u001b[0m: string index out of range"
]
}
],
"source": [
"word = 'tin' # Bad approach, if the string is larger it misses characters and if it shorter it fails!\n",
"print(word[0])\n",
"print(word[1])\n",
"print(word[2])\n",
"print(word[3])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### There is a better approach: Recursion\n",
"Recursion is made by for loops:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Example 1. A better way:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"l\n",
"e\n",
"a\n",
"d\n"
]
}
],
"source": [
"word = 'lead'\n",
"for char in word:\n",
" print(char)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The method supports strings of any lenght:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"o\n",
"x\n",
"i\n",
"g\n",
"e\n",
"n\n"
]
}
],
"source": [
"word = 'oxigen'\n",
"for char in word:\n",
" print (char)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's see it in action:\n",
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/loops_image.png\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### General form of a for-loop:\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img width=\"800px\" src=\"https://www.safaribooksonline.com/library/view/head-first-python/9781449397524/httpatomoreillycomsourceoreillyimages1368346.png.jpg\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can choose any name we want for variables. "
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"o\n",
"x\n",
"y\n",
"g\n",
"e\n",
"n\n"
]
}
],
"source": [
"word = 'oxygen'\n",
"for banana in word:\n",
" print(banana)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Example 2. This loop repeatedly updates a variable that acts as counter. It is very usual to find this structure:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"There are 5 vowels\n"
]
}
],
"source": [
"lenght = 0\n",
"for vowel in 'aeiou': # The process details can be explained here\n",
" lenght = lenght + 1 # Explain what happens if lenght is inside\n",
"print('There are ',lenght,'vowels')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The for body is executed 5 times\n",
"<ul>\n",
"<li>1st: vowel eqs a; lenght eqs 1\n",
"<li>2st: vowel eqs e; lenght eqs 2\n",
"<li>etc.."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Off-topic tip: Some loops frecuently used are wraped inside very useful methods, such as <code>len</code> which returns the length of the variable. The methods avaiable by default in Python without import a thing are called <em>built-in</em> methods"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"5\n"
]
}
],
"source": [
"print(len('aeiou')) # built-in function to get the length of a string (and the length of many other things...). \n",
" # Is faster and much easier to read than a for loop"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercises"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### From 1 to N"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Python has a built-in function called range that creates a sequence of numbers. Using range, write a loop that uses range to print the first 3 odd natural numbers. Use the builtin help!"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1\n",
"3\n",
"5\n"
]
}
],
"source": [
"for num in range(1,6,2):\n",
" print (num)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Making choices\n",
"\n",
"In last section we discovered something suspicios in our inflammation data by drawing some plots. How can we use Python\n",
"to automatically detect the anomalies we found and take an action for each of them?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<strong>By writing code that runs only certain conditions</strong>:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Conditionals\n",
"\n",
"A conditional is a piece of code that takes different actions depending on a condition:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Imagine we want to determine if a certain number is lower or greater than 100. The flow of this conditional:\n",
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-flowchart-conditional.png\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This scheme is achieved in Python by means of the <code>if</code>/<code>else</code> clause:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sometimes there is no need to use a else, it depends on the logic of the problem:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sometimes the flow of the decision is more complex. There are still multiple choices available \n",
"when the first condition is discarded. <br>\n",
"As an example imagine we want to know if a given number is positive negative or zero. We make use of the <code>elif</code> clause:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<strong>Note the \"==\"</strong>. This symbol checks equality rather than \"=\" wich means assingment"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercises\n",
"#### What Is Truth?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"if '':\n",
" print('empty string is true')\n",
"if 'word':\n",
" print('word is true')\n",
"if []:\n",
" print('empty list is true')\n",
"if [1, 2, 3]:\n",
" print('non-empty list is true')\n",
"if 0:\n",
" print('zero is true')\n",
"if 1:\n",
" print('one is true')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### That’s Not Not What I Meant"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"if not '':\n",
" print('empty string is not true')\n",
"if not 'word':\n",
" print('word is not true')\n",
"if not not True:\n",
" print('not not True is true')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Composed conditions\n",
"We can write complex conditions in the if clause by using concatenation of simple conditions by means of <code>and</code> and <code>or</code>. <br>\n",
"As in human language an <code>and</code> condition is True if all its components are True:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Whereas an <code>or</code> condition is True if any of it components is True:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"#### Close Enough\n",
"\n",
"Write some conditions that print True if the variable a is within 10% of the variable b and False otherwise. Compare your implementation with your partner’s: do you get the same answer for all possible pairs of numbers?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Checking our Data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we are in conditions to check our suspicious data in the inflammation tests.<br>\n",
"First two files max inflammation seems to rise linearly. So let's write a code that check this behavior and show warning:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We saw a different issue in file 3. All minima where 0. So we write a code to check that:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can check now several files putting all toghether:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Additional Exercises\n",
"\n",
"### In-place operators"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"Python (and most other languages in the C family) provides in-place operators that work like this:\n",
"\n",
"```x = 1 # original value\n",
"x += 1 # add one to x, assigning result back to x\n",
"x *= 3 # multiply x by 3\n",
"print(x)```\n",
"\n",
"\n",
"``6``\n",
"\n",
"Write some code that sums the positive and negative numbers in a list separately, using in-place operators. Do you think the result is more or less readable than writing the same without in-place operators?\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Counting Vowels "
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"* Write a loop that counts the number of vowels in a character string.\n",
"* Test it on a few individual words and full sentences.\n",
"* Once you are done, compare your solution to your neighbor’s. Did you make the same decisions about how to handle the letter ‘y’ (which some people think is a vowel, and some do not)?\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Making choices\n",
"\n",
"In last section we discovered something suspicios in our inflammation data by drawing some plots. How can we use Python\n",
"to automatically detect the anomalies we found and take an action for each of them?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<strong>By writing code that runs only certain conditions</strong>:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Conditionals\n",
"\n",
"A conditional is a piece of code that takes different actions depending on a condition:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Imagine we want to determine if a certain number is lower or greater than 100. The flow of this conditional:\n",
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-flowchart-conditional.png\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This scheme is achieved in Python by means of the <code>if</code>/<code>else</code> clause:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"not greater\n",
"done\n"
]
}
],
"source": [
"num = 37\n",
"if num > 100:\n",
" print('greater')\n",
"else:\n",
" print('not greater')\n",
"print('done')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sometimes there is no need to use a else, it depends on the logic of the problem:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"before conditional....\n",
"... after conditional\n"
]
}
],
"source": [
"num = 53\n",
"print ('before conditional....')\n",
"if num > 100:\n",
" print ('53 is greater than 100')\n",
"print('... after conditional')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sometimes the flow of the decision is more complex. There are still multiple choices available \n",
"when the first condition is discarded. <br>\n",
"As an example imagine we want to know if a given number is positive negative or zero. We make use of the <code>elif</code> clause:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"-3 is negative\n"
]
}
],
"source": [
"\n",
"num = -3\n",
"\n",
"if num > 0:\n",
" print(num, 'is positive')\n",
"elif num == 0: # note the sign == instead of =. The reason is that \"==\" tests equality whereas \"=\" means assignment\n",
" print(num, 'is zero')\n",
"else:\n",
" print(num, 'is negative')\n",
" "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<strong>Note the \"==\"</strong>. This symbol checks equality rather than \"=\" wich means assingment"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercises\n",
"\n",
"#### What Is Truth?"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"word is true\n",
"non-empty list is true\n",
"one is true\n"
]
}
],
"source": [
"if '':\n",
" print('empty string is true')\n",
"if 'word':\n",
" print('word is true')\n",
"if []:\n",
" print('empty list is true')\n",
"if [1, 2, 3]:\n",
" print('non-empty list is true')\n",
"if 0:\n",
" print('zero is true')\n",
"if 1:\n",
" print('one is true')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### That’s Not Not What I Meant"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"empty string is not true\n",
"not not True is true\n"
]
}
],
"source": [
"if not '':\n",
" print('empty string is not true')\n",
"if not 'word':\n",
" print('word is not true')\n",
"if not not True:\n",
" print('not not True is true')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Composed conditions\n",
"We can write complex conditions in the if clause by using concatenation of simple conditions by means of <code>and</code> and <code>or</code>. <br>\n",
"As in human language an <code>and</code> condition is True if all its components are True:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"at least one part is false\n"
]
}
],
"source": [
"# We can add complex conditions to the if clause, concatenating sentences with \"or\" and \"and\"\n",
"\n",
"if (1 > 0) and (-1 > 0): # Note the () the are not really needed but the reading is clearer\n",
" # and the \"and\". For and \"and\" to be true every part has to be true by itself\n",
" print ('both parts are true')\n",
"else:\n",
" print('at least one part is false')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Whereas an <code>or</code> condition is True if any of it components is True:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"at least one part is true\n"
]
}
],
"source": [
"if (1 > 0) or (-1 > 0): # Note that an \"or\" condition is true if any of the parts is true\n",
" print('at least one part is true')\n",
"else:\n",
" print('none of them are true')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"#### Close Enough\n",
"\n",
"Write some conditions that print True if the variable a is within 5% of the variable b and False otherwise. Compare your implementation with your partner’s: do you get the same answer for all possible pairs of numbers?"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"False\n"
]
}
],
"source": [
"a = .9\n",
"b = 1\n",
"if (a > 0.9 * b) and (a < 1.1 * b): # We consider within as strictly below b+5% and above b-5%\n",
" print('True')\n",
"else:\n",
" print('False')"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"True\n"
]
}
],
"source": [
"print(abs(a - b) < 0.1 * abs(b))"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"multiplication=a*b\n",
"substraction=a-b"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Variable Type Data/Info\n",
"-----------------------------------\n",
"a float 0.9\n",
"b int 1\n",
"multiplication float 0.9\n",
"substraction float -0.09999999999999998\n"
]
}
],
"source": [
"%whos"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Checking our Data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we are in conditions to check our suspicious data in the inflammation tests.<br>\n",
"First two files max inflammation seems to rise linearly. So let's write a code that check this behavior and show warning:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Suspicious looking maxima\n"
]
}
],
"source": [
"import numpy\n",
"\n",
"data = numpy.loadtxt(fname='inflammation-01.csv', delimiter=',')\n",
"if (data.max(axis=0)[0]==0) and (data.max(axis=0)[20]==20): # Anomalous linear behavior of the max in the data\n",
" print('Suspicious looking maxima')\n",
"elif (data.min(axis=0).sum() == 0):\n",
" print('Minima add up to zero')\n",
"else:\n",
" print('Everything seems OK')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We saw a different issue in file 3. All minima where 0. So we write a code to check that:"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Minima add up to zero\n"
]
}
],
"source": [
"data = numpy.loadtxt(fname='inflammation-03.csv', delimiter=',')\n",
"if (data.max(axis=0)[0]==0) and (data.max(axis=0)[20]==20): # Anomalous linear behavior of the max in the data\n",
" print('Suspicious looking maxima')\n",
"elif (data.min(axis=0).sum() == 0):\n",
" print('Minima add up to zero')\n",
"else:\n",
" print('Everything seems OK')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can check now several files putting all toghether:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import glob"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"inflammation-01.csv :\n",
"Suspicious looking maxima\n",
"inflammation-02.csv :\n",
"Suspicious looking maxima\n",
"inflammation-03.csv :\n",
"Minima add up to zero\n"
]
}
],
"source": [
"filenames = sorted(glob.glob('inflammation*.csv'))\n",
"filenames = filenames[0:3] # Get elements 0, 1 and 2 of the list corresponding to inf-01 inf-02 and inf-03\n",
"filenames\n",
"for f in filenames:\n",
" print(f,':')\n",
" data = numpy.loadtxt(fname=f, delimiter=',')\n",
" if (data.max(axis=0)[0]==0) and (data.max(axis=0)[20]==20): # Anomalous linear behavior of the max in the data\n",
" print('Suspicious looking maxima')\n",
" elif (data.min(axis=0).sum() == 0):\n",
" print('Minima add up to zero')\n",
" else:\n",
" print('Everything seems OK')\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Additional Exercises"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## How many paths?"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"C\n"
]
}
],
"source": [
"if 4 > 5:\n",
" print('A')\n",
"elif 4 == 5:\n",
" print('B')\n",
"elif 4 < 5:\n",
" print('C')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### In-place operators"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Python (and most other languages in the C family) provides in-place operators that work like this:\n",
"\n",
"```x = 1 # original value\n",
"x += 1 # add one to x, assigning result back to x\n",
"x *= 3 # multiply x by 3\n",
"print(x)```\n",
"\n",
"\n",
"``6``\n",
"\n",
"Write some code that sums the positive and negative numbers in a list separately, using in-place operators. Do you think the result is more or less readable than writing the same without in-place operators?"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"positive sum is 14 , and the negative sum is -6\n"
]
}
],
"source": [
"numbers = [-1, 2, -3, 7, 5, -2] # Given a list. Not an array!!\n",
"\n",
"pos_sum = 0\n",
"neg_sum = 0\n",
"\n",
"for number in numbers:\n",
" if number > 0:\n",
" pos_sum += number\n",
" else:\n",
" neg_sum += number\n",
"print('positive sum is', pos_sum, ', and the negative sum is', neg_sum ) \n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Counting Vowels "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* Write a loop that counts the number of vowels in a character string.\n",
"* Test it on a few individual words and full sentences.\n",
"* Once you are done, compare your solution to your neighbor’s. Did you make the same decisions about how to handle the letter ‘y’ (which some people think is a vowel, and some do not)?"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"number of vowels: 4\n"
]
}
],
"source": [
"string = 'aljdiajdi'\n",
"vowels = 0\n",
"for char in string:\n",
" if (char == 'a') or (char == 'e') or (char == 'i' ) or (char == 'o') or (char == 'u'):\n",
" vowels += 1\n",
" \n",
"print('number of vowels:', vowels )"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Multiple files\n",
"\n",
"We almost have all the tools needed to process all files. We need an extra library that will make the task easier:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Glob has a function called <code>glob</code> that finds files and directories whose names match a pattern:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Output is an unsorted list of filenames to loop over. We can sort it using <code>sorted</code> built-in"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we can bring together all loops, lists and loops over lists, and use it to process all files: "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercises"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Plotting Differences\n",
"\n",
"Plot the difference between the average of the first dataset and the average of the second dataset, i.e., the difference between the leftmost plot of the first two figures."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![jupyter](images/jupyter-logo-2.png)\n",
"\n",
"![IPython](images/ipython_logo-s.png)\n",
"\n",
"\n",
"# Ipython / Jupyter Notebooks walkthrough"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Starting the notebook server using the command line"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can start the notebook server from the command line (Terminal on Mac/Linux, CMD prompt on Windows) by running the following command: \n",
"\n",
" jupyter-notebook\n",
"\n",
"This will print some information about the notebook server in your terminal, including the URL of the web application (by default, `http://127.0.0.1:8888`). It will then open your default web browser to this URL.\n",
"\n",
"When the notebook opens, you will see the **notebook dashboard**, which will show a list of the notebooks, files, and subdirectories in the directory where the notebook server was started. Most of the time, you will want to start a notebook server in the highest directory in your filesystem where notebooks can be found. Often this will be your home directory."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Basic conceps"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* **Notebook documents**: Notebook documents (or \"notebooks\") are documents produced by the Jupyter Notebook App which contain both computer code (e.g. Python) and rich text elements (paragraph, equations, figures, links, etc...). Notebook documents are both human-readable documents containing the analysis description and the results (figures, tables, etc..) as well as executable documents which can be run to perform data analysis.\n",
"\n",
"* **Kernels**: A notebook kernel is a “computational engine” that executes the code contained in a Notebook document and returns output back to the notebook web application. We will use here the `IPython` kernel. \n",
"\n",
"* **Notebook Dashboard**: The Notebook Dashboard is the component which is shown first when the launching Jupyter Notebook App. The Notebook Dashboard is mainly used to open notebook documents, and to manage the running kernels (visualize and shutdown).\n",
"\n",
"* **Cells**: The notebook consists of a sequence of **cells**. A cell is a multi-line text input field, and its contents can be executed by using `Shift-Enter`."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Modal editor"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Jupyter Notebooks have a modal user interface. This means that the keyboard does different things depending on which mode the Notebook is in. There are two modes: *edit* mode and *command* mode."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Edit mode\n",
"\n",
"Edit mode is indicated by a green cell border and a prompt showing in the editor area:\n",
"\n",
"<img src=\"images/edit_mode.png\">\n",
"\n",
"When a cell is in edit mode, you can type into the cell, like a normal text editor.\n",
"\n",
"<div class=\"alert alert-success\">\n",
"Enter edit mode by pressing `ENTER` or using the mouse to click on a cell's editor area.\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Command mode\n",
"\n",
"Command mode is indicated by a grey cell border with a blue left margin:\n",
"\n",
"<img src=\"images/command_mode.png\">\n",
"\n",
"When you are in command mode, you are able to edit the notebook as a whole, but not type into individual cells. Most importantly, in command mode, the keyboard is mapped to a set of shortcuts that let you perform notebook and cell actions efficiently. For example, if you are in command mode and you press `c`, you will copy the current cell - no modifier is needed.\n",
"\n",
"<div class=\"alert alert-error\">\n",
"Don't try to type into a cell in command mode; unexpected things will happen!\n",
"</div>\n",
"\n",
"<div class=\"alert alert-success\">\n",
"Enter command mode by pressing `ESC` or using the mouse to click *outside* a cell's editor area.\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Cell types"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We have different types of cells. The type of a cell is selected from the dropdown menu or with a keyboard shortcut in command mode. We'll see `code` cells and `Markdown` cells. \n",
"\n",
"This is a **Markdown** cell itself and is used to add formatted text to your notebooks. You can use both [Markdown](https://en.wikipedia.org/wiki/Markdown) syntax and [LaTeX](https://en.wikipedia.org/wiki/LaTeX) syntax.\n",
"\n",
"You can include mathematical expressions both inline: $e^{i\\pi} + 1 = 0$ and displayed:\n",
"\n",
"$$e^x=\\sum_{i=0}^\\infty \\frac{1}{i!}x^i$$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Code cells** on the other hand allow us to input Python code which will be later run by the kernel. \n",
"\n",
"Run a code cell using `Shift-Enter` or pressing the <button class='btn btn-default btn-xs'><i class=\"icon-play fa fa-play\"></i></button> button in the toolbar above. Once the cell is run (see below how), the corresponding output, if any, apperas below the cell."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1.0, 4.0, 3.14]\n"
]
}
],
"source": [
"# This is a code cell. It runs code :-)\n",
"a = [1., 4., 3.14]\n",
"print (a)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"3.141592653589793\n",
"1.0\n"
]
}
],
"source": [
"# And another code cell\n",
"import math\n",
"print (math.pi)\n",
"print (math.sin(math.pi/2.))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Running cells"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The keyboard shortcuts for running a cell, both in edit and command mode, are:\n",
"\n",
"* `Shift-Enter` runs the current cell and moves to the one below.\n",
"* `Alt-Enter` runs the current cell and inserts a new one below.\n",
"* `Ctrl-Enter` run the current cell and enters command mode in current cell.\n",
"\n",
"<div class=\"alert alert-success\">\n",
"Press `h` anytime in command mode for a keyboard shotcut list.\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Tab completion & help (edit mode)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Tab completion**, especially for attributes, is a convenient way to explore the structure of any object you’re dealing with. Simply type in a code cell `object_name.<TAB>` to view the object’s attributes. Besides Python objects and keywords, tab completion also works on file and directory names.\n",
"\n",
"For getting an object **help**, type `object_name.<SHIFT+TAB>` and a tooltip with the object short help will open. Pressing `<TAB>` twice (`<SHIFT+TAB+TAB>`) the full object help will open. Doing it four times and the full object help will go into a new frame."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Summarizing\n",
"\n",
"\n",
"* An Jupyter **notebook** is composed of **cells**.\n",
"\n",
"* The **cells** are edited by us and then executed by the **kernel**.\n",
"\n",
"* Cells can be **Markdown** (text cells accepting Markdown and LaTeX syntax), and **code** cells (for executing code).\n",
"\n",
"* We have a **modal** interface with **command** (for the whole notebook, press `ESC`) and **edit** (for a cell, `ENTER`) modes.\n",
"\n",
"* Use tab completion (`object_name.<TAB>`) and inline help (`object_name.<SHIFT+TAB>`) extensively.\n",
"\n",
"* `H` for keyboard shotcut reference (`ESC` to exit).\n",
"\n",
"Typically, you will work on a computational problem in pieces, organizing related ideas into cells and moving forward once previous parts work correctly. \n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## References \n",
"\n",
"* This tutorial was essentially based in [IPython's notebook-based documentation](http://nbviewer.ipython.org/github/ipython/ipython/blob/3.x/examples/Index.ipynb). Take a look at it for a more extensive introduction to IPython.\n",
"\n",
"* Official [Jupyter notebook begginer guide](http://jupyter-notebook-beginner-guide.readthedocs.org/en/latest/index.html#).\n",
"\n",
"* Official [Jupyter user manual](https://jupyter.readthedocs.io/en/latest/index.html)\n",
"\n",
"* [A gallery of interesting IPython Notebooks](https://github.com/ipython/ipython/wiki/A-gallery-of-interesting-IPython-Notebooks).\n",
"\n",
"* [IPython project page](http://ipython.org/)\n",
"\n",
"* [Jupyter project page](http://jupyter.org/)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Errors and Exceptions\n",
"\n",
"Two main questions to be answered\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li>How Python report errors?\n",
"\n",
"<li>How I can handle errors in Python programs?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Every programmer makes Errors\n",
"\n",
"Errors in Python have a very specific form called <b>\"traceback\"</b>. Traceback are made of levels wich are marked with special symbol <b>--></b>"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"ename": "IndexError",
"evalue": "list index out of range",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mIndexError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-1-c34fcf537534>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 9\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mice_creams\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 10\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 11\u001b[1;33m \u001b[0mfavorite_ice_cream\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;32m<ipython-input-1-c34fcf537534>\u001b[0m in \u001b[0;36mfavorite_ice_cream\u001b[1;34m()\u001b[0m\n\u001b[0;32m 7\u001b[0m \u001b[1;34m\"strawberry\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 8\u001b[0m ]\n\u001b[1;32m----> 9\u001b[1;33m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mice_creams\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 10\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 11\u001b[0m \u001b[0mfavorite_ice_cream\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mIndexError\u001b[0m: list index out of range"
]
}
],
"source": [
"# This code has an intentional error. You can type it directly or\n",
"# use it for reference to understand the error message below.\n",
"def favorite_ice_cream():\n",
" ice_creams = [\n",
" \"chocolate\",\n",
" \"vanilla\",\n",
" \"strawberry\"\n",
" ]\n",
" print(ice_creams[3])\n",
"\n",
"favorite_ice_cream()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Traceback with two levels. Are read from bottom to top:\n",
"<li> 1) Last level is the line with the error actually is\n",
"\n",
"<li> 2) Upper level(s) show what function was executed to get the next level down"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Tracebacks could be very long but important info is usually at the bottom"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Error categories"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"All errors at the end of a traceback, are usually in the form:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<code>Category: Some more info</code>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Where Categories are:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Syntax Errors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You forget a colon, add too many spaces, forget a parenthesis etc... Makes Python not to know how to read your program. That gives you:\n",
"<code>SyntaxError</code>"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"ename": "SyntaxError",
"evalue": "invalid syntax (<ipython-input-2-dbf32ad5d3e8>, line 1)",
"output_type": "error",
"traceback": [
"\u001b[1;36m File \u001b[1;32m\"<ipython-input-2-dbf32ad5d3e8>\"\u001b[1;36m, line \u001b[1;32m1\u001b[0m\n\u001b[1;33m def some_function()\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
]
}
],
"source": [
"def some_function()\n",
" msg = \"hello, world!\"\n",
" print(msg)\n",
" return msg"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"ename": "IndentationError",
"evalue": "unexpected indent (<ipython-input-3-e169556d667b>, line 4)",
"output_type": "error",
"traceback": [
"\u001b[1;36m File \u001b[1;32m\"<ipython-input-3-e169556d667b>\"\u001b[1;36m, line \u001b[1;32m4\u001b[0m\n\u001b[1;33m return msg\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mIndentationError\u001b[0m\u001b[1;31m:\u001b[0m unexpected indent\n"
]
}
],
"source": [
"def some_function():\n",
" msg = \"hello, world!\"\n",
" print(msg)\n",
" return msg"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li>Remember: Both SyntaxError and IntentationError indicate a problem with the syntax of the program"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Variable Name Errors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Difficult to state a general case but common mistakes are:\n",
"<li> You meant to use a string but forgot quotes\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'hello' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-1-43a14fcd4265>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mhello\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;31mNameError\u001b[0m: name 'hello' is not defined"
]
}
],
"source": [
"print(hello)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li> You forgot to create a variable before using it\n"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'count' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-6-3cc942c225b7>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mnumber\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[0mcount\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcount\u001b[0m \u001b[1;33m+\u001b[0m \u001b[0mnumber\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 3\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"The count is:\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcount\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mNameError\u001b[0m: name 'count' is not defined"
]
}
],
"source": [
"for number in range(10):\n",
" count = count + number\n",
"print(\"The count is:\", count)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li> There is a typo in a variable name (maybe because Python's Case Sensitivity)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'count' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-7-79d2bb4fcc22>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[0mCount\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;36m0\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mnumber\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mcount\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcount\u001b[0m \u001b[1;33m+\u001b[0m \u001b[0mnumber\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"The count is:\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcount\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mNameError\u001b[0m: name 'count' is not defined"
]
}
],
"source": [
"Count = 0\n",
"for number in range(10):\n",
" count = count + number\n",
"print(\"The count is:\", count)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### IndexErrors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Typically you try to access something out of bounds:"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Letter #1 is a\n",
"Letter #2 is b\n",
"Letter #3 is c\n"
]
},
{
"ename": "IndexError",
"evalue": "list index out of range",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mIndexError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-9-656a22fa6ec5>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"Letter #2 is\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mletters\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"Letter #3 is\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mletters\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 5\u001b[1;33m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"Letter #4 is\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mletters\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;31mIndexError\u001b[0m: list index out of range"
]
}
],
"source": [
"letters = ['a', 'b', 'c']\n",
"print(\"Letter #1 is\", letters[0])\n",
"print(\"Letter #2 is\", letters[1])\n",
"print(\"Letter #3 is\", letters[2])\n",
"print(\"Letter #4 is\", letters[3])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### File Errors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Typically two:\n",
"<li> Trying to access a file that does not exist:"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"ename": "FileNotFoundError",
"evalue": "[Errno 2] No such file or directory: 'myfile.txt'",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mFileNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-10-f6e1ac4aee96>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mfile_handle\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mopen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'myfile.txt'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'r'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: 'myfile.txt'"
]
}
],
"source": [
"file_handle = open('myfile.txt', 'r')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li> You try to read(write) a write-only(read-only) file:"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"ename": "UnsupportedOperation",
"evalue": "not readable",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mUnsupportedOperation\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-12-02e2f546ed29>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[0mfile_handle\u001b[0m\u001b[1;33m=\u001b[0m \u001b[0mopen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'myfile.txt'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'w'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[0mfile_handle\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mread\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;31mUnsupportedOperation\u001b[0m: not readable"
]
}
],
"source": [
"file_handle= open('myfile.txt', 'w')\n",
"file_handle.read()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercises\n",
"\n",
"### Reading Error Messages "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Read the python code and the resulting traceback below, and answer the following questions:\n",
"\n",
"* How many levels does the traceback have? **3 levels**\n",
"* What is the function name where the error occurred? **print_message**\n",
"* On which line number in this function did the error occurr? **11**\n",
"* What is the type of error? **Keyerror**\n",
"* What is the error message? **'Friday'**"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```\n",
"# This code has an intentional error. Do not type it directly;\n",
"# use it for reference to understand the error message below.\n",
"def print_message(day):\n",
" messages = {\n",
" \"monday\": \"Hello, world!\",\n",
" \"tuesday\": \"Today is tuesday!\",\n",
" \"wednesday\": \"It is the middle of the week.\",\n",
" \"thursday\": \"Today is Donnerstag in German!\",\n",
" \"friday\": \"Last day of the week!\",\n",
" \"saturday\": \"Hooray for the weekend!\",\n",
" \"sunday\": \"Aw, the weekend is almost over.\"\n",
" }\n",
" print(messages[day])\n",
"\n",
"def print_friday_message():\n",
" print_message(\"Friday\")\n",
"\n",
"print_friday_message()\n",
"---------------------------------------------------------------------------\n",
"KeyError Traceback (most recent call last)\n",
"<ipython-input-1-4be1945adbe2> in <module>()\n",
" 14 print_message(\"Friday\")\n",
" 15\n",
"---> 16 print_friday_message()\n",
"\n",
"<ipython-input-1-4be1945adbe2> in print_friday_message()\n",
" 12\n",
" 13 def print_friday_message():\n",
"---> 14 print_message(\"Friday\")\n",
" 15\n",
" 16 print_friday_message()\n",
"\n",
"<ipython-input-1-4be1945adbe2> in print_message(day)\n",
" 9 \"sunday\": \"Aw, the weekend is almost over.\"\n",
" 10 }\n",
"---> 11 print(messages[day])\n",
" 12\n",
" 13 def print_friday_message():\n",
"\n",
"KeyError: 'Friday'```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Identifying Syntax Errors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Read the code below, and (without running it) try to identify what the errors are.\n",
"\n",
"Run the code, and read the error message. Is it a SyntaxError or an IndentationError?\n",
"Fix the error.\n",
"Repeat steps 2 and 3, until you have fixed all the errors.\n",
"```\n",
"def another_function # Falta ():\n",
" print(\"Syntax errors are annoying.\")\n",
" print(\"But at least python tells us about them!\") # Mala indentación\n",
" print(\"So they are usually not too hard to fix.\")```"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Syntax errors are annoying.\n",
"But at least python tells us about them!\n",
"So they are usually not too hard to fix.\n"
]
}
],
"source": [
"def another_function():\n",
" print(\"Syntax errors are annoying.\")\n",
" print(\"But at least python tells us about them!\")\n",
" print(\"So they are usually not too hard to fix.\")\n",
"another_function()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Errors and Exceptions\n",
"\n",
"Two main questions to be answered\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li>How Python report errors?\n",
"\n",
"<li>How I can handle errors in Python programs?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Every programmer makes Errors\n",
"\n",
"Errors in Python have a very specific form called <b>\"traceback\"</b>. Traceback are made of levels wich are marked with special symbol <b>--></b>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# This code has an intentional error. You can type it directly or\n",
"# use it for reference to understand the error message below.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Traceback with two levels. Are read from bottom to top:\n",
"<li> 1) Last level is the line with the error actually is\n",
"\n",
"<li> 2) Upper level(s) show what function was executed to get the next level down"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Tracebacks could be very long but important info is usually at the bottom"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Error categories"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"All errors at the end of a traceback, are usually in the form:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<code>Category: Some more info</code>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Where Categories are:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Syntax Errors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You forget a colon, add too many spaces, forget a parenthesis etc... Makes Python not to know how to read your program. That gives you:\n",
"<code>SyntaxError</code>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li>Remember: Both SyntaxError and IntentationError indicate a problem with the syntax of the program"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Variable Name Errors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Difficult to state a general case but common mistakes are:\n",
"<li> You meant to use a string but forgot quotes\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li> You forgot to create a variable before using it\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li> There is a typo in a variable name (maybe because Python's Case Sensitivity)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### IndexErrors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Typically you try to access something out of bounds:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### File Errors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Typically two:\n",
"<li> Trying to access a file that does not exist:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<li> You try to read(write) a write-only(read-only) file:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercises\n",
"\n",
"### Reading Error Messages "
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"Read the python code and the resulting traceback below, and answer the following questions:\n",
"\n",
"How many levels does the traceback have?\n",
"What is the function name where the error occurred?\n",
"On which line number in this function did the error occurr?\n",
"What is the type of error?\n",
"What is the error message?\n",
"How to fix it?\n",
"\n",
"# This code has an intentional error. Do not type it directly;\n",
"# use it for reference to understand the error message below.\n",
"def print_message(day):\n",
" messages = {\n",
" \"monday\": \"Hello, world!\",\n",
" \"tuesday\": \"Today is tuesday!\",\n",
" \"wednesday\": \"It is the middle of the week.\",\n",
" \"thursday\": \"Today is Donnerstag in German!\",\n",
" \"friday\": \"Last day of the week!\",\n",
" \"saturday\": \"Hooray for the weekend!\",\n",
" \"sunday\": \"Aw, the weekend is almost over.\"\n",
" }\n",
" print(messages[day])\n",
"\n",
"def print_friday_message():\n",
" print_message(\"Friday\")\n",
"\n",
"print_friday_message()\n",
"---------------------------------------------------------------------------\n",
"KeyError Traceback (most recent call last)\n",
"<ipython-input-1-4be1945adbe2> in <module>()\n",
" 14 print_message(\"Friday\")\n",
" 15\n",
"---> 16 print_friday_message()\n",
"\n",
"<ipython-input-1-4be1945adbe2> in print_friday_message()\n",
" 12\n",
" 13 def print_friday_message():\n",
"---> 14 print_message(\"Friday\")\n",
" 15\n",
" 16 print_friday_message()\n",
"\n",
"<ipython-input-1-4be1945adbe2> in print_message(day)\n",
" 9 \"sunday\": \"Aw, the weekend is almost over.\"\n",
" 10 }\n",
"---> 11 print(messages[day])\n",
" 12\n",
" 13 def print_friday_message():\n",
"\n",
"KeyError: 'Friday'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Identifying Syntax Errors"
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"Read the code below, and (without running it) try to identify what the errors are.\n",
"Run the code, and read the error message. Is it a SyntaxError or an IndentationError?\n",
"Fix the error.\n",
"Repeat steps 2 and 3, until you have fixed all the errors.\n",
"\n",
"def another_function \n",
" print(\"Syntax errors are annoying.\")\n",
" print(\"But at least python tells us about them!\")\n",
" print(\"So they are usually not too hard to fix.\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Part1: Patient data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
" ## 1. Check Your Understanding\n",
"\n",
" Draw diagrams showing what variables refer to what values after each statement in the following program:\n",
"\n",
" mass = 47.5\n",
" age = 122\n",
" mass = mass * 2.0\n",
" age = age - 20\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 2. Sorting Out References\n",
"\n",
"What does the following program print out?\n",
"```python\n",
"first, second = 'Grace', 'Hopper'\n",
"third, fourth = second, first\n",
"print(third, fourth)\n",
"```\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 3. Slicing Strings\n",
"\n",
"A section of an array is called a slice. We can take slices of character strings as well:\n",
"```python\n",
"element = 'oxygen'\n",
"print('first three characters:', element[0:3])\n",
"print('last three characters:', element[3:6])\n",
"\n",
"first three characters: oxy\n",
"last three characters: gen\n",
"```\n",
"What is the value of element[:4]? What about element[4:]? Or element[:]?\n",
"\n",
"What is element[-1]? What is element[-2]?\n",
"\n",
"Given those answers, explain what element[1:-1] does."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 4.Thin Slices\n",
"\n",
"The expression element[3:3] produces an empty string, i.e., a string that contains no characters. If data holds our array of patient data, what does data[3:3, 4:4] produce? What about data[3:3, :]?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 5. Make Your Own Plot\n",
"\n",
"Create a plot showing the standard deviation (numpy.std) of the inflammation data for each day across all patients."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 6. Moving Plots Around\n",
"\n",
"Modify the program to display the three plots on top of one another instead of side by side."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 7. Stacking Arrays\n",
"\n",
"Arrays can be concatenated and stacked on top of one another, using NumPy’s vstack and hstack functions for vertical and horizontal stacking, respectively.\n",
"```python\n",
"import numpy\n",
"\n",
"A = numpy.array([[1,2,3], [4,5,6], [7, 8, 9]])\n",
"print('A = ')\n",
"print(A)\n",
"\n",
"B = numpy.hstack([A, A])\n",
"print('B = ')\n",
"print(B)\n",
"\n",
"C = numpy.vstack([A, A])\n",
"print('C = ')\n",
"print(C)\n",
"```\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The output is:\n",
"\n",
"```python\n",
"A =\n",
"[[1 2 3]\n",
" [4 5 6]\n",
" [7 8 9]]\n",
"B =\n",
"[[1 2 3 1 2 3]\n",
" [4 5 6 4 5 6]\n",
" [7 8 9 7 8 9]]\n",
"C =\n",
"[[1 2 3]\n",
" [4 5 6]\n",
" [7 8 9]\n",
" [1 2 3]\n",
" [4 5 6]\n",
" [7 8 9]]\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Write some additional code that slices the first and last columns of A, and stacks them into a 3x2 array. Make sure to print the results to verify your solution."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 7. Change In Inflammation\n",
"\n",
"This patient data is longitudinal in the sense that each row represents a series of observations relating to one individual. This means that the change in inflammation over time is a meaningful concept.\n",
"\n",
"The numpy.diff() function takes a NumPy array and returns the differences between two successive values along a specified axis. For example, a NumPy array that looks like this:\n",
"\n",
"```python\n",
" npdiff = numpy.array([ 0, 2, 5, 9, 14])\n",
"\n",
" Calling numpy.diff(npdiff) would do the following calculations and put the answers in another array.\n",
"\n",
" [ 2 - 0, 5 - 2, 9 - 5, 14 - 9 ]\n",
"\n",
" numpy.diff(npdiff)\n",
"\n",
" array([2, 3, 4, 5])\n",
"```\n",
"Which axis would it make sense to use this function along?\n",
"\n",
"If the shape of an individual data file is (60, 40) (60 rows and 40 columns), what would the shape of the array be after you run the diff() function and why?\n",
"\n",
"How would you find the largest change in inflammation for each patient? Does it matter if the change in inflammation is an increase or a decrease?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Part2: Loops"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 8. From 1 to N\n",
"\n",
"Python has a built-in function called range that creates a sequence of numbers. range can accept 1, 2, or 3 parameters.\n",
"\n",
"If one parameter is given, range creates an array of that length, starting at zero and incrementing by 1. For example, range(3) produces the numbers 0, 1, 2.\n",
"If two parameters are given, range starts at the first and ends just before the second, incrementing by one. For example, range(2, 5) produces 2, 3, 4.\n",
"If range is given 3 parameters, it starts at the first one, ends just before the second one, and increments by the third one. For exmaple range(3, 10, 2) produces 3, 5, 7, 9.\n",
"\n",
"Using range, write a loop that uses range to print the first 3 natural numbers."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 9. Computing Powers With Loops\n",
"\n",
"Exponentiation is built into Python:\n",
"```python\n",
"print(5 ** 3)\n",
"\n",
"125\n",
"```\n",
"Write a loop that calculates the same result as 5 ** 3 using multiplication (and without exponentiation)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 10. Reverse a String\n",
"\n",
"Knowing that two strings can be concatenated using the + operator, write a loop that takes a string and produces a new string with the characters in reverse order, so 'Newton' becomes 'notweN'."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Part3: Lists"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 11. Turn a String Into a List\n",
"\n",
"Use a for-loop to convert the string “hello” into a list of letters:\n",
"\n",
"[\"h\", \"e\", \"l\", \"l\", \"o\"]\n",
"\n",
"Hint: You can create an empty list like this:\n",
"\n",
"my_list = []\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 12. Slicing From the End\n",
"\n",
"Use slicing to access only the last four characters of a string or entries of a list.\n",
"```python\n",
"string_for_slicing = \"Observation date: 02-Feb-2013\"\n",
"list_for_slicing = [[\"fluorine\", \"F\"], [\"chlorine\", \"Cl\"], [\"bromine\", \"Br\"], [\"iodine\", \"I\"], [\"astatine\", \"At\"]]\n",
"\n",
"\"2013\"\n",
"[[\"chlorine\", \"Cl\"], [\"bromine\", \"Br\"], [\"iodine\", \"I\"], [\"astatine\", \"At\"]]\n",
"```\n",
"Would your solution work regardless of whether you knew beforehand the length of the string or list (e.g. if you wanted to apply the solution to a set of lists of different lengths)? If not, try to change your approach to make it more robust."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 13. Non-Continuous Slices\n",
"\n",
"So far we’ve seen how to use slicing to take single blocks of successive entries from a sequence. But what if we want to take a subset of entries that aren’t next to each other in the sequence?\n",
"\n",
"You can achieve this by providing a third argument to the range within the brackets, called the step size. The example below shows how you can take every third entry in a list:\n",
"```python\n",
"primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]\n",
"subset = primes[0:12:3]\n",
"print(\"subset\", subset)\n",
"\n",
"subset [2, 7, 17, 29]\n",
"```\n",
"Notice that the slice taken begins with the first entry in the range, followed by entries taken at equally-spaced intervals (the steps) thereafter. If you wanted to begin the subset with the third entry, you would need to specify that as the starting point of the sliced range:\n",
"```python\n",
"primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]\n",
"subset = primes[2:12:3]\n",
"print(\"subset\", subset)\n",
"\n",
"subset [5, 13, 23, 37]\n",
"```\n",
"Use the step size argument to create a new string that contains only every other character in the string “In an octopus’s garden in the shade”\n",
"```python\n",
"beatles = \"In an octopus's garden in the shade\"\n",
"\n",
"I notpssgre ntesae\n",
"```\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 14. Overloading\n",
"\n",
"'+' usually means addition, but when used on strings or lists, it means “concatenate”. Given that, what do you think the multiplication operator * does on lists? In particular, what will be the output of the following code?\n",
"```python\n",
"counts = [2, 4, 6, 8, 10]\n",
"repeats = counts * 2\n",
"print(repeats)\n",
"```\n",
"Possible answers:\n",
"```python\n",
" [2, 4, 6, 8, 10, 2, 4, 6, 8, 10]\n",
" [4, 8, 12, 16, 20]\n",
" [[2, 4, 6, 8, 10],[2, 4, 6, 8, 10]]\n",
" [2, 4, 6, 8, 10, 4, 8, 12, 16, 20]\n",
"```\n",
"The technical term for this is operator overloading: a single operator, like + or *, can do different things depending on what it’s applied to."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Part4: Multiple Files"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 15. Generate Composite Statistics\n",
"\n",
"Use each of the files once to generate a dataset containing values averaged over all patients. This is the structure you should be using:\n",
"```python\n",
"filenames = glob.glob('inflammation*.csv')\n",
"composite_data = numpy.zeros((60,40))\n",
"for f in filenames:\n",
" # sum each new file's data into composite_data as it's read\n",
" #\n",
"# and then divide the composite_data by number of samples\n",
"composite_data /= len(filenames)\n",
"```\n",
"Then use pyplot to generate average, max, and min for all patients."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Part5: Conditionals"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 16. How Many Paths?\n",
"\n",
"Consider this code:\n",
"```python\n",
"if 4 > 5:\n",
" print('A')\n",
"elif 4 == 5:\n",
" print('B')\n",
"elif 4 < 5:\n",
" print('C')\n",
"```\n",
"Which of the following would be printed if you were to run this code? Why did you pick this answer?\n",
"\n",
" A\n",
" B\n",
" C\n",
" B and C\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 17. What Is Truth?\n",
"\n",
"True and False booleans are not the only values in Python that are true and false. In fact, any value can be used in an if or elif. After reading and running the code below, explain what the rule is for which values are considered true and which are considered false.\n",
"```python\n",
" if '':\n",
" print('empty string is true')\n",
" if 'word':\n",
" print('word is true')\n",
" if []:\n",
" print('empty list is true')\n",
" if [1, 2, 3]:\n",
" print('non-empty list is true')\n",
" if 0:\n",
" print('zero is true')\n",
" if 1:\n",
" print('one is true')\n",
"```\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 18. That’s Not Not What I Meant\n",
"\n",
"Sometimes it is useful to check whether some condition is not true. The Boolean operator not can do this explicitly. After reading and running the code below, write some if statements that use not to test the rule that you formulated in the previous challenge.\n",
"```python\n",
" if not '':\n",
" print('empty string is not true')\n",
" if not 'word':\n",
" print('word is not true')\n",
" if not not True:\n",
" print('not not True is true')\n",
"```\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 19. Close Enough\n",
"\n",
"Write some conditions that print True if the variable a is within 10% of the variable b and False otherwise. Compare your implementation with your partner’s: do you get the same answer for all possible pairs of numbers?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 20. In-Place Operators\n",
"\n",
"Python (and most other languages in the C family) provides in-place operators that work like this:\n",
"```python\n",
"x = 1 # original value\n",
"x += 1 # add one to x, assigning result back to x\n",
"x *= 3 # multiply x by 3\n",
"print(x)\n",
"```\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 21. Counting Vowels\n",
"\n",
"Write a loop that counts the number of vowels in a character string.\n",
"Test it on a few individual words and full sentences.\n",
"Once you are done, compare your solution to your neighbor’s. Did you make the same decisions about how to handle the letter ‘y’ (which some people think is a vowel, and some do not)?\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Analyzing Patient Data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We are studying inflammation in patients who have been given a new treatment for arthritis, and need to analyze the first dozen data sets of their daily inflammation. The data sets are stored in comma-separated values (CSV) format: each row holds information for a single patient, and the columns represent successive days"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We want to:\n",
"\n",
" * load that data into memory,\n",
" * calculate the average inflammation per day across all patients, and\n",
" * plot the result.\n",
"\n",
"To do all that, we’ll have to learn a little bit about programming."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Python as a calculator\n",
"\n",
"Any Python interpreter can be used as a calculator:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Here you have an overview of math operators:\n",
"\n",
"| Operators | Operations | Examples |\n",
"| :--------:| :---------------- | ---------- |\n",
"| + | Addition | 2 + 3 = 5 |\n",
"| - | Substraction | 3 - 2 = 1 |\n",
"| * | Multiplication | 2 * 3 = 6 |\n",
"| / | Division | 3 / 2 = 1.5|\n",
"| // | Integer division | 7 // 3 = 2 |\n",
"| % | remainder division| 7 % 2 = 1 |\n",
"| ** | Exponent | 2**3 = 8 |"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Variables"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This only outputs a value. To use values in any manner, we have to access them in memory by using a variable.\n",
"\n",
"In Python, variable names:\n",
"\n",
"* can include letters, digits, and underscores\n",
"* cannot start with a digit\n",
"* are case sensitive.\n",
"\n",
"\n",
"Let's assign a value 55 to variable named ``weight_kg``:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
" "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We use ``print`` to output the value of a variable. Is a built-in function:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can do some arithmetics with variables:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What the ...?? why is not simply giving 121.0??? <br>\n",
"\n",
"Well it looks 121 enought to me.... Ok let's continue. \n",
"\n",
"We can change the value of a variable by re-assigning it:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Variables as sticky notes with the name put in a particular value.<br>\n",
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-sticky-note-variables-01.svg\">\n",
"\n",
"We can create new variables from others:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-sticky-note-variables-02.svg\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What happens to ``weight_lb`` if you change ``weight_kg``?:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-sticky-note-variables-03.svg\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<br>\n",
"Command <code>%whos</code> shows memory stored variables defined along the notebook:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"What does the following program print out?\n",
"\n",
"<code>\n",
"first, second = 'Grace', 'Hopper'\n",
"third, fourth = second, first\n",
"print(third, fourth)\n",
"<code/>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Using libraries (modules)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First, we will load a library. Let's import Numpy. Numpy is important for fancy number manipulations:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Libraries provide additional functionality to the basic Python package. Importing too many libraries can sometimes complicate and slow down your programs - so we only import what we need for each program.\n",
"\n",
"Now we read the first file where patient data are stored. \n",
"\n",
"We will use functions which belong to a certain library and perform \"something\" for us. In this case we want to load a data file"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The expression ``numpy.loadtxt(...)`` is a function call that asks Python to run the function loadtxt which belongs to the numpy library. This dotted notation is used everywhere in Python: the thing that appears before the dot contains the thing that appears after."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"``numpy.loadtxt`` has two parameters: the name of the file we want to read, and the delimiter that separates values on a line. These both need to be character strings (or strings for short), so we put them in quotes."
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"We did not assign the output of the function to any variable, so the notebook just dumped the ouptut to an ``Out[]`` cell. But, just the same way we asigned values to a variable, we can assing the array of values to an variable using the same syntax:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"No output here, as we just assigned, as we did before with ``weight_kg``. To print out the variable value:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's check what type of \"thing\" ``data`` variable refers to:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"When we create a variable, <strong>we also create information about it</strong>, as the attribute shape! That's very important!!\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"So we have 60 rows and 40 columns in ``data`` variable."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In order to get a single number from the array we provide an index in square brackets, just as we do in maths"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"Selecting intervals of data by using ranges : . <strong>Caution here!:</strong>ranges seem closed but they are [) "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This is how index is assigned by python:\n",
"<img width=\"700px\" src=\"http://swcarpentry.github.io/python-novice-inflammation/fig/python-zero-index.png\">\n",
"<br>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"There is no need to include upper and lower bounds:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"what does ``data[3:3, 4:4]`` produce? \n",
"What about ``data[3:3, :]``?\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Some array math\n",
"Basic arithmetics: The operation is performed in <strong>every element</strong> of the array"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Array to Array operations: The operation is made on <strong>each corresponding element</strong> of the arrays:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"More complex operations:\n",
"<br>The following is a method. Method are actions that can be made on the variable, Python knows how to!. <strong> The actions available depend on the variable type</strong>:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"panel panel-info\">\n",
"<div class=\"panel-heading\">\n",
"<h3 class=\"panel-title\">\n",
"Reminder: method vs attribute\n",
"</h3>\n",
"</div>\n",
"<div class=\"panel-body\">\n",
"<ul>\n",
"<li> attributes are descriptions of variable properties\n",
"<li> methods are actions that Python knows to perform on the variable\n",
"</ul>\n",
"</div>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Several important methods for numpy variables:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sometimes is useful to make some partial statistics. For instance max inflammation for first patient of all days: "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Oh wait... maybe I am creating to many variables... let's check:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sometimes we can avoid the use of some variables:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What if we need max inflammation for all patients at once?. Operations along all columns or rows at once:<br>\n",
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-operations-across-axes.png\">\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Then the calculation for the average inflammation over all patients per day is:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"A quick check that the array is ok:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Or if preferred, the average inflammation over all days per patient:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Data visualization"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Ploting is great for insight! Matplotlib is <em>the facto</em> standar. Some basics:\n",
"<br>\n",
"Just pick the pyplot library of Matplotlib:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"panel panel-info\">\n",
"<div class=\"panel-heading\">\n",
"<h3 class=\"panel-title\">\n",
"IPython Magic!\n",
"</h3>\n",
"</div>\n",
"<div class=\"panel-body\">\n",
"The % indicates an IPython magic function - a funciton that is valid only within the notebook environment.\n",
"</div>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's plot data array (the average inflammation per day):"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Average inflammation over time. Linear plot:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This plot does not correspond with the expected. The model predices a smooth sharper rise and a slower after fall. Let's have a look to the other statistics:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"None of them seems very likely to fit the model. <strong> Something could be wrong with the data</strong>\n",
"<br>\n",
"<br>\n",
"We can further improve the visualization by grouping plots in a multiplot:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Additional Exercises \n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Slicing strings"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What is the value of element[:4]? What about element[4:]? Or element[:]?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What is element[-1]? What is element[-2]?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Given those answers, explain what element[1:-1] does."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Analyzing Patient Data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We are studying inflammation in patients who have been given a new treatment for arthritis, and need to analyze the first dozen data sets of their daily inflammation. The data sets are stored in comma-separated values (CSV) format: each row holds information for a single patient, and the columns represent successive days"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We want to:\n",
"\n",
" * load that data into memory,\n",
" * calculate the average inflammation per day across all patients, and\n",
" * plot the result.\n",
"\n",
"To do all that, we’ll have to learn a little bit about programming."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Python as a calculator\n",
"\n",
"Any Python interpreter can be used as a calculator:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"23"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"3 + 5 * 4"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Here you have an overview of math operators:\n",
"\n",
"| Operators | Operations | Examples |\n",
"| :--------:| :---------------- | ---------- |\n",
"| + | Addition | 2 + 3 = 5 |\n",
"| - | Substraction | 3 - 2 = 1 |\n",
"| * | Multiplication | 2 * 3 = 6 |\n",
"| / | Division | 3 / 2 = 1.5|\n",
"| // | Integer division | 7 // 3 = 2 |\n",
"| % | remainder division| 7 % 2 = 1 |\n",
"| ** | Exponent | 2**3 = 8 |"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Variables"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This only outputs a value. To use values in any manner, we have to access them in memory by using a variable.\n",
"\n",
"In Python, variable names:\n",
"\n",
"* can include letters, digits, and underscores\n",
"* cannot start with a digit\n",
"* are case sensitive.\n",
"\n",
"Let's assign a value 55 to variable named ``weight_kg``:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"weight_kg = 55 # we assign the value 55 to the variable weight_kg using ="
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We use ``print`` to output the value of a variable. Is a built-in function:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"55\n"
]
}
],
"source": [
"print(weight_kg) "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can do some arithmetics with variables:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Weight in pounds: 121.00000000000001\n"
]
}
],
"source": [
"print(\"Weight in pounds: \", 2.2 * weight_kg) # Don't forget to explain about printing\n",
" # types, strings and comma separation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What the ...?? why is not simply giving 121.0??? <br>\n",
"(<strong>Pro tip:</strong> <em>Because 2.2 is a number with no exact float representation, so it multiplies by the closest number with a float representation. That produces a 1 at the last decimal position so Python realices that there is something non-zero at the end and plots it.</em>)<br><br>\n",
"Well it looks 121 enought to me.... Ok let's continue. \n",
"\n",
"We can change the value of a variable by re-assigning it:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Weight in kilograms is now: 57.5\n"
]
}
],
"source": [
"weight_kg = 57.5\n",
"print('Weight in kilograms is now:', weight_kg)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Variables as sticky notes with the name put in a particular value.<br>\n",
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-sticky-note-variables-01.svg\">\n",
"\n",
"We can create new variables from others:"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"weight in kilograms: 57.5 and in pounds: 126.50000000000001\n"
]
}
],
"source": [
"weight_lb = 2.2 * weight_kg\n",
"\n",
"print( 'weight in kilograms: ', weight_kg, 'and in pounds: ', weight_lb) #concatenating complex expressions"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-sticky-note-variables-02.svg\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What happens to ``weight_lb`` if you change ``weight_kg``?:"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"weight in kilograms: 100 and in pounds: 126.50\n"
]
}
],
"source": [
"weight_kg = 100 # we change the sticky note of weight to 100 \n",
"print( 'weight in kilograms: ', weight_kg, 'and in pounds: %.2f' %weight_lb) #Do it as an exercise"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-sticky-note-variables-03.svg\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<br>\n",
"Command <code>%whos</code> shows memory stored variables defined along the notebook:"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Variable Type Data/Info\n",
"------------------------------\n",
"weight_kg int 100\n",
"weight_lb float 126.50000000000001\n"
]
}
],
"source": [
"%whos"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"What does the following program print out?\n",
"\n",
"<code>\n",
"first, second = 'Grace', 'Hopper'\n",
"third, fourth = second, first\n",
"print(third, fourth)\n",
"<code/>"
]
},
{
"cell_type": "code",
"execution_count": 53,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Hopper Grace\n"
]
}
],
"source": [
"first, second = 'Grace', 'Hopper'\n",
"third, fourth = second, first\n",
"print(third, fourth)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Using libraries (modules)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First, we will load a library. Let's import Numpy. Numpy is important for fancy number manipulations:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import numpy"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Libraries provide additional functionality to the basic Python package. Importing too many libraries can sometimes complicate and slow down your programs - so we only import what we need for each program.\n",
"\n",
"Now we read the first file where patient data are stored. \n",
"\n",
"We will use functions which belong to a certain library and perform \"something\" for us. In this case we want to load a data file"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"array([[ 0., 0., 1., ..., 3., 0., 0.],\n",
" [ 0., 1., 2., ..., 1., 0., 1.],\n",
" [ 0., 1., 1., ..., 2., 1., 1.],\n",
" ..., \n",
" [ 0., 1., 1., ..., 1., 1., 1.],\n",
" [ 0., 0., 0., ..., 0., 2., 0.],\n",
" [ 0., 0., 1., ..., 1., 1., 0.]])"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"numpy.loadtxt(fname=\"inflammation-01.csv\", delimiter=\",\") #Explain what is a function call\n",
" # and what are parameters briefly\n",
"# Do not forget to explain why the elipsis below "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The expression ``numpy.loadtxt(...)`` is a function call that asks Python to run the function loadtxt which belongs to the numpy library. This dotted notation is used everywhere in Python: the thing that appears before the dot contains the thing that appears after."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"``numpy.loadtxt`` has two parameters: the name of the file we want to read, and the delimiter that separates values on a line. These both need to be character strings (or strings for short), so we put them in quotes."
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"We did not assign the output of the function to any variable, so the notebook just dumped the ouptut to an ``Out[]`` cell. But, just the same way we asigned values to a variable, we can assing the array of values to an variable using the same syntax:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"data = numpy.loadtxt(fname='inflammation-01.csv', delimiter=',') "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"No output here, as we just assigned, as we did before with ``weight_kg``. To print out the variable value:"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[ 0. 0. 1. ..., 3. 0. 0.]\n",
" [ 0. 1. 2. ..., 1. 0. 1.]\n",
" [ 0. 1. 1. ..., 2. 1. 1.]\n",
" ..., \n",
" [ 0. 1. 1. ..., 1. 1. 1.]\n",
" [ 0. 0. 0. ..., 0. 2. 0.]\n",
" [ 0. 0. 1. ..., 1. 1. 0.]]\n"
]
}
],
"source": [
"print(data)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's check what type of \"thing\" ``data`` variable refers to:"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'numpy.ndarray'>\n"
]
}
],
"source": [
"print(type(data)) #You should explain numpy arrays at this point"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"When we create a variable, <strong>we also create information about it</strong>, as the attribute shape! That's very important!!\n"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(60, 40)\n"
]
}
],
"source": [
"print(data.shape) # Explain here that once we created \n",
" # data we also created a information about \n",
" # the array called members or attributes that describe \n",
" # data in the same way an adjetive describes a noun"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"So we have 60 rows and 40 columns in ``data`` variable."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In order to get a single number from the array we provide an index in square brackets, just as we do in maths"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"first value in data: 0.0\n"
]
}
],
"source": [
"print('first value in data:', data[0,0]) # You should explain here than in many \n",
" # languages arrays start by 0"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"middle value in data: 13.0\n"
]
}
],
"source": [
"print('middle value in data:', data[30,20])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"Selecting intervals of data by using ranges : . <strong>Caution here!:</strong>ranges seem closed but they are [) "
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[ 0. 0. 1. 2. 2. 4. 2. 1. 6. 4.]\n",
" [ 0. 0. 2. 2. 4. 2. 2. 5. 5. 8.]\n",
" [ 0. 0. 1. 2. 3. 1. 2. 3. 5. 3.]\n",
" [ 0. 0. 0. 3. 1. 5. 6. 5. 5. 8.]\n",
" [ 0. 1. 1. 2. 1. 3. 5. 3. 5. 8.]]\n"
]
}
],
"source": [
"print(data[5:10, 0:10]) # Selecting rows 0,1,2,3 and cols from 0 to 9. Important! notice upper limits are not \n",
" # included in the counting\n",
" # You don't have to start slices at 0"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This is how index is assigned by python:\n",
"<img width=\"700px\" src=\"http://swcarpentry.github.io/python-novice-inflammation/fig/python-zero-index.png\">\n",
"<br>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"There is no need to include upper and lower bounds:"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"small is: \n",
"[[ 2. 3. 0. 0.]\n",
" [ 1. 1. 0. 1.]\n",
" [ 2. 2. 1. 1.]]\n"
]
}
],
"source": [
"small = data[:3, 36:] # There is no need to include upper and lower bounds\n",
"print ('small is: ')\n",
"print (small)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"what does ``data[3:3, 4:4]`` produce? \n",
"What about ``data[3:3, :]``?\n"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[]\n",
"[]\n"
]
}
],
"source": [
"print(data[3:3, 4:4])\n",
"print(data[3:3, :])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Some array math\n",
"Basic arithmetics: The operation is performed in <strong>every element</strong> of the array"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"original:\n",
"[[ 2. 3. 0. 0.]\n",
" [ 1. 1. 0. 1.]\n",
" [ 2. 2. 1. 1.]]\n",
"doubledata: \n",
"[[ 4. 6. 0. 0.]\n",
" [ 2. 2. 0. 2.]\n",
" [ 4. 4. 2. 2.]]\n"
]
}
],
"source": [
"doubledata = 2 * data # The x2 operation is made in every element of the array\n",
"print('original:')\n",
"print(data[:3,36:])\n",
"print('doubledata: ')\n",
"print(doubledata[:3,36:])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Array to Array operations: The operation is made on <strong>each corresponding element</strong> of the arrays:"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"tripledata:\n",
"[[ 6. 9. 0. 0.]\n",
" [ 3. 3. 0. 3.]\n",
" [ 6. 6. 3. 3.]]\n"
]
}
],
"source": [
"tripledata = doubledata + data #Array-Array operations are made on each corresponding element\n",
"print('tripledata:')\n",
"print(tripledata[:3,36:])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"More complex operations:\n",
"<br>The following is a method. Method are actions that can be made on the variable, Python knows how to!. <strong> The actions available depend on the variable type</strong>:"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"6.14875\n"
]
}
],
"source": [
"print(data.mean()) # method: Difference with attribute->\n",
" # they can take parameters that modify the behavior\n",
" # Note the parenthesis. They are \n",
" # actions related to the object, whereas the attributes \n",
" # are descriptions of the object in \n",
" # question. Maybe is better to explain tab completion here...!!"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"panel panel-info\">\n",
"<div class=\"panel-heading\">\n",
"<h3 class=\"panel-title\">\n",
"Reminder: method vs attribute\n",
"</h3>\n",
"</div>\n",
"<div class=\"panel-body\">\n",
"<ul>\n",
"<li> attributes are descriptions of variable properties\n",
"<li> methods are actions that Python knows to perform on the variable\n",
"</ul>\n",
"</div>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Several important methods for numpy variables:"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"maximum inflammation: 20.0\n",
"minimum inflammation: 0.0\n",
"standard deviation: 4.61383319712\n"
]
}
],
"source": [
"print('maximum inflammation:', data.max())\n",
"print('minimum inflammation:', data.min())\n",
"print('standard deviation:', data.std())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sometimes is useful to make some partial statistics. For instance max inflammation for first patient of all days: "
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"maximum inflammation for patient 0: 18.0\n"
]
}
],
"source": [
"patient_0 = data[0,:] #One possibility is creating an array\n",
"print('maximum inflammation for patient 0:', patient_0.max())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Oh wait... maybe I am creating to many variables... let's check:"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Variable Type Data/Info\n",
"---------------------------------\n",
"data ndarray 60x40: 2400 elems, type `float64`, 19200 bytes\n",
"doubledata ndarray 60x40: 2400 elems, type `float64`, 19200 bytes\n",
"numpy module <module 'numpy' from '/ho<...>kages/numpy/__init__.py'>\n",
"patient_0 ndarray 40: 40 elems, type `float64`, 320 bytes\n",
"small ndarray 3x4: 12 elems, type `float64`, 96 bytes\n",
"weight_kg int 100\n",
"weight_lb float 126.50000000000001\n"
]
}
],
"source": [
"%whos"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sometimes we can avoid the use of some variables:"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"maximum inflamation for patient 2: 19.0\n"
]
}
],
"source": [
"print('maximum inflamation for patient 2:', data[2, :].max())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What if we need max inflammation for all patients at once?. Operations along all columns or rows at once:<br>\n",
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-operations-across-axes.png\">\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Then the calculation for the average inflammation over all patients per day is:"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[ 0. 0.45 1.11666667 1.75 2.43333333 3.15\n",
" 3.8 3.88333333 5.23333333 5.51666667 5.95 5.9\n",
" 8.35 7.73333333 8.36666667 9.5 9.58333333\n",
" 10.63333333 11.56666667 12.35 13.25 11.96666667\n",
" 11.03333333 10.16666667 10. 8.66666667 9.15 7.25\n",
" 7.33333333 6.58333333 6.06666667 5.95 5.11666667 3.6\n",
" 3.3 3.56666667 2.48333333 1.5 1.13333333\n",
" 0.56666667]\n"
]
}
],
"source": [
"print(data.mean(axis=0)) #columns"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"A quick check that the array is ok:"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(40,)\n"
]
}
],
"source": [
"print(data.mean(axis=0).shape) #Quick check everything if fine"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Or if preferred, the average inflammation over all days per patient:"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[ 5.45 5.425 6.1 5.9 5.55 6.225 5.975 6.65 6.625 6.525\n",
" 6.775 5.8 6.225 5.75 5.225 6.3 6.55 5.7 5.85 6.55\n",
" 5.775 5.825 6.175 6.1 5.8 6.425 6.05 6.025 6.175 6.55\n",
" 6.175 6.35 6.725 6.125 7.075 5.725 5.925 6.15 6.075 5.75\n",
" 5.975 5.725 6.3 5.9 6.75 5.925 7.225 6.15 5.95 6.275 5.7\n",
" 6.1 6.825 5.975 6.725 5.7 6.25 6.4 7.05 5.9 ]\n"
]
}
],
"source": [
"print(data.mean(axis=1)) # mean of each row"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(60,)\n"
]
}
],
"source": [
"print(data.mean(axis=1).shape)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Data visualization"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Ploting is great for insight! Matplotlib is <em>the facto</em> standar. Some basics:\n",
"<br>\n",
"Just pick the pyplot library of Matplotlib:"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import matplotlib.pyplot # Diffrence with numpy: Matplotlib is a extense package.\n",
" # We only want pyplot at the moment\n",
" # You may get a warning here about rendering fonts. If we re-run it not htere anymore."
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"panel panel-info\">\n",
"<div class=\"panel-heading\">\n",
"<h3 class=\"panel-title\">\n",
"IPython Magic!\n",
"</h3>\n",
"</div>\n",
"<div class=\"panel-body\">\n",
"The % indicates an IPython magic function - a funciton that is valid only within the notebook environment.\n",
"</div>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's plot data array (the average inflammation per day):"
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAALYAAAD8CAYAAADaM14OAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXt0leW9578/SAK6wyUIBAIigqClHkG8K3hp9Sy0tdXT\ng5dp5yjLirNGXbbHM15npnXNSNVz2ums6pwjPa3aZdVKW61YpQUXFMEeRFGspUgIIgIhEU2QhEoS\neOaPbPfz+303+80mxGSvl99nLZfPk2df3v3uh3d/399VQghwnLTRr68PwHE+C3xjO6nEN7aTSnxj\nO6nEN7aTSnxjO6nEN7aTSnxjO6nkkDa2iMwSkXdEZKOI3NFTB+U4h4p01/MoIv0BbABwEYCtAFYD\nuDqEsK7QcypkQBiIzIFfr39/Mw8DyuPa3nb74DL72P0VZbnxvoFiX8c+FOUf7yt0eIa9R9knlu+2\n6/vj4aH/J/Yc8jGYtcr9Zj4+82FuvLV+hFkLVR32ue30YRT99xR+Tz6+/RXxsfpzHIiy1sL7I/S3\n76lfq6x1Hz02XkP7tXUUXAMA7Pmk4HvuRtPOEMKIgg/49P27ekACpwPYGELYBAAi8hSArwIouLEH\nIoMz5IsHXOs/pMrM90+oyY37bdpu1qRqiJl/Mv6o3PijEwaYtfZB9n3GLtlV6PAMtd+wT6xZbr/g\nltFxkw1bv9es8TGY583YY+b/esbPcuPbv3uDWWuf/ZGZN+0YXPB1h75ZeIfy8bWMqciNW2sK/4MA\ngOrVewuutQ2x20efk+pV9jy3DxmYGw/c/KFZ21dlL3bh9T8XfM8l4ZfvFT7ayKFIkTEA3lfzrdm/\nGURkroi8JiKvtaPwSXKcnuQzv3kMIcwPIZwaQji1HIWvZI7TkxyKFNkG4Gg1H5v9W9H0r4ryg+WF\nlh+8Fprsz1y5+imrWWR/5pid54yO4+mkPTNRF4590a41TrfXgLFLi//1+dLcl3PjZ5+cadZufzHK\nj/u/+7BZ+1/XzzHz3d+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aTSorqQdNjbyby\nATpLDg8HsLOLh/cmfjzJlNLxHBNCSEjt76RXN3buTUVeK6ZBTm/hx5NMqR1PMbgUcVKJb2wnlfTV\nxp7fR+9bCD+eZErteLqkTzS243zWuBRxUkmvbmwRmSUi74jIRhHpk97rIvJTEWkUkbfV34aJyGIR\nqc3+v2eqZRZ3PEeLyFIRWScifxaRW/rymERkoIi8KiJrs8dzT18eT3fptY0tIv0BPATgYgBTAFwt\nIlOSn/WZ8CiAWfS3OwC8FEKYBOCl7Ly36ABwawhhCoAzAdyYPS99dUx7AXwhhDAVwDQAs0TkzD48\nnu4RQuiV/wCcBeB3an4ngDt76/3pWMYDeFvN3wEwOjseDeCdvjiu7Pv/BsBFpXBMAI4EsAbAGaVw\nPAfzX29KkTEA3lfzrdm/lQLVIYT67HgHOpu29joiMh7AyQBW9eUxiUh/EXkTnW3EF4cQ+vR4uoPf\nPBKh85LU66YiEakE8CsA3wohmNjW3j6mEMK+EMI0AGMBnC4iJ9J6n5yjg6E3N/Y2AEer+djs30qB\nBhEZDQDZ/zf25puLSDk6N/XPQwif1i7r02MCgBBCM4Cl6Lwn6fPjORh6c2OvBjBJRI4VkQoAVwF4\nrhffP4nnAFyTHV+DTp3bK0hnk/qfAPhLCOEHfX1MIjJCRIZmx0egU++v76vj6Ta9fDNyCYANAOoA\n3N0XNxUAngRQD6AdnTr/OgBHofNOvxbAEgDDevF4ZqDzZ/0tAG9m/7ukr44JwEkA3sgez9sA/mf2\n7312jrrzn3senVTiN49OKvGN7aQS39hOKvGN7aQS39hOKvGN7aQS39hOKvGN7aSS/w+XOkyfWnt+\nTQAAAABJRU5ErkJggg==\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x7f77beaa4860>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"image = matplotlib.pyplot.imshow(data) # Remider: explain %matplotlib inline Note: Ipython!!\n",
" # otherwise matplotlib.pyplot.show() is mandatory!!"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Average inflammation over time. Linear plot:"
]
},
{
"cell_type": "code",
"execution_count": 51,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4VuX9x/H3N3svMkhIQoAEgowwIipTRFQEHPWHFWer\nFfeoWqvVVmuXbbW1VrHFYh04qBvcqCCiMhIIhE1YGYQMQsgi+/79kUdEBDKeJznP+L6uKxfJyZOc\nT4/Jpyf3Oee+xRiDUkop1+dldQCllFKOoYWulFJuQgtdKaXchBa6Ukq5CS10pZRyE1roSinlJrTQ\nlVLKTWihK6WUm9BCV0opN+HTkzuLjo42KSkpPblLpZRyednZ2eXGmJj2XtejhZ6SkkJWVlZP7lIp\npVyeiOztyOt0yEUppdyEFrpSSrkJLXSllHITWuhKKeUmtNCVUspNaKErpZSb0EJXSik3oYWu1DEK\nD9bxbk6R1TGU6rQefbBIKWdnjOHO13LI2nuQwfFhDIwLtTqSUh2mZ+hKHWXR+n1k7T0IwCur8i1O\no1TnaKErZVPX2MyfPtjK0D5hzMxI4M3sQuoam62OpVSHaaErZfPMsp3sr6rn4ZlDuPqMvlQ3NLN4\n/T6rYynVYVroSgEFFXX8e/kuLhyRQGZKFJl9IxkYF8KClTrsolyHFrpSwB8/2IK3CPdNSwdARLjy\n9L7kFh1iQ2GlxemU6hgtdOXxvt5Zzocb93PzmQOIDw88sv2ikX0I9PXmZT1LVy5CC115tOaWVn67\naDOJkYFcP7H/9z4XFuDLRSMTeHd9EYcON1mUUKmO00JXHu2V1flsK6nmwemDCfD1/sHnLx/Tl/qm\nVt5eW2hBOqU6RwtdeayDtY08/sl2xg7oxblDeh/3NcMSw8lIDOflVfkYY3o4oVKdo4WuPNbfP91O\ndX0Tv5l5CiJywtddcXpfdpTWsHp3RQ+mU6rztNCVR9q6v4oFK/dy5el9Se8ddtLXzhyeQFiADy/r\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3N4BzH7UTZLCciicB04D9HbXbIMXOFQj/eYtRO\n8QNtY4BPRSRbROZYHeY44owxxbb39wNxVoY5jttEZINtSMaS4aCjiUgKMBJYhZMdu2OygRMcO9vQ\nQQ5QCiwxxjjNcTtBNrD+uD0B3Au0HrXNIcfMFQrd2Y03xowApgG32IYWnJJpG19zirMUm2eA/sAI\noBh43MowIhICvAncaYypOvpzVh+742RzimNnjGmx/fwnAmNEZOgxn7fsuJ0gm6XHTURmAKXGmOwT\nvcaeY+YKhd6hxaitYowpsv1bCrxN2xCRMymxjcN+Ox5banGeI4wxJbZfulbgWSw8drZx1jeBl40x\nb9k2O8WxO142Zzp2tjyVwFLaxqid4rgdL5sTHLdxwAW2a2+vAWeJyAIcdMxcodCddjFqEQm2XahC\nRIKBc4CNJ/+qHrcIuMb2/jXAuxZm+Z5vf4BtLsaiY2e7gDYf2GKM+dtRn7L82J0omzMcOxGJEZEI\n2/uBtN24sBXnOG7HzWb1cTPG3G+MSTTGpNDWZZ8bY67EUcfMGOP0b8D5tN3pshN4wOo8R+XqD6y3\nvW2yOhvwKm1/RjbRdq3hOqAX8BmwA/gUiHKibC8BucAG2w90vEXZxtP2J+4GIMf2dr4zHLuTZLP8\n2AHDgXW2DBuB39i2O8NxO1E2y4/bURnPBN5z5DFz+tsWlVJKdYwrDLkopZTqAC10pZRyE1roSinl\nJrTQlVLKTWihK6WUm9BCV0opN6GFrpRSbkILXSml3MT/A28p6Ke22pdeAAAAAElFTkSuQmCC\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x7f77bea78048>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"ave_inflammation = data.mean(axis=0)\n",
"ave_plot = matplotlib.pyplot.plot(ave_inflammation)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This plot does not correspond with the expected. The model predices a smooth sharper rise and a slower after fall. Let's have a look to the other statistics:"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "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c0rJcQ2Gu7/t7vvTj09IelXSxQrsmGbM\n2Xx/RzDH1N1/k374QSWvxbkCO5ZS5pxSQMdSSn4yk/TXksZbHu75eBa1kHX9pqMAuKRdZrbPzG4u\ne5gOLnT3w1LyD1/ShSXPM5NVZrbfzMbL/tF7OjP7uKR5kv5T0kWhHtOWOX+cPhTMMU3zwAuS3pa0\ny933KcBjmTGnFNCxTP2rpH/SqW84Uh/HM7gz0xJc7e5XKPnueEuaEGIR6iva35L0CXefp+QfUjA/\n2qYZ4zFJX0vPgKcfwyCOaZs5gzqm7j7l7pcr+Slnvpl9SgEeyzZz/qkCO5Zmdq2kw+lPZjP95NDx\neBa1oP+XpI+1/P7i9LHguPtb6f8ekfQDJbkoVIfN7CLp/db6y5Lnacvdj7Tc1eQ7kv68zHmazOxs\nJYvkw+7+ePpwcMe03ZyhHlN3/19JE5IWKcBj2dQ6Z4DH8mpJo+nref8u6bNm9rCkt3s9nkUt6Psk\n/bGZXWJm50r6iqQdBT1X38zsvPRMSGb2IUlfkPRyuVOdxnT6d+wdkpanH98k6fHpf6Ekp82Z/p+v\n6csK55h+V9Ir7r6p5bEQj+kZc4Z0TM3s95qZwsxmSfq8ktYf1LHMmPO1kI6lJLn77e7+MXf/hJK1\n8il3/ztJT6jX4+nuhfxS8h37kKSfSrqtqOcZcMY/krRf0guSXgppTklblewQ+j9JP1eyG2O2pN3p\ncd0p6XcDnfMhSS+mx/aHSlpg2XNeLem9lv/ez6f/H/1ISMd0hjmDOaaSLk3n2p/OdEf6eGjHMmvO\nYI5lm5k/I2lHv8eTNxYBQEXwoigAVAQLOgBUBAs6AFQECzoAVAQLOgBUBAs6AFQECzoAVAQLOgBU\nxP8DpFAe9vF8qV0AAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x77e6050>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"max_plot = matplotlib.pyplot.plot(data.max(axis=0))"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata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K6lfN1rNNnWN7H2qznpLk7vtbn56g\n6BqYq2brKbWtU6rReppZv6QvSbp33MOJ1zJriNVi401MLukZM1tnZl+rupgO5rv7din6Bpc0v+J6\nJnOzmQ2Z2b1V/5o8npktkjQg6T8lnVHX9RxX59rWQ7Vaz9av8+slbZP0jLuvUw3Xs02dUr3W8weS\nvqP//4EipVjL2p15Fugqd79U0U+6m1q/7oeirleL/1HSee4+oOibpRa/hrZaDj+S9K3Wmeyx61eL\n9Zygztqtp7sfcfdLFP3GssLMlqiG6zlBnRepRutpZqskbW/9hjXZ2X/Htcwa2v8jaeG4P/e3Hqsd\nd9/a+udOSU8oau3U1XYzO0P6pP+5o+J6JuTuO8e9x9w/Sbqsynokycz6FAXhw+7+ZOvh2q3nRHXW\ncT3HuPseSU1JK1XD9Rwzvs6aredVkq5rXVt7VNLnzexhSduSrmXW0F4n6XwzO8fMpku6QdJTGV8z\nd2Z2UuusRmY2U9IXJNXpDYVMR//0fUrSn7c+/zNJTx77H1TkqDpbX2Rjfl/1WNP7Jb3i7neNe6yO\n63lcnXVbTzObN9ZSMLMZkn5XUf+9VuvZps5NdVpPd/+uuy909/MU5eRz7v4nkn6ipGvp7pk+FP3k\nfVXSa5Juy/p6RXxIOlfSkKT1kkbqVKekRxTdeXNA0tuK7nQ4VdKzrXVdI+mUmtb5kKSXWmv7Y0X9\nuSprvErS4XF/1y+2vj5Pq9N6TlJn3dbz4lZtQ626/qr1eN3Ws12dtVrPcfX+lqSn0q4lm2sAICC9\ndCESAIJHaANAQAhtAAgIoQ0AASG0ASAghDYABITQBoCAENoAEJD/A05hwmP+LPV6AAAAAElFTkSu\nQmCC\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x7805410>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"min_plot = matplotlib.pyplot.plot(data.min(axis=0))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"None of them seems very likely to fit the model. <strong> Something could be wrong with the data</strong>\n",
"<br>\n",
"<br>\n",
"We can further improve the visualization by grouping plots in a multiplot:"
]
},
{
"cell_type": "code",
"execution_count": 52,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsgAAADQCAYAAAAasZepAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl81PW1//HXyZ4JIWRjCSETEAQBATWCilpwRXFve69r\ntbW1i7fV21Zra3vb3l5te6ut7W2vSqutrf3V3atVFHFBsVolIArIDklIWLJByELWOb8/ZgYjsswk\nM/Od78x5Ph55kExmOUA+mc985vM5b1FVjDHGGGOMMX4pThdgjDHGGGNMPLEJsjHGGGOMMf3YBNkY\nY4wxxph+bIJsjDHGGGNMPzZBNsYYY4wxph+bIBtjjDHGGNOPTZCNMcYYY4zpxybIxhhjjDHG9GMT\nZGOMMcYYY/pJc7qAUBQVFWl5ebnTZRgTE8uXL29U1WKn6xgoG68m2diYNcY9Qh2vrpggl5eXU1lZ\n6XQZxsSEiFQ7XcNg2Hg1ycbGrDHuEep4tS0WxhhjjDHG9GMTZGOMMcYYY/qxCbIxxhhjjDH92ATZ\nGIOIjBGR10TkQxFZIyI3BS4vEJHFIrIx8Ge+07UaYw5PRKpEZJWIrBQR21xszADYBNkYA9ALfEtV\nJwMnATeKyGTgNuAVVZ0AvBL42hgT/+aq6gxVrXC6EGPcyBVdLIxzXlm7i18u3sDjXzkZT4b9uCQq\nVd0B7Ah83ioia4HRwMXAnMDVHgKWAN9xoEQTgtbOHq774zKuO6WcC6eXOF2OMUnlO098wPOrdoR9\nu1PHF3HfNSdEoSIzGDbjMYf129c2sWb7Xt7a1MRZk0c4XY6JAREpB44D3gFGBCbPADuBg/4QiMgN\nwA0AZWVl0S/SHNS9SzazvHo31U3tzJlYTG5WutMlGWco8LKI9AH3q+qCA69gYzbyXllXz5gCD6cc\nVRjybZZX7+bV9fX4fEpKikSxOhMumyCbQ1qzvYX3avYAsGRDvU2Qk4CIDAGeB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wTaF4Frg28Pm1+PchxQUREeABYK2q/rLft+KyZhEpFpFhgc+z8e/n\nWkcc1quq31XVUlUtx/+z+qqqXk0c1holbh2vEKf/RzZeo8vGrGvHbFz+/9h4ja6Ij1enN1QP9gM4\nH9gAbAZud7qeg9T3N2AH0IN//9b1QCH+TeQbgZeBAqfr7FfvqfjffvgAWBn4OD9eawamAe8F6l0N\n/Efg8rist1/dc/joAEFc1xrhv3dcj9dAja4ZszZeY1q7jdk4HLM2XqNab1KPV4uaNsYYY4wxph+3\nb7EwxhhjjDEmomyCbIwxxhhjTD82QTbGGGOMMaYfmyAbY4wxxhjTj02QjTHGGGOM6ccmyMYYY4wx\nxvRjE2RjjDHGGGP6+f8skxfhNmbXPwAAAABJRU5ErkJggg==\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x7f77bea35668>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig = matplotlib.pyplot.figure(figsize=(10.0, 3.0)) # Figure canvas, size in inches!!\n",
"\n",
"\n",
"axes1 = fig.add_subplot(1,3,1) # Means: add subplot to a 1x3 grid in the first place\n",
"axes2 = fig.add_subplot(1,3,2) # Means: add subplot to a 1x3 grid in the second place\n",
"axes3 = fig.add_subplot(1,3,3) # Means: add subplot to a 1x3 grid in the third place\n",
"\n",
"axes1.set_ylabel('average')\n",
"axes1.plot(data.mean(axis=0))\n",
"axes2.set_ylabel('max')\n",
"axes2.plot(data.max(axis=0))\n",
"axes3.set_ylabel('min')\n",
"axes3.plot(data.min(axis=0))\n",
"\n",
"fig.tight_layout() # Adjust the subplots to fit the margins\n",
"\n",
"matplotlib.pyplot.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Additional Exercises "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Slicing strings"
]
},
{
"cell_type": "code",
"execution_count": 54,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"first three characters: oxi\n",
"last three characters: gen\n"
]
}
],
"source": [
"element = 'oxigen'\n",
"print('first three characters:', element[0:3])\n",
"print('last three characters:', element[-3:])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What is the value of element[:4]? What about element[4:]? Or element[:]?"
]
},
{
"cell_type": "code",
"execution_count": 55,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'en'"
]
},
"execution_count": 55,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"element[4:]"
]
},
{
"cell_type": "code",
"execution_count": 56,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'oxig'"
]
},
"execution_count": 56,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"element[:4]\n"
]
},
{
"cell_type": "code",
"execution_count": 58,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'oxigen'"
]
},
"execution_count": 58,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"element[:]\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What is element[-1]? What is element[-2]?"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'n'"
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"element[-1]"
]
},
{
"cell_type": "code",
"execution_count": 59,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'e'"
]
},
"execution_count": 59,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"element[-2]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Given those answers, explain what element[1:-1] does."
]
},
{
"cell_type": "code",
"execution_count": 60,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'xige'"
]
},
"execution_count": 60,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"element[1:-1]"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Lists\n",
"They are used to store many values. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Difference with array?\n",
"<li>They are very similar but they do not belong to numpy, and do not have some of the attributes of numpy arrays, such as mean sd max min etc... Beside this they are pretty similar in concept\n",
"<li>We create a list the same "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Selecting elements of a list:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can loop over a list:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"List are also pretty similar to strings. There is an <strong>IMPORTANT</strong> difference between strings and lists: Elements in a list can be modified but not ones in a string:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"But:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### List of Lists or nested lists\n",
"Making a list whose elements are also lists."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Example: Products in the shelves of a shop. We can print the results of the index operations in the images:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can print the first element of the list <code>x</code>:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Printing first element of <code>x[0]</code> list:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Modifying list contents\n",
"Many ways to change a string"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<strong>Caution here!</strong>: List are treated slightly conterintuitive:<br>\n",
"<em>Pro-tip: Technically it is said that lists are copied \"by reference\" instead of \"by value\"</em>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"#### Turn string into a list\n",
"\n",
"Use a for-loop to convert the string “hello” into a list of letters:\n",
"\n",
"<code>\n",
"[\"h\", \"e\", \"l\", \"l\", \"o\"]\n",
"<code/>\n",
"\n",
"Hint: You can create an empty list like this:\n",
"\n",
"``my_list = []``"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can make a single copy of the original list using list built-in"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"panel panel-info\">\n",
"<div class=\"panel panel-heading\">\n",
"<h3>Reminder: When not to use \"list\" method?</h3>\n",
"</div>\n",
"<div class=\"panel panel-body\">\n",
"<li>Reference copy uses less resources \n",
"<li>Is the default when relating lists through assignment\n",
"<li>But whether you need to do a reference or a copy is your choice!!\n",
"</div>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"#### Overloading\n",
"\n",
"`+` usually means addition, but when used on strings or lists, it means “concatenate”. Given that, what do you think the multiplication operator * does on lists? In particular, what will be the output of the following code?\n",
"\n",
"<code>\n",
"counts = [2, 4, 6, 8, 10]\n",
"repeats = counts * 2\n",
"<code/>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Lists\n",
"They are used to store many values. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Difference with array?\n",
"<li>They are very similar but they do not belong to numpy, and do not have some of the attributes of numpy arrays, such as mean sd max min etc... Beside this they are pretty similar in concept\n",
"<li>We create a list the same "
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"odds are: [1, 3, 5, 7]\n"
]
}
],
"source": [
"odds = [1, 3, 5, 7]\n",
"print('odds are:', odds)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Selecting elements of a list:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"first and last: 1 7\n"
]
}
],
"source": [
"print('first and last:', odds[0], odds[-1])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can loop over a list:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1\n",
"3\n",
"5\n",
"7\n"
]
}
],
"source": [
"for number in odds: #explain iterables\n",
" print(number)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"List are also pretty similar to strings. There is an <strong>IMPORTANT</strong> difference between strings and lists: Elements in a list can be modified but not ones in a string:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"names originally: ['Newton', 'Darwing', 'Turing']\n",
"names corrected: ['Newton', 'Darwin', 'Turing']\n"
]
}
],
"source": [
"names = ['Newton', 'Darwing', 'Turing']\n",
"print('names originally:', names)\n",
"names[1]='Darwin'\n",
"print('names corrected:', names)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"But:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"ename": "TypeError",
"evalue": "'str' object does not support item assignment",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-5-7d3b982a1b78>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mname\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'Bell'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mname\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'a'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mTypeError\u001b[0m: 'str' object does not support item assignment"
]
}
],
"source": [
"name = 'Bell' #Explain mutability\n",
"name[1] = 'a'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### List of Lists or nested lists\n",
"Making a list whose elements are also lists."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Example: Products in the shelves of a shop. We can print the results of the index operations in the images:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"x = [['salt', 'zuchini', 'onion'], ['cabbage', 'lettuce', 'garlic'],['apple','pear','banana']]"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[['salt', 'zuchini', 'onion']]\n"
]
}
],
"source": [
"print([x[0]])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can print the first element of the list <code>x</code>:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['salt', 'zuchini', 'onion']\n"
]
}
],
"source": [
"print(x[0]) # Prints x's first element, in this case again a list"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Printing first element of <code>x[0]</code> list:"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"salt\n"
]
}
],
"source": [
"print(x[0][0]) # Prints x's first element's first element. In this case a string"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Modifying list contents\n",
"Many ways to change a string"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1, 3, 5, 7, 11]\n"
]
}
],
"source": [
"odds.append(11) # Add 11 at the end of the list. Also written as +=[] \n",
"print(odds) # Explain that operators have different effects depending on the nature of the operands"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[3, 5, 7, 11]\n"
]
}
],
"source": [
"del odds[0]\n",
"print(odds)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"reversed odds: [11, 7, 5, 3]\n"
]
}
],
"source": [
"odds.reverse()\n",
"print('reversed odds:', odds)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"#### Turn string into a list\n",
"\n",
"Use a for-loop to convert the string “hello” into a list of letters:\n",
"\n",
"<code>\n",
"[\"h\", \"e\", \"l\", \"l\", \"o\"]\n",
"<code/>\n",
"\n",
"Hint: You can create an empty list like this:\n",
"\n",
"``my_list = []``"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"the list: ['h', 'e', 'l', 'l', 'o']\n"
]
}
],
"source": [
"my_list = []\n",
"\n",
"for letter in 'hello':\n",
" my_list +=[letter] \n",
"print('the list:', my_list)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<strong>Caution here!</strong>: List are treated slightly conterintuitive:<br>\n",
"<em>Pro-tip: Technically it is said that lists are copied \"by reference\" instead of \"by value\"</em>"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"primes: [1, 3, 5, 7, 2]\n",
"odds: [1, 3, 5, 7, 2]\n"
]
}
],
"source": [
"odds = [1, 3, 5, 7]\n",
"primes = odds # list do not behave has simple variables, \n",
" # when assigning it does not copy the whole list, but adds\n",
" # a reference to the list odds named primes\n",
"primes += [2] \n",
"print('primes:', primes)\n",
"print('odds:', odds)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can make a single copy of the original list using list built-in"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"primes: [1, 3, 5, 7, 2]\n",
"odds: [1, 3, 5, 7]\n"
]
}
],
"source": [
"odds = [1, 3, 5, 7]\n",
"primes = list(odds) # This time a new copy of the list is done\n",
"primes += [2]\n",
"print('primes:', primes)\n",
"print('odds:', odds)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"panel panel-info\">\n",
"<div class=\"panel panel-heading\">\n",
"<h3>Reminder: When not to use \"list\" method?</h3>\n",
"</div>\n",
"<div class=\"panel panel-body\">\n",
"<li>Reference copy uses less resources \n",
"<li>Is the default when relating lists through assignment\n",
"<li>But whether you need to do a reference or a copy is your choice!!\n",
"</div>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"#### Overloading\n",
"\n",
"`+` usually means addition, but when used on strings or lists, it means “concatenate”. Given that, what do you think the multiplication operator * does on lists? In particular, what will be the output of the following code?\n",
"\n",
"<code>\n",
"counts = [2, 4, 6, 8, 10]\n",
"repeats = counts * 2\n",
"<code/>"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[2, 4, 6, 8, 10, 2, 4, 6, 8, 10]\n"
]
}
],
"source": [
"counts = [2, 4, 6, 8, 10]\n",
"repeats = counts * 2 # The * operator applied to lists replicates the elements in it a given number of times\n",
"print(repeats)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Repeating Actions with Loops"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We found some suspicious features in our firs dataset \"inflammation-01.csv\". It is possible that other datasets are also affected by this?? We would like to check... Fast!"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Repeat tasks:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We have a lot of data sets and we have to tell the computer how to repeat things.\n",
"<br>\n",
"Let's first do something simpler: Show each character in a string!"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Bad approach: tedious and if the string is larger it misses some characters, and if it shorter:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### There is a better approach: Recursion\n",
"Recursion is made by for loops:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Example 1. A better way:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The method supports strings of any lenght:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's see it in action:\n",
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/loops_image.png\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### General form of a for-loop:\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img width=\"800px\" src=\"https://www.safaribooksonline.com/library/view/head-first-python/9781449397524/httpatomoreillycomsourceoreillyimages1368346.png.jpg\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can choose any name we want for variables. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Example 2. This loop repeatedly updates a variable that acts as counter. It is very usual to find this structure:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The for body is executed 5 times\n",
"<ul>\n",
"<li>1st: vowel eqs a; lenght eqs 1\n",
"<li>2st: vowel eqs e; lenght eqs 2\n",
"<li>etc.."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Example 3. This loop overrides the value of a external variable:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Off-topic tip: Some loops frecuently used are wraped inside very useful methods, such as <code>len</code> which returns the length of the variable. The methods avaiable by default in Python without import a thing are called <em>built-in</em> methods"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercises"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### From 1 to N"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Python has a built-in function called range that creates a sequence of numbers. Using range, write a loop that uses range to print the first 3 odd natural numbers. Use the builtin help!"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Repeating Actions with Loops"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We found some suspicious features in our firs dataset \"inflammation-01.csv\". It is possible that other datasets are also affected by this?? We would like to check... Fast!"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Repeat tasks:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We have a lot of data sets and we have to tell the computer how to repeat things.\n",
"<br>\n",
"Let's first do something simpler: Show each character in a string!"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"l\n",
"e\n",
"a\n",
"d\n"
]
}
],
"source": [
"word = 'lead' # From wich number to wich number we had to go? Ask people\n",
"print(word[0])\n",
"print(word[1])\n",
"print(word[2])\n",
"print(word[3])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Bad approach: tedious and if the string is larger it misses some characters, and if it shorter:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"t\n",
"i\n",
"n\n"
]
},
{
"ename": "IndexError",
"evalue": "string index out of range",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-2-61757d5ac451>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mword\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mword\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 5\u001b[0;31m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mword\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mIndexError\u001b[0m: string index out of range"
]
}
],
"source": [
"word = 'tin' # Bad approach, if the string is larger it misses characters and if it shorter it fails!\n",
"print(word[0])\n",
"print(word[1])\n",
"print(word[2])\n",
"print(word[3])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### There is a better approach: Recursion\n",
"Recursion is made by for loops:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Example 1. A better way:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"l\n",
"e\n",
"a\n",
"d\n"
]
}
],
"source": [
"word = 'lead'\n",
"for char in word:\n",
" print(char)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The method supports strings of any lenght:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"o\n",
"x\n",
"i\n",
"g\n",
"e\n",
"n\n"
]
}
],
"source": [
"word = 'oxigen'\n",
"for char in word:\n",
" print (char)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's see it in action:\n",
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/loops_image.png\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### General form of a for-loop:\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img width=\"800px\" src=\"https://www.safaribooksonline.com/library/view/head-first-python/9781449397524/httpatomoreillycomsourceoreillyimages1368346.png.jpg\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can choose any name we want for variables. "
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"o\n",
"x\n",
"y\n",
"g\n",
"e\n",
"n\n"
]
}
],
"source": [
"word = 'oxygen'\n",
"for banana in word:\n",
" print(banana)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Example 2. This loop repeatedly updates a variable that acts as counter. It is very usual to find this structure:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"There are 5 vowels\n"
]
}
],
"source": [
"lenght = 0\n",
"for vowel in 'aeiou': # The process details can be explained here\n",
" lenght = lenght + 1 # Explain what happens if lenght is inside\n",
"print('There are ',lenght,'vowels')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The for body is executed 5 times\n",
"<ul>\n",
"<li>1st: vowel eqs a; lenght eqs 1\n",
"<li>2st: vowel eqs e; lenght eqs 2\n",
"<li>etc.."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Off-topic tip: Some loops frecuently used are wraped inside very useful methods, such as <code>len</code> which returns the length of the variable. The methods avaiable by default in Python without import a thing are called <em>built-in</em> methods"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"5\n"
]
}
],
"source": [
"print(len('aeiou')) # built-in function to get the length of a string (and the length of many other things...). \n",
" # Is faster and much easier to read than a for loop"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercises"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### From 1 to N"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Python has a built-in function called range that creates a sequence of numbers. Using range, write a loop that uses range to print the first 3 odd natural numbers. Use the builtin help!"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1\n",
"3\n",
"5\n"
]
}
],
"source": [
"for num in range(1,6,2):\n",
" print (num)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Making choices\n",
"\n",
"In last section we discovered something suspicios in our inflammation data by drawing some plots. How can we use Python\n",
"to automatically detect the anomalies we found and take an action for each of them?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<strong>By writing code that runs only certain conditions</strong>:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Conditionals\n",
"\n",
"A conditional is a piece of code that takes different actions depending on a condition:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Imagine we want to determine if a certain number is lower or greater than 100. The flow of this conditional:\n",
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-flowchart-conditional.png\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This scheme is achieved in Python by means of the <code>if</code>/<code>else</code> clause:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sometimes there is no need to use a else, it depends on the logic of the problem:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sometimes the flow of the decision is more complex. There are still multiple choices available \n",
"when the first condition is discarded. <br>\n",
"As an example imagine we want to know if a given number is positive negative or zero. We make use of the <code>elif</code> clause:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<strong>Note the \"==\"</strong>. This symbol checks equality rather than \"=\" wich means assingment"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercises\n",
"#### What Is Truth?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"if '':\n",
" print('empty string is true')\n",
"if 'word':\n",
" print('word is true')\n",
"if []:\n",
" print('empty list is true')\n",
"if [1, 2, 3]:\n",
" print('non-empty list is true')\n",
"if 0:\n",
" print('zero is true')\n",
"if 1:\n",
" print('one is true')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### That’s Not Not What I Meant"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"if not '':\n",
" print('empty string is not true')\n",
"if not 'word':\n",
" print('word is not true')\n",
"if not not True:\n",
" print('not not True is true')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Composed conditions\n",
"We can write complex conditions in the if clause by using concatenation of simple conditions by means of <code>and</code> and <code>or</code>. <br>\n",
"As in human language an <code>and</code> condition is True if all its components are True:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Whereas an <code>or</code> condition is True if any of it components is True:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"#### Close Enough\n",
"\n",
"Write some conditions that print True if the variable a is within 10% of the variable b and False otherwise. Compare your implementation with your partner’s: do you get the same answer for all possible pairs of numbers?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Checking our Data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we are in conditions to check our suspicious data in the inflammation tests.<br>\n",
"First two files max inflammation seems to rise linearly. So let's write a code that check this behavior and show warning:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We saw a different issue in file 3. All minima where 0. So we write a code to check that:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can check now several files putting all toghether:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Additional Exercises\n",
"\n",
"### In-place operators"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"Python (and most other languages in the C family) provides in-place operators that work like this:\n",
"\n",
"```x = 1 # original value\n",
"x += 1 # add one to x, assigning result back to x\n",
"x *= 3 # multiply x by 3\n",
"print(x)```\n",
"\n",
"\n",
"``6``\n",
"\n",
"Write some code that sums the positive and negative numbers in a list separately, using in-place operators. Do you think the result is more or less readable than writing the same without in-place operators?\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Counting Vowels "
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"* Write a loop that counts the number of vowels in a character string.\n",
"* Test it on a few individual words and full sentences.\n",
"* Once you are done, compare your solution to your neighbor’s. Did you make the same decisions about how to handle the letter ‘y’ (which some people think is a vowel, and some do not)?\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Making choices\n",
"\n",
"In last section we discovered something suspicios in our inflammation data by drawing some plots. How can we use Python\n",
"to automatically detect the anomalies we found and take an action for each of them?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<strong>By writing code that runs only certain conditions</strong>:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Conditionals\n",
"\n",
"A conditional is a piece of code that takes different actions depending on a condition:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Imagine we want to determine if a certain number is lower or greater than 100. The flow of this conditional:\n",
"<img src=\"https://scw-ss.github.io/python-novice-inflammation-2016-06-27-cfmehu/fig/python-flowchart-conditional.png\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This scheme is achieved in Python by means of the <code>if</code>/<code>else</code> clause:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"not greater\n",
"done\n"
]
}
],
"source": [
"num = 37\n",
"if num > 100:\n",
" print('greater')\n",
"else:\n",
" print('not greater')\n",
"print('done')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sometimes there is no need to use a else, it depends on the logic of the problem:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"before conditional....\n",
"... after conditional\n"
]
}
],
"source": [
"num = 53\n",
"print ('before conditional....')\n",
"if num > 100:\n",
" print ('53 is greater than 100')\n",
"print('... after conditional')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sometimes the flow of the decision is more complex. There are still multiple choices available \n",
"when the first condition is discarded. <br>\n",
"As an example imagine we want to know if a given number is positive negative or zero. We make use of the <code>elif</code> clause:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"-3 is negative\n"
]
}
],
"source": [
"\n",
"num = -3\n",
"\n",
"if num > 0:\n",
" print(num, 'is positive')\n",
"elif num == 0: # note the sign == instead of =. The reason is that \"==\" tests equality whereas \"=\" means assignment\n",
" print(num, 'is zero')\n",
"else:\n",
" print(num, 'is negative')\n",
" "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<strong>Note the \"==\"</strong>. This symbol checks equality rather than \"=\" wich means assingment"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercises\n",
"\n",
"#### What Is Truth?"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"word is true\n",
"non-empty list is true\n",
"one is true\n"
]
}
],
"source": [
"if '':\n",
" print('empty string is true')\n",
"if 'word':\n",
" print('word is true')\n",
"if []:\n",
" print('empty list is true')\n",
"if [1, 2, 3]:\n",
" print('non-empty list is true')\n",
"if 0:\n",
" print('zero is true')\n",
"if 1:\n",
" print('one is true')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### That’s Not Not What I Meant"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"empty string is not true\n",
"not not True is true\n"
]
}
],
"source": [
"if not '':\n",
" print('empty string is not true')\n",
"if not 'word':\n",
" print('word is not true')\n",
"if not not True:\n",
" print('not not True is true')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Composed conditions\n",
"We can write complex conditions in the if clause by using concatenation of simple conditions by means of <code>and</code> and <code>or</code>. <br>\n",
"As in human language an <code>and</code> condition is True if all its components are True:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"at least one part is false\n"
]
}
],
"source": [
"# We can add complex conditions to the if clause, concatenating sentences with \"or\" and \"and\"\n",
"\n",
"if (1 > 0) and (-1 > 0): # Note the () the are not really needed but the reading is clearer\n",
" # and the \"and\". For and \"and\" to be true every part has to be true by itself\n",
" print ('both parts are true')\n",
"else:\n",
" print('at least one part is false')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Whereas an <code>or</code> condition is True if any of it components is True:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"at least one part is true\n"
]
}
],
"source": [
"if (1 > 0) or (-1 > 0): # Note that an \"or\" condition is true if any of the parts is true\n",
" print('at least one part is true')\n",
"else:\n",
" print('none of them are true')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"#### Close Enough\n",
"\n",
"Write some conditions that print True if the variable a is within 5% of the variable b and False otherwise. Compare your implementation with your partner’s: do you get the same answer for all possible pairs of numbers?"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"False\n"
]
}
],
"source": [
"a = .9\n",
"b = 1\n",
"if (a > 0.9 * b) and (a < 1.1 * b): # We consider within as strictly below b+5% and above b-5%\n",
" print('True')\n",
"else:\n",
" print('False')"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"True\n"
]
}
],
"source": [
"print(abs(a - b) < 0.1 * abs(b))"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"multiplication=a*b\n",
"substraction=a-b"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Variable Type Data/Info\n",
"-----------------------------------\n",
"a float 0.9\n",
"b int 1\n",
"multiplication float 0.9\n",
"substraction float -0.09999999999999998\n"
]
}
],
"source": [
"%whos"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Checking our Data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we are in conditions to check our suspicious data in the inflammation tests.<br>\n",
"First two files max inflammation seems to rise linearly. So let's write a code that check this behavior and show warning:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Suspicious looking maxima\n"
]
}
],
"source": [
"import numpy\n",
"\n",
"data = numpy.loadtxt(fname='inflammation-01.csv', delimiter=',')\n",
"if (data.max(axis=0)[0]==0) and (data.max(axis=0)[20]==20): # Anomalous linear behavior of the max in the data\n",
" print('Suspicious looking maxima')\n",
"elif (data.min(axis=0).sum() == 0):\n",
" print('Minima add up to zero')\n",
"else:\n",
" print('Everything seems OK')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We saw a different issue in file 3. All minima where 0. So we write a code to check that:"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Minima add up to zero\n"
]
}
],
"source": [
"data = numpy.loadtxt(fname='inflammation-03.csv', delimiter=',')\n",
"if (data.max(axis=0)[0]==0) and (data.max(axis=0)[20]==20): # Anomalous linear behavior of the max in the data\n",
" print('Suspicious looking maxima')\n",
"elif (data.min(axis=0).sum() == 0):\n",
" print('Minima add up to zero')\n",
"else:\n",
" print('Everything seems OK')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can check now several files putting all toghether:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import glob"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"inflammation-01.csv :\n",
"Suspicious looking maxima\n",
"inflammation-02.csv :\n",
"Suspicious looking maxima\n",
"inflammation-03.csv :\n",
"Minima add up to zero\n"
]
}
],
"source": [
"filenames = sorted(glob.glob('inflammation*.csv'))\n",
"filenames = filenames[0:3] # Get elements 0, 1 and 2 of the list corresponding to inf-01 inf-02 and inf-03\n",
"filenames\n",
"for f in filenames:\n",
" print(f,':')\n",
" data = numpy.loadtxt(fname=f, delimiter=',')\n",
" if (data.max(axis=0)[0]==0) and (data.max(axis=0)[20]==20): # Anomalous linear behavior of the max in the data\n",
" print('Suspicious looking maxima')\n",
" elif (data.min(axis=0).sum() == 0):\n",
" print('Minima add up to zero')\n",
" else:\n",
" print('Everything seems OK')\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Additional Exercises"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## How many paths?"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"C\n"
]
}
],
"source": [
"if 4 > 5:\n",
" print('A')\n",
"elif 4 == 5:\n",
" print('B')\n",
"elif 4 < 5:\n",
" print('C')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### In-place operators"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Python (and most other languages in the C family) provides in-place operators that work like this:\n",
"\n",
"```x = 1 # original value\n",
"x += 1 # add one to x, assigning result back to x\n",
"x *= 3 # multiply x by 3\n",
"print(x)```\n",
"\n",
"\n",
"``6``\n",
"\n",
"Write some code that sums the positive and negative numbers in a list separately, using in-place operators. Do you think the result is more or less readable than writing the same without in-place operators?"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"positive sum is 14 , and the negative sum is -6\n"
]
}
],
"source": [
"numbers = [-1, 2, -3, 7, 5, -2] # Given a list. Not an array!!\n",
"\n",
"pos_sum = 0\n",
"neg_sum = 0\n",
"\n",
"for number in numbers:\n",
" if number > 0:\n",
" pos_sum += number\n",
" else:\n",
" neg_sum += number\n",
"print('positive sum is', pos_sum, ', and the negative sum is', neg_sum ) \n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Counting Vowels "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* Write a loop that counts the number of vowels in a character string.\n",
"* Test it on a few individual words and full sentences.\n",
"* Once you are done, compare your solution to your neighbor’s. Did you make the same decisions about how to handle the letter ‘y’ (which some people think is a vowel, and some do not)?"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"number of vowels: 4\n"
]
}
],
"source": [
"string = 'aljdiajdi'\n",
"vowels = 0\n",
"for char in string:\n",
" if (char == 'a') or (char == 'e') or (char == 'i' ) or (char == 'o') or (char == 'u'):\n",
" vowels += 1\n",
" \n",
"print('number of vowels:', vowels )"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Multiple files\n",
"\n",
"We almost have all the tools needed to process all files. We need an extra library that will make the task easier:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Glob has a function called <code>glob</code> that finds files and directories whose names match a pattern:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Output is an unsorted list of filenames to loop over. We can sort it using <code>sorted</code> built-in"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we can bring together all loops, lists and loops over lists, and use it to process all files: "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercises"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Plotting Differences\n",
"\n",
"Plot the difference between the average of the first dataset and the average of the second dataset, i.e., the difference between the leftmost plot of the first two figures."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:ooo="http://xml.openoffice.org/svg/export"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.2"
width="342.37863"
height="154.1693"
viewBox="0 0 9662.6858 4351.0001"
preserveAspectRatio="xMidYMid"
clip-path="url(#presentation_clip_path)"
xml:space="preserve"
id="svg2"
inkscape:version="0.48.2 r9819"
sodipodi:docname="python-overlapping-ranges.svg"
style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"><metadata
id="metadata574"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview572"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="0.23838384"
inkscape:cx="341.31563"
inkscape:cy="-292.11024"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<defs
class="ClipPathGroup"
id="defs4">
<clipPath
id="presentation_clip_path"
clipPathUnits="userSpaceOnUse">
<rect
x="0"
y="0"
width="21590"
height="27940"
id="rect7" />
</clipPath>
</defs>
<defs
class="TextShapeIndex"
id="defs9">
<g
ooo:slide="id1"
ooo:id-list="id3 id4 id5 id6 id7 id8 id9 id10 id11 id12 id13 id14 id15 id16 id17 id18 id19 id20 id21 id22 id23 id24 id25 id26"
id="g11" />
</defs>
<defs
class="EmbeddedBulletChars"
id="defs13">
<g
id="bullet-char-template(57356)"
transform="scale(4.8828125e-4,-4.8828125e-4)">
<path
d="M 580,1141 1163,571 580,0 -4,571 580,1141 z"
id="path16"
inkscape:connector-curvature="0" />
</g>
<g
id="bullet-char-template(57354)"
transform="scale(4.8828125e-4,-4.8828125e-4)">
<path
d="m 8,1128 1129,0 L 1137,0 8,0 8,1128 z"
id="path19"
inkscape:connector-curvature="0" />
</g>
<g
id="bullet-char-template(10146)"
transform="scale(4.8828125e-4,-4.8828125e-4)">
<path
d="M 174,0 602,739 174,1481 1456,739 174,0 z m 1184,739 -1049,607 350,-607 699,0 z"
id="path22"
inkscape:connector-curvature="0" />
</g>
<g
id="bullet-char-template(10132)"
transform="scale(4.8828125e-4,-4.8828125e-4)">
<path
d="M 2015,739 1276,0 717,0 l 543,543 -1086,0 0,393 1086,0 -543,545 557,0 741,-742 z"
id="path25"
inkscape:connector-curvature="0" />
</g>
<g
id="bullet-char-template(10007)"
transform="scale(4.8828125e-4,-4.8828125e-4)">
<path
d="m 0,-2 c -7,16 -16,29 -25,39 l 381,530 c -94,256 -141,385 -141,387 0,25 13,38 40,38 9,0 21,-2 34,-5 21,4 42,12 65,25 l 27,-13 111,-251 280,301 64,-25 24,25 c 21,-10 41,-24 62,-43 C 886,937 835,863 770,784 769,783 710,716 594,584 L 774,223 c 0,-27 -21,-55 -63,-84 l 16,-20 C 717,90 699,76 672,76 641,76 570,178 457,381 L 164,-76 c -22,-34 -53,-51 -92,-51 -42,0 -63,17 -64,51 -7,9 -10,24 -10,44 0,9 1,19 2,30 z"
id="path28"
inkscape:connector-curvature="0" />
</g>
<g
id="bullet-char-template(10004)"
transform="scale(4.8828125e-4,-4.8828125e-4)">
<path
d="M 285,-33 C 182,-33 111,30 74,156 52,228 41,333 41,471 c 0,78 14,145 41,201 34,71 87,106 158,106 53,0 88,-31 106,-94 l 23,-176 c 8,-64 28,-97 59,-98 l 735,706 c 11,11 33,17 66,17 42,0 63,-15 63,-46 l 0,-122 c 0,-36 -10,-64 -30,-84 L 442,47 C 390,-6 338,-33 285,-33 z"
id="path31"
inkscape:connector-curvature="0" />
</g>
<g
id="bullet-char-template(9679)"
transform="scale(4.8828125e-4,-4.8828125e-4)">
<path
d="M 813,0 C 632,0 489,54 383,161 276,268 223,411 223,592 c 0,181 53,324 160,431 106,107 249,161 430,161 179,0 323,-54 432,-161 108,-107 162,-251 162,-431 0,-180 -54,-324 -162,-431 C 1136,54 992,0 813,0 z"
id="path34"
inkscape:connector-curvature="0" />
</g>
<g
id="bullet-char-template(8226)"
transform="scale(4.8828125e-4,-4.8828125e-4)">
<path
d="m 346,457 c -73,0 -137,26 -191,78 -54,51 -81,114 -81,188 0,73 27,136 81,188 54,52 118,78 191,78 73,0 134,-26 185,-79 51,-51 77,-114 77,-187 0,-75 -25,-137 -76,-188 -50,-52 -112,-78 -186,-78 z"
id="path37"
inkscape:connector-curvature="0" />
</g>
<g
id="bullet-char-template(8211)"
transform="scale(4.8828125e-4,-4.8828125e-4)">
<path
d="m -4,459 1139,0 0,147 -1139,0 0,-147 z"
id="path40"
inkscape:connector-curvature="0" />
</g>
</defs>
<defs
class="TextEmbeddedBitmaps"
id="defs42" />
<g
id="g44"
transform="translate(-1162.3145,-1375)">
<g
id="id2"
class="Master_Slide">
<g
id="bg-id2"
class="Background" />
<g
id="bo-id2"
class="BackgroundObjects" />
</g>
</g>
<g
class="SlideGroup"
id="g49"
transform="translate(-1162.3145,-1375)">
<g
id="g51">
<g
id="id1"
class="Slide"
clip-path="url(#presentation_clip_path)">
<g
class="Page"
id="g54">
<g
class="com.sun.star.drawing.TextShape"
id="g56">
<g
id="id3">
<text
class="TextShape"
id="text59"><tspan
class="TextParagraph"
font-size="388px"
font-weight="400"
id="tspan61"
style="font-size:388px;font-weight:400;font-family:'Arial, sans-serif'"><tspan
class="TextPosition"
x="1150"
y="1976"
id="tspan63"><tspan
id="tspan65"
style="fill:#000000;stroke:none">-3.0</tspan></tspan></tspan></text>
</g>
</g>
<g
class="com.sun.star.drawing.LineShape"
id="g67">
<g
id="id4">
<path
d="m 2000,2000 8000,0"
id="path70"
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:50" />
</g>
</g>
<g
class="com.sun.star.drawing.LineShape"
id="g72">
<g
id="id5">
<path
d="m 2000,1700 0,300"
id="path75"
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:50" />
</g>
</g>
<g
class="com.sun.star.drawing.LineShape"
id="g77">
<g
id="id6">
<path
d="m 10000,1700 0,300"
id="path80"
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:50" />
</g>
</g>
<g
class="com.sun.star.drawing.TextShape"
id="g82">
<g
id="id7">
<text
class="TextShape"
id="text85"><tspan
class="TextParagraph"
font-size="388px"
font-weight="400"
id="tspan87"
style="font-size:388px;font-weight:400;font-family:'Arial, sans-serif'"><tspan
class="TextPosition"
x="10251"
y="1977"
id="tspan89"><tspan
id="tspan91"
style="fill:#000000;stroke:none">5.0</tspan></tspan></tspan></text>
</g>
</g>
<g
class="com.sun.star.drawing.TextShape"
id="g93">
<g
id="id8">
<text
class="TextShape"
id="text96"><tspan
class="TextParagraph"
font-size="388px"
font-weight="400"
id="tspan98"
style="font-size:388px;font-weight:400;font-family:'Arial, sans-serif'"><tspan
class="TextPosition"
x="4250"
y="2976"
id="tspan100"><tspan
id="tspan102"
style="fill:#000000;stroke:none">0.0</tspan></tspan></tspan></text>
</g>
</g>
<g
class="com.sun.star.drawing.LineShape"
id="g104">
<g
id="id9">
<path
d="m 5000,3000 4500,0"
id="path107"
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:50" />
</g>
</g>
<g
class="com.sun.star.drawing.LineShape"
id="g109">
<g
id="id10">
<path
d="m 5000,2700 0,300"
id="path112"
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:50" />
</g>
</g>
<g
class="com.sun.star.drawing.LineShape"
id="g114">
<g
id="id11">
<path
d="m 9500,2700 0,300"
id="path117"
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:50" />
</g>
</g>
<g
class="com.sun.star.drawing.TextShape"
id="g119">
<g
id="id12">
<text
class="TextShape"
id="text122"><tspan
class="TextParagraph"
font-size="388px"
font-weight="400"
id="tspan124"
style="font-size:388px;font-weight:400;font-family:'Arial, sans-serif'"><tspan
class="TextPosition"
x="9751"
y="2977"
id="tspan126"><tspan
id="tspan128"
style="fill:#000000;stroke:none">4.5</tspan></tspan></tspan></text>
</g>
</g>
<g
class="com.sun.star.drawing.TextShape"
id="g130">
<g
id="id13">
<text
class="TextShape"
id="text133"><tspan
class="TextParagraph"
font-size="388px"
font-weight="400"
id="tspan135"
style="font-size:388px;font-weight:400;font-family:'Arial, sans-serif'"><tspan
class="TextPosition"
x="2609"
y="3976"
id="tspan137"><tspan
id="tspan139"
style="fill:#000000;stroke:none">-1.5</tspan></tspan></tspan></text>
</g>
</g>
<g
class="com.sun.star.drawing.LineShape"
id="g141">
<g
id="id14">
<path
d="m 3500,4000 3500,0"
id="path144"
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:50" />
</g>
</g>
<g
class="com.sun.star.drawing.LineShape"
id="g146">
<g
id="id15">
<path
d="m 3500,3700 0,300"
id="path149"
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:50" />
</g>
</g>
<g
class="com.sun.star.drawing.LineShape"
id="g151">
<g
id="id16">
<path
d="m 7000,3700 0,300"
id="path154"
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:50" />
</g>
</g>
<g
class="com.sun.star.drawing.TextShape"
id="g156">
<g
id="id17">
<text
class="TextShape"
id="text159"><tspan
class="TextParagraph"
font-size="388px"
font-weight="400"
id="tspan161"
style="font-size:388px;font-weight:400;font-family:'Arial, sans-serif'"><tspan
class="TextPosition"
x="7210"
y="3977"
id="tspan163"><tspan
id="tspan165"
style="fill:#000000;stroke:none">2.0</tspan></tspan></tspan></text>
</g>
</g>
<g
class="com.sun.star.drawing.LineShape"
id="g167">
<g
id="id18">
<path
d="m 5000,1400 0,51"
id="path170"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,1502 0,51"
id="path172"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,1604 0,51"
id="path174"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,1706 0,51"
id="path176"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,1808 0,51"
id="path178"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,1910 0,51"
id="path180"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,2012 0,51"
id="path182"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,2114 0,51"
id="path184"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,2216 0,51"
id="path186"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,2318 0,51"
id="path188"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,2420 0,51"
id="path190"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,2522 0,51"
id="path192"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,2624 0,51"
id="path194"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,2726 0,51"
id="path196"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,2828 0,51"
id="path198"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,2930 0,51"
id="path200"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,3032 0,51"
id="path202"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,3134 0,51"
id="path204"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,3236 0,51"
id="path206"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,3338 0,51"
id="path208"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,3440 0,51"
id="path210"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,3542 0,51"
id="path212"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,3644 0,51"
id="path214"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,3746 0,51"
id="path216"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,3848 0,51"
id="path218"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,3950 0,51"
id="path220"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,4052 0,51"
id="path222"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,4154 0,51"
id="path224"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,4256 0,51"
id="path226"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,4358 0,51"
id="path228"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,4460 0,51"
id="path230"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,4562 0,51"
id="path232"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,4664 0,51"
id="path234"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,4766 0,51"
id="path236"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,4868 0,51"
id="path238"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,4970 0,51"
id="path240"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,5072 0,51"
id="path242"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,5174 0,51"
id="path244"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,5276 0,51"
id="path246"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,5378 0,51"
id="path248"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,5480 0,51"
id="path250"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,5582 0,51"
id="path252"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5000,5684 0,16"
id="path254"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
</g>
</g>
<g
class="com.sun.star.drawing.LineShape"
id="g256">
<g
id="id19">
<path
d="m 7000,1400 0,51"
id="path259"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,1502 0,51"
id="path261"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,1604 0,51"
id="path263"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,1706 0,51"
id="path265"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,1808 0,51"
id="path267"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,1910 0,51"
id="path269"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,2012 0,51"
id="path271"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,2114 0,51"
id="path273"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,2216 0,51"
id="path275"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,2318 0,51"
id="path277"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,2420 0,51"
id="path279"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,2522 0,51"
id="path281"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,2624 0,51"
id="path283"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,2726 0,51"
id="path285"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,2828 0,51"
id="path287"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,2930 0,51"
id="path289"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,3032 0,51"
id="path291"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,3134 0,51"
id="path293"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,3236 0,51"
id="path295"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,3338 0,51"
id="path297"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,3440 0,51"
id="path299"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,3542 0,51"
id="path301"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,3644 0,51"
id="path303"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,3746 0,51"
id="path305"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,3848 0,51"
id="path307"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,3950 0,51"
id="path309"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,4052 0,51"
id="path311"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,4154 0,51"
id="path313"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,4256 0,51"
id="path315"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,4358 0,51"
id="path317"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,4460 0,51"
id="path319"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,4562 0,51"
id="path321"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,4664 0,51"
id="path323"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,4766 0,51"
id="path325"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,4868 0,51"
id="path327"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,4970 0,51"
id="path329"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,5072 0,51"
id="path331"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,5174 0,51"
id="path333"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,5276 0,51"
id="path335"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,5378 0,51"
id="path337"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,5480 0,51"
id="path339"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,5582 0,51"
id="path341"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7000,5684 0,16"
id="path343"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
</g>
</g>
<g
class="com.sun.star.drawing.LineShape"
id="g345">
<g
id="id20">
<path
d="m 5000,5700 2000,0"
id="path348"
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:50" />
</g>
</g>
<g
class="com.sun.star.drawing.LineShape"
id="g350">
<g
id="id21">
<path
d="m 5000,5400 0,300"
id="path353"
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:50" />
</g>
</g>
<g
class="com.sun.star.drawing.LineShape"
id="g355">
<g
id="id22">
<path
d="m 7000,5400 0,300"
id="path358"
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:50" />
</g>
</g>
<g
class="com.sun.star.drawing.TextShape"
id="g360">
<g
id="id23">
<text
class="TextShape"
id="text363"><tspan
class="TextParagraph"
font-size="388px"
font-weight="400"
id="tspan365"
style="font-size:388px;font-weight:400;font-family:'Arial, sans-serif'"><tspan
class="TextPosition"
x="4250"
y="5677"
id="tspan367"><tspan
id="tspan369"
style="fill:#000000;stroke:none">0.0</tspan></tspan></tspan></text>
</g>
</g>
<g
class="com.sun.star.drawing.LineShape"
id="g371">
<g
id="id24">
<path
d="m 7000,5401 0,300"
id="path374"
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:50" />
</g>
</g>
<g
class="com.sun.star.drawing.TextShape"
id="g376">
<g
id="id25">
<text
class="TextShape"
id="text379"><tspan
class="TextParagraph"
font-size="388px"
font-weight="400"
id="tspan381"
style="font-size:388px;font-weight:400;font-family:'Arial, sans-serif'"><tspan
class="TextPosition"
x="7210"
y="5678"
id="tspan383"><tspan
id="tspan385"
style="fill:#000000;stroke:none">2.0</tspan></tspan></tspan></text>
</g>
</g>
<g
class="com.sun.star.drawing.LineShape"
id="g387">
<g
id="id26">
<path
d="m 1600,4800 51,0"
id="path390"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 1702,4800 51,0"
id="path392"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 1804,4800 51,0"
id="path394"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 1906,4800 51,0"
id="path396"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 2008,4800 51,0"
id="path398"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 2110,4800 51,0"
id="path400"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 2212,4800 51,0"
id="path402"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 2314,4800 51,0"
id="path404"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 2416,4800 51,0"
id="path406"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 2518,4800 51,0"
id="path408"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 2620,4800 51,0"
id="path410"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 2722,4800 51,0"
id="path412"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 2824,4800 51,0"
id="path414"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 2926,4800 51,0"
id="path416"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 3028,4800 51,0"
id="path418"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 3130,4800 51,0"
id="path420"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 3232,4800 51,0"
id="path422"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 3334,4800 51,0"
id="path424"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 3436,4800 51,0"
id="path426"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 3538,4800 51,0"
id="path428"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 3640,4800 51,0"
id="path430"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 3742,4800 51,0"
id="path432"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 3844,4800 51,0"
id="path434"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 3946,4800 51,0"
id="path436"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 4048,4800 51,0"
id="path438"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 4150,4800 51,0"
id="path440"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 4252,4800 51,0"
id="path442"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 4354,4800 51,0"
id="path444"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 4456,4800 51,0"
id="path446"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 4558,4800 51,0"
id="path448"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 4660,4800 51,0"
id="path450"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 4762,4800 51,0"
id="path452"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 4864,4800 51,0"
id="path454"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 4966,4800 51,0"
id="path456"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5068,4800 51,0"
id="path458"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5170,4800 51,0"
id="path460"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5272,4800 51,0"
id="path462"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5374,4800 51,0"
id="path464"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5476,4800 51,0"
id="path466"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5578,4800 51,0"
id="path468"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5680,4800 51,0"
id="path470"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5782,4800 51,0"
id="path472"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5884,4800 51,0"
id="path474"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 5986,4800 51,0"
id="path476"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 6088,4800 51,0"
id="path478"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 6190,4800 51,0"
id="path480"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 6292,4800 51,0"
id="path482"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 6394,4800 51,0"
id="path484"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 6496,4800 51,0"
id="path486"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 6598,4800 51,0"
id="path488"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 6700,4800 51,0"
id="path490"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 6802,4800 51,0"
id="path492"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 6904,4800 51,0"
id="path494"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7006,4800 51,0"
id="path496"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7108,4800 51,0"
id="path498"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7210,4800 51,0"
id="path500"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7312,4800 51,0"
id="path502"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7414,4800 51,0"
id="path504"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7516,4800 51,0"
id="path506"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7618,4800 51,0"
id="path508"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7720,4800 51,0"
id="path510"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7822,4800 51,0"
id="path512"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 7924,4800 51,0"
id="path514"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 8026,4800 51,0"
id="path516"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 8128,4800 51,0"
id="path518"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 8230,4800 51,0"
id="path520"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 8332,4800 51,0"
id="path522"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 8434,4800 51,0"
id="path524"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 8536,4800 51,0"
id="path526"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 8638,4800 51,0"
id="path528"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 8740,4800 51,0"
id="path530"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 8842,4800 51,0"
id="path532"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 8944,4800 51,0"
id="path534"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 9046,4800 51,0"
id="path536"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 9148,4800 51,0"
id="path538"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 9250,4800 51,0"
id="path540"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 9352,4800 51,0"
id="path542"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 9454,4800 51,0"
id="path544"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 9556,4800 51,0"
id="path546"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 9658,4800 51,0"
id="path548"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 9760,4800 51,0"
id="path550"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 9862,4800 51,0"
id="path552"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 9964,4800 51,0"
id="path554"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 10066,4800 51,0"
id="path556"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 10168,4800 51,0"
id="path558"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 10270,4800 51,0"
id="path560"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 10372,4800 51,0"
id="path562"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 10474,4800 51,0"
id="path564"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 10576,4800 51,0"
id="path566"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 10678,4800 51,0"
id="path568"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
<path
d="m 10780,4800 20,0"
id="path570"
inkscape:connector-curvature="0"
style="fill:none;stroke:#c0c0c0;stroke-width:50" />
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
import sys
print('sys.argv is', sys.argv)
import sys
def main():
assert len(sys.argv) == 4, 'Need exactly 3 arguments'
operator = sys.argv[1]
assert operator in ['add', 'subtract', 'multiply', 'divide'], \
'Operator is not one of add, subtract, multiply, or divide: bailing out'
try:
operand1, operand2 = float(sys.argv[2]), float(sys.argv[3])
except ValueError:
print 'cannot convert input to a number: bailing out'
return
do_arithmetic(operand1, operator, operand2)
def do_arithmetic(operand1, operator, operand2):
if operator == 'add':
value = operand1 + operand2
elif operator == 'subtract':
value = operand1 - operand2
elif operator == 'multiply':
value = operand1 * operand2
elif operator == 'divide':
value = operand1 / operand2
print value
if __name__ == '__main__':
main()
import sys
import numpy
def main():
script = sys.argv[0]
filenames = sys.argv[1:]
if len(filenames) <=1: #nothing to check
print 'Only 1 file specified on input'
else:
nrow0, ncol0 = row_col_count(filenames[0])
print 'First file %s: %d rows and %d columns' % (filenames[0], nrow0, ncol0)
for f in filenames[1:]:
nrow, ncol = row_col_count(f)
if nrow != nrow0 or ncol != ncol0:
print 'File %s does not check: %d rows and %d columns' % (f, nrow, ncol)
else:
print 'File %s checks' % f
return
def row_col_count(filename):
try:
nrow, ncol = numpy.loadtxt(filename, delimiter=',').shape
except ValueError: #get this if file doesn't have same number of rows and columns, or if it has non-numeric content
nrow, ncol = (0, 0)
return nrow, ncol
if __name__ == '__main__':
main()
import sys
count = 0
for line in sys.stdin:
count += 1
print(count, 'lines in standard input')
def favorite_ice_cream():
ice_creams = [
"chocolate",
"vanilla",
"strawberry"
]
print(ice_creams[3])
def print_message(day):
messages = {
"monday": "Hello, world!",
"tuesday": "Today is tuesday!",
"wednesday": "It is the middle of the week.",
"thursday": "Today is Donnerstag in German!",
"friday": "Last day of the week!",
"saturday": "Hooray for the weekend!",
"sunday": "Aw, the weekend is almost over."
}
print(messages[day])
def print_friday_message():
print_message("Friday")
#!/usr/bin/env python
'''Generate pseudo-random patient inflammation data for use in Python lessons.'''
import sys
import random
n_patients = 60
n_days = 40
n_range = 20
middle = n_days / 2
for p in range(n_patients):
vals = []
for d in range(n_days):
upper = max(n_range - abs(d - middle), 0)
vals.append(random.randint(upper/4, upper))
print(','.join([str(v) for v in vals]))
import sys
def main():
'''print each input filename and the number of lines in it,
and print the sum of the number of lines'''
filenames = sys.argv[1:]
sum_nlines = 0 #initialize counting variable
if len(filenames) == 0: # no filenames, just stdin
sum_nlines = count_file_like(sys.stdin)
print 'stdin: %d' % sum_nlines
else:
for f in filenames:
n = count_file(f)
print '%s %d' % (f, n)
sum_nlines += n
print 'total: %d' % sum_nlines
def count_file(filename):
'''count the number of lines in a file'''
f = open(filename,'r')
nlines = len(f.readlines())
f.close()
return(nlines)
def count_file_like(file_like):
'''count the number of lines in a file-like object (eg stdin)'''
n = 0
for line in file_like:
n = n+1
return n
if __name__ == '__main__':
main()
import sys
import glob
def main():
'''prints names of all files with sys.argv as suffix'''
assert len(sys.argv) >= 2, 'Argument list cannot be empty'
suffix = sys.argv[1] # NB: behaviour is not as you'd expect if sys.argv[1] is *
glob_input = '*.' + suffix # construct the input
glob_output = glob.glob(glob_input) # call the glob function
for item in glob_output: # print the output
print item
return
if __name__ == '__main__':
main()
import sys
import numpy
def main():
script = sys.argv[0]
filename = sys.argv[1]
data = numpy.loadtxt(filename, delimiter=',')
for m in data.mean(axis=1):
print(m)
import sys
import numpy
def main():
script = sys.argv[0]
filename = sys.argv[1]
data = numpy.loadtxt(filename, delimiter=',')
for m in data.mean(axis=1):
print(m)
if __name__ == '__main__':
main()
import sys
import numpy
def main():
script = sys.argv[0]
for filename in sys.argv[1:]:
data = numpy.loadtxt(filename, delimiter=',')
for m in data.mean(axis=1):
print(m)
if __name__ == '__main__':
main()
import sys
import numpy
def main():
script = sys.argv[0]
action = sys.argv[1]
filenames = sys.argv[2:]
for f in filenames:
data = numpy.loadtxt(f, delimiter=',')
if action == '--min':
values = data.min(axis=1)
elif action == '--mean':
values = data.mean(axis=1)
elif action == '--max':
values = data.max(axis=1)
for m in values:
print(m)
if __name__ == '__main__':
main()
import sys
import numpy
def main():
script = sys.argv[0]
action = sys.argv[1]
filenames = sys.argv[2:]
assert action in ['--min', '--mean', '--max'], \
'Action is not one of --min, --mean, or --max: ' + action
for f in filenames:
process(f, action)
def process(filename, action):
data = numpy.loadtxt(filename, delimiter=',')
if action == '--min':
values = data.min(axis=1)
elif action == '--mean':
values = data.mean(axis=1)
elif action == '--max':
values = data.max(axis=1)
for m in values:
print(m)
if __name__ == '__main__':
main()
import sys
import numpy
def main():
script = sys.argv[0]
action = sys.argv[1]
filenames = sys.argv[2:]
assert action in ['--min', '--mean', '--max'], \
'Action is not one of --min, --mean, or --max: ' + action
if len(filenames) == 0:
process(sys.stdin, action)
else:
for f in filenames:
process(f, action)
def process(filename, action):
data = numpy.loadtxt(filename, delimiter=',')
if action == '--min':
values = data.min(axis=1)
elif action == '--mean':
values = data.mean(axis=1)
elif action == '--max':
values = data.max(axis=1)
for m in values:
print(m)
if __name__ == '__main__':
main()
import sys
import numpy
def main():
script = sys.argv[0]
action = sys.argv[1]
filenames = sys.argv[2:]
assert action in ['-n', '-m', '-x'], \
'Action is not one of -n, -m, or -x: ' + action
if len(filenames) == 0:
process(sys.stdin, action)
else:
for f in filenames:
process(f, action)
def process(filename, action):
data = numpy.loadtxt(filename, delimiter=',')
if action == '-n':
values = data.min(axis=1)
elif action == '-m':
values = data.mean(axis=1)
elif action == '-x':
values = data.max(axis=1)
for m in values:
print m
if __name__ == '__main__':
main()
import sys
import numpy
def main():
script = sys.argv[0]
if len(sys.argv) == 1: # no arguments, so print help message
print('Usage: python readings_08.py action filenames\n'
'action must be one of --min --mean --max\n'
'if filenames is blank, input is taken from stdin;\n'
'otherwise, each filename in the list of arguments is processed in turn')
return
action = sys.argv[1]
filenames = sys.argv[2:]
assert action in ['--min', '--mean', '--max'], \
'Action is not one of --min, --mean, or --max: ' + action
if len(filenames) == 0:
process(sys.stdin, action)
else:
for f in filenames:
process(f, action)
def process(filename, action):
data = numpy.loadtxt(filename, delimiter=',')
if action == '--min':
values = data.min(axis=1)
elif action == '--mean':
values = data.mean(axis=1)
elif action == '--max':
values = data.max(axis=1)
for m in values:
print(m)
main()
import sys
import numpy
def main():
script = sys.argv[0]
action = sys.argv[1]
if action not in ['--min', '--mean', '--max']: # if no action given
action = '--mean' # set a default action, that being mean
filenames = sys.argv[1:] # start the filenames one place earlier in the argv list
else:
filenames = sys.argv[2:]
if len(filenames) == 0:
process(sys.stdin, action)
else:
for f in filenames:
process(f, action)
def process(filename, action):
data = numpy.loadtxt(filename, delimiter=',')
if action == '--min':
values = data.min(axis=1)
elif action == '--mean':
values = data.mean(axis=1)
elif action == '--max':
values = data.max(axis=1)
for m in values:
print(m)
if __name__ == '__main__':
main()
def rectangle_area(coords):
x0, y0, x1, y1 = coords
return (x1 - x0) * (x1 - y0)
import sys
print('version is', sys.version)
0,0,1,3,1,2,4,7,8,3,3,3,10,5,7,4,7,7,12,18,6,13,11,11,7,7,4,6,8,8,4,4,5,7,3,4,2,3,0,0
0,1,2,1,2,1,3,2,2,6,10,11,5,9,4,4,7,16,8,6,18,4,12,5,12,7,11,5,11,3,3,5,4,4,5,5,1,1,0,1
0,1,1,3,3,2,6,2,5,9,5,7,4,5,4,15,5,11,9,10,19,14,12,17,7,12,11,7,4,2,10,5,4,2,2,3,2,2,1,1
0,0,2,0,4,2,2,1,6,7,10,7,9,13,8,8,15,10,10,7,17,4,4,7,6,15,6,4,9,11,3,5,6,3,3,4,2,3,2,1
0,1,1,3,3,1,3,5,2,4,4,7,6,5,3,10,8,10,6,17,9,14,9,7,13,9,12,6,7,7,9,6,3,2,2,4,2,0,1,1
0,0,1,2,2,4,2,1,6,4,7,6,6,9,9,15,4,16,18,12,12,5,18,9,5,3,10,3,12,7,8,4,7,3,5,4,4,3,2,1
0,0,2,2,4,2,2,5,5,8,6,5,11,9,4,13,5,12,10,6,9,17,15,8,9,3,13,7,8,2,8,8,4,2,3,5,4,1,1,1
0,0,1,2,3,1,2,3,5,3,7,8,8,5,10,9,15,11,18,19,20,8,5,13,15,10,6,10,6,7,4,9,3,5,2,5,3,2,2,1
0,0,0,3,1,5,6,5,5,8,2,4,11,12,10,11,9,10,17,11,6,16,12,6,8,14,6,13,10,11,4,6,4,7,6,3,2,1,0,0
0,1,1,2,1,3,5,3,5,8,6,8,12,5,13,6,13,8,16,8,18,15,16,14,12,7,3,8,9,11,2,5,4,5,1,4,1,2,0,0
0,1,0,0,4,3,3,5,5,4,5,8,7,10,13,3,7,13,15,18,8,15,15,16,11,14,12,4,10,10,4,3,4,5,5,3,3,2,2,1
0,1,0,0,3,4,2,7,8,5,2,8,11,5,5,8,14,11,6,11,9,16,18,6,12,5,4,3,5,7,8,3,5,4,5,5,4,0,1,1
0,0,2,1,4,3,6,4,6,7,9,9,3,11,6,12,4,17,13,15,13,12,8,7,4,7,12,9,5,6,5,4,7,3,5,4,2,3,0,1
0,0,0,0,1,3,1,6,6,5,5,6,3,6,13,3,10,13,9,16,15,9,11,4,6,4,11,11,12,3,5,8,7,4,6,4,1,3,0,0
0,1,2,1,1,1,4,1,5,2,3,3,10,7,13,5,7,17,6,9,12,13,10,4,12,4,6,7,6,10,8,2,5,1,3,4,2,0,2,0
0,1,1,0,1,2,4,3,6,4,7,5,5,7,5,10,7,8,18,17,9,8,12,11,11,11,14,6,11,2,10,9,5,6,5,3,4,2,2,0
0,0,0,0,2,3,6,5,7,4,3,2,10,7,9,11,12,5,12,9,13,19,14,17,5,13,8,11,5,10,9,8,7,5,3,1,4,0,2,1
0,0,0,1,2,1,4,3,6,7,4,2,12,6,12,4,14,7,8,14,13,19,6,9,12,6,4,13,6,7,2,3,6,5,4,2,3,0,1,0
0,0,2,1,2,5,4,2,7,8,4,7,11,9,8,11,15,17,11,12,7,12,7,6,7,4,13,5,7,6,6,9,2,1,1,2,2,0,1,0
0,1,2,0,1,4,3,2,2,7,3,3,12,13,11,13,6,5,9,16,9,19,16,11,8,9,14,12,11,9,6,6,6,1,1,2,4,3,1,1
0,1,1,3,1,4,4,1,8,2,2,3,12,12,10,15,13,6,5,5,18,19,9,6,11,12,7,6,3,6,3,2,4,3,1,5,4,2,2,0
0,0,2,3,2,3,2,6,3,8,7,4,6,6,9,5,12,12,8,5,12,10,16,7,14,12,5,4,6,9,8,5,6,6,1,4,3,0,2,0
0,0,0,3,4,5,1,7,7,8,2,5,12,4,10,14,5,5,17,13,16,15,13,6,12,9,10,3,3,7,4,4,8,2,6,5,1,0,1,0
0,1,1,1,1,3,3,2,6,3,9,7,8,8,4,13,7,14,11,15,14,13,5,13,7,14,9,10,5,11,5,3,5,1,1,4,4,1,2,0
0,1,1,1,2,3,5,3,6,3,7,10,3,8,12,4,12,9,15,5,17,16,5,10,10,15,7,5,3,11,5,5,6,1,1,1,1,0,2,1
0,0,2,1,3,3,2,7,4,4,3,8,12,9,12,9,5,16,8,17,7,11,14,7,13,11,7,12,12,7,8,5,7,2,2,4,1,1,1,0
0,0,1,2,4,2,2,3,5,7,10,5,5,12,3,13,4,13,7,15,9,12,18,14,16,12,3,11,3,2,7,4,8,2,2,1,3,0,1,1
0,0,1,1,1,5,1,5,2,2,4,10,4,8,14,6,15,6,12,15,15,13,7,17,4,5,11,4,8,7,9,4,5,3,2,5,4,3,2,1
0,0,2,2,3,4,6,3,7,6,4,5,8,4,7,7,6,11,12,19,20,18,9,5,4,7,14,8,4,3,7,7,8,3,5,4,1,3,1,0
0,0,0,1,4,4,6,3,8,6,4,10,12,3,3,6,8,7,17,16,14,15,17,4,14,13,4,4,12,11,6,9,5,5,2,5,2,1,0,1
0,1,1,0,3,2,4,6,8,6,2,3,11,3,14,14,12,8,8,16,13,7,6,9,15,7,6,4,10,8,10,4,2,6,5,5,2,3,2,1
0,0,2,3,3,4,5,3,6,7,10,5,10,13,14,3,8,10,9,9,19,15,15,6,8,8,11,5,5,7,3,6,6,4,5,2,2,3,0,0
0,1,2,2,2,3,6,6,6,7,6,3,11,12,13,15,15,10,14,11,11,8,6,12,10,5,12,7,7,11,5,8,5,2,5,5,2,0,2,1
0,0,2,1,3,5,6,7,5,8,9,3,12,10,12,4,12,9,13,10,10,6,10,11,4,15,13,7,3,4,2,9,7,2,4,2,1,2,1,1
0,0,1,2,4,1,5,5,2,3,4,8,8,12,5,15,9,17,7,19,14,18,12,17,14,4,13,13,8,11,5,6,6,2,3,5,2,1,1,1
0,0,0,3,1,3,6,4,3,4,8,3,4,8,3,11,5,7,10,5,15,9,16,17,16,3,8,9,8,3,3,9,5,1,6,5,4,2,2,0
0,1,2,2,2,5,5,1,4,6,3,6,5,9,6,7,4,7,16,7,16,13,9,16,12,6,7,9,10,3,6,4,5,4,6,3,4,3,2,1
0,1,1,2,3,1,5,1,2,2,5,7,6,6,5,10,6,7,17,13,15,16,17,14,4,4,10,10,10,11,9,9,5,4,4,2,1,0,1,0
0,1,0,3,2,4,1,1,5,9,10,7,12,10,9,15,12,13,13,6,19,9,10,6,13,5,13,6,7,2,5,5,2,1,1,1,1,3,0,1
0,1,1,3,1,1,5,5,3,7,2,2,3,12,4,6,8,15,16,16,15,4,14,5,13,10,7,10,6,3,2,3,6,3,3,5,4,3,2,1
0,0,0,2,2,1,3,4,5,5,6,5,5,12,13,5,7,5,11,15,18,7,9,10,14,12,11,9,10,3,2,9,6,2,2,5,3,0,0,1
0,0,1,3,3,1,2,1,8,9,2,8,10,3,8,6,10,13,11,17,19,6,4,11,6,12,7,5,5,4,4,8,2,6,6,4,2,2,0,0
0,1,1,3,4,5,2,1,3,7,9,6,10,5,8,15,11,12,15,6,12,16,6,4,14,3,12,9,6,11,5,8,5,5,6,1,2,1,2,0
0,0,1,3,1,4,3,6,7,8,5,7,11,3,6,11,6,10,6,19,18,14,6,10,7,9,8,5,8,3,10,2,5,1,5,4,2,1,0,1
0,1,1,3,3,4,4,6,3,4,9,9,7,6,8,15,12,15,6,11,6,18,5,14,15,12,9,8,3,6,10,6,8,7,2,5,4,3,1,1
0,1,2,2,4,3,1,4,8,9,5,10,10,3,4,6,7,11,16,6,14,9,11,10,10,7,10,8,8,4,5,8,4,4,5,2,4,1,1,0
0,0,2,3,4,5,4,6,2,9,7,4,9,10,8,11,16,12,15,17,19,10,18,13,15,11,8,4,7,11,6,7,6,5,1,3,1,0,0,0
0,1,1,3,1,4,6,2,8,2,10,3,11,9,13,15,5,15,6,10,10,5,14,15,12,7,4,5,11,4,6,9,5,6,1,1,2,1,2,1
0,0,1,3,2,5,1,2,7,6,6,3,12,9,4,14,4,6,12,9,12,7,11,7,16,8,13,6,7,6,10,7,6,3,1,5,4,3,0,0
0,0,1,2,3,4,5,7,5,4,10,5,12,12,5,4,7,9,18,16,16,10,15,15,10,4,3,7,5,9,4,6,2,4,1,4,2,2,2,1
0,1,2,1,1,3,5,3,6,3,10,10,11,10,13,10,13,6,6,14,5,4,5,5,9,4,12,7,7,4,7,9,3,3,6,3,4,1,2,0
0,1,2,2,3,5,2,4,5,6,8,3,5,4,3,15,15,12,16,7,20,15,12,8,9,6,12,5,8,3,8,5,4,1,3,2,1,3,1,0
0,0,0,2,4,4,5,3,3,3,10,4,4,4,14,11,15,13,10,14,11,17,9,11,11,7,10,12,10,10,10,8,7,5,2,2,4,1,2,1
0,0,2,1,1,4,4,7,2,9,4,10,12,7,6,6,11,12,9,15,15,6,6,13,5,12,9,6,4,7,7,6,5,4,1,4,2,2,2,1
0,1,2,1,1,4,5,4,4,5,9,7,10,3,13,13,8,9,17,16,16,15,12,13,5,12,10,9,11,9,4,5,5,2,2,5,1,0,0,1
0,0,1,3,2,3,6,4,5,7,2,4,11,11,3,8,8,16,5,13,16,5,8,8,6,9,10,10,9,3,3,5,3,5,4,5,3,3,0,1
0,1,1,2,2,5,1,7,4,2,5,5,4,6,6,4,16,11,14,16,14,14,8,17,4,14,13,7,6,3,7,7,5,6,3,4,2,2,1,1
0,1,1,1,4,1,6,4,6,3,6,5,6,4,14,13,13,9,12,19,9,10,15,10,9,10,10,7,5,6,8,6,6,4,3,5,2,1,1,1
0,0,0,1,4,5,6,3,8,7,9,10,8,6,5,12,15,5,10,5,8,13,18,17,14,9,13,4,10,11,10,8,8,6,5,5,2,0,2,0
0,0,1,0,3,2,5,4,8,2,9,3,3,10,12,9,14,11,13,8,6,18,11,9,13,11,8,5,5,2,8,5,3,5,4,1,3,1,1,0
0,0,0,1,3,4,6,5,2,7,7,8,6,11,5,6,10,4,5,9,15,15,14,13,14,12,10,9,8,8,6,6,6,6,5,4,2,1,1,0
0,0,2,2,4,2,1,7,5,7,3,6,10,5,5,14,14,9,11,10,5,5,5,15,6,6,10,13,6,8,3,5,7,7,3,2,2,0,2,1
0,1,2,3,2,1,4,1,8,7,4,5,10,3,11,5,11,8,18,4,17,9,5,6,15,14,11,5,6,4,7,2,5,6,4,5,4,0,2,1
0,0,0,0,1,2,4,7,3,5,8,7,5,13,10,7,11,8,18,6,13,4,10,13,5,5,4,3,8,9,2,3,2,3,5,3,1,3,1,1
0,1,0,2,1,2,3,6,5,2,9,3,5,12,9,5,8,11,9,4,19,19,15,9,6,12,9,3,6,2,9,9,8,5,3,5,3,0,2,1
0,0,1,3,4,4,2,2,6,3,2,9,4,11,12,8,6,8,8,7,18,11,13,13,10,5,7,11,3,6,9,6,4,5,1,4,1,0,0,0
0,1,0,3,2,3,2,2,4,6,4,11,11,8,3,9,11,7,12,16,10,5,17,8,11,15,6,8,11,10,6,9,4,3,3,3,1,3,1,1
0,1,2,1,4,1,2,7,2,2,8,9,5,6,12,12,6,14,6,5,12,11,11,5,10,7,6,6,10,2,4,5,8,3,5,3,3,0,0,1
0,0,1,2,2,1,4,2,7,4,10,6,4,3,6,5,8,13,8,8,12,4,13,4,13,4,14,5,12,10,6,3,2,1,5,3,4,3,2,0
0,1,1,1,4,2,1,3,5,3,2,3,11,3,4,5,14,4,5,8,18,18,13,5,11,4,13,12,11,4,10,9,3,3,6,3,2,0,2,0
0,1,0,0,2,3,5,2,5,8,4,7,7,8,5,5,8,15,14,4,10,12,8,14,11,14,5,13,4,6,8,3,6,5,5,2,4,2,2,1
0,1,2,3,2,5,6,4,2,4,6,9,6,9,6,6,14,11,6,18,6,13,18,7,15,13,3,12,8,8,5,2,5,7,4,2,2,3,2,0
0,0,0,1,4,1,4,1,7,7,8,7,7,4,9,3,8,17,17,9,13,19,5,10,8,7,5,3,7,4,6,5,4,1,5,2,1,0,0,0
0,0,2,1,1,4,5,7,8,5,5,3,6,9,7,8,10,10,13,19,18,15,4,11,6,4,8,11,7,5,4,3,7,3,5,4,4,0,1,0
0,1,0,3,4,3,3,7,6,8,4,11,6,10,10,7,12,9,11,17,10,16,17,4,5,8,4,8,10,8,5,5,4,7,4,2,3,1,0,1
0,0,0,3,1,3,5,1,6,5,3,4,8,11,11,3,4,12,14,17,7,9,4,8,8,15,3,12,9,10,6,6,3,3,2,5,4,3,1,0
0,1,0,0,4,5,5,6,8,9,2,11,4,13,5,15,13,5,13,7,7,5,12,4,12,10,7,4,4,10,10,7,8,2,4,3,4,0,1,1
0,0,2,0,2,3,2,4,4,3,10,5,8,9,8,12,15,10,9,4,17,5,13,12,15,5,8,10,9,5,3,9,4,2,6,4,2,0,1,1
0,0,2,1,3,4,3,2,7,3,5,7,9,8,6,3,7,12,13,15,20,7,5,17,13,5,5,13,8,6,8,4,5,1,1,5,3,2,1,1
0,0,0,3,4,2,2,5,2,8,6,10,7,13,7,11,10,6,12,14,8,7,9,12,11,5,5,13,7,7,4,9,4,7,2,1,2,3,0,1
0,1,1,2,4,1,6,3,8,8,8,9,8,7,12,9,5,7,9,11,8,7,11,6,8,13,14,5,3,7,10,6,8,6,5,4,4,2,0,0
0,0,2,3,3,1,5,3,3,6,8,4,12,8,12,11,14,9,5,7,11,13,13,4,13,12,14,6,7,5,3,4,3,1,1,3,4,3,2,1
0,1,2,3,2,4,1,3,6,2,10,11,7,3,9,6,11,15,4,19,16,9,18,4,6,12,6,5,9,6,9,5,2,4,6,2,1,3,2,1
0,1,0,3,4,5,6,5,4,3,3,9,9,13,10,12,14,7,15,16,15,7,15,6,9,7,10,9,4,8,2,6,8,2,6,4,1,3,0,1
0,1,0,1,4,2,2,7,7,8,7,11,9,5,5,6,14,7,6,14,8,17,5,13,8,6,13,13,10,10,4,2,2,7,6,3,4,1,1,1
0,0,2,2,2,4,3,7,6,9,10,10,3,5,14,14,9,15,16,17,15,10,4,14,12,6,8,12,4,3,6,4,8,3,2,5,1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,4,6,9,5,1,2,1,4,2,0,0
0,1,0,1,4,2,2,5,4,7,3,11,3,12,11,6,4,15,15,16,8,4,16,15,8,7,12,10,5,5,9,5,8,1,3,4,4,2,0,0
0,0,1,2,3,5,4,6,7,7,2,8,9,6,4,9,7,14,6,11,17,16,13,12,16,12,6,5,8,3,8,5,3,1,4,3,1,2,0,1
0,1,2,3,1,3,5,2,2,4,5,9,12,4,7,13,15,4,15,12,15,18,5,16,4,15,8,9,4,9,2,2,6,1,2,3,3,2,1,0
0,1,1,1,2,2,6,3,5,2,10,4,7,13,3,5,14,10,9,16,18,11,15,5,9,14,8,4,3,3,2,8,4,1,4,1,1,1,2,1
0,1,1,2,1,1,5,3,5,4,9,8,11,3,5,15,6,6,8,19,8,15,18,10,12,10,10,6,9,3,10,9,7,6,3,3,1,2,0,0
0,1,2,0,2,1,4,1,5,7,3,2,5,6,6,9,4,17,11,10,16,12,17,13,10,7,13,6,8,9,8,3,8,2,6,1,1,3,2,0
0,0,1,2,3,2,3,5,3,9,8,4,3,9,8,14,6,15,13,4,17,8,9,17,9,5,6,8,10,6,3,7,4,4,3,1,1,0,2,0
0,1,1,0,1,1,2,7,8,6,4,4,9,3,10,14,14,11,6,8,18,5,13,10,4,5,3,12,9,7,8,8,2,4,3,4,3,2,1,1
0,0,0,1,1,1,4,2,5,4,10,9,7,9,3,15,12,6,14,17,16,18,5,8,10,12,10,11,11,8,10,9,8,5,1,3,4,3,0,1
0,0,0,2,4,4,1,2,7,4,7,7,10,7,14,9,6,17,8,8,8,9,6,15,15,12,10,9,11,6,4,7,7,2,4,1,4,1,1,1
0,1,1,1,1,1,1,3,3,4,10,2,6,7,12,8,6,5,11,19,8,10,6,9,15,7,13,7,10,3,3,8,2,2,1,3,2,0,2,1
0,1,1,2,2,4,5,3,4,6,2,3,10,3,7,15,10,8,12,7,13,12,9,7,8,4,9,8,12,10,6,2,4,3,4,3,3,1,0,0
0,0,0,1,3,2,6,5,6,6,7,8,3,13,5,12,4,12,10,18,13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,14,10,4,11,8,8,2,3,5,2,2,3,6,5,0,1,0,0,0
0,0,1,2,1,2,4,5,3,10,5,10,0,4,12,8,2,12,8,8,4,14,1,13,2,8,6,5,1,4,3,2,3,6,1,2,1,0,0,0
0,0,1,3,0,3,2,0,3,2,6,11,3,1,0,3,3,0,11,1,6,3,4,16,3,2,13,6,9,4,1,7,5,3,3,1,3,1,0,0
0,0,1,2,1,0,4,3,1,6,4,14,4,3,14,17,1,0,8,5,4,4,10,2,14,5,11,0,6,4,4,5,0,3,0,0,2,1,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,1,2,2,4,4,2,5,2,4,8,4,10,7,3,13,10,11,7,7,9,17,7,6,12,13,12,6,5,4,8,6,7,3,5,1,1,0,1,0
0,1,1,1,2,1,4,1,4,9,3,10,10,4,7,10,5,15,17,9,6,12,10,11,9,15,7,11,11,9,3,4,8,3,6,2,3,0,1,0
0,0,1,2,4,1,2,3,6,8,5,6,4,3,8,12,7,4,14,11,15,17,13,4,11,13,10,9,5,6,4,9,4,3,4,2,4,2,1,0
0,0,2,1,1,2,4,1,5,8,3,2,6,10,6,5,11,9,15,9,5,9,17,13,9,12,5,4,6,3,5,8,8,7,4,2,2,3,2,0
0,1,2,3,4,2,2,5,5,5,2,9,11,11,5,15,15,16,15,17,18,18,8,12,5,10,12,11,8,2,7,7,4,2,1,5,1,2,0,0
0,1,0,0,2,2,1,5,6,8,9,7,11,6,4,14,15,11,13,11,18,9,5,16,6,11,10,10,10,2,5,8,7,2,6,4,2,2,2,0
0,0,0,2,4,5,1,1,5,2,10,6,12,5,12,6,13,15,11,12,19,14,15,17,13,9,14,4,12,8,6,4,7,6,6,4,1,2,0,0
0,0,1,2,2,2,2,4,2,5,6,6,10,12,8,15,11,14,15,15,20,9,7,9,10,7,9,12,11,2,8,6,2,2,3,5,1,1,2,1
0,0,1,3,2,5,5,5,7,4,4,3,5,7,9,13,4,13,16,11,13,10,16,13,12,9,6,10,12,6,7,8,8,1,2,3,2,0,0,1
0,1,0,3,3,4,1,7,7,8,8,10,5,6,11,5,16,5,16,19,9,7,12,15,5,3,7,8,9,8,6,2,2,7,6,3,1,1,1,0
0,0,0,1,4,1,6,6,2,8,7,10,4,8,11,9,5,4,11,18,7,19,4,5,8,9,5,12,4,11,8,5,3,2,2,5,4,0,1,0
0,1,2,2,1,2,4,5,5,8,2,10,8,7,12,4,14,14,9,15,20,5,14,12,11,6,12,12,6,9,9,6,5,4,6,4,2,3,1,1
0,1,0,1,1,3,1,5,5,6,5,11,5,12,14,12,8,16,5,7,15,12,12,10,5,9,14,13,10,6,2,5,4,3,1,5,2,1,0,0
0,1,0,2,3,5,4,4,5,9,4,8,9,11,12,5,8,4,16,5,14,15,14,12,11,9,3,8,8,6,9,3,7,2,6,1,2,2,2,0
0,1,2,3,2,4,6,3,7,3,10,2,5,13,10,11,10,17,7,9,7,17,17,13,15,7,9,6,10,10,5,9,8,5,1,4,2,2,0,0
0,0,0,3,4,2,4,6,4,5,4,3,12,9,3,8,9,8,12,17,20,11,4,9,12,9,3,12,7,8,7,2,2,5,2,5,3,3,0,0
0,0,0,3,2,5,4,7,3,9,2,2,6,3,3,15,5,7,14,19,11,13,6,16,5,6,8,13,6,2,8,4,3,5,4,5,2,3,0,1
0,1,0,2,3,3,4,7,7,9,2,3,9,3,6,14,6,4,11,7,17,7,16,11,6,13,7,7,11,2,10,2,8,5,2,4,2,1,1,1
0,1,1,3,2,1,1,1,8,2,8,10,3,10,9,7,16,17,8,19,18,6,5,7,8,14,14,10,12,5,7,7,2,2,6,3,4,2,2,0
0,1,1,1,2,2,2,7,5,4,8,3,4,6,4,12,9,11,12,14,6,6,18,12,9,9,11,8,4,3,3,8,3,1,1,2,1,1,1,1
0,1,1,3,2,2,6,2,7,2,4,5,11,10,13,5,8,6,13,14,19,8,13,4,15,8,12,10,12,8,5,9,2,6,2,4,1,2,1,0
0,0,1,2,2,5,2,5,8,7,5,2,11,5,14,10,6,14,11,6,18,6,14,9,14,5,6,3,6,11,7,7,4,1,4,1,2,1,2,0
0,1,1,2,2,3,6,4,6,7,10,10,12,12,6,15,5,15,10,19,7,15,16,10,7,14,12,6,7,2,3,9,8,5,6,4,1,2,1,0
0,1,0,3,2,3,5,2,2,7,3,6,7,9,12,12,15,15,15,13,14,8,17,12,15,4,9,13,12,4,6,3,5,7,2,5,1,1,0,0
0,0,0,1,2,4,1,4,2,2,6,4,10,8,5,14,6,11,10,10,17,10,14,16,8,13,3,4,7,3,5,7,2,3,5,5,1,0,2,1
0,0,0,1,3,4,4,5,6,6,8,7,11,7,9,6,15,7,12,10,16,16,15,11,4,5,14,8,5,9,8,2,6,5,5,1,3,2,0,1
0,1,0,3,4,2,5,3,2,7,10,2,5,8,4,8,14,15,15,8,15,6,17,14,12,5,12,8,9,9,2,5,4,5,2,5,4,2,1,1
0,1,0,1,4,3,1,6,4,6,2,6,10,12,6,15,9,7,10,8,15,5,8,16,8,4,7,12,11,4,4,7,6,7,3,4,3,2,2,0
0,1,2,1,1,2,1,7,2,3,4,6,8,12,3,11,9,11,15,16,17,4,17,5,8,6,3,5,10,11,4,6,4,2,1,4,1,3,0,1
0,0,1,3,4,5,3,5,5,8,7,6,8,5,14,15,14,9,8,16,20,19,5,6,8,9,5,12,9,2,9,6,6,3,5,5,4,0,0,0
0,0,0,2,3,2,4,2,6,8,5,10,3,6,12,9,10,4,7,6,15,19,5,7,10,15,6,12,12,10,2,8,6,3,5,4,2,0,1,0
0,1,0,2,2,4,4,2,8,4,6,7,11,5,4,7,13,11,12,5,9,18,15,4,11,6,11,6,9,4,4,5,6,6,6,5,3,1,2,1
0,0,0,2,3,2,5,2,5,9,3,4,9,10,10,9,5,12,10,16,12,6,15,9,6,3,8,13,7,8,2,5,4,3,5,4,1,2,2,1
0,0,0,3,3,2,6,1,8,3,3,5,12,6,8,13,4,14,9,6,14,10,15,13,15,11,12,8,4,4,10,3,4,7,1,2,4,2,2,0
0,0,1,1,3,4,1,6,5,5,10,9,6,5,11,14,7,14,6,10,11,15,11,10,16,7,4,3,11,7,5,3,3,2,2,3,3,2,0,0
0,0,1,0,2,3,5,3,5,6,5,3,5,6,6,9,11,10,11,19,19,19,14,5,7,13,5,8,5,6,8,2,8,1,6,3,1,1,1,1
0,0,1,2,3,2,4,6,8,4,3,7,10,4,5,7,8,6,14,15,6,4,9,17,6,6,8,5,7,8,6,9,3,7,4,1,3,0,0,1
0,1,1,1,4,4,4,5,2,2,4,7,4,12,11,11,15,13,7,11,10,6,8,4,5,11,13,4,7,11,7,3,8,5,2,1,1,3,0,1
0,1,1,1,1,2,5,6,5,7,6,3,8,11,13,8,14,14,8,12,8,5,15,13,13,15,10,9,3,4,6,4,7,1,4,4,3,3,2,1
0,1,0,1,1,4,2,4,3,3,3,8,7,4,10,13,10,6,17,16,20,7,12,16,6,6,11,12,7,4,2,7,7,1,4,4,1,1,1,0
0,1,2,0,1,2,6,5,8,6,7,6,11,6,7,12,9,7,16,7,10,12,14,9,15,11,5,3,6,9,9,3,5,2,3,5,3,3,1,0
0,0,1,0,4,4,1,7,4,5,6,9,11,6,3,7,10,15,11,17,19,15,8,14,16,14,14,8,3,2,9,6,5,1,3,5,2,0,1,1
0,1,0,3,4,5,5,2,8,2,2,4,6,5,6,13,7,9,7,6,8,10,13,4,4,6,14,8,10,3,9,6,7,6,2,1,2,3,1,0
0,1,1,0,3,3,2,4,2,6,4,3,11,11,6,3,10,10,18,13,14,8,12,8,8,13,6,7,6,5,9,7,8,3,6,5,4,3,2,0
0,0,1,2,4,3,4,4,4,8,6,8,5,11,13,4,16,11,11,7,6,18,13,9,10,10,5,9,10,4,2,5,8,5,3,5,4,1,1,1
0,0,0,2,1,2,3,2,6,2,10,2,12,7,8,15,16,8,16,13,11,14,14,16,15,14,7,5,3,4,2,2,2,1,2,2,1,0,2,1
0,0,1,0,3,4,5,6,5,8,3,4,10,5,3,10,9,15,4,13,5,17,9,4,15,6,6,3,3,3,10,7,7,7,1,1,4,0,0,1
0,0,0,3,4,5,1,5,4,5,5,5,4,12,14,6,10,14,11,19,12,11,8,16,14,6,13,8,8,9,3,9,3,1,2,5,3,1,2,1
0,0,2,2,3,2,2,1,7,3,3,8,12,3,12,5,12,11,5,12,10,8,17,16,16,12,5,7,3,2,3,6,8,3,1,5,2,1,1,0
0,1,2,1,4,5,1,6,2,3,10,7,11,6,11,5,6,4,17,5,5,5,16,6,10,12,11,5,10,11,9,2,2,5,1,2,4,3,0,1
0,1,2,2,4,2,3,2,4,3,2,3,3,8,8,11,4,6,9,11,14,9,14,14,15,15,10,6,7,2,9,9,6,1,2,2,3,1,0,0
0,0,2,2,2,1,5,4,7,7,2,9,12,6,7,15,10,4,12,4,20,7,18,16,9,15,4,11,4,10,4,8,5,2,3,1,4,0,0,1
0,1,0,3,2,4,1,5,8,5,5,10,9,12,10,4,4,14,16,4,20,14,10,15,6,6,6,8,7,5,7,5,5,1,6,5,4,3,1,1
0,0,0,2,2,3,4,1,8,5,6,5,8,12,14,6,4,10,18,10,10,11,7,15,6,14,11,10,9,2,2,9,3,6,6,2,4,2,2,0
0,0,2,3,2,4,2,3,2,6,2,10,10,7,4,13,14,11,17,16,6,8,4,16,12,15,6,11,12,5,10,3,6,4,6,3,2,2,1,0
0,0,0,3,2,1,5,3,4,3,6,5,5,9,13,11,6,6,7,11,8,17,11,16,14,8,13,7,9,9,7,3,2,2,1,2,2,1,0,0
0,0,1,3,3,3,3,3,5,4,4,9,9,13,4,11,14,5,13,10,11,18,11,8,11,6,8,5,5,2,4,2,6,1,1,5,2,2,1,0
0,0,1,2,3,5,4,7,3,3,7,7,3,3,8,4,16,9,9,9,5,4,12,6,4,15,3,11,4,4,3,5,4,6,5,2,4,0,1,0
0,0,2,3,2,1,4,7,8,4,4,11,12,6,9,13,10,11,13,4,17,16,12,5,4,11,11,5,12,2,10,2,4,3,4,2,4,2,0,1
0,0,2,2,1,1,4,4,5,2,8,10,4,9,13,5,11,5,10,5,9,15,18,14,11,11,7,6,11,10,4,8,2,7,2,2,2,1,0,1
0,1,0,2,4,4,5,1,2,5,5,8,10,12,10,9,15,9,7,9,10,7,5,8,9,6,7,5,11,9,3,8,6,7,5,1,3,0,2,1
0,0,2,1,1,4,4,6,2,4,4,4,7,12,11,15,10,9,12,15,7,17,14,12,6,12,5,11,3,9,7,8,8,3,3,3,1,1,0,1
0,1,0,0,1,2,2,3,4,8,5,2,7,13,14,13,15,16,15,13,18,4,10,11,6,3,14,4,4,6,10,8,6,2,6,2,3,0,0,1
0,1,0,2,1,3,6,1,3,4,10,2,8,11,11,12,14,12,15,15,20,11,12,7,4,15,9,11,9,5,10,7,5,2,3,1,4,2,0,0
0,0,2,2,3,3,5,1,4,2,9,7,5,7,11,10,14,6,9,7,18,15,15,5,6,14,5,5,11,9,8,9,8,1,6,4,2,1,2,1
0,0,0,2,3,4,4,5,3,2,9,8,8,12,11,6,15,8,17,14,20,7,8,10,4,11,9,6,7,7,2,3,5,6,3,4,3,3,0,0
0,1,1,1,3,1,6,4,5,5,2,6,9,13,13,11,10,6,15,16,14,16,14,10,5,9,8,4,9,4,5,9,7,5,6,1,2,1,2,1
0,0,2,3,1,4,6,6,4,5,3,5,10,8,6,8,4,14,7,17,7,5,17,8,10,10,10,3,11,3,9,6,6,7,2,1,3,1,2,1
0,0,2,1,4,4,4,7,5,5,10,8,6,12,14,12,6,6,16,5,6,15,10,5,15,13,13,7,3,11,9,3,7,4,5,4,1,2,1,1
0,1,2,1,2,3,6,1,2,6,10,7,12,6,3,4,4,16,16,18,9,7,10,10,16,12,11,6,3,10,6,8,5,3,4,1,4,2,1,1
0,0,1,3,2,1,1,4,4,5,10,9,6,5,12,13,4,16,11,19,11,15,13,13,9,7,12,5,3,7,8,8,6,2,5,5,3,3,2,1
0,0,1,0,1,3,1,3,4,7,7,8,8,6,7,5,10,12,6,15,15,8,12,8,14,5,5,7,9,4,9,2,3,4,5,3,4,2,2,1
0,1,0,0,2,1,5,1,8,3,7,2,5,13,9,9,10,12,9,5,12,7,5,8,16,5,6,5,4,4,2,2,4,1,3,5,2,1,0,0
0,1,1,2,1,4,2,3,3,9,2,7,6,7,6,3,13,11,13,15,14,15,8,15,14,13,8,9,10,8,5,9,7,4,6,2,4,3,1,0
0,1,1,3,2,4,2,7,3,8,5,9,10,7,9,4,4,5,4,10,13,4,9,9,12,8,7,5,3,4,5,9,6,1,4,1,2,0,0,1
0,0,2,2,4,5,6,2,5,3,5,5,11,6,8,8,6,6,10,17,19,9,11,8,7,11,4,5,12,6,3,8,7,5,2,5,1,3,0,0
0,1,0,2,4,3,6,7,7,9,2,7,9,5,12,7,8,5,15,12,13,16,18,5,13,15,4,8,3,4,7,8,6,1,5,4,2,1,2,0
0,1,1,3,4,5,4,3,4,9,10,5,11,10,7,6,10,7,15,18,14,17,15,16,13,14,6,4,6,8,9,6,5,2,4,5,4,1,2,0
0,0,2,1,3,4,3,6,8,5,6,2,10,11,11,10,5,15,9,18,10,15,11,15,8,15,7,13,7,5,4,3,8,6,5,1,1,0,0,1
0,1,1,0,2,1,4,4,4,5,10,11,12,10,7,10,7,16,16,8,14,18,8,16,7,13,14,12,9,2,10,9,7,7,2,2,3,2,0,0
0,1,0,1,1,2,4,1,4,5,5,7,3,12,10,9,5,5,17,4,8,12,5,11,11,4,13,7,6,4,6,8,7,3,6,5,2,1,1,1
0,0,2,2,2,4,1,4,7,5,8,11,12,5,3,4,6,6,17,17,16,7,4,17,16,4,11,3,11,4,4,2,2,5,3,3,2,1,0,0
0,1,0,1,4,2,6,3,7,6,9,8,4,9,10,7,7,6,6,5,5,13,17,4,11,15,13,3,10,5,10,4,4,2,4,4,2,2,0,0
0,0,2,3,2,4,6,4,3,5,6,5,10,10,8,9,15,16,17,14,5,18,17,6,7,6,7,11,7,10,3,2,5,2,2,3,4,3,1,1
0,0,1,0,1,1,3,1,4,7,8,10,11,11,8,13,9,7,12,14,16,10,10,15,9,4,9,10,3,10,10,9,8,5,2,2,3,3,1,0
0,0,1,1,4,5,3,4,8,2,10,6,6,5,9,3,16,16,18,10,16,19,11,8,15,3,11,3,6,3,3,5,5,2,1,4,3,1,2,0
0,0,2,2,3,5,4,5,5,7,4,2,4,12,11,6,7,17,18,4,10,5,8,15,16,10,7,12,6,4,4,8,2,3,4,3,4,1,2,1
0,0,0,3,2,1,2,7,4,7,10,11,12,3,13,5,6,14,10,16,13,10,11,8,11,13,11,8,12,8,6,3,2,6,5,1,2,1,2,0
0,1,1,2,4,1,5,7,6,5,4,3,11,10,4,10,9,6,16,12,5,4,4,10,9,5,14,5,6,4,2,4,7,6,3,4,4,2,2,1
0,0,2,0,3,3,3,7,2,4,3,8,6,13,5,9,7,12,13,18,8,13,6,6,15,3,10,7,10,7,5,5,3,6,4,5,3,1,0,1
0,0,1,2,4,1,5,7,6,5,4,3,12,12,13,5,15,8,12,5,12,4,7,6,5,9,3,3,7,3,7,7,2,4,4,2,3,3,0,0
0,0,0,0,1,2,6,3,4,2,2,10,3,9,6,10,6,11,11,19,12,15,14,10,15,9,11,7,3,3,8,7,7,7,5,1,3,0,1,1
0,0,2,2,1,1,5,6,6,7,5,7,12,5,7,5,15,11,7,13,15,19,14,13,15,4,11,5,6,7,2,4,7,5,5,5,3,1,1,0
0,0,0,2,1,4,5,3,3,2,7,7,5,4,9,6,16,8,13,12,16,17,5,15,13,6,8,13,12,6,3,7,7,2,2,2,2,1,2,0
0,1,2,1,4,5,5,1,7,6,5,10,9,4,4,5,16,4,5,4,6,9,11,4,4,5,4,8,10,7,6,7,8,1,6,2,4,1,2,1
0,1,2,3,4,2,2,1,3,2,9,2,8,9,8,13,5,11,13,8,20,7,6,15,4,7,14,4,8,9,7,6,3,3,5,5,4,2,0,1
0,0,2,0,4,4,6,3,4,8,4,8,10,13,6,10,10,15,6,13,10,6,16,6,5,3,10,6,9,3,6,7,4,6,1,4,3,2,2,1
0,0,0,2,3,3,3,3,6,7,5,6,10,8,13,5,14,9,11,6,10,17,7,10,15,3,4,10,12,11,7,7,4,5,6,4,1,1,0,0
0,1,2,0,3,1,4,7,8,2,5,4,7,11,11,14,12,17,10,11,5,18,14,14,9,7,5,8,9,7,9,8,2,7,3,1,2,1,2,1
0,0,0,2,1,4,2,1,7,5,9,8,8,6,9,3,11,9,17,6,10,11,17,16,16,10,13,13,6,10,6,9,2,2,2,1,2,0,0,0
0,0,1,2,4,4,3,5,3,3,2,6,9,13,6,13,6,4,15,6,15,11,6,14,6,7,13,4,3,11,4,4,8,4,1,3,2,1,0,0
0,0,2,2,4,5,5,1,5,2,9,6,6,7,14,15,11,17,13,19,18,18,16,4,7,15,6,5,6,8,2,4,6,7,5,5,2,2,2,0
0,0,2,1,2,3,6,5,8,5,3,8,11,4,6,5,15,17,9,7,16,9,18,6,9,13,12,10,6,10,2,7,6,5,3,4,2,0,1,1
0,0,0,2,1,5,4,2,5,6,7,6,6,9,3,15,9,11,14,14,14,10,5,10,11,11,12,10,6,4,8,7,4,5,2,2,3,3,1,1
0,0,0,1,1,1,6,3,3,4,7,7,9,7,14,3,7,8,12,7,6,7,7,6,8,14,4,6,8,10,4,3,3,5,6,5,2,3,1,0
0,0,2,2,4,3,4,2,8,6,2,8,12,9,5,10,11,16,16,14,9,15,7,17,13,11,10,10,3,4,3,6,5,7,3,3,2,2,0,0
0,0,2,0,3,1,4,4,4,4,9,11,4,9,12,15,4,13,9,13,11,17,5,15,8,6,8,3,12,8,7,3,2,7,3,3,4,0,0,1
0,0,0,1,1,3,1,5,4,8,8,5,9,3,14,15,7,11,10,17,20,8,13,10,9,7,6,8,3,2,4,4,3,3,1,1,4,0,0,1
0,1,0,1,4,5,3,7,2,3,9,7,3,11,3,12,6,16,16,13,12,8,14,17,9,13,8,8,9,4,2,8,5,6,1,5,3,2,0,1
0,0,0,1,4,1,5,6,4,9,3,5,7,9,11,15,10,9,8,18,18,19,12,4,6,4,11,11,5,11,10,3,8,5,4,1,4,2,0,1
0,1,1,0,3,4,1,7,7,4,2,8,7,12,14,8,6,8,12,15,18,8,12,17,14,4,12,7,10,8,5,2,8,4,2,4,2,0,1,0
0,1,1,2,2,4,5,2,7,9,7,6,10,9,9,4,16,4,11,12,6,10,16,12,7,11,14,8,12,7,6,7,8,1,4,4,1,0,2,0
0,0,1,3,3,1,3,3,3,2,6,9,6,3,13,15,7,16,17,15,10,16,4,17,8,13,4,10,12,3,5,7,6,6,4,3,4,0,1,0
0,0,0,3,2,3,2,5,8,8,7,4,8,6,8,4,8,4,4,4,9,19,8,9,7,8,10,12,4,11,8,9,6,6,6,3,3,1,1,0
0,0,1,2,3,5,6,4,8,4,10,7,3,6,12,6,6,15,9,19,7,15,16,11,9,9,9,6,8,2,7,7,4,5,6,4,4,0,1,1
0,0,1,0,1,3,5,5,5,3,4,9,10,5,6,5,13,9,4,6,5,16,5,11,5,12,10,5,7,10,6,9,6,3,4,5,3,2,0,0
0,1,1,1,2,2,4,1,2,8,9,8,5,11,3,12,4,7,6,7,5,5,11,12,7,12,5,8,6,10,6,7,4,2,1,4,2,1,0,1
0,0,2,1,3,5,6,2,3,8,6,6,3,3,11,5,4,14,10,11,5,15,10,15,13,12,13,10,3,2,2,5,7,6,1,5,4,0,1,1
0,1,2,3,4,5,1,2,2,6,7,2,4,8,8,14,14,9,13,13,9,8,10,17,14,15,13,13,9,4,2,6,6,3,2,5,4,1,2,1
0,0,1,0,3,4,4,3,3,9,3,2,8,11,8,7,9,15,7,19,16,15,6,16,5,13,9,11,5,3,6,9,5,3,3,2,4,1,0,1
0,0,2,0,3,4,5,7,6,7,8,4,4,6,9,5,10,12,16,8,19,17,16,16,12,12,12,9,8,4,2,8,3,5,6,3,2,2,0,0
0,1,0,2,2,4,2,4,2,8,7,8,5,6,12,3,13,14,18,4,10,17,14,11,9,15,3,10,3,8,10,7,6,3,6,1,1,3,0,0
0,0,1,0,2,2,2,5,5,7,7,6,8,5,7,13,14,11,15,16,6,14,11,10,9,5,4,7,8,7,4,7,2,1,5,2,3,2,0,1
0,0,0,2,4,2,2,2,4,4,5,8,5,9,8,13,8,9,11,15,7,8,18,14,16,3,6,7,9,6,8,7,2,3,2,2,1,2,0,1
0,1,2,1,3,2,5,7,3,8,3,6,5,5,3,15,16,6,15,6,18,13,4,10,5,5,12,3,7,7,3,3,4,6,6,1,1,0,2,0
0,0,1,2,3,1,1,7,8,2,2,6,8,12,12,14,6,5,18,12,13,6,17,8,14,3,4,7,7,4,5,7,4,5,2,2,4,0,2,1
0,1,0,0,4,3,1,3,8,6,9,3,10,6,3,14,7,15,18,6,7,4,10,5,9,12,4,6,8,5,10,9,4,7,1,5,1,3,1,0
0,1,0,3,2,1,4,6,5,6,3,9,11,13,11,15,16,13,18,7,9,6,15,10,16,5,7,10,9,9,3,4,7,2,4,2,4,0,2,1
0,0,1,3,1,4,6,5,5,8,7,8,4,13,6,14,16,16,11,8,16,11,8,8,16,8,6,4,11,5,6,8,7,3,5,4,2,3,0,1
0,0,0,2,3,3,5,2,3,3,4,2,8,10,5,13,7,4,15,9,11,5,12,4,11,7,4,6,6,3,4,3,8,2,1,5,4,1,2,0
0,1,2,3,3,5,5,3,2,6,10,9,6,6,10,3,11,4,7,7,20,5,9,8,9,4,6,4,6,8,8,2,5,1,2,1,3,2,2,0
0,1,1,3,1,1,4,3,5,4,3,6,9,13,10,10,12,14,14,12,5,14,10,9,10,10,11,4,10,6,4,9,2,6,4,2,2,3,2,0
0,0,1,1,2,3,3,4,7,7,7,9,9,13,12,8,10,15,18,9,11,7,5,13,13,9,4,10,4,8,6,5,7,1,6,2,4,3,2,1
0,1,0,3,1,3,1,2,3,8,5,5,4,4,6,5,10,7,7,19,15,5,11,6,11,11,7,8,5,8,6,4,6,6,4,1,1,2,1,1
0,1,1,2,4,3,4,1,6,7,6,2,10,12,9,8,8,14,18,15,16,15,16,9,10,12,14,12,8,5,4,5,2,7,5,1,4,3,1,0
0,0,2,1,4,1,5,4,5,6,10,11,3,5,13,11,4,8,13,11,6,10,12,5,16,4,9,5,3,4,7,4,6,7,5,2,3,2,2,0
0,1,2,1,4,4,4,3,2,9,7,2,9,3,11,12,14,8,18,9,8,13,4,12,14,3,10,12,8,8,10,8,6,2,6,3,1,1,2,0
0,0,1,2,3,4,6,7,2,3,6,5,12,13,4,12,8,14,13,18,7,18,9,9,15,7,12,11,4,7,10,7,2,3,2,5,4,0,1,0
0,1,1,1,1,3,1,4,8,3,3,10,6,10,9,5,11,10,6,9,19,4,18,7,10,15,3,3,10,9,10,3,6,1,1,2,3,2,1,0
0,1,0,3,4,5,5,3,6,2,8,4,10,8,12,12,11,4,18,6,19,5,7,14,14,5,8,4,10,6,3,8,7,1,6,5,3,2,0,1
0,1,0,1,4,1,1,5,5,3,4,3,11,6,11,11,6,12,13,10,16,5,15,15,12,5,13,5,8,6,9,7,3,3,3,1,4,2,1,1
0,0,2,1,4,2,1,4,4,5,6,11,7,10,8,7,16,11,16,11,9,7,6,17,9,3,4,6,9,11,7,5,8,6,4,2,1,3,2,1
0,0,0,0,2,5,5,1,6,2,8,3,8,13,10,7,7,6,4,9,7,8,17,15,8,14,4,12,5,3,9,7,7,6,3,5,2,3,0,1
0,0,0,1,4,4,3,7,8,8,10,11,10,11,7,4,13,8,12,13,12,17,7,16,7,8,4,10,5,7,9,2,7,7,3,1,3,1,0,0
0,0,1,2,1,5,4,7,2,4,9,10,4,4,10,11,5,8,11,6,8,17,5,15,12,11,8,8,5,5,3,5,4,5,1,4,4,1,1,0
0,0,2,2,1,4,6,5,8,5,6,9,7,7,10,5,14,7,7,13,6,11,7,11,8,12,10,5,4,5,10,5,3,1,1,2,1,3,2,1
0,0,2,0,3,1,4,3,7,8,3,11,3,10,9,9,7,5,7,10,9,7,6,7,7,4,11,6,5,7,3,5,3,4,2,2,2,1,1,0
0,0,2,3,3,3,1,5,3,2,4,11,9,11,14,5,11,14,6,18,14,7,10,13,10,15,13,10,12,5,3,5,6,3,5,2,3,2,0,0
0,0,2,1,2,3,5,5,6,7,5,4,12,9,5,14,6,14,7,4,7,17,9,9,12,14,6,13,4,3,6,9,8,7,3,1,1,2,1,1
0,0,0,3,2,3,1,4,8,8,2,2,8,3,5,8,7,4,16,11,18,12,8,9,7,10,12,8,8,7,9,8,5,2,1,5,4,2,1,0
0,0,0,0,3,4,6,6,8,5,2,9,8,8,11,8,10,12,8,13,9,5,5,17,13,9,3,5,11,4,4,2,4,5,5,2,4,1,1,0
0,1,2,2,2,1,5,7,2,6,10,4,7,8,4,9,5,15,12,11,13,9,7,16,6,7,13,4,3,6,5,3,3,5,2,3,4,1,0,1
0,0,1,3,1,5,1,7,5,5,2,7,6,11,10,8,13,16,6,7,11,4,11,14,13,7,6,4,3,10,4,8,2,7,4,4,2,1,1,0
0,1,1,3,3,1,3,6,2,8,5,6,12,4,4,13,15,17,12,11,6,11,4,7,11,8,13,6,4,9,8,6,2,1,6,1,1,1,2,0
0,1,0,0,3,3,4,6,2,8,4,9,6,4,8,14,15,16,7,18,6,8,13,7,6,7,9,6,4,7,10,3,7,7,6,4,1,1,1,0
0,1,1,0,2,5,6,3,8,2,9,9,4,4,9,9,13,14,10,17,10,19,11,12,5,13,7,5,6,5,3,4,4,1,5,2,3,1,1,1
0,1,1,2,2,1,2,2,8,4,8,10,10,13,7,9,12,5,10,10,17,14,9,12,7,15,11,9,4,11,7,2,5,6,6,4,2,0,1,1
0,1,1,2,4,1,6,6,7,9,6,2,3,7,14,3,12,14,17,9,17,5,7,15,11,4,8,11,8,7,8,3,6,3,6,2,2,0,2,0
0,0,0,2,4,5,6,1,6,8,5,9,12,9,12,9,15,4,14,4,18,13,11,8,12,14,11,10,3,7,10,6,2,3,6,4,1,2,2,0
0,0,0,3,4,5,6,5,5,9,6,3,9,12,14,13,16,14,18,9,6,15,7,10,6,5,7,7,10,11,10,2,6,6,2,2,1,3,1,1
0,0,1,1,1,5,4,3,5,9,8,10,9,13,5,4,14,7,10,14,20,7,7,12,14,8,12,5,7,8,10,5,7,4,2,4,4,2,0,0
0,0,1,0,1,2,1,4,6,6,10,5,6,13,4,9,7,10,5,10,18,14,16,10,7,8,11,8,3,2,3,9,4,7,3,2,2,0,2,0
0,1,1,2,1,1,3,7,2,8,10,10,7,9,10,5,13,4,12,17,5,5,16,16,15,9,7,3,10,10,2,9,3,4,1,4,1,0,0,0
0,1,0,3,1,3,6,1,2,5,2,11,6,10,8,5,6,8,17,14,16,4,15,13,16,5,5,8,10,7,5,6,6,6,5,2,4,0,0,0
0,0,2,0,4,5,6,5,6,4,3,6,11,6,11,13,13,4,5,4,9,15,7,5,5,7,12,5,8,3,3,6,4,5,5,2,3,3,0,0
0,1,2,2,4,1,4,2,6,8,8,3,8,13,6,8,16,11,18,16,11,11,12,6,9,6,12,4,11,6,10,4,5,3,4,5,2,0,1,0
0,1,0,3,2,4,2,6,5,7,4,3,8,4,8,3,7,7,11,13,7,7,10,17,5,4,6,7,6,3,8,8,8,2,5,3,2,1,2,0
0,0,0,0,2,1,5,3,3,7,8,9,5,7,8,4,11,9,12,18,6,7,11,16,10,3,6,6,12,5,3,4,2,4,4,5,2,2,1,1
0,0,1,2,4,3,6,5,4,6,8,7,9,9,13,11,14,7,5,11,9,14,16,11,12,13,7,3,7,10,3,6,4,2,4,4,3,1,1,1
0,0,2,3,1,2,4,2,3,3,3,10,5,13,7,9,15,13,6,17,14,4,12,10,12,8,13,11,10,3,7,4,2,7,5,5,3,1,0,0
0,1,0,0,2,1,2,3,3,7,2,9,9,6,12,14,15,13,18,17,14,10,8,14,4,6,3,8,3,11,9,4,2,6,5,3,1,3,0,0
0,0,1,2,2,2,6,2,3,2,4,8,10,7,6,11,6,17,4,17,12,15,17,11,4,9,9,13,3,7,5,2,5,4,6,2,2,0,1,0
0,0,2,3,4,2,6,3,4,3,4,7,10,11,11,14,16,6,6,17,7,12,17,7,9,7,10,4,3,8,9,9,6,6,6,4,1,0,1,1
0,0,1,2,1,5,4,3,8,2,10,11,9,7,8,4,15,7,13,9,12,9,15,13,9,11,11,4,9,5,5,7,3,6,6,2,3,1,1,0
0,1,1,0,3,2,2,7,2,5,7,9,12,4,5,9,16,11,9,15,18,5,10,13,7,11,3,13,6,11,2,8,7,7,4,4,3,2,0,1
0,1,0,1,2,2,4,3,6,5,2,4,10,3,8,7,11,10,9,12,11,16,12,14,9,3,10,12,5,2,5,8,7,6,4,1,4,3,2,1
0,1,0,3,3,1,3,2,3,2,10,5,6,4,3,11,8,7,14,12,7,14,8,9,14,14,3,11,8,9,5,3,6,3,1,3,3,2,2,0
0,0,2,2,4,3,1,3,4,4,7,3,10,9,11,8,5,8,14,16,16,18,9,12,14,3,9,11,7,8,2,3,7,4,3,4,3,2,2,0
0,1,0,2,4,1,4,3,6,8,7,7,6,7,6,14,9,7,4,18,13,14,18,4,7,6,10,9,12,10,10,9,6,5,2,3,2,1,0,1
0,0,1,1,4,3,5,1,3,6,6,6,12,5,7,12,16,14,10,10,9,10,9,8,9,9,6,12,12,2,5,4,8,5,6,5,1,3,2,0
0,1,0,2,2,5,6,2,4,7,2,2,11,5,6,4,4,7,18,17,9,5,7,15,10,4,10,3,3,2,3,4,3,7,3,3,4,1,1,1
0,1,0,2,3,4,1,5,3,9,2,5,8,10,10,14,15,16,7,9,10,14,6,9,4,6,6,12,7,3,9,5,6,7,3,2,1,0,0,1
0,0,1,2,3,4,6,7,6,4,5,9,6,13,5,12,8,10,7,6,7,12,8,13,6,9,14,6,12,2,9,9,3,3,2,2,1,1,1,0
0,1,2,2,1,1,3,4,7,4,2,7,12,6,9,10,12,8,11,15,5,16,18,10,16,8,7,8,5,4,6,8,4,4,5,2,1,2,2,1
0,0,2,1,2,5,3,5,6,4,4,2,9,3,10,15,5,17,16,6,6,16,7,6,13,8,4,5,3,10,2,2,8,5,3,3,2,1,0,0
0,0,1,0,2,5,1,1,7,5,3,10,8,10,7,6,10,11,8,17,8,17,7,7,7,14,8,9,4,5,8,3,7,3,3,5,4,2,2,0
0,1,0,3,1,1,1,1,6,5,7,3,4,4,9,10,12,8,5,19,14,15,11,5,4,13,7,10,3,5,5,5,8,5,1,3,4,1,0,0
0,0,1,0,1,2,1,1,6,7,10,10,6,13,11,6,6,11,5,5,14,18,14,14,5,3,12,5,7,8,4,5,7,1,3,4,4,2,2,0
0,0,2,1,1,4,6,5,5,6,2,2,6,4,10,6,5,15,12,5,12,14,9,16,8,10,9,7,4,10,5,5,7,3,1,3,2,2,1,0
0,0,2,2,1,1,6,4,6,3,10,6,12,5,5,10,8,6,10,14,15,17,17,4,15,12,7,3,11,6,8,4,4,1,5,4,1,3,1,1
0,1,2,0,2,2,4,7,4,4,4,3,6,3,9,8,13,12,8,5,6,12,14,5,10,6,7,10,11,7,6,4,8,3,4,5,4,1,1,0
0,0,2,0,4,2,2,5,3,6,6,7,9,4,3,13,16,10,16,5,12,7,12,5,5,12,4,12,4,9,6,4,6,5,4,3,1,3,0,1
0,1,0,3,1,5,1,5,7,4,10,4,7,12,11,8,13,17,5,15,18,12,5,17,13,3,8,4,12,2,7,3,8,7,5,4,4,3,0,1
0,0,1,2,2,4,5,3,6,8,4,11,8,4,4,4,6,17,5,10,15,15,7,13,16,12,4,9,8,4,4,5,4,6,5,2,4,1,0,0
0,0,0,3,1,4,6,5,4,3,5,9,9,9,8,5,5,5,17,10,19,10,8,9,11,4,9,7,3,8,4,6,3,6,4,4,1,3,2,1
0,1,1,1,2,2,1,7,2,5,9,5,8,3,7,3,5,7,10,10,13,8,4,5,8,12,7,8,12,2,9,4,4,1,5,3,2,3,1,0
0,0,1,3,4,5,5,1,3,3,8,2,5,3,8,14,15,5,6,8,16,15,7,12,11,11,7,4,12,7,4,8,8,1,6,2,1,1,2,1
0,1,1,1,1,4,2,4,4,4,6,8,11,13,12,3,9,11,14,17,12,16,8,13,7,15,14,9,10,7,7,3,2,2,1,3,3,1,0,1
0,0,1,3,4,1,6,3,4,3,7,3,9,5,12,7,8,11,17,17,13,7,7,5,14,5,11,4,7,2,9,4,7,1,3,4,1,1,1,0
0,0,1,3,3,2,5,3,6,4,5,8,12,4,12,13,7,5,16,12,20,4,16,7,5,3,10,11,5,10,10,7,2,7,4,5,2,3,2,0
0,0,1,0,2,2,2,1,4,8,10,4,12,9,6,9,5,13,15,12,20,12,12,11,15,10,4,7,4,7,6,2,5,7,5,5,1,0,2,0
0,0,1,0,1,2,4,4,3,2,2,5,10,5,10,4,10,16,9,14,5,16,11,13,5,3,9,13,7,6,3,7,2,7,1,1,4,1,1,1
0,1,1,1,3,3,4,3,2,8,10,9,4,13,4,15,10,12,4,15,7,9,16,16,7,8,8,10,5,9,4,3,4,5,6,2,1,1,0,1
0,1,0,2,2,4,1,4,5,8,10,5,8,13,10,4,5,7,16,18,20,10,13,12,15,12,12,13,9,9,10,3,3,3,6,4,2,3,1,0
0,0,1,1,4,5,2,1,2,8,10,7,4,5,11,11,7,7,17,6,14,5,17,8,9,15,9,12,12,5,8,6,6,3,1,1,2,3,1,1
0,1,1,0,3,1,4,5,4,2,10,4,10,12,5,7,13,9,18,5,8,19,13,8,7,14,4,13,3,11,3,7,3,2,1,1,2,3,2,1
0,1,2,2,4,2,3,6,4,2,5,7,10,8,5,11,8,16,14,19,11,5,10,10,4,9,9,11,7,9,5,9,3,7,2,4,3,2,1,1
0,0,1,1,3,4,3,3,4,6,4,5,3,12,11,14,14,9,13,7,19,5,14,16,16,11,10,10,9,3,6,3,4,5,6,1,3,0,0,1
0,0,0,1,2,4,6,7,7,2,3,5,9,10,8,3,9,13,9,13,17,10,13,14,11,13,13,12,3,3,7,8,7,4,3,3,1,0,0,0
0,0,2,2,3,5,6,3,7,8,8,11,4,6,6,3,13,5,10,11,14,19,14,12,7,10,14,10,7,4,4,5,2,5,4,1,4,1,2,1
0,0,2,1,1,2,1,2,8,8,8,5,5,5,11,3,16,6,9,13,15,8,15,5,15,6,7,7,11,2,2,6,3,1,6,5,3,2,1,0
0,1,1,3,2,5,3,3,4,6,7,2,7,6,14,6,15,13,7,5,5,12,10,7,6,15,14,12,4,6,3,8,7,5,2,4,4,3,1,0
0,1,1,3,1,5,1,7,8,6,8,8,7,7,7,10,6,17,9,10,15,12,11,13,4,8,11,9,11,5,7,5,4,1,3,4,3,0,2,1
0,1,0,1,3,3,2,2,4,8,8,4,5,6,6,10,14,5,6,13,12,16,15,12,7,6,4,7,10,7,7,7,3,6,5,3,3,2,0,0
0,1,1,1,1,1,5,6,4,6,8,9,12,10,7,15,16,14,13,15,15,7,13,11,7,7,11,13,7,3,10,3,3,1,6,2,2,1,1,1
0,1,2,2,4,4,5,1,2,3,10,3,12,10,11,7,10,8,4,11,14,19,16,14,8,7,14,5,5,4,3,6,4,4,2,3,3,3,1,1
0,0,1,1,4,1,4,7,6,7,2,6,7,6,12,13,9,9,16,6,16,4,14,6,14,14,9,11,6,11,5,3,4,5,3,3,3,0,1,1
0,1,0,3,4,2,5,7,5,2,3,10,12,8,7,7,10,10,5,18,13,18,16,13,9,12,12,6,12,6,5,2,7,7,5,1,4,1,1,0
0,1,1,2,3,2,1,3,8,5,10,7,9,7,6,7,5,4,14,4,14,18,11,13,6,13,6,13,4,11,7,8,2,2,1,5,4,1,2,1
0,1,1,2,3,2,5,1,3,3,10,10,7,12,4,11,13,9,10,12,13,6,11,11,6,7,11,11,12,3,5,7,3,5,2,3,4,0,0,1
0,1,2,2,1,5,6,1,4,4,5,4,8,10,4,4,13,16,6,11,13,18,4,15,15,4,5,4,8,3,6,6,2,1,1,1,4,3,2,0
0,1,1,3,3,3,2,1,2,9,2,2,6,9,10,3,5,16,9,6,18,16,12,8,11,15,7,11,4,8,8,4,8,3,2,1,3,2,2,1
0,0,1,0,4,1,2,5,7,8,6,4,10,6,5,3,16,16,4,12,14,10,17,10,13,12,10,10,8,2,4,3,5,7,5,3,4,2,1,0
0,1,0,3,3,1,4,5,5,7,7,8,4,7,13,12,16,7,4,8,5,9,10,17,16,7,9,13,4,6,8,6,5,5,2,3,2,3,0,0
0,0,2,3,3,2,3,7,7,7,2,8,11,7,10,6,12,5,6,7,14,14,5,4,13,4,9,6,3,10,4,2,3,7,1,1,3,3,0,1
0,1,1,3,3,4,3,2,6,2,3,5,6,10,6,6,7,6,12,19,19,8,5,14,12,6,4,8,11,6,2,4,4,2,5,2,4,1,0,0
0,1,1,0,2,3,4,4,6,7,7,9,11,3,10,15,5,9,9,9,20,17,12,6,9,11,3,5,12,11,6,7,4,6,1,1,1,2,1,0
0,1,2,3,4,3,2,1,4,7,3,10,6,10,4,3,15,12,15,6,11,14,8,4,12,6,4,12,11,7,9,8,6,2,1,2,4,3,1,0
0,1,2,0,1,2,3,7,5,5,4,9,8,4,4,14,6,8,17,15,5,19,8,6,15,5,12,9,8,7,5,5,7,7,2,2,4,1,0,1
0,0,1,1,4,5,1,3,5,2,9,10,7,11,5,12,14,15,12,15,16,11,4,6,16,6,12,12,4,2,10,4,8,4,2,5,4,3,2,1
0,1,0,1,3,5,1,7,4,5,4,7,7,6,13,13,10,14,5,9,16,4,7,9,14,12,5,6,9,11,4,6,5,6,2,3,1,0,0,0
0,0,0,0,4,3,4,7,3,8,3,6,9,3,3,9,15,6,11,8,20,8,15,10,12,4,14,5,4,9,4,9,5,7,3,4,1,1,1,0
0,1,1,1,2,2,6,1,2,3,7,3,3,7,5,13,12,6,5,7,7,6,17,11,4,10,12,7,11,7,8,6,5,4,1,4,3,3,2,1
0,1,1,0,3,4,5,5,8,7,8,6,5,12,4,8,7,8,13,7,6,17,8,4,8,15,3,7,5,11,5,8,6,2,4,4,2,3,0,0
0,1,2,3,1,3,1,1,5,4,2,9,12,8,7,6,16,15,9,15,16,18,4,12,16,3,12,12,12,10,7,5,2,5,5,3,4,2,2,1
0,1,2,0,2,3,1,1,2,4,9,6,6,13,7,3,6,13,14,17,12,6,11,14,12,5,13,5,8,11,4,2,6,7,6,4,4,3,2,0
0,0,0,0,2,5,4,3,3,6,8,8,9,9,10,11,16,5,8,13,11,6,5,12,14,8,4,3,6,6,5,7,7,4,2,4,3,2,2,1
0,1,2,2,4,2,3,2,4,4,8,8,6,4,3,8,9,12,16,19,5,5,10,11,16,15,11,8,5,6,6,4,4,6,6,4,3,3,2,1
0,1,0,2,3,4,4,4,4,7,2,6,5,9,14,8,13,12,13,10,7,18,15,17,14,15,3,11,6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,2,2,4,3,7,4,5,3,0,2,1
0,1,1,2,2,1,5,3,5,6,3,7,9,8,11,9,4,16,4,17,13,12,8,4,9,13,5,6,8,10,3,8,2,4,6,2,2,3,0,1
0,1,2,3,3,5,3,4,4,6,8,7,10,11,6,13,4,6,5,6,10,10,17,6,9,14,13,5,3,9,9,3,7,1,6,1,3,0,1,1
0,1,0,2,4,2,4,5,5,6,4,4,5,4,10,10,10,11,11,4,18,11,14,14,12,5,13,4,7,11,10,4,2,5,6,1,2,3,0,1
0,0,0,3,2,4,3,1,6,4,2,6,7,8,10,6,16,10,15,5,16,18,16,4,9,13,7,11,6,7,7,6,5,6,5,4,2,1,2,1
0,0,1,2,1,1,2,1,8,8,10,7,8,7,6,14,11,9,4,8,6,9,18,6,7,12,4,6,8,3,3,8,2,1,3,1,3,3,0,0
0,0,2,1,3,1,2,7,2,8,7,7,9,13,5,10,9,10,5,16,7,4,8,6,10,13,11,5,8,4,3,3,5,5,4,5,3,3,1,0
0,1,1,2,3,5,1,4,5,6,4,6,9,13,11,7,5,8,9,12,8,6,4,14,14,14,14,11,4,8,6,7,3,1,1,5,1,3,1,0
0,1,0,3,1,2,4,4,6,3,8,9,4,10,10,3,12,17,18,15,13,19,10,8,8,5,12,10,11,4,7,3,7,6,3,5,1,3,2,0
0,1,0,1,1,3,1,5,8,3,5,5,12,6,6,10,14,11,7,18,19,16,5,15,4,15,4,7,10,11,2,3,4,1,5,2,1,0,1,0
0,1,0,1,4,2,2,2,2,7,4,4,7,3,6,6,15,10,17,17,20,7,6,16,4,7,9,13,3,11,5,5,7,2,5,3,1,3,1,0
0,1,0,3,1,1,2,7,6,5,8,2,11,4,3,10,8,9,18,6,20,11,14,9,9,10,4,6,3,10,7,7,4,7,2,5,3,1,2,0
0,1,0,3,4,3,1,4,3,7,3,6,7,3,11,3,6,7,14,12,18,12,13,9,11,13,13,7,8,4,10,6,7,2,6,2,1,3,0,1
0,0,0,0,4,1,3,7,5,6,2,6,9,6,3,5,13,14,16,18,9,13,4,4,16,9,11,6,12,2,8,4,4,3,6,3,3,2,2,0
0,0,0,1,4,4,1,2,8,7,4,9,10,12,11,13,9,10,12,16,7,14,16,17,15,10,12,11,10,5,10,4,7,5,3,1,3,3,0,1
0,1,1,0,1,5,6,6,2,9,10,7,5,11,9,15,8,11,4,8,15,19,4,13,5,9,11,3,9,10,10,2,7,1,3,1,3,2,1,0
0,0,2,3,4,3,3,6,6,2,6,11,11,10,10,6,9,5,9,17,7,8,9,13,11,9,10,8,5,7,3,4,6,2,4,2,3,1,1,0
0,1,2,3,2,3,3,3,5,9,6,9,10,9,14,10,6,4,16,14,6,8,12,7,15,14,7,8,3,10,2,6,2,4,2,1,2,3,2,0
0,1,2,1,1,4,4,1,5,2,9,4,9,11,9,3,5,13,13,6,16,10,12,16,10,3,10,8,4,7,5,9,5,5,1,5,3,2,2,1
0,0,0,1,4,4,6,2,4,8,8,4,5,6,14,12,7,5,8,14,5,7,8,17,15,6,5,9,8,8,8,5,2,3,4,1,4,0,1,1
0,1,1,3,2,2,6,4,5,9,7,8,4,13,3,11,7,7,17,8,12,11,9,6,13,14,11,13,10,3,5,4,7,6,3,4,1,3,1,1
0,0,2,2,3,4,5,1,7,6,5,6,6,8,10,4,16,15,5,7,6,9,14,11,14,8,6,10,5,11,8,4,5,3,2,1,4,3,1,1
0,1,1,1,2,2,1,3,5,6,5,6,7,5,8,12,9,5,4,7,12,13,7,14,15,9,3,11,7,9,4,6,2,1,6,1,3,3,2,1
0,1,0,0,4,5,3,5,5,8,8,5,9,7,8,5,4,4,18,14,16,13,12,7,7,12,12,9,10,6,10,3,2,1,4,3,3,0,2,0
0,1,0,3,3,5,1,2,3,5,5,5,5,9,11,8,5,6,15,13,9,14,13,6,6,4,6,13,9,6,9,4,6,2,4,3,3,2,0,1
0,0,0,3,4,5,5,2,3,2,4,7,4,5,4,13,12,14,12,12,11,8,17,17,5,3,7,4,9,2,4,7,7,7,6,1,1,1,2,0
0,1,0,0,1,5,5,6,3,3,8,9,9,6,7,14,14,9,18,6,12,13,10,12,16,5,10,13,9,7,9,2,6,7,5,3,2,1,1,1
0,0,2,3,3,2,6,2,5,8,5,10,5,8,9,3,4,13,17,5,7,6,5,10,6,12,7,10,4,11,5,9,5,1,3,2,2,1,0,0
0,0,1,3,1,5,4,2,4,8,3,7,3,13,6,11,16,16,17,13,13,11,7,17,16,7,4,12,9,10,10,9,5,7,3,2,3,2,1,1
0,1,1,1,1,2,3,4,8,5,6,8,6,13,7,14,7,12,15,10,5,7,6,6,13,11,10,4,6,11,2,4,2,7,5,5,1,1,0,0
0,0,2,2,3,2,3,1,8,9,6,6,10,12,6,9,7,12,11,17,15,18,15,13,15,3,11,9,8,10,2,2,3,7,2,2,4,2,2,0
0,1,0,2,2,3,5,3,3,5,5,4,12,5,10,4,6,10,10,6,13,9,13,12,13,12,11,8,9,9,8,9,5,3,2,2,1,0,0,1
0,1,1,3,1,5,4,4,6,6,10,10,8,4,4,11,15,6,6,7,10,15,11,17,6,13,7,9,11,6,10,2,3,2,2,5,1,1,0,1
0,0,0,3,3,2,2,7,7,9,2,8,4,3,7,12,5,5,4,18,19,9,15,13,11,14,9,7,10,6,7,5,8,7,5,1,1,0,2,0
0,0,2,1,1,5,5,1,7,9,3,9,5,6,8,8,12,4,12,14,18,5,7,11,16,14,12,11,8,5,3,9,2,4,6,4,4,1,2,0
0,1,0,2,1,2,5,5,2,2,3,11,5,5,6,3,6,9,10,7,14,8,7,7,14,14,5,10,5,8,9,9,6,5,1,1,3,3,1,0
0,1,1,2,3,4,1,5,6,7,4,2,11,11,11,8,13,4,11,16,12,18,18,11,9,5,3,7,7,11,7,5,4,5,3,1,2,2,1,1
0,1,2,2,4,2,2,4,4,7,9,8,12,3,6,7,14,9,7,13,9,11,10,12,10,4,4,11,5,7,8,4,6,1,4,5,3,0,1,1
0,1,2,3,4,1,2,7,5,3,8,7,6,12,6,13,14,11,16,8,8,9,5,15,4,11,10,3,9,7,9,3,7,1,4,5,4,0,1,0
0,0,1,1,1,5,5,5,8,7,10,10,11,3,3,7,16,8,9,18,13,5,18,4,16,13,5,7,9,4,5,9,6,2,2,3,3,1,0,1
0,1,1,0,1,3,1,5,5,8,9,6,8,12,13,10,10,11,9,13,14,11,12,15,8,4,11,4,8,8,8,6,6,4,2,5,4,0,1,1
0,0,0,0,4,4,6,7,7,8,4,5,7,3,14,9,5,15,13,12,20,16,14,15,6,13,6,13,5,4,5,3,2,5,2,4,4,0,0,0
0,1,0,3,1,3,2,5,5,5,6,2,5,7,9,13,6,17,16,4,15,5,11,13,6,15,9,8,9,9,5,7,5,6,5,4,2,0,2,0
0,0,1,3,3,3,2,5,3,4,2,11,4,7,11,3,12,4,10,17,6,17,9,7,12,8,8,6,10,5,4,3,3,1,2,4,1,0,2,1
0,1,1,0,2,3,3,3,6,5,4,11,4,4,9,7,9,16,6,13,10,9,6,13,5,7,12,8,11,7,9,5,6,7,5,1,4,2,2,0
0,0,1,0,4,2,2,2,3,9,2,9,3,3,9,12,16,9,13,5,15,16,13,5,15,9,11,11,11,7,10,7,6,6,1,2,2,2,0,0
0,1,2,3,2,1,5,6,5,6,10,5,5,12,6,5,11,15,17,12,11,5,18,9,6,10,5,11,9,6,5,8,8,4,4,2,4,3,2,0
0,1,0,0,2,1,1,1,4,9,10,5,7,3,5,9,12,17,7,10,9,9,18,13,5,7,3,7,7,8,6,8,6,2,1,3,3,2,0,1
0,0,0,0,1,1,5,5,8,4,9,2,12,3,4,4,5,5,13,15,17,12,5,17,5,5,11,6,4,8,3,9,3,1,2,2,3,3,2,0
0,1,2,1,4,1,6,6,3,3,4,9,8,10,9,7,16,7,5,4,20,18,7,6,7,6,11,7,11,9,3,9,5,3,5,5,3,1,2,1
0,0,0,2,3,1,2,6,3,6,10,11,6,13,5,9,11,8,13,16,20,8,13,5,13,6,6,8,5,3,2,5,3,6,5,4,2,3,2,1
0,1,1,1,2,2,5,5,5,9,6,4,6,12,4,5,11,17,5,19,10,6,8,7,10,13,14,4,8,2,7,3,2,5,4,5,4,3,0,0
0,0,0,3,1,1,6,3,4,8,10,10,6,12,13,9,6,10,18,8,8,4,4,15,6,7,14,11,5,2,8,3,3,6,4,1,3,1,1,1
0,0,1,0,4,1,2,4,7,2,6,7,7,7,13,7,11,7,8,8,5,11,10,12,14,10,6,9,11,8,4,2,8,7,4,2,3,0,0,0
0,0,2,0,4,3,5,7,5,7,3,8,6,3,11,11,6,9,6,10,5,14,17,17,10,8,3,12,11,10,10,2,8,3,1,1,2,1,2,1
0,1,2,0,4,3,6,5,2,9,7,2,8,11,9,9,8,14,17,8,15,13,4,4,8,11,13,3,12,2,7,5,3,7,4,1,3,2,0,1
0,0,0,2,3,2,3,6,3,7,7,3,12,5,7,12,12,15,9,18,11,13,5,15,8,11,3,11,12,11,2,2,2,5,2,3,3,1,1,0
0,1,2,0,4,2,2,7,5,5,9,8,4,9,7,7,9,12,10,6,18,14,14,10,6,8,4,5,5,10,5,9,7,1,1,4,2,0,0,1
0,1,0,0,3,2,3,6,7,5,10,9,10,9,5,15,12,14,13,9,15,17,4,4,4,8,5,4,7,10,3,4,4,1,1,3,1,3,0,0
0,1,1,3,2,3,4,3,8,3,4,7,10,5,6,6,8,16,14,5,10,11,7,11,14,13,6,6,3,4,5,3,5,2,1,3,4,0,1,0
0,1,0,3,1,1,3,5,6,2,2,8,11,9,14,4,13,6,16,15,8,7,6,17,15,14,14,10,10,10,4,4,6,7,4,5,1,0,0,1
0,0,2,3,3,1,5,6,8,9,6,9,4,13,5,7,15,4,12,8,8,8,15,10,12,14,3,13,12,2,10,4,6,3,3,4,3,0,1,0
0,0,2,0,1,4,1,3,4,7,8,9,9,11,7,4,13,14,11,16,11,13,10,6,12,11,11,5,11,10,7,4,4,5,1,5,4,3,1,0
0,1,0,0,1,5,2,3,5,2,10,9,3,12,14,6,13,8,4,9,19,5,11,5,15,15,10,6,4,9,9,7,7,3,5,5,2,0,0,0
0,1,1,3,3,1,2,5,7,4,10,7,12,3,3,12,10,6,18,5,9,7,11,14,9,5,10,8,9,9,6,7,6,1,6,1,2,0,2,1
0,0,1,2,4,2,6,6,2,3,10,3,12,7,14,9,15,11,8,17,9,8,7,8,15,3,9,7,10,7,9,4,6,7,5,1,2,1,2,0
0,0,0,2,3,2,5,6,4,4,6,10,9,6,8,5,11,10,10,8,11,11,13,6,4,7,9,5,8,8,3,2,2,2,4,5,1,2,1,0
0,0,1,0,2,5,6,2,6,9,6,5,8,3,10,11,8,8,6,7,6,13,9,12,10,4,4,8,11,11,5,8,6,2,5,2,2,3,0,1
0,0,0,1,4,4,1,7,5,3,3,2,4,5,6,13,9,10,4,19,5,9,16,16,5,10,4,7,8,4,6,2,5,4,5,1,2,3,2,0
0,0,1,1,4,4,4,4,6,3,3,7,11,12,8,6,9,13,9,13,15,8,16,16,9,4,7,5,4,9,8,2,3,3,1,4,3,2,0,1
0,1,2,2,1,3,2,3,4,5,10,2,4,6,11,10,13,9,15,18,14,6,12,9,16,9,10,11,5,7,3,3,8,3,4,5,4,1,0,0
0,0,0,2,4,3,4,2,7,7,8,5,12,5,13,5,11,8,18,13,20,19,10,6,15,15,8,6,7,6,9,3,7,3,5,2,1,1,1,1
0,0,1,0,3,2,1,4,7,9,4,5,7,13,12,15,13,14,12,7,19,10,7,14,13,13,14,11,11,4,6,8,6,7,6,3,4,2,2,1
0,0,0,0,2,2,3,1,5,4,4,11,8,5,10,15,16,7,5,10,7,16,14,12,7,10,11,6,11,4,5,4,4,3,1,1,3,2,1,1
0,1,2,3,4,5,5,7,2,7,5,10,4,13,5,10,6,5,8,11,18,9,13,9,8,14,11,7,6,6,10,9,6,3,6,3,3,3,0,1
0,1,2,0,2,5,2,3,7,6,8,6,11,11,13,6,12,7,4,12,6,4,8,5,16,11,13,12,7,3,9,7,8,4,4,2,1,3,2,0
0,1,0,3,4,2,4,4,3,3,10,7,8,7,11,10,12,10,17,7,10,17,12,9,16,11,10,4,6,4,9,2,2,6,1,2,2,0,2,0
0,1,1,1,1,3,4,3,8,6,4,8,11,3,6,13,9,6,18,9,11,5,12,14,10,4,10,3,12,2,3,7,3,6,6,5,3,2,1,1
0,1,0,3,2,3,4,5,8,2,2,4,9,10,12,15,12,8,16,5,7,15,12,14,14,12,5,7,11,4,8,2,6,2,1,5,2,2,1,1
0,1,2,1,4,4,1,2,5,6,10,7,3,10,13,15,7,17,13,4,17,19,16,7,14,12,8,6,3,2,9,7,3,2,4,2,1,2,2,0
0,0,1,1,1,5,4,5,6,7,8,10,4,8,5,14,13,6,15,17,16,13,5,16,8,14,4,7,7,6,7,2,8,2,6,1,2,2,2,1
0,1,2,1,1,2,1,5,2,6,2,8,3,3,5,7,10,7,10,15,7,11,10,16,10,8,7,9,9,6,7,5,3,4,5,3,4,3,2,0
0,0,2,1,3,3,3,6,7,4,3,6,3,6,4,8,5,10,5,6,20,10,18,4,13,12,8,11,4,6,8,5,2,3,5,4,1,0,0,0
0,1,0,0,1,2,5,7,6,3,8,7,6,3,8,6,14,8,11,17,19,6,18,17,12,10,8,11,12,4,10,2,4,5,6,4,1,2,0,1
0,1,0,2,2,1,4,3,5,5,3,10,6,6,6,13,6,14,10,8,12,4,10,11,9,4,7,5,4,5,3,3,5,7,2,2,2,2,2,0
0,1,2,1,3,3,6,2,7,4,6,9,8,5,4,13,4,12,13,5,10,5,10,9,6,14,8,9,3,5,5,2,7,5,4,3,3,3,1,0
0,1,2,0,3,4,4,6,8,6,8,9,9,10,11,13,16,5,6,15,10,16,14,11,16,15,10,9,10,10,5,5,8,7,5,3,2,3,1,1
0,0,1,1,3,5,3,4,3,4,8,3,8,12,13,10,10,6,5,18,17,17,7,7,14,6,3,9,11,2,2,3,2,2,2,3,4,1,1,0
0,1,1,3,1,1,6,3,3,5,10,7,12,7,14,4,11,17,6,9,17,4,15,15,4,5,8,6,7,7,2,2,5,4,3,1,4,0,2,0
0,1,2,3,3,4,6,6,8,7,3,5,3,9,9,12,7,15,4,5,16,10,6,11,10,12,5,7,12,10,2,4,7,6,2,4,2,1,0,0
0,0,1,3,4,4,2,4,8,5,7,6,4,3,3,9,15,8,10,15,6,11,18,8,15,13,4,8,10,10,9,4,4,4,2,5,4,2,1,0
0,1,2,1,2,1,5,6,5,7,6,7,12,5,7,13,11,13,13,19,14,15,6,10,10,4,10,10,4,5,10,3,4,6,5,1,1,2,1,0
0,1,0,3,4,4,5,5,8,6,9,7,11,11,8,7,5,12,15,9,11,7,8,12,8,15,9,4,10,8,3,7,3,6,1,5,2,3,1,0
0,1,1,1,1,4,5,3,3,6,9,7,6,8,4,12,5,4,13,7,13,15,18,4,7,15,6,8,8,8,8,4,6,7,2,3,3,0,0,1
0,1,0,2,3,3,5,6,5,2,8,11,10,13,3,7,9,16,11,12,8,16,18,11,10,13,10,8,8,10,6,5,3,1,2,3,2,2,1,0
0,1,0,1,1,2,4,6,5,8,10,9,5,10,9,15,8,6,11,10,8,7,17,7,13,10,9,6,9,9,2,8,7,3,1,3,1,0,2,1
0,1,2,2,2,5,3,2,2,8,3,11,7,9,5,5,6,16,16,11,17,19,14,8,9,13,12,5,7,9,10,2,2,6,1,5,1,1,1,1
0,0,1,0,1,1,6,1,6,9,6,4,4,4,4,5,4,15,18,11,7,4,4,17,4,12,13,12,7,4,7,3,7,6,4,4,3,2,2,1
0,1,2,1,2,2,5,1,3,7,5,8,5,7,9,4,14,8,18,14,9,10,12,11,8,5,13,6,10,6,7,8,4,6,4,3,2,1,1,0
0,0,1,2,4,5,6,7,4,7,9,2,11,10,14,12,12,7,11,14,13,12,14,17,6,7,3,11,4,8,3,3,3,7,6,4,4,3,2,1
0,1,2,1,4,5,3,7,3,4,10,5,10,8,11,4,10,4,13,7,12,16,9,17,11,11,11,13,9,3,6,9,7,2,3,3,3,1,1,0
0,0,0,0,1,3,6,2,4,5,10,2,4,3,5,8,16,16,16,12,18,18,14,8,13,3,3,9,7,3,3,8,8,5,1,5,3,1,2,1
0,1,0,1,3,3,4,7,3,8,9,7,5,8,3,10,5,7,15,13,5,4,6,6,16,7,3,4,9,11,9,9,4,1,2,4,2,3,2,0
0,1,1,3,4,3,6,6,2,9,9,11,9,10,13,9,7,5,15,18,8,16,18,13,10,6,4,6,6,10,6,5,8,1,2,4,3,1,0,1
0,0,2,0,4,1,1,3,3,7,5,2,4,6,6,11,7,4,5,15,19,11,13,8,8,13,6,13,7,4,9,5,2,2,6,2,3,3,2,0
0,1,0,1,1,2,3,3,7,3,5,7,12,10,8,3,16,5,14,10,10,9,8,15,6,12,4,7,8,10,7,4,4,6,6,1,3,3,1,0
0,0,0,1,1,4,4,1,6,6,3,3,12,6,13,11,16,12,8,8,8,18,5,14,9,15,7,13,6,9,2,4,3,6,6,3,1,0,0,0
0,1,1,2,2,4,6,6,8,6,6,6,9,5,9,14,15,7,18,4,8,7,6,11,6,10,3,7,7,10,7,9,5,3,4,2,3,3,1,1
0,1,0,2,3,4,5,1,2,4,5,2,7,13,9,4,16,12,5,11,8,6,16,6,16,8,8,10,6,8,8,9,4,5,2,1,4,1,0,1
0,0,2,0,4,2,5,1,2,6,10,3,6,13,4,13,10,10,6,6,13,6,6,8,14,12,13,10,11,8,3,4,8,7,2,3,2,0,1,1
0,1,2,1,2,3,2,5,7,2,2,2,5,8,7,7,6,17,18,13,7,13,17,12,6,13,5,13,3,2,4,5,7,7,1,1,3,2,1,0
0,0,2,2,1,3,6,6,4,3,8,5,4,9,13,4,8,15,7,7,6,19,12,16,10,14,3,10,3,9,7,7,7,2,4,3,1,1,2,1
0,0,0,2,1,4,3,6,7,9,5,7,11,3,7,6,10,5,6,15,10,14,10,5,15,15,7,13,5,5,9,2,7,5,4,3,4,1,1,0
0,1,1,3,1,2,4,6,5,5,6,8,10,7,8,11,15,17,4,10,10,10,6,5,5,11,6,7,11,6,3,4,8,1,3,4,2,2,1,0
0,1,1,0,1,1,2,2,4,3,2,11,4,4,13,3,8,7,5,5,18,9,18,17,7,7,7,10,5,10,2,9,3,4,4,3,1,2,0,0
0,1,1,2,3,5,2,2,7,8,7,5,3,13,3,14,11,14,14,14,14,5,13,15,6,12,6,8,9,8,9,7,4,7,1,2,1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,3,0,0
0,1,2,0,4,5,6,2,5,3,8,3,8,11,7,9,7,4,8,11,5,18,4,5,6,6,5,13,7,4,7,9,4,3,5,5,2,2,2,1
0,0,2,0,3,2,6,7,5,6,8,5,8,11,13,8,5,11,10,11,9,12,17,5,4,15,7,5,11,3,5,8,4,4,5,4,2,0,2,1
0,1,1,3,3,1,1,3,4,3,6,3,9,6,6,7,5,15,18,4,9,12,9,4,9,4,9,11,10,8,10,2,6,1,6,4,4,2,0,1
0,1,0,0,4,2,2,4,4,6,5,9,8,3,14,11,5,7,5,14,9,7,15,10,11,5,11,12,4,7,10,6,6,2,6,3,4,0,2,1
0,1,2,1,3,1,5,3,8,6,3,3,12,13,12,6,15,10,5,4,16,10,12,14,15,10,6,4,8,7,7,4,5,4,3,5,4,0,0,0
0,1,1,0,4,5,5,2,7,5,3,5,3,8,11,13,15,9,14,19,16,11,10,17,7,8,3,7,8,9,9,5,4,2,4,1,4,3,1,0
0,0,2,2,3,5,1,4,6,4,7,7,3,13,7,3,7,6,18,18,10,12,17,8,7,15,13,13,11,4,9,9,8,1,3,1,4,2,1,1
0,0,1,2,4,5,1,7,7,7,8,2,8,13,10,10,5,16,17,13,8,6,9,5,11,15,5,6,5,10,2,3,8,4,6,4,2,2,0,1
0,0,2,3,3,2,3,4,8,7,6,11,5,6,8,8,9,16,7,13,14,11,17,9,9,3,11,8,3,6,4,9,8,3,6,3,4,3,2,0
0,0,1,3,4,1,3,4,8,2,9,6,3,11,11,6,8,6,17,13,17,12,5,11,4,15,7,4,9,4,8,6,3,4,1,5,4,1,1,0
0,0,0,0,3,4,5,6,6,9,10,6,7,12,9,6,15,15,9,7,10,14,15,10,5,15,13,12,8,5,7,5,4,2,2,1,2,1,0,0
0,1,0,0,3,5,2,4,3,2,6,5,9,3,6,13,12,16,10,4,15,10,4,15,13,15,4,3,11,2,8,4,5,2,5,1,3,0,0,1
0,0,2,3,2,2,6,5,2,2,9,2,6,12,14,12,6,6,17,4,8,10,8,10,6,12,13,11,8,5,10,8,7,1,5,2,1,2,1,1
0,0,0,0,3,2,2,3,7,9,4,9,4,10,6,14,6,10,6,10,12,13,5,6,12,14,9,8,11,3,10,2,5,6,3,5,3,3,1,0
0,1,1,2,4,2,6,4,8,9,8,6,5,9,12,8,9,6,11,8,6,18,4,16,11,14,9,10,3,10,9,6,6,1,5,2,4,1,1,0
0,0,0,1,3,3,3,6,7,8,10,8,11,10,10,10,5,6,5,9,15,11,5,17,6,13,5,11,11,3,3,3,6,1,3,2,1,2,2,1
0,0,1,0,1,5,3,1,8,3,8,5,3,6,7,14,14,5,7,17,13,14,11,6,14,11,10,13,8,6,3,8,3,5,2,3,4,3,0,0
0,1,1,1,1,4,3,6,4,4,6,8,6,13,10,12,5,15,17,8,15,16,5,10,4,12,12,13,10,4,7,7,2,4,2,2,4,3,2,0
0,1,1,3,4,3,3,4,7,2,3,10,4,8,10,6,14,5,9,5,14,5,4,17,11,11,7,7,12,8,10,6,6,2,3,1,2,1,2,1
0,1,2,0,2,4,3,1,7,2,10,2,11,7,3,13,7,11,9,14,10,7,14,4,5,10,8,12,8,6,10,9,2,4,4,5,3,0,1,0
0,1,0,1,2,4,3,6,5,5,8,11,6,5,11,5,15,7,11,15,17,5,16,5,11,7,11,4,12,7,8,3,8,5,3,1,1,3,0,0
0,1,2,0,4,5,6,1,5,2,4,4,8,9,7,12,8,12,9,7,5,6,14,10,14,13,10,8,4,9,8,4,3,5,5,3,4,1,0,0
0,1,1,1,4,3,1,3,6,5,6,2,5,10,8,11,4,8,4,15,20,19,11,4,10,7,8,10,6,6,3,3,6,1,4,3,3,0,2,1
0,1,2,1,3,1,4,1,4,6,7,2,11,13,6,12,13,14,12,18,18,7,12,6,14,15,3,11,6,5,7,4,6,1,2,4,3,2,2,1
0,1,1,1,4,2,6,3,7,7,7,2,6,11,3,6,10,15,10,16,6,17,16,7,8,3,10,7,3,8,6,3,7,2,5,5,2,1,1,1
0,0,2,2,4,5,4,7,6,8,4,8,3,3,3,13,5,16,5,19,16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,10,13,12,14,13,4,14,17,17,6,4,5,12,3,9,6,6,7,4,5,2,2,2,4,3,1,1
0,0,0,1,2,4,3,4,8,8,6,7,8,11,3,14,12,14,7,5,5,13,12,14,10,9,8,4,10,5,2,2,3,2,6,5,4,0,2,1
0,0,0,2,4,4,6,5,2,2,2,7,7,3,12,8,14,11,10,5,16,4,8,10,13,7,8,12,12,4,2,8,4,5,5,2,4,3,2,0
0,0,0,1,2,3,6,6,2,3,8,2,3,13,14,5,10,5,10,7,16,11,18,7,7,15,11,4,6,4,8,6,8,4,5,2,2,1,1,0
0,0,0,2,4,3,1,7,4,3,10,8,4,7,14,11,10,13,12,6,13,6,17,11,8,14,9,6,7,7,4,3,5,3,1,4,2,0,1,1
0,1,0,1,4,5,2,4,5,6,9,9,5,10,11,11,14,4,13,4,19,14,16,13,6,10,3,13,5,2,8,7,3,5,1,1,2,1,2,0
0,0,2,2,1,1,4,5,3,7,8,10,10,13,5,9,6,7,5,5,10,15,10,17,14,8,12,6,8,7,3,5,5,3,5,4,2,0,2,0
0,1,0,1,2,3,6,2,6,2,3,11,10,10,5,6,5,7,18,19,14,19,14,15,10,4,13,13,6,10,7,3,7,1,2,3,1,0,1,0
0,0,0,1,3,1,5,2,5,8,9,2,10,8,5,11,10,17,8,18,7,19,8,13,10,14,8,11,6,5,6,4,3,5,2,3,3,3,1,1
0,1,2,2,4,5,4,3,2,8,9,4,4,11,6,12,13,17,10,18,13,18,9,7,10,14,11,6,12,9,6,3,4,2,5,1,2,1,0,1
0,0,2,1,2,4,4,1,8,3,9,6,3,13,9,6,14,15,9,17,14,12,12,4,12,3,11,9,11,10,8,6,8,2,2,3,2,1,1,0
0,1,1,2,3,5,2,1,6,7,2,9,7,5,7,4,10,6,9,15,11,5,6,7,8,4,10,13,12,5,6,8,4,2,3,1,2,3,2,0
0,1,0,2,1,1,6,2,8,9,5,11,6,12,11,9,7,16,14,18,8,4,7,5,14,10,4,9,4,2,7,5,4,6,3,4,4,2,0,1
0,1,0,1,4,2,3,6,4,6,5,3,6,10,7,11,7,13,17,7,18,13,10,14,6,9,4,12,7,5,5,6,8,2,1,1,1,3,0,0
0,0,0,3,1,1,2,4,7,7,6,11,3,5,8,11,14,12,6,7,13,9,6,5,5,15,6,7,11,9,6,5,6,3,4,3,3,0,1,0
0,1,0,1,3,3,6,7,2,6,7,11,7,13,11,7,6,4,14,8,8,15,16,8,9,5,7,8,6,9,5,4,7,6,1,5,1,3,0,1
0,0,1,3,4,1,4,5,7,7,2,3,7,7,6,15,14,8,17,4,20,16,14,4,9,9,4,9,10,7,8,7,6,6,3,4,1,1,2,1
0,0,2,1,3,5,3,7,2,8,5,4,12,13,7,15,13,16,16,9,18,15,8,4,16,5,13,11,10,5,6,5,2,2,3,2,3,3,2,1
0,1,0,2,1,5,5,2,6,5,6,7,5,7,13,6,10,8,18,5,7,14,15,7,16,12,8,3,11,11,10,3,3,3,2,2,1,0,0,1
0,0,0,1,3,3,4,7,8,2,10,11,8,11,3,15,9,4,9,11,11,15,17,11,15,15,14,7,11,4,2,6,7,7,2,5,4,3,0,1
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![jupyter](images/jupyter-logo-2.png)\n",
"\n",
"![IPython](images/ipython_logo-s.png)\n",
"\n",
"\n",
"# Ipython / Jupyter Notebooks walkthrough"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Starting the notebook server using the command line"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can start the notebook server from the command line (Terminal on Mac/Linux, CMD prompt on Windows) by running the following command: \n",
"\n",
" jupyter-notebook\n",
"\n",
"This will print some information about the notebook server in your terminal, including the URL of the web application (by default, `http://127.0.0.1:8888`). It will then open your default web browser to this URL.\n",
"\n",
"When the notebook opens, you will see the **notebook dashboard**, which will show a list of the notebooks, files, and subdirectories in the directory where the notebook server was started. Most of the time, you will want to start a notebook server in the highest directory in your filesystem where notebooks can be found. Often this will be your home directory."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Basic concepts"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* **Notebook documents**: Notebook documents (or \"notebooks\") are documents produced by the Jupyter Notebook App which contain both computer code (e.g. Python) and rich text elements (paragraph, equations, figures, links, etc...). Notebook documents are both human-readable documents containing the analysis description and the results (figures, tables, etc..) as well as executable documents which can be run to perform data analysis.\n",
"\n",
"* **Kernels**: A notebook kernel is a “computational engine” that executes the code contained in a Notebook document and returns output back to the notebook web application. We will use here the `IPython` kernel. \n",
"\n",
"* **Notebook Dashboard**: The Notebook Dashboard is the component which is shown first when the launching Jupyter Notebook App. The Notebook Dashboard is mainly used to open notebook documents, and to manage the running kernels (visualize and shutdown).\n",
"\n",
"* **Cells**: The notebook consists of a sequence of **cells**. A cell is a multi-line text input field, and its contents can be executed by using `Shift-Enter`."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Modal editor"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Jupyter Notebooks have a modal user interface. This means that the keyboard does different things depending on which mode the Notebook is in. There are two modes: *edit* mode and *command* mode."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Edit mode\n",
"\n",
"Edit mode is indicated by a green cell border and a prompt showing in the editor area:\n",
"\n",
"<img src=\"images/edit_mode.png\">\n",
"\n",
"When a cell is in edit mode, you can type into the cell, like a normal text editor.\n",
"\n",
"<div class=\"alert alert-success\">\n",
"Enter edit mode by pressing `ENTER` or using the mouse to click on a cell's editor area.\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Command mode\n",
"\n",
"Command mode is indicated by a grey cell border with a blue left margin:\n",
"\n",
"<img src=\"images/command_mode.png\">\n",
"\n",
"When you are in command mode, you are able to edit the notebook as a whole, but not type into individual cells. Most importantly, in command mode, the keyboard is mapped to a set of shortcuts that let you perform notebook and cell actions efficiently. For example, if you are in command mode and you press `c`, you will copy the current cell - no modifier is needed.\n",
"\n",
"<div class=\"alert alert-error\">\n",
"Don't try to type into a cell in command mode; unexpected things will happen!\n",
"</div>\n",
"\n",
"<div class=\"alert alert-success\">\n",
"Enter command mode by pressing `ESC` or using the mouse to click *outside* a cell's editor area.\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Cell types"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We have different types of cells. The type of a cell is selected from the dropdown menu or with a keyboard shortcut in command mode. We'll see `code` cells and `Markdown` cells. \n",
"\n",
"This is a **Markdown** cell itself and is used to add formatted text to your notebooks. You can use both [Markdown](https://en.wikipedia.org/wiki/Markdown) syntax and [LaTeX](https://en.wikipedia.org/wiki/LaTeX) syntax.\n",
"\n",
"You can include mathematical expressions both inline: $e^{i\\pi} + 1 = 0$ and displayed:\n",
"\n",
"$$e^x=\\sum_{i=0}^\\infty \\frac{1}{i!}x^i$$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Code cells** on the other hand allow us to input Python code which will be later run by the kernel. \n",
"\n",
"Run a code cell using `Shift-Enter` or pressing the <button class='btn btn-default btn-xs'><i class=\"icon-play fa fa-play\"></i></button> button in the toolbar above. Once the cell is run (see below how), the corresponding output, if any, apperas below the cell."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1.0, 4.0, 3.14]\n"
]
}
],
"source": [
"# This is a code cell. It runs code :-)\n",
"a = [1., 4., 3.14]\n",
"print (a)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"3.141592653589793\n",
"1.0\n"
]
}
],
"source": [
"# And another code cell\n",
"import math\n",
"print (math.pi)\n",
"print (math.sin(math.pi/2.))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Running cells"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The keyboard shortcuts for running a cell, both in edit and command mode, are:\n",
"\n",
"* `Shift-Enter` runs the current cell and moves to the one below.\n",
"* `Alt-Enter` runs the current cell and inserts a new one below.\n",
"* `Ctrl-Enter` run the current cell and enters command mode in current cell.\n",
"\n",
"<div class=\"alert alert-success\">\n",
"Press `h` anytime in command mode for a keyboard shotcut list.\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Tab completion & help (edit mode)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Tab completion**, especially for attributes, is a convenient way to explore the structure of any object you’re dealing with. Simply type in a code cell `object_name.<TAB>` to view the object’s attributes. Besides Python objects and keywords, tab completion also works on file and directory names.\n",
"\n",
"For getting an object **help**, type `object_name.<SHIFT+TAB>` and a tooltip with the object short help will open. Pressing `<TAB>` twice (`<SHIFT+TAB+TAB>`) the full object help will open. Doing it four times and the full object help will go into a new frame."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Summarizing\n",
"\n",
"\n",
"* An Jupyter **notebook** is composed of **cells**.\n",
"\n",
"* The **cells** are edited by us and then executed by the **kernel**.\n",
"\n",
"* Cells can be **Markdown** (text cells accepting Markdown and LaTeX syntax), and **code** cells (for executing code).\n",
"\n",
"* We have a **modal** interface with **command** (for the whole notebook, press `ESC`) and **edit** (for a cell, `ENTER`) modes.\n",
"\n",
"* Use tab completion (`object_name.<TAB>`) and inline help (`object_name.<SHIFT+TAB>`) extensively.\n",
"\n",
"* `H` for keyboard shotcut reference (`ESC` to exit).\n",
"\n",
"Typically, you will work on a computational problem in pieces, organizing related ideas into cells and moving forward once previous parts work correctly. \n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## References \n",
"\n",
"* This tutorial was essentially based in [IPython's notebook-based documentation](http://nbviewer.ipython.org/github/ipython/ipython/blob/3.x/examples/Index.ipynb). Take a look at it for a more extensive introduction to IPython.\n",
"\n",
"* Official [Jupyter notebook begginer guide](http://jupyter-notebook-beginner-guide.readthedocs.org/en/latest/index.html#).\n",
"\n",
"* Official [Jupyter user manual](https://jupyter.readthedocs.io/en/latest/index.html)\n",
"\n",
"* [A gallery of interesting IPython Notebooks](https://github.com/ipython/ipython/wiki/A-gallery-of-interesting-IPython-Notebooks).\n",
"\n",
"* [IPython project page](http://ipython.org/)\n",
"\n",
"* [Jupyter project page](http://jupyter.org/)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment