diff --git a/.gitignore b/.gitignore index 62273454..4153b32a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -# Google App Engine generated folder -appengine-generated/ +.DS_Store +.ipynb_checkpoints +.temp diff --git "a/JupyterNotebooks/Cap\303\255tulo01/DSA-Python-Cap\303\255tulo1-Como utilizar o Jupyter Notebook.ipynb" b/Cap01/DSA-Python-Cap01-ComoUtilizarJupyterNotebook.ipynb similarity index 51% rename from "JupyterNotebooks/Cap\303\255tulo01/DSA-Python-Cap\303\255tulo1-Como utilizar o Jupyter Notebook.ipynb" rename to Cap01/DSA-Python-Cap01-ComoUtilizarJupyterNotebook.ipynb index ca607ca8..20466612 100644 --- "a/JupyterNotebooks/Cap\303\255tulo01/DSA-Python-Cap\303\255tulo1-Como utilizar o Jupyter Notebook.ipynb" +++ b/Cap01/DSA-Python-Cap01-ComoUtilizarJupyterNotebook.ipynb @@ -12,35 +12,37 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Como utilizar o Jupyer Notebook" + "## Como Utilizar o Jupyter Notebook" ] }, { "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "')" ] }, { @@ -54,16 +56,16 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python [Root]", + "display_name": "Python 3", "language": "python", - "name": "Python [Root]" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -75,9 +77,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.2" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo01/Jupyter Notebook-Manual de Usu\303\241rio.ipynb" b/Cap01/JupyterNotebook-ManualUsuario.ipynb similarity index 100% rename from "JupyterNotebooks/Cap\303\255tulo01/Jupyter Notebook-Manual de Usu\303\241rio.ipynb" rename to Cap01/JupyterNotebook-ManualUsuario.ipynb diff --git a/Cap01/hello.py b/Cap01/hello.py new file mode 100644 index 00000000..8e235769 --- /dev/null +++ b/Cap01/hello.py @@ -0,0 +1 @@ +print("Hello World") \ No newline at end of file diff --git a/Cap02/Lab01/game_v1.py b/Cap02/Lab01/game_v1.py new file mode 100644 index 00000000..5d3329cf --- /dev/null +++ b/Cap02/Lab01/game_v1.py @@ -0,0 +1,145 @@ +# Game Ping-Pong + +from tkinter import * +import random +import time + +level = int(input("Qual nível você gostaria de jogar? 1/2/3/4/5 \n")) +length = 500/level + + +root = Tk() +root.title("Ping Pong") +root.resizable(0,0) +root.wm_attributes("-topmost", -1) + +canvas = Canvas(root, width=800, height=600, bd=0,highlightthickness=0) +canvas.pack() + +root.update() + +# Variável +count = 0 +lost = False + +class Bola: + def __init__(self, canvas, Barra, color): + self.canvas = canvas + self.Barra = Barra + self.id = canvas.create_oval(0, 0, 15, 15, fill=color) + self.canvas.move(self.id, 245, 200) + + starts_x = [-3, -2, -1, 1, 2, 3] + random.shuffle(starts_x) + + self.x = starts_x[0] + self.y = -3 + + self.canvas_height = self.canvas.winfo_height() + self.canvas_width = self.canvas.winfo_width() + + + def draw(self): + self.canvas.move(self.id, self.x, self.y) + + pos = self.canvas.coords(self.id) + + if pos[1] <= 0: + self.y = 3 + + if pos[3] >= self.canvas_height: + self.y = -3 + + if pos[0] <= 0: + self.x = 3 + + if pos[2] >= self.canvas_width: + self.x = -3 + + self.Barra_pos = self.canvas.coords(self.Barra.id) + + + if pos[2] >= self.Barra_pos[0] and pos[0] <= self.Barra_pos[2]: + if pos[3] >= self.Barra_pos[1] and pos[3] <= self.Barra_pos[3]: + self.y = -3 + global count + count +=1 + score() + + + if pos[3] <= self.canvas_height: + self.canvas.after(10, self.draw) + else: + game_over() + global lost + lost = True + + +class Barra: + def __init__(self, canvas, color): + self.canvas = canvas + self.id = canvas.create_rectangle(0, 0, length, 10, fill=color) + self.canvas.move(self.id, 200, 400) + + self.x = 0 + + self.canvas_width = self.canvas.winfo_width() + + self.canvas.bind_all("", self.move_left) + self.canvas.bind_all("", self.move_right) + + def draw(self): + self.canvas.move(self.id, self.x, 0) + + self.pos = self.canvas.coords(self.id) + + if self.pos[0] <= 0: + self.x = 0 + + if self.pos[2] >= self.canvas_width: + self.x = 0 + + global lost + + if lost == False: + self.canvas.after(10, self.draw) + + def move_left(self, event): + if self.pos[0] >= 0: + self.x = -3 + + def move_right(self, event): + if self.pos[2] <= self.canvas_width: + self.x = 3 + + +def start_game(event): + global lost, count + lost = False + count = 0 + score() + canvas.itemconfig(game, text=" ") + + time.sleep(1) + Barra.draw() + Bola.draw() + + +def score(): + canvas.itemconfig(score_now, text="Pontos: " + str(count)) + +def game_over(): + canvas.itemconfig(game, text="Game over!") + + +Barra = Barra(canvas, "orange") +Bola = Bola(canvas, Barra, "purple") + + +score_now = canvas.create_text(430, 20, text="Pontos: " + str(count), fill = "green", font=("Arial", 16)) +game = canvas.create_text(400, 300, text=" ", fill="red", font=("Arial", 40)) + + +canvas.bind_all("", start_game) + +root.mainloop() \ No newline at end of file diff --git "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-N\303\272meros.ipynb" b/Cap02/Notebooks/DSA-Python-Cap02-01-Numeros.ipynb similarity index 85% rename from "JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-N\303\272meros.ipynb" rename to Cap02/Notebooks/DSA-Python-Cap02-01-Numeros.ipynb index d94bfcf3..356006e6 100644 --- "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-N\303\272meros.ipynb" +++ b/Cap02/Notebooks/DSA-Python-Cap02-01-Numeros.ipynb @@ -13,29 +13,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Números " + "## Números e Operações Matemáticas" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### Operações Básicas" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Pressione as teclas shift e enter para executar o código em uma célula" + "# Pressione as teclas shift e enter para executar o código em uma célula ou pressione o botão Play no menu superior" ] }, { "cell_type": "code", "execution_count": 1, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -56,9 +47,7 @@ { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -79,9 +68,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -102,9 +89,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -125,9 +110,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -148,9 +131,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -178,9 +159,7 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -200,9 +179,7 @@ { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -222,9 +199,7 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -252,9 +227,7 @@ { "cell_type": "code", "execution_count": 10, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -274,9 +247,7 @@ { "cell_type": "code", "execution_count": 11, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -296,9 +267,7 @@ { "cell_type": "code", "execution_count": 12, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -318,9 +287,7 @@ { "cell_type": "code", "execution_count": 13, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -341,9 +308,7 @@ { "cell_type": "code", "execution_count": 14, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -364,9 +329,7 @@ { "cell_type": "code", "execution_count": 15, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -386,9 +349,7 @@ { "cell_type": "code", "execution_count": 16, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -415,9 +376,7 @@ { "cell_type": "code", "execution_count": 17, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -437,9 +396,7 @@ { "cell_type": "code", "execution_count": 18, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -459,9 +416,7 @@ { "cell_type": "code", "execution_count": 19, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -488,9 +443,7 @@ { "cell_type": "code", "execution_count": 20, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -510,9 +463,7 @@ { "cell_type": "code", "execution_count": 21, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -532,9 +483,7 @@ { "cell_type": "code", "execution_count": 22, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -554,9 +503,7 @@ { "cell_type": "code", "execution_count": 23, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -583,9 +530,7 @@ { "cell_type": "code", "execution_count": 24, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -606,9 +551,7 @@ { "cell_type": "code", "execution_count": 25, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -629,9 +572,7 @@ { "cell_type": "code", "execution_count": 26, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -652,9 +593,7 @@ { "cell_type": "code", "execution_count": 27, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -675,9 +614,7 @@ { "cell_type": "code", "execution_count": 28, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -706,16 +643,16 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python [Root]", + "display_name": "Python 3", "language": "python", - "name": "Python [Root]" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -727,9 +664,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.2" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Vari\303\241veis.ipynb" b/Cap02/Notebooks/DSA-Python-Cap02-02-Variaveis.ipynb similarity index 86% rename from "JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Vari\303\241veis.ipynb" rename to Cap02/Notebooks/DSA-Python-Cap02-02-Variaveis.ipynb index 9895358a..a7e6d61e 100644 --- "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Vari\303\241veis.ipynb" +++ b/Cap02/Notebooks/DSA-Python-Cap02-02-Variaveis.ipynb @@ -31,9 +31,7 @@ { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -54,9 +52,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -74,9 +70,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "ename": "NameError", @@ -109,9 +103,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -131,9 +123,7 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -164,9 +154,7 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -197,9 +185,7 @@ { "cell_type": "code", "execution_count": 11, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -237,9 +223,7 @@ { "cell_type": "code", "execution_count": 13, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -259,9 +243,7 @@ { "cell_type": "code", "execution_count": 14, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -281,9 +263,7 @@ { "cell_type": "code", "execution_count": 15, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -314,9 +294,7 @@ { "cell_type": "code", "execution_count": 17, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -336,9 +314,7 @@ { "cell_type": "code", "execution_count": 18, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -355,6 +331,29 @@ "fruta2" ] }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'Fruta2' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mFruta2\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;31mNameError\u001b[0m: name 'Fruta2' is not defined" + ] + } + ], + "source": [ + "# Fique atento!!! Python é case-sensitive. Criamos a variável fruta2, mas não a variável Fruta2.\n", + "# Letras maiúsculas e minúsculas tem diferença no nome da variável.\n", + "Fruta2" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -364,7 +363,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 20, "metadata": { "collapsed": true }, @@ -375,10 +374,8 @@ }, { "cell_type": "code", - "execution_count": 20, - "metadata": { - "collapsed": false - }, + "execution_count": 21, + "metadata": {}, "outputs": [ { "data": { @@ -386,7 +383,7 @@ "50" ] }, - "execution_count": 20, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -397,17 +394,15 @@ }, { "cell_type": "code", - "execution_count": 21, - "metadata": { - "collapsed": false - }, + "execution_count": 22, + "metadata": {}, "outputs": [ { "ename": "SyntaxError", - "evalue": "invalid syntax (, line 2)", + "evalue": "invalid syntax (, line 2)", "output_type": "error", "traceback": [ - "\u001b[0;36m File \u001b[0;32m\"\"\u001b[0;36m, line \u001b[0;32m2\u001b[0m\n\u001b[0;31m 1x = 50\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" + "\u001b[0;36m File \u001b[0;32m\"\"\u001b[0;36m, line \u001b[0;32m2\u001b[0m\n\u001b[0;31m 1x = 50\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" ] } ], @@ -459,17 +454,15 @@ }, { "cell_type": "code", - "execution_count": 22, - "metadata": { - "collapsed": false - }, + "execution_count": 23, + "metadata": {}, "outputs": [ { "ename": "SyntaxError", - "evalue": "invalid syntax (, line 2)", + "evalue": "invalid syntax (, line 2)", "output_type": "error", "traceback": [ - "\u001b[0;36m File \u001b[0;32m\"\"\u001b[0;36m, line \u001b[0;32m2\u001b[0m\n\u001b[0;31m break = 1\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" + "\u001b[0;36m File \u001b[0;32m\"\"\u001b[0;36m, line \u001b[0;32m2\u001b[0m\n\u001b[0;31m break = 1\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" ] } ], @@ -487,7 +480,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 24, "metadata": { "collapsed": true }, @@ -498,7 +491,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 25, "metadata": { "collapsed": true }, @@ -509,7 +502,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 26, "metadata": { "collapsed": true }, @@ -520,10 +513,8 @@ }, { "cell_type": "code", - "execution_count": 26, - "metadata": { - "collapsed": false - }, + "execution_count": 27, + "metadata": {}, "outputs": [ { "data": { @@ -531,7 +522,7 @@ "8" ] }, - "execution_count": 26, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" } @@ -542,7 +533,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 28, "metadata": { "collapsed": true }, @@ -553,10 +544,8 @@ }, { "cell_type": "code", - "execution_count": 28, - "metadata": { - "collapsed": false - }, + "execution_count": 29, + "metadata": {}, "outputs": [ { "data": { @@ -564,7 +553,7 @@ "12" ] }, - "execution_count": 28, + "execution_count": 29, "metadata": {}, "output_type": "execute_result" } @@ -575,9 +564,9 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 30, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -587,10 +576,8 @@ }, { "cell_type": "code", - "execution_count": 30, - "metadata": { - "collapsed": false - }, + "execution_count": 31, + "metadata": {}, "outputs": [ { "data": { @@ -598,7 +585,7 @@ "32" ] }, - "execution_count": 30, + "execution_count": 31, "metadata": {}, "output_type": "execute_result" } @@ -616,7 +603,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 32, "metadata": { "collapsed": true }, @@ -627,7 +614,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 33, "metadata": { "collapsed": true }, @@ -638,10 +625,8 @@ }, { "cell_type": "code", - "execution_count": 33, - "metadata": { - "collapsed": false - }, + "execution_count": 34, + "metadata": {}, "outputs": [ { "data": { @@ -649,7 +634,7 @@ "60" ] }, - "execution_count": 33, + "execution_count": 34, "metadata": {}, "output_type": "execute_result" } @@ -660,10 +645,8 @@ }, { "cell_type": "code", - "execution_count": 34, - "metadata": { - "collapsed": false - }, + "execution_count": 35, + "metadata": {}, "outputs": [ { "data": { @@ -671,7 +654,7 @@ "10" ] }, - "execution_count": 34, + "execution_count": 35, "metadata": {}, "output_type": "execute_result" } @@ -682,10 +665,8 @@ }, { "cell_type": "code", - "execution_count": 35, - "metadata": { - "collapsed": false - }, + "execution_count": 36, + "metadata": {}, "outputs": [ { "data": { @@ -693,7 +674,7 @@ "875" ] }, - "execution_count": 35, + "execution_count": 36, "metadata": {}, "output_type": "execute_result" } @@ -704,10 +685,8 @@ }, { "cell_type": "code", - "execution_count": 36, - "metadata": { - "collapsed": false - }, + "execution_count": 37, + "metadata": {}, "outputs": [ { "data": { @@ -715,7 +694,7 @@ "1.4" ] }, - "execution_count": 36, + "execution_count": 37, "metadata": {}, "output_type": "execute_result" } @@ -726,10 +705,8 @@ }, { "cell_type": "code", - "execution_count": 37, - "metadata": { - "collapsed": false - }, + "execution_count": 38, + "metadata": {}, "outputs": [ { "data": { @@ -737,7 +714,7 @@ "10" ] }, - "execution_count": 37, + "execution_count": 38, "metadata": {}, "output_type": "execute_result" } @@ -755,29 +732,29 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 39, "metadata": { "collapsed": true }, "outputs": [], "source": [ - "nome = \"Luis\"" + "nome = \"Steve\"" ] }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 40, "metadata": { "collapsed": true }, "outputs": [], "source": [ - "sobrenome = \"Suarez\"" + "sobrenome = \"Jobs\"" ] }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 41, "metadata": { "collapsed": true }, @@ -788,18 +765,16 @@ }, { "cell_type": "code", - "execution_count": 41, - "metadata": { - "collapsed": false - }, + "execution_count": 42, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "'Luis Suarez'" + "'Steve Jobs'" ] }, - "execution_count": 41, + "execution_count": 42, "metadata": {}, "output_type": "execute_result" } @@ -819,16 +794,16 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python [Root]", + "display_name": "Python 3", "language": "python", - "name": "Python [Root]" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -840,9 +815,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.2" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Strings.ipynb" b/Cap02/Notebooks/DSA-Python-Cap02-03-Strings.ipynb similarity index 86% rename from "JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Strings.ipynb" rename to Cap02/Notebooks/DSA-Python-Cap02-03-Strings.ipynb index 18a93489..4862c822 100644 --- "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Strings.ipynb" +++ b/Cap02/Notebooks/DSA-Python-Cap02-03-Strings.ipynb @@ -27,14 +27,12 @@ { "cell_type": "code", "execution_count": 1, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "'Olá'" + "'Oi'" ] }, "execution_count": 1, @@ -44,20 +42,18 @@ ], "source": [ "# Uma única palavra\n", - "'Olá'" + "'Oi'" ] }, { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "'Isto é uma string em Python'" + "'Criando uma string em Python'" ] }, "execution_count": 2, @@ -67,20 +63,18 @@ ], "source": [ "# Uma frase\n", - "'Isto é uma string em Python'" + "'Criando uma string em Python'" ] }, { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "'Isto é uma string em Python, usando aspas duplas'" + "'Podemos usar aspas duplas ou simples para strings em Python'" ] }, "execution_count": 3, @@ -90,15 +84,13 @@ ], "source": [ "# Podemos usar aspas duplas\n", - "\"Isto é uma string em Python, usando aspas duplas\"" + "\"Podemos usar aspas duplas ou simples para strings em Python\"" ] }, { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -126,9 +118,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -145,9 +135,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -167,9 +155,7 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -206,9 +192,7 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -225,9 +209,7 @@ { "cell_type": "code", "execution_count": 10, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -248,9 +230,7 @@ { "cell_type": "code", "execution_count": 11, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -270,9 +250,7 @@ { "cell_type": "code", "execution_count": 12, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -299,9 +277,7 @@ { "cell_type": "code", "execution_count": 13, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -315,7 +291,7 @@ } ], "source": [ - "# Retorna todos os elementos da string, começando pela posição (lembre que Python começa a indexação pela posição 0),\n", + "# Retorna todos os elementos da string, começando pela posição (lembre-se que Python começa a indexação pela posição 0),\n", "# até o fim da string.\n", "s[1:]" ] @@ -323,9 +299,7 @@ { "cell_type": "code", "execution_count": 14, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -346,9 +320,7 @@ { "cell_type": "code", "execution_count": 15, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -369,9 +341,7 @@ { "cell_type": "code", "execution_count": 16, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -391,9 +361,7 @@ { "cell_type": "code", "execution_count": 17, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -414,9 +382,7 @@ { "cell_type": "code", "execution_count": 18, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -444,9 +410,7 @@ { "cell_type": "code", "execution_count": 19, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -466,9 +430,7 @@ { "cell_type": "code", "execution_count": 20, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -488,9 +450,7 @@ { "cell_type": "code", "execution_count": 21, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -517,9 +477,7 @@ { "cell_type": "code", "execution_count": 22, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -539,9 +497,7 @@ { "cell_type": "code", "execution_count": 23, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "ename": "TypeError", @@ -563,9 +519,7 @@ { "cell_type": "code", "execution_count": 24, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -597,9 +551,7 @@ { "cell_type": "code", "execution_count": 26, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -628,9 +580,7 @@ { "cell_type": "code", "execution_count": 28, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -657,9 +607,7 @@ { "cell_type": "code", "execution_count": 29, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -679,9 +627,7 @@ { "cell_type": "code", "execution_count": 30, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -702,9 +648,7 @@ { "cell_type": "code", "execution_count": 31, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -725,9 +669,7 @@ { "cell_type": "code", "execution_count": 32, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -766,9 +708,7 @@ { "cell_type": "code", "execution_count": 33, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -802,20 +742,18 @@ }, "outputs": [], "source": [ - "s = 'olá! seja bem vindo ao universo de python'" + "s = 'seja bem vindo ao universo de python'" ] }, { "cell_type": "code", "execution_count": 35, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "'Olá! seja bem vindo ao universo de python'" + "'Seja bem vindo ao universo de python'" ] }, "execution_count": 35, @@ -830,9 +768,7 @@ { "cell_type": "code", "execution_count": 36, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -852,14 +788,12 @@ { "cell_type": "code", "execution_count": 37, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "35" + "30" ] }, "execution_count": 37, @@ -874,14 +808,12 @@ { "cell_type": "code", "execution_count": 38, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "'olá! seja bem vindo ao universo de python'" + "'seja bem vindo ao universo de python'" ] }, "execution_count": 38, @@ -896,9 +828,7 @@ { "cell_type": "code", "execution_count": 39, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -918,9 +848,7 @@ { "cell_type": "code", "execution_count": 40, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -940,9 +868,7 @@ { "cell_type": "code", "execution_count": 41, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -962,9 +888,7 @@ { "cell_type": "code", "execution_count": 42, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -984,9 +908,7 @@ { "cell_type": "code", "execution_count": 43, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1006,14 +928,12 @@ { "cell_type": "code", "execution_count": 44, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "('olá', '!', ' seja bem vindo ao universo de python')" + "('seja bem vindo ao universo de python', '', '')" ] }, "execution_count": 44, @@ -1035,9 +955,7 @@ { "cell_type": "code", "execution_count": 45, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -1054,9 +972,7 @@ { "cell_type": "code", "execution_count": 46, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -1081,16 +997,16 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python [Root]", + "display_name": "Python 3", "language": "python", - "name": "Python [Root]" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -1102,9 +1018,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.2" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Listas.ipynb" b/Cap02/Notebooks/DSA-Python-Cap02-04-Listas.ipynb similarity index 91% rename from "JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Listas.ipynb" rename to Cap02/Notebooks/DSA-Python-Cap02-04-Listas.ipynb index ce551c4b..e829c0ed 100644 --- "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Listas.ipynb" +++ b/Cap02/Notebooks/DSA-Python-Cap02-04-Listas.ipynb @@ -31,9 +31,7 @@ { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -63,9 +61,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -95,9 +91,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -116,7 +110,7 @@ "cell_type": "code", "execution_count": 7, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -140,9 +134,7 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -167,9 +159,7 @@ { "cell_type": "code", "execution_count": 10, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -202,9 +192,7 @@ { "cell_type": "code", "execution_count": 12, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -232,9 +220,7 @@ { "cell_type": "code", "execution_count": 13, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "ename": "IndexError", @@ -268,9 +254,7 @@ { "cell_type": "code", "execution_count": 15, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -311,9 +295,7 @@ { "cell_type": "code", "execution_count": 17, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -346,9 +328,7 @@ { "cell_type": "code", "execution_count": 19, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -379,9 +359,7 @@ { "cell_type": "code", "execution_count": 21, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -412,9 +390,7 @@ { "cell_type": "code", "execution_count": 23, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -445,9 +421,7 @@ { "cell_type": "code", "execution_count": 25, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -478,9 +452,7 @@ { "cell_type": "code", "execution_count": 27, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -511,9 +483,7 @@ { "cell_type": "code", "execution_count": 29, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -544,9 +514,7 @@ { "cell_type": "code", "execution_count": 31, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -585,9 +553,7 @@ { "cell_type": "code", "execution_count": 33, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -619,9 +585,7 @@ { "cell_type": "code", "execution_count": 35, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -652,9 +616,7 @@ { "cell_type": "code", "execution_count": 37, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -685,9 +647,7 @@ { "cell_type": "code", "execution_count": 39, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -718,9 +678,7 @@ { "cell_type": "code", "execution_count": 41, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -751,9 +709,7 @@ { "cell_type": "code", "execution_count": 43, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -791,9 +747,7 @@ { "cell_type": "code", "execution_count": 45, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -824,9 +778,7 @@ { "cell_type": "code", "execution_count": 47, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -858,9 +810,7 @@ { "cell_type": "code", "execution_count": 49, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -899,9 +849,7 @@ { "cell_type": "code", "execution_count": 51, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -919,9 +867,7 @@ { "cell_type": "code", "execution_count": 52, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -946,9 +892,7 @@ { "cell_type": "code", "execution_count": 53, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -969,9 +913,7 @@ { "cell_type": "code", "execution_count": 54, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -992,9 +934,7 @@ { "cell_type": "code", "execution_count": 55, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1039,9 +979,7 @@ { "cell_type": "code", "execution_count": 58, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1072,9 +1010,7 @@ { "cell_type": "code", "execution_count": 60, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1094,9 +1030,7 @@ { "cell_type": "code", "execution_count": 61, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1128,9 +1062,7 @@ { "cell_type": "code", "execution_count": 63, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -1147,9 +1079,7 @@ { "cell_type": "code", "execution_count": 64, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1180,9 +1110,7 @@ { "cell_type": "code", "execution_count": 66, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1213,9 +1141,7 @@ { "cell_type": "code", "execution_count": 68, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1270,9 +1196,7 @@ { "cell_type": "code", "execution_count": 72, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1325,9 +1249,7 @@ { "cell_type": "code", "execution_count": 76, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1347,9 +1269,7 @@ { "cell_type": "code", "execution_count": 77, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1369,9 +1289,7 @@ { "cell_type": "code", "execution_count": 78, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -1390,9 +1308,7 @@ { "cell_type": "code", "execution_count": 79, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1419,9 +1335,7 @@ { "cell_type": "code", "execution_count": 80, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "ename": "ValueError", @@ -1442,9 +1356,7 @@ { "cell_type": "code", "execution_count": 81, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1465,7 +1377,7 @@ "cell_type": "code", "execution_count": 82, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -1475,9 +1387,7 @@ { "cell_type": "code", "execution_count": 83, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1509,9 +1419,7 @@ { "cell_type": "code", "execution_count": 85, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1543,9 +1451,7 @@ { "cell_type": "code", "execution_count": 87, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1577,9 +1483,7 @@ { "cell_type": "code", "execution_count": 89, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1611,9 +1515,7 @@ { "cell_type": "code", "execution_count": 91, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1641,16 +1543,16 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python [Root]", + "display_name": "Python 3", "language": "python", - "name": "Python [Root]" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -1662,9 +1564,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.2" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Dicion\303\241rios.ipynb" b/Cap02/Notebooks/DSA-Python-Cap02-05-Dicionarios.ipynb similarity index 85% rename from "JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Dicion\303\241rios.ipynb" rename to Cap02/Notebooks/DSA-Python-Cap02-05-Dicionarios.ipynb index 7107af78..4b2035e0 100644 --- "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Dicion\303\241rios.ipynb" +++ b/Cap02/Notebooks/DSA-Python-Cap02-05-Dicionarios.ipynb @@ -25,20 +25,18 @@ "outputs": [], "source": [ "# Isso é uma lista\n", - "estudantes_lst = [\"Pedro\", 24, \"Fernando\", 22, \"Tania\", 26, \"Cris\", 25] " + "estudantes_lst = [\"Mateus\", 24, \"Fernanda\", 22, \"Tamires\", 26, \"Cristiano\", 25] " ] }, { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "['Pedro', 24, 'Fernando', 22, 'Tania', 26, 'Cris', 25]" + "['Mateus', 24, 'Fernanda', 22, 'Tamires', 26, 'Cristiano', 25]" ] }, "execution_count": 2, @@ -59,20 +57,18 @@ "outputs": [], "source": [ "# Isso é um dicionário\n", - "estudantes_dict = {\"Pedro\":24, \"Fernando\":22, \"Tania\":26, \"Cris\":25}" + "estudantes_dict = {\"Mateus\":24, \"Fernanda\":22, \"Tamires\":26, \"Cristiano\":25}" ] }, { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'Cris': 25, 'Fernando': 22, 'Pedro': 24, 'Tania': 26}" + "{'Cristiano': 25, 'Fernanda': 22, 'Mateus': 24, 'Tamires': 26}" ] }, "execution_count": 4, @@ -87,9 +83,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -103,7 +97,7 @@ } ], "source": [ - "estudantes_dict[\"Pedro\"]" + "estudantes_dict[\"Mateus\"]" ] }, { @@ -120,9 +114,7 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -142,9 +134,7 @@ { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -158,7 +148,7 @@ } ], "source": [ - "estudantes_dict[\"Tania\"]" + "estudantes_dict[\"Tamires\"]" ] }, { @@ -175,9 +165,7 @@ { "cell_type": "code", "execution_count": 10, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -208,9 +196,7 @@ { "cell_type": "code", "execution_count": 12, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "ename": "NameError", @@ -236,20 +222,18 @@ }, "outputs": [], "source": [ - "estudantes = {\"Pedro\":24, \"Fernando\":22, \"Tania\":26, \"Cris\":25}" + "estudantes = {\"Mateus\":24, \"Fernanda\":22, \"Tamires\":26, \"Cristiano\":25}" ] }, { "cell_type": "code", "execution_count": 14, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'Cris': 25, 'Fernando': 22, 'Pedro': 24, 'Tania': 26}" + "{'Cristiano': 25, 'Fernanda': 22, 'Mateus': 24, 'Tamires': 26}" ] }, "execution_count": 14, @@ -264,9 +248,7 @@ { "cell_type": "code", "execution_count": 15, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -286,14 +268,12 @@ { "cell_type": "code", "execution_count": 16, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "dict_keys(['Cris', 'Pedro', 'Tania', 'Fernando'])" + "dict_keys(['Mateus', 'Fernanda', 'Tamires', 'Cristiano'])" ] }, "execution_count": 16, @@ -308,14 +288,12 @@ { "cell_type": "code", "execution_count": 17, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "dict_values([25, 24, 26, 22])" + "dict_values([24, 22, 26, 25])" ] }, "execution_count": 17, @@ -330,14 +308,12 @@ { "cell_type": "code", "execution_count": 18, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "dict_items([('Cris', 25), ('Pedro', 24), ('Tania', 26), ('Fernando', 22)])" + "dict_items([('Mateus', 24), ('Fernanda', 22), ('Tamires', 26), ('Cristiano', 25)])" ] }, "execution_count": 18, @@ -363,9 +339,7 @@ { "cell_type": "code", "execution_count": 20, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -396,20 +370,18 @@ { "cell_type": "code", "execution_count": 22, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'Cris': 25,\n", + "{'Cristiano': 25,\n", " 'Erika': 28,\n", - " 'Fernando': 22,\n", + " 'Fernanda': 22,\n", " 'Maria': 27,\n", + " 'Mateus': 24,\n", " 'Milton': 26,\n", - " 'Pedro': 24,\n", - " 'Tania': 26}" + " 'Tamires': 26}" ] }, "execution_count": 22, @@ -435,9 +407,7 @@ { "cell_type": "code", "execution_count": 24, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -468,9 +438,7 @@ { "cell_type": "code", "execution_count": 26, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -498,9 +466,7 @@ { "cell_type": "code", "execution_count": 28, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -525,20 +491,18 @@ }, "outputs": [], "source": [ - "dic1[8.2] = \"Olá\"" + "dic1[8.2] = \"Python\"" ] }, { "cell_type": "code", "execution_count": 30, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'key_one': 2, 8.2: 'Olá', 10: 5}" + "{'key_one': 2, 10: 5, 8.2: 'Python'}" ] }, "execution_count": 30, @@ -564,14 +528,12 @@ { "cell_type": "code", "execution_count": 32, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'key_one': 2, 8.2: 'Olá', 10: 5, 'teste': 5}" + "{'key_one': 2, 10: 5, 8.2: 'Python', 'teste': 5}" ] }, "execution_count": 32, @@ -597,9 +559,7 @@ { "cell_type": "code", "execution_count": 34, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -641,9 +601,7 @@ { "cell_type": "code", "execution_count": 37, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -708,9 +666,7 @@ { "cell_type": "code", "execution_count": 42, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -763,9 +719,7 @@ { "cell_type": "code", "execution_count": 46, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -797,9 +751,7 @@ { "cell_type": "code", "execution_count": 48, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -819,9 +771,7 @@ { "cell_type": "code", "execution_count": 49, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -841,9 +791,7 @@ { "cell_type": "code", "execution_count": 50, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -876,9 +824,7 @@ { "cell_type": "code", "execution_count": 52, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -910,9 +856,7 @@ { "cell_type": "code", "execution_count": 54, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -951,9 +895,7 @@ { "cell_type": "code", "execution_count": 56, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -973,9 +915,7 @@ { "cell_type": "code", "execution_count": 57, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1003,16 +943,16 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python [Root]", + "display_name": "Python 3", "language": "python", - "name": "Python [Root]" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -1024,9 +964,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.2" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Tuplas.ipynb" b/Cap02/Notebooks/DSA-Python-Cap02-06-Tuplas.ipynb similarity index 90% rename from "JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Tuplas.ipynb" rename to Cap02/Notebooks/DSA-Python-Cap02-06-Tuplas.ipynb index 1e4d6ff0..99c61b50 100644 --- "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Tuplas.ipynb" +++ b/Cap02/Notebooks/DSA-Python-Cap02-06-Tuplas.ipynb @@ -25,20 +25,18 @@ "outputs": [], "source": [ "# Criando uma tupla\n", - "tupla1 = (\"Matemática\", 23, \"Gatos\")" + "tupla1 = (\"Geografia\", 23, \"Elefantes\")" ] }, { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "('Matemática', 23, 'Gatos')" + "('Geografia', 23, 'Elefantes')" ] }, "execution_count": 2, @@ -54,9 +52,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "ename": "AttributeError", @@ -78,9 +74,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "ename": "TypeError", @@ -114,9 +108,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -141,20 +133,18 @@ }, "outputs": [], "source": [ - "tupla1 = (\"Matemática\", 23, \"Gatos\")" + "tupla1 = (\"Geografia\", 23, \"Elefantes\")" ] }, { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "'Matemática'" + "'Geografia'" ] }, "execution_count": 8, @@ -169,9 +159,7 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -192,14 +180,12 @@ { "cell_type": "code", "execution_count": 10, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "(23, 'Gatos')" + "(23, 'Elefantes')" ] }, "execution_count": 10, @@ -215,9 +201,7 @@ { "cell_type": "code", "execution_count": 11, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -231,15 +215,13 @@ } ], "source": [ - "tupla1.index('Gatos')" + "tupla1.index('Elefantes')" ] }, { "cell_type": "code", "execution_count": 12, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "ename": "TypeError", @@ -273,9 +255,7 @@ { "cell_type": "code", "execution_count": 14, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "ename": "NameError", @@ -308,9 +288,7 @@ { "cell_type": "code", "execution_count": 16, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -330,9 +308,7 @@ { "cell_type": "code", "execution_count": 17, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "ename": "TypeError", @@ -366,9 +342,7 @@ { "cell_type": "code", "execution_count": 19, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -411,9 +385,7 @@ { "cell_type": "code", "execution_count": 22, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -441,16 +413,16 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python [Root]", + "display_name": "Python 3", "language": "python", - "name": "Python [Root]" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -462,9 +434,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.2" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git a/Cap02/Notebooks/DSA-Python-Cap02-Exercicios-Solucao.ipynb b/Cap02/Notebooks/DSA-Python-Cap02-Exercicios-Solucao.ipynb new file mode 100644 index 00000000..7a04f053 --- /dev/null +++ b/Cap02/Notebooks/DSA-Python-Cap02-Exercicios-Solucao.ipynb @@ -0,0 +1,258 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Data Science Academy - Python Fundamentos - Capítulo 2\n", + "\n", + "## Download: http://github.com/dsacademybr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exercícios Cap02 - Soluções" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n" + ] + } + ], + "source": [ + "# Exercício 1 - Imprima na tela os números de 1 a 10. Use uma lista para armazenar os números.\n", + "lista = [1,2,3,4,5,6,7,8,9,10]\n", + "print(lista)" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['chocolate', 'banana', 'abacaxi', 'uva', 'morango']\n" + ] + } + ], + "source": [ + "# Exercício 2 - Crie uma lista de 5 objetos e imprima na tela\n", + "lista = ['chocolate', 'banana', 'abacaxi', 'uva', 'morango']\n", + "print(lista)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Se beber não dirija!\n" + ] + } + ], + "source": [ + "# Exercício 3 - Crie duas strings e concatene as duas em uma terceira string\n", + "frase1 = 'Se beber '\n", + "frase2 = 'não dirija!'\n", + "frase_final = frase1 + frase2\n", + "print(frase_final)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Exercício 4 - Crie uma tupla com os seguintes elementos: 1, 2, 2, 3, 4, 4, 4, 5 e depois utilize a função count do \n", + "# objeto tupla para verificar quantas vezes o número 4 aparece na tupla\n", + "tup1 = (1, 2, 2, 3, 4, 4, 4, 5)\n", + "tup1.count(4)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{}\n" + ] + } + ], + "source": [ + "# Exercício 5 - Crie um dicionário vazio e imprima na tela\n", + "dict3 = {}\n", + "print(dict3)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'k1': 'martelo', 'k2': 'serrote', 'k3': 'machado'}\n" + ] + } + ], + "source": [ + "# Exercício 6 - Crie um dicionário com 3 chaves e 3 valores e imprima na tela\n", + "dict = {'k1':'martelo', 'k2':'serrote', 'k3':'machado'}\n", + "print(dict)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'k1': 'martelo', 'k2': 'serrote', 'k3': 'machado', 'k4': 'parafuso'}\n" + ] + } + ], + "source": [ + "# Exercício 7 - Adicione mais um elemento ao dicionário criado no exercício anterior e imprima na tela\n", + "dict['k4'] = 'parafuso'\n", + "print(dict)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'chave1': 'Geografia', 'chave2': 'Biologia', 'chave3': [70, 90]}\n" + ] + } + ], + "source": [ + "# Exercício 8 - Crie um dicionário com 3 chaves e 3 valores. Um dos valores deve ser uma lista de 2 elementos numéricos. \n", + "# Imprima o dicionário na tela.\n", + "dict2 = {'chave1':'Geografia', 'chave2':'Biologia', 'chave3':[70, 90]}\n", + "print(dict2)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['String1', (90, 92), {'k1': 'v1', 'k2': 'v2'}, 99.98]\n" + ] + } + ], + "source": [ + "# Exercício 9 - Crie uma lista de 4 elementos. O primeiro elemento deve ser uma string, \n", + "# o segundo uma tupla de 2 elementos, o terceiro um dcionário com 2 chaves e 2 valores e \n", + "# o quarto elemento um valor do tipo float.\n", + "# Imprima a lista na tela.\n", + "lst = ['String1', (90, 92), {'k1':'v1', 'k2':'v2'}, 99.98]\n", + "print(lst)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'Cientista de Dados'" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Exercício 10 - Considere a string abaixo. Imprima na tela apenas os caracteres da posição 1 a 18.\n", + "frase = 'Cientista de Dados é o profissional mais sexy do século XXI'\n", + "frase[0:18]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Fim" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + ] + } + ], + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 1 +} diff --git "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Exerc\303\255cios.ipynb" b/Cap02/Notebooks/DSA-Python-Cap02-Exercicios.ipynb similarity index 58% rename from "JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Exerc\303\255cios.ipynb" rename to Cap02/Notebooks/DSA-Python-Cap02-Exercicios.ipynb index f4f7e176..fc545aad 100644 --- "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Exerc\303\255cios.ipynb" +++ b/Cap02/Notebooks/DSA-Python-Cap02-Exercicios.ipynb @@ -13,123 +13,103 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Exercícios" + "## Exercícios Cap02" ] }, { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ - "# Exercício 1 - Imprima na tela os números de 1 a 10\n" + "# Exercício 1 - Imprima na tela os números de 1 a 10. Use uma lista para armazenar os números." ] }, { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ - "# Exercício 2 - Crie uma lista de 5 objetos e imprima na tela\n" + "# Exercício 2 - Crie uma lista de 5 objetos e imprima na tela" ] }, { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ - "# Exercício 3 - Crie duas strings e concatene as duas em uma terceira string\n" + "# Exercício 3 - Crie duas strings e concatene as duas em uma terceira string" ] }, { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ "# Exercício 4 - Crie uma tupla com os seguintes elementos: 1, 2, 2, 3, 4, 4, 4, 5 e depois utilize a função count do \n", - "# objeto tupla para verificar quantas vezes o número 4 aparece na tupla\n" + "# objeto tupla para verificar quantas vezes o número 4 aparece na tupla" ] }, { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ - "# Exercício 5 - Crie um dicionário com 3 chaves e 3 valores e imprima na tela\n" + "# Exercício 5 - Crie um dicionário vazio e imprima na tela" ] }, { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ - "# Exercício 6 - Adicione mais uma ferramenta ao dicionário criado no exercício anterior e imprima na tela\n" + "# Exercício 6 - Crie um dicionário com 3 chaves e 3 valores e imprima na tela" ] }, { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ - "# Exercício 7 - Crie um arquivo chamado nomes.txt no diretório onde está este notebook, grave 5 nomes no arquivo e \n", - "# feche-o.\n" + "# Exercício 7 - Adicione mais um elemento ao dicionário criado no exercício anterior e imprima na tela" ] }, { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ - "# Exercício 8 - Abra o arquivo criado no item anterior e leia o arquivo na tela.\n" + "# Exercício 8 - Crie um dicionário com 3 chaves e 3 valores. Um dos valores deve ser uma lista de 2 elementos numéricos. \n", + "# Imprima o dicionário na tela." ] }, { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ - "# Exercício 9 - Crie um dicionário vazio e imrpima na tela\n" + "# Exercício 9 - Crie uma lista de 4 elementos. O primeiro elemento deve ser uma string, \n", + "# o segundo uma tupla de 2 elementos, o terceiro um dcionário com 2 chaves e 2 valores e \n", + "# o quarto elemento um valor do tipo float.\n", + "# Imprima a lista na tela." ] }, { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ - "# Exercício 10 - Complelete o trecho de código abaixo criado com Pandas e use a função tail() para ler os últimos \n", - "# elementos do dataset.\n", - "import pandas as pd\n", - "file_name = \"http://www.ats.ucla.edu/stat/data/binary.csv\"\n", - "df = pd.read_csv(file_name)" + "# Exercício 10 - Considere a string abaixo. Imprima na tela apenas os caracteres da posição 1 a 18.\n", + "frase = 'Cientista de Dados é o profissional mais sexy do século XXI'" ] }, { @@ -143,7 +123,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -163,9 +143,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git a/Cap03/Lab01/game_v2.py b/Cap03/Lab01/game_v2.py new file mode 100644 index 00000000..63f6c122 --- /dev/null +++ b/Cap03/Lab01/game_v2.py @@ -0,0 +1,208 @@ +# Game Ping-Pong + +# Imports +from tkinter import * +import random +import time + +# Variável recebendo o valor digitado pelo usuário +level = int(input("Qual nível você gostaria de jogar? 1/2/3/4/5 \n")) + +# Variável +length = 500/level + +# Instância do Objeto Tk +root = Tk() +root.title("Ping Pong") +root.resizable(0,0) +root.wm_attributes("-topmost", -1) + +# Variável recebendo o resultado da função Canvas +canvas = Canvas(root, width=800, height=600, bd=0,highlightthickness=0) +canvas.pack() +root.update() + +# Variável +count = 0 + +# Variável +lost = False + +# Classe +class Bola: + def __init__(self, canvas, Barra, color): + + # Variáveis + self.canvas = canvas + self.Barra = Barra + self.id = canvas.create_oval(0, 0, 15, 15, fill=color) + self.canvas.move(self.id, 245, 200) + + # Lista + starts_x = [-3, -2, -1, 1, 2, 3] + random.shuffle(starts_x) + + # Variáveis + self.x = starts_x[0] + self.y = -3 + self.canvas_height = self.canvas.winfo_height() + self.canvas_width = self.canvas.winfo_width() + + # Função + def draw(self): + + # Variáveis + self.canvas.move(self.id, self.x, self.y) + pos = self.canvas.coords(self.id) + + # Condicional if + if pos[1] <= 0: + + # Variável + self.y = 3 + + # Condicional if + if pos[3] >= self.canvas_height: + + # Variável + self.y = -3 + + # Condicional if + if pos[0] <= 0: + + # Variável + self.x = 3 + + # Condicional if + if pos[2] >= self.canvas_width: + + # Variável + self.x = -3 + + # Variável + self.Barra_pos = self.canvas.coords(self.Barra.id) + + # Condicional if aninhado + if pos[2] >= self.Barra_pos[0] and pos[0] <= self.Barra_pos[2]: + if pos[3] >= self.Barra_pos[1] and pos[3] <= self.Barra_pos[3]: + + # Variáveis + self.y = -3 + global count + count +=1 + + # Chamada à função + score() + + # Condicional if + if pos[3] <= self.canvas_height: + + # Variável + self.canvas.after(10, self.draw) + else: + + # Chamada à função + game_over() + + # Variáveis + global lost + lost = True + +# Classe +class Barra: + def __init__(self, canvas, color): + + # Variáveis + self.canvas = canvas + self.id = canvas.create_rectangle(0, 0, length, 10, fill=color) + self.canvas.move(self.id, 200, 400) + self.x = 0 + self.canvas_width = self.canvas.winfo_width() + self.canvas.bind_all("", self.move_left) + self.canvas.bind_all("", self.move_right) + + # Função + def draw(self): + + # Chamada ao método + self.canvas.move(self.id, self.x, 0) + + # Variável + self.pos = self.canvas.coords(self.id) + + # Condicional if + if self.pos[0] <= 0: + + # Variável + self.x = 0 + + # Condicional if + if self.pos[2] >= self.canvas_width: + + # Variável + self.x = 0 + + global lost + + # Condicional if + if lost == False: + self.canvas.after(10, self.draw) + + # Função + def move_left(self, event): + + # Condicional if + if self.pos[0] >= 0: + + # Variável + self.x = -3 + + # Função + def move_right(self, event): + + # Condicional if + if self.pos[2] <= self.canvas_width: + + # Variável + self.x = 3 + +# Função +def start_game(event): + + # Variáveis + global lost, count + lost = False + count = 0 + + # Chamada à função + score() + + # Variável que recebe o resultado da função + canvas.itemconfig(game, text=" ") + + # Métodos dos objetos + time.sleep(1) + Barra.draw() + Bola.draw() + +# Função +def score(): + canvas.itemconfig(score_now, text="Pontos: " + str(count)) + +# Função +def game_over(): + canvas.itemconfig(game, text="Game over!") + +# Instâncias dos objetos Barra e Bola +Barra = Barra(canvas, "orange") +Bola = Bola(canvas, Barra, "purple") + +# Variáveis que recebem o resultado das funções +score_now = canvas.create_text(430, 20, text="Pontos: " + str(count), fill = "green", font=("Arial", 16)) +game = canvas.create_text(400, 300, text=" ", fill="red", font=("Arial", 40)) +canvas.bind_all("", start_game) + +# Executa o programa +root.mainloop() + + diff --git a/Cap03/Lab02/calculadora_v1.py b/Cap03/Lab02/calculadora_v1.py new file mode 100644 index 00000000..097a578a --- /dev/null +++ b/Cap03/Lab02/calculadora_v1.py @@ -0,0 +1,8 @@ +# Calculadora em Python + +# Desenvolva uma calculadora em Python com tudo que você aprendeu nos capítulos 2 e 3. +# A solução será apresentada no próximo capítulo! +# Assista o vídeo com a execução do programa! + +print("\n******************* Python Calculator *******************") + diff --git "a/JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-If-Elif-Else.ipynb" b/Cap03/Notebooks/DSA-Python-Cap03-01-If-Elif-Else.ipynb similarity index 82% rename from "JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-If-Elif-Else.ipynb" rename to Cap03/Notebooks/DSA-Python-Cap03-01-If-Elif-Else.ipynb index 76b5cd27..e9251b52 100644 --- "a/JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-If-Elif-Else.ipynb" +++ b/Cap03/Notebooks/DSA-Python-Cap03-01-If-Elif-Else.ipynb @@ -19,9 +19,7 @@ { "cell_type": "code", "execution_count": 1, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -34,16 +32,13 @@ "source": [ "# Condicional If\n", "if 5 > 2:\n", - " print(\"Python funciona!\")\n", - " " + " print(\"Python funciona!\")" ] }, { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -64,9 +59,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -86,9 +79,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -108,9 +99,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -130,9 +119,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -152,9 +139,7 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -172,9 +157,7 @@ { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -192,9 +175,7 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "ename": "SyntaxError", @@ -211,19 +192,37 @@ " print(\"Tudo funciona!\")" ] }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "ename": "IndentationError", + "evalue": "expected an indented block (, line 3)", + "output_type": "error", + "traceback": [ + "\u001b[0;36m File \u001b[0;32m\"\"\u001b[0;36m, line \u001b[0;32m3\u001b[0m\n\u001b[0;31m print(\"Tudo funciona!\")\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mIndentationError\u001b[0m\u001b[0;31m:\u001b[0m expected an indented block\n" + ] + } + ], + "source": [ + "# Atenção com a sintaxe\n", + "if 4 > 3:\n", + "print(\"Tudo funciona!\")" + ] + }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### Condicionais aninhados" + "### Condicionais Aninhados" ] }, { "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, + "execution_count": 11, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -241,10 +240,8 @@ }, { "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false - }, + "execution_count": 12, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -265,10 +262,8 @@ }, { "cell_type": "code", - "execution_count": 12, - "metadata": { - "collapsed": false - }, + "execution_count": 13, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -287,10 +282,8 @@ }, { "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, + "execution_count": 14, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -316,10 +309,8 @@ }, { "cell_type": "code", - "execution_count": 14, - "metadata": { - "collapsed": false - }, + "execution_count": 15, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -339,10 +330,8 @@ }, { "cell_type": "code", - "execution_count": 15, - "metadata": { - "collapsed": false - }, + "execution_count": 16, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -370,10 +359,8 @@ }, { "cell_type": "code", - "execution_count": 16, - "metadata": { - "collapsed": false - }, + "execution_count": 17, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -392,10 +379,8 @@ }, { "cell_type": "code", - "execution_count": 17, - "metadata": { - "collapsed": false - }, + "execution_count": 18, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -413,17 +398,15 @@ }, { "cell_type": "code", - "execution_count": 18, - "metadata": { - "collapsed": false - }, + "execution_count": 19, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Digite o nome da disciplina: Matemática\n", - "Digite a nota final (entre 0 e 100): 90\n", + "Digite o nome da disciplina: Geografia\n", + "Digite a nota final (entre 0 e 100): 76\n", "Você foi aprovado!\n" ] } @@ -434,7 +417,7 @@ "disciplina = input('Digite o nome da disciplina: ')\n", "nota_final = input('Digite a nota final (entre 0 e 100): ')\n", "\n", - "if disciplina == 'Matemática' and nota_final >= '50':\n", + "if disciplina == 'Geografia' and nota_final >= '70':\n", " print('Você foi aprovado!')\n", "else:\n", " print('Lamento, acho que você precisa estudar mais!')" @@ -442,19 +425,17 @@ }, { "cell_type": "code", - "execution_count": 19, - "metadata": { - "collapsed": false - }, + "execution_count": 20, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Digite o nome da disciplina: Matemática\n", - "Digite a nota final (entre 0 e 100): 90\n", - "Digite o semestre (1 a 4): 3\n", - "Você foi aprovado em Matemática com média final '90'!\n" + "Digite o nome da disciplina: Geografia\n", + "Digite a nota final (entre 0 e 100): 87\n", + "Digite o semestre (1 a 4): 2\n", + "Você foi aprovado em Geografia com média final '87'!\n" ] } ], @@ -465,7 +446,7 @@ "nota_final = input('Digite a nota final (entre 0 e 100): ')\n", "semestre = input('Digite o semestre (1 a 4): ')\n", "\n", - "if disciplina == 'Matemática' and nota_final >= '50' and int(semestre) != 1:\n", + "if disciplina == 'Geografia' and nota_final >= '50' and int(semestre) != 1:\n", " print('Você foi aprovado em %s com média final %r!' %(disciplina, nota_final))\n", "else:\n", " print('Lamento, acho que você precisa estudar mais!')" @@ -475,7 +456,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### --> Fique atento aos espaços entre a margem e cada um dos seus comandos. Falaremos mais sobre indentação ao longo do curso." + "### --> Fique atento aos espaços entre a margem e cada um dos seus comandos. Falaremos mais sobre indentação ao longo do curso. A indentação faz parte da sintaxe da linguagem Python." ] }, { @@ -489,7 +470,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -509,9 +490,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-For.ipynb" b/Cap03/Notebooks/DSA-Python-Cap03-02-For.ipynb similarity index 90% rename from "JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-For.ipynb" rename to Cap03/Notebooks/DSA-Python-Cap03-02-For.ipynb index 5e410751..8161cb05 100644 --- "a/JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-For.ipynb" +++ b/Cap03/Notebooks/DSA-Python-Cap03-02-For.ipynb @@ -20,9 +20,7 @@ { "cell_type": "code", "execution_count": 1, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -36,17 +34,15 @@ ], "source": [ "# Criando uma tupla e imprimindo cada um dos valores\n", - "tupla = (2,3,4)\n", - "for i in tupla:\n", + "tp = (2,3,4)\n", + "for i in tp:\n", " print(i)" ] }, { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -68,9 +64,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -93,9 +87,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -120,9 +112,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -191,9 +181,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -266,9 +254,7 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -311,10 +297,8 @@ }, { "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, + "execution_count": 8, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -338,9 +322,7 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -362,9 +344,7 @@ { "cell_type": "code", "execution_count": 10, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -387,9 +367,7 @@ { "cell_type": "code", "execution_count": 11, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -413,9 +391,7 @@ { "cell_type": "code", "execution_count": 12, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -438,9 +414,7 @@ { "cell_type": "code", "execution_count": 13, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -462,9 +436,7 @@ { "cell_type": "code", "execution_count": 14, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -493,7 +465,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -513,9 +485,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-While.ipynb" b/Cap03/Notebooks/DSA-Python-Cap03-03-While.ipynb similarity index 92% rename from "JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-While.ipynb" rename to Cap03/Notebooks/DSA-Python-Cap03-03-While.ipynb index 5e1ae173..28b218c2 100644 --- "a/JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-While.ipynb" +++ b/Cap03/Notebooks/DSA-Python-Cap03-03-While.ipynb @@ -19,9 +19,7 @@ { "cell_type": "code", "execution_count": 1, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -51,9 +49,7 @@ { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -106,9 +102,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -135,9 +129,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -168,9 +160,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -199,6 +189,7 @@ " j = j + 1\n", " else:\n", " j = j + 1\n", + " \n", " if counter == 0:\n", " print(str(i) + \" é um número primo\")\n", " counter = 0\n", @@ -217,7 +208,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -237,9 +228,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-Range.ipynb" b/Cap03/Notebooks/DSA-Python-Cap03-04-Range.ipynb similarity index 86% rename from "JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-Range.ipynb" rename to Cap03/Notebooks/DSA-Python-Cap03-04-Range.ipynb index b97fd3c9..bf8dba44 100644 --- "a/JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-Range.ipynb" +++ b/Cap03/Notebooks/DSA-Python-Cap03-04-Range.ipynb @@ -19,9 +19,7 @@ { "cell_type": "code", "execution_count": 1, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -65,9 +63,7 @@ { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -87,9 +83,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -116,9 +110,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -126,13 +118,13 @@ "text": [ "Morango\n", "Banana\n", - "Maça\n", + "Abacaxi\n", "Uva\n" ] } ], "source": [ - "lista = ['Morango', 'Banana', 'Maça', 'Uva']\n", + "lista = ['Morango', 'Banana', 'Abacaxi', 'Uva']\n", "lista_tamanho = len(lista)\n", "for i in range(0, lista_tamanho):\n", " print(lista[i])" @@ -141,9 +133,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -172,7 +162,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -192,9 +182,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo04/DSA-Python-Cap\303\255tulo4-M\303\251todos.ipynb" b/Cap03/Notebooks/DSA-Python-Cap03-05-Metodos.ipynb similarity index 91% rename from "JupyterNotebooks/Cap\303\255tulo04/DSA-Python-Cap\303\255tulo4-M\303\251todos.ipynb" rename to Cap03/Notebooks/DSA-Python-Cap03-05-Metodos.ipynb index 25628b2f..abfac5b1 100644 --- "a/JupyterNotebooks/Cap\303\255tulo04/DSA-Python-Cap\303\255tulo4-M\303\251todos.ipynb" +++ b/Cap03/Notebooks/DSA-Python-Cap03-05-Metodos.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 4\n", + "# Data Science Academy - Python Fundamentos - Capítulo 3\n", "\n", "## Download: http://github.com/dsacademybr" ] @@ -43,9 +43,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -66,9 +64,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -89,9 +85,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -113,9 +107,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -137,6 +129,7 @@ " '__iadd__',\n", " '__imul__',\n", " '__init__',\n", + " '__init_subclass__',\n", " '__iter__',\n", " '__le__',\n", " '__len__',\n", @@ -191,9 +184,7 @@ { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -219,7 +210,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -239,9 +230,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo04/DSA-Python-Cap\303\255tulo4-Fun\303\247\303\265es.ipynb" b/Cap03/Notebooks/DSA-Python-Cap03-06-Funcoes.ipynb similarity index 71% rename from "JupyterNotebooks/Cap\303\255tulo04/DSA-Python-Cap\303\255tulo4-Fun\303\247\303\265es.ipynb" rename to Cap03/Notebooks/DSA-Python-Cap03-06-Funcoes.ipynb index b7b8cd38..de2c8a39 100644 --- "a/JupyterNotebooks/Cap\303\255tulo04/DSA-Python-Cap\303\255tulo4-Fun\303\247\303\265es.ipynb" +++ b/Cap03/Notebooks/DSA-Python-Cap03-06-Funcoes.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 4\n", + "# Data Science Academy - Python Fundamentos - Capítulo 3\n", "\n", "## Download: http://github.com/dsacademybr" ] @@ -26,21 +26,19 @@ "source": [ "# Definindo uma função\n", "def primeiraFunc():\n", - " print ('Olá')" + " print('Hello World')" ] }, { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Olá\n" + "Hello World\n" ] } ], @@ -58,21 +56,19 @@ "source": [ "# Definindo uma função com parâmetro\n", "def primeiraFunc(nome):\n", - " print ('Olá %s' %(nome))" + " print('Hello %s' %(nome))" ] }, { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Olá Aluno\n" + "Hello Aluno\n" ] } ], @@ -96,9 +92,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -119,30 +113,28 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# Função para somar números\n", "def addNum(firstnum, secondnum):\n", " print(\"Primeiro número: \" + str(firstnum))\n", - " print(\"Segundo número: \" + str(secondnum))" + " print(\"Segundo número: \" + str(secondnum))\n", + " print(\"Soma: \", firstnum + secondnum)" ] }, { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Primeiro número: 45\n", - "Segundo número: 3\n" + "Segundo número: 3\n", + "Soma: 48\n" ] } ], @@ -162,12 +154,13 @@ "cell_type": "code", "execution_count": 9, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ "# Variável Global\n", "var_global = 10 # Esta é uma variável global\n", + "\n", "def multiply(num1, num2):\n", " var_global = num1 * num2 # Esta é uma variável local\n", " print(var_global)" @@ -176,28 +169,24 @@ { "cell_type": "code", "execution_count": 10, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "230\n" + "125\n" ] } ], "source": [ - "multiply(10, 23)" + "multiply(5, 25)" ] }, { "cell_type": "code", "execution_count": 11, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -215,42 +204,38 @@ "cell_type": "code", "execution_count": 12, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ "# Variável Local\n", - "var_global = 10\n", + "var_global = 10 # Esta é uma variável global\n", "def multiply(num1, num2):\n", - " var_local = num1 * num2\n", + " var_local = num1 * num2 # Esta é uma variável local\n", " print(var_local)" ] }, { "cell_type": "code", "execution_count": 13, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "230\n" + "125\n" ] } ], "source": [ - "multiply(10, 23)" + "multiply(5, 25)" ] }, { "cell_type": "code", "execution_count": 14, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "ename": "NameError", @@ -278,9 +263,7 @@ { "cell_type": "code", "execution_count": 15, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -300,9 +283,7 @@ { "cell_type": "code", "execution_count": 16, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -322,9 +303,7 @@ { "cell_type": "code", "execution_count": 17, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -344,9 +323,7 @@ { "cell_type": "code", "execution_count": 18, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -363,192 +340,6 @@ "bool(1)" ] }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "# Criando um string\n", - "Frase = \"Eu estou aprendendo Python\"" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "str" - ] - }, - "execution_count": 20, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Tipo de variável Frase\n", - "type(Frase)" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "['__add__',\n", - " '__class__',\n", - " '__contains__',\n", - " '__delattr__',\n", - " '__dir__',\n", - " '__doc__',\n", - " '__eq__',\n", - " '__format__',\n", - " '__ge__',\n", - " '__getattribute__',\n", - " '__getitem__',\n", - " '__getnewargs__',\n", - " '__gt__',\n", - " '__hash__',\n", - " '__init__',\n", - " '__iter__',\n", - " '__le__',\n", - " '__len__',\n", - " '__lt__',\n", - " '__mod__',\n", - " '__mul__',\n", - " '__ne__',\n", - " '__new__',\n", - " '__reduce__',\n", - " '__reduce_ex__',\n", - " '__repr__',\n", - " '__rmod__',\n", - " '__rmul__',\n", - " '__setattr__',\n", - " '__sizeof__',\n", - " '__str__',\n", - " '__subclasshook__',\n", - " 'capitalize',\n", - " 'casefold',\n", - " 'center',\n", - " 'count',\n", - " 'encode',\n", - " 'endswith',\n", - " 'expandtabs',\n", - " 'find',\n", - " 'format',\n", - " 'format_map',\n", - " 'index',\n", - " 'isalnum',\n", - " 'isalpha',\n", - " 'isdecimal',\n", - " 'isdigit',\n", - " 'isidentifier',\n", - " 'islower',\n", - " 'isnumeric',\n", - " 'isprintable',\n", - " 'isspace',\n", - " 'istitle',\n", - " 'isupper',\n", - " 'join',\n", - " 'ljust',\n", - " 'lower',\n", - " 'lstrip',\n", - " 'maketrans',\n", - " 'partition',\n", - " 'replace',\n", - " 'rfind',\n", - " 'rindex',\n", - " 'rjust',\n", - " 'rpartition',\n", - " 'rsplit',\n", - " 'rstrip',\n", - " 'split',\n", - " 'splitlines',\n", - " 'startswith',\n", - " 'strip',\n", - " 'swapcase',\n", - " 'title',\n", - " 'translate',\n", - " 'upper',\n", - " 'zfill']" - ] - }, - "execution_count": 21, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Função dir() retorna o que funções podem ser usadas com um determinado objeto\n", - "dir(Frase)" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Help on built-in function upper:\n", - "\n", - "upper(...) method of builtins.str instance\n", - " S.upper() -> str\n", - " \n", - " Return a copy of S converted to uppercase.\n", - "\n" - ] - } - ], - "source": [ - "# Função help() mostra para que serve o método que pode ser usado com o objeto\n", - "help(Frase.upper)" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Help on built-in function replace:\n", - "\n", - "replace(...) method of builtins.str instance\n", - " S.replace(old, new[, count]) -> str\n", - " \n", - " Return a copy of S with all occurrences of substring\n", - " old replaced by new. If the optional argument count is\n", - " given, only the first count occurrences are replaced.\n", - "\n" - ] - } - ], - "source": [ - "help(Frase.replace)" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -558,10 +349,8 @@ }, { "cell_type": "code", - "execution_count": 24, - "metadata": { - "collapsed": false - }, + "execution_count": 19, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -572,13 +361,13 @@ }, { "ename": "TypeError", - "evalue": "unorderable types: str() > int()", + "evalue": "'>' not supported between instances of 'str' and 'int'", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# Erro ao executar por causa da conversão\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0midade\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0minput\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Digite sua idade: \"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0;32mif\u001b[0m \u001b[0midade\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m13\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Você pode acessar o Facebook\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mTypeError\u001b[0m: unorderable types: str() > int()" + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# Erro ao executar por causa da conversão\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0midade\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0minput\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Digite sua idade: \"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0;32mif\u001b[0m \u001b[0midade\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m13\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Você pode acessar o Facebook\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mTypeError\u001b[0m: '>' not supported between instances of 'str' and 'int'" ] } ], @@ -591,10 +380,8 @@ }, { "cell_type": "code", - "execution_count": 25, - "metadata": { - "collapsed": false - }, + "execution_count": 20, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -614,10 +401,8 @@ }, { "cell_type": "code", - "execution_count": 26, - "metadata": { - "collapsed": false - }, + "execution_count": 21, + "metadata": {}, "outputs": [ { "data": { @@ -625,7 +410,7 @@ "26" ] }, - "execution_count": 26, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -636,10 +421,8 @@ }, { "cell_type": "code", - "execution_count": 27, - "metadata": { - "collapsed": false - }, + "execution_count": 22, + "metadata": {}, "outputs": [ { "data": { @@ -647,7 +430,7 @@ "123.345" ] }, - "execution_count": 27, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } @@ -658,10 +441,8 @@ }, { "cell_type": "code", - "execution_count": 28, - "metadata": { - "collapsed": false - }, + "execution_count": 23, + "metadata": {}, "outputs": [ { "data": { @@ -669,7 +450,7 @@ "'14'" ] }, - "execution_count": 28, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } @@ -680,10 +461,8 @@ }, { "cell_type": "code", - "execution_count": 29, - "metadata": { - "collapsed": false - }, + "execution_count": 24, + "metadata": {}, "outputs": [ { "data": { @@ -691,7 +470,7 @@ "4" ] }, - "execution_count": 29, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } @@ -702,7 +481,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 25, "metadata": { "collapsed": true }, @@ -713,10 +492,8 @@ }, { "cell_type": "code", - "execution_count": 31, - "metadata": { - "collapsed": false - }, + "execution_count": 26, + "metadata": {}, "outputs": [ { "data": { @@ -724,7 +501,7 @@ "'c'" ] }, - "execution_count": 31, + "execution_count": 26, "metadata": {}, "output_type": "execute_result" } @@ -735,10 +512,8 @@ }, { "cell_type": "code", - "execution_count": 32, - "metadata": { - "collapsed": false - }, + "execution_count": 27, + "metadata": {}, "outputs": [ { "data": { @@ -746,7 +521,7 @@ "'a'" ] }, - "execution_count": 32, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" } @@ -757,7 +532,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 28, "metadata": { "collapsed": true }, @@ -768,10 +543,8 @@ }, { "cell_type": "code", - "execution_count": 34, - "metadata": { - "collapsed": false - }, + "execution_count": 29, + "metadata": {}, "outputs": [ { "data": { @@ -779,7 +552,7 @@ "['a', 'b', 'c', 'd', 'A', 'B', 'C', 'D']" ] }, - "execution_count": 34, + "execution_count": 29, "metadata": {}, "output_type": "execute_result" } @@ -790,10 +563,8 @@ }, { "cell_type": "code", - "execution_count": 35, - "metadata": { - "collapsed": false - }, + "execution_count": 30, + "metadata": {}, "outputs": [ { "data": { @@ -801,7 +572,7 @@ "'d'" ] }, - "execution_count": 35, + "execution_count": 30, "metadata": {}, "output_type": "execute_result" } @@ -812,10 +583,8 @@ }, { "cell_type": "code", - "execution_count": 36, - "metadata": { - "collapsed": false - }, + "execution_count": 31, + "metadata": {}, "outputs": [ { "data": { @@ -823,7 +592,7 @@ "'A'" ] }, - "execution_count": 36, + "execution_count": 31, "metadata": {}, "output_type": "execute_result" } @@ -834,7 +603,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 32, "metadata": { "collapsed": true }, @@ -845,10 +614,8 @@ }, { "cell_type": "code", - "execution_count": 38, - "metadata": { - "collapsed": false - }, + "execution_count": 33, + "metadata": {}, "outputs": [ { "data": { @@ -856,7 +623,7 @@ "125" ] }, - "execution_count": 38, + "execution_count": 33, "metadata": {}, "output_type": "execute_result" } @@ -874,7 +641,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 34, "metadata": { "collapsed": true }, @@ -897,10 +664,8 @@ }, { "cell_type": "code", - "execution_count": 40, - "metadata": { - "collapsed": false - }, + "execution_count": 35, + "metadata": {}, "outputs": [ { "data": { @@ -908,7 +673,7 @@ "'Este número é primo'" ] }, - "execution_count": 40, + "execution_count": 35, "metadata": {}, "output_type": "execute_result" } @@ -926,7 +691,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 36, "metadata": { "collapsed": true }, @@ -939,7 +704,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 37, "metadata": { "collapsed": true }, @@ -950,10 +715,8 @@ }, { "cell_type": "code", - "execution_count": 43, - "metadata": { - "collapsed": false - }, + "execution_count": 38, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -970,7 +733,7 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 39, "metadata": { "collapsed": true }, @@ -982,10 +745,8 @@ }, { "cell_type": "code", - "execution_count": 45, - "metadata": { - "collapsed": false - }, + "execution_count": 40, + "metadata": {}, "outputs": [ { "data": { @@ -1003,7 +764,7 @@ " 'dados.']" ] }, - "execution_count": 45, + "execution_count": 40, "metadata": {}, "output_type": "execute_result" } @@ -1014,7 +775,7 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 41, "metadata": { "collapsed": true }, @@ -1025,7 +786,7 @@ }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 42, "metadata": { "collapsed": true }, @@ -1037,7 +798,7 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": 43, "metadata": { "collapsed": true }, @@ -1048,10 +809,8 @@ }, { "cell_type": "code", - "execution_count": 49, - "metadata": { - "collapsed": false - }, + "execution_count": 44, + "metadata": {}, "outputs": [ { "data": { @@ -1059,7 +818,7 @@ "'este texto deveria estar todo em lowercase'" ] }, - "execution_count": 49, + "execution_count": 44, "metadata": {}, "output_type": "execute_result" } @@ -1070,7 +829,7 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 45, "metadata": { "collapsed": true }, @@ -1089,10 +848,8 @@ }, { "cell_type": "code", - "execution_count": 51, - "metadata": { - "collapsed": false - }, + "execution_count": 46, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -1104,15 +861,13 @@ ], "source": [ "# Fazendo chamada à função usando apenas 1 argumento\n", - "printVarInfo(10)\n" + "printVarInfo(10)" ] }, { "cell_type": "code", - "execution_count": 52, - "metadata": { - "collapsed": false - }, + "execution_count": 47, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -1139,7 +894,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -1159,9 +914,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo04/DSA-Python-Cap\303\255tulo4-Lambda.ipynb" b/Cap03/Notebooks/DSA-Python-Cap03-07-Lambda.ipynb similarity index 85% rename from "JupyterNotebooks/Cap\303\255tulo04/DSA-Python-Cap\303\255tulo4-Lambda.ipynb" rename to Cap03/Notebooks/DSA-Python-Cap03-07-Lambda.ipynb index 42703f5a..4ed4b2bb 100644 --- "a/JupyterNotebooks/Cap\303\255tulo04/DSA-Python-Cap\303\255tulo4-Lambda.ipynb" +++ b/Cap03/Notebooks/DSA-Python-Cap03-07-Lambda.ipynb @@ -33,9 +33,7 @@ { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -68,9 +66,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -91,7 +87,7 @@ "cell_type": "code", "execution_count": 5, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -102,9 +98,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -124,29 +118,36 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, + "outputs": [], + "source": [ + "# Definindo uma expressão lambda\n", + "potencia = lambda num: num**2" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - ">" + "25" ] }, - "execution_count": 7, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "# Definindo uma expressão lambda\n", - "lambda num: num**2" + "potencia(5)" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": { "collapsed": true }, @@ -158,10 +159,8 @@ }, { "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, + "execution_count": 10, + "metadata": {}, "outputs": [ { "data": { @@ -169,7 +168,7 @@ "False" ] }, - "execution_count": 9, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -180,10 +179,8 @@ }, { "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, + "execution_count": 11, + "metadata": {}, "outputs": [ { "data": { @@ -191,7 +188,7 @@ "True" ] }, - "execution_count": 10, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -202,7 +199,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 12, "metadata": { "collapsed": true }, @@ -213,10 +210,8 @@ }, { "cell_type": "code", - "execution_count": 12, - "metadata": { - "collapsed": false - }, + "execution_count": 13, + "metadata": {}, "outputs": [ { "data": { @@ -224,7 +219,7 @@ "'P'" ] }, - "execution_count": 12, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -235,7 +230,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 14, "metadata": { "collapsed": true }, @@ -246,10 +241,8 @@ }, { "cell_type": "code", - "execution_count": 14, - "metadata": { - "collapsed": false - }, + "execution_count": 15, + "metadata": {}, "outputs": [ { "data": { @@ -257,7 +250,7 @@ "'nohtyP'" ] }, - "execution_count": 14, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -268,7 +261,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 16, "metadata": { "collapsed": true }, @@ -279,10 +272,8 @@ }, { "cell_type": "code", - "execution_count": 16, - "metadata": { - "collapsed": false - }, + "execution_count": 17, + "metadata": {}, "outputs": [ { "data": { @@ -290,7 +281,7 @@ "5" ] }, - "execution_count": 16, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -310,7 +301,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -330,9 +321,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git a/Cap03/Notebooks/DSA-Python-Cap03-Exercicios-Funcoes-Solucao.ipynb b/Cap03/Notebooks/DSA-Python-Cap03-Exercicios-Funcoes-Solucao.ipynb new file mode 100644 index 00000000..d8bba8ab --- /dev/null +++ b/Cap03/Notebooks/DSA-Python-Cap03-Exercicios-Funcoes-Solucao.ipynb @@ -0,0 +1,627 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Data Science Academy - Python Fundamentos - Capítulo 3\n", + "\n", + "## Download: http://github.com/dsacademybr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exercícios - Métodos e Funções" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2\n", + "4\n", + "6\n", + "8\n", + "10\n", + "12\n", + "14\n", + "16\n", + "18\n", + "20\n" + ] + } + ], + "source": [ + "# Exercício 1 - Crie uma função que imprima a sequência de números pares entre 1 e 20 (a função não recebe parâmetro) e \n", + "# depois faça uma chamada à função para listar os números\n", + "def listaPar():\n", + " for i in range(2, 21, 2): \n", + " print(i)\n", + " \n", + "listaPar() " + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RUMO À ANÁLISE DE DADOS\n" + ] + } + ], + "source": [ + "# Exercício 2 - Crie uam função que receba uma string como argumento e retorne a mesma string em letras maiúsculas.\n", + "# Faça uma chamada à função, passando como parâmetro uma string\n", + "def listaString(texto):\n", + " print(texto.upper())\n", + " return\n", + "\n", + "listaString('Rumo à Análise de Dados')" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "None\n", + "None\n", + "[1, 2, 3, 4, 5, 6]\n" + ] + } + ], + "source": [ + "# Exercício 3 - Crie uma função que receba como parâmetro uma lista de 4 elementos, adicione 2 elementos a lista e \n", + "# imprima a lista\n", + "def novaLista(lista):\n", + " print(lista.append(5))\n", + " print(lista.append(6))\n", + " \n", + "lista1 = [1, 2, 3, 4] \n", + "novaLista(lista1)\n", + "print(lista1)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "100\n", + "A\n", + "B\n", + "C\n" + ] + } + ], + "source": [ + "# Exercício 4 - Crie uma função que receba um argumento formal e uma possível lista de elementos. Faça duas chamadas \n", + "# à função, com apenas 1 elemento e na segunda chamada com 4 elementos\n", + "def printNum( arg1, *lista ):\n", + " print (arg1)\n", + " for i in lista:\n", + " print (i)\n", + " return;\n", + "\n", + "# Chamada à função\n", + "printNum( 100 )\n", + "printNum( 'A', 'B', 'C' )" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "A soma é : 750\n" + ] + } + ], + "source": [ + "# Exercício 5 - Crie uma função anônima e atribua seu retorno a uma variável chamada soma. A expressão vai receber 2 \n", + "# números como parâmetro e retornar a soma deles\n", + "soma = lambda arg1, arg2: arg1 + arg2\n", + "print (\"A soma é : \", soma( 452, 298 ))" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Dentro da função o total é: 30\n", + "Fora da função o total é: 0\n" + ] + } + ], + "source": [ + "# Exercício 6 - Execute o código abaixo e certifique-se que compreende a diferença entre variável global e local\n", + "\n", + "total = 0\n", + "def soma( arg1, arg2 ):\n", + " total = arg1 + arg2; \n", + " print (\"Dentro da função o total é: \", total)\n", + " return total;\n", + "\n", + "\n", + "soma( 10, 20 );\n", + "print (\"Fora da função o total é: \", total)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[102.56, 97.7, 99.14, 100.03999999999999]\n" + ] + } + ], + "source": [ + "# Exercício 7 - Abaixo você encontra uma lista com temperaturas em graus Celsius\n", + "# Crie uma função anônima que converta cada temperatura para Fahrenheit\n", + "# Dica: para conseguir realizar este exercício, você deve criar sua função lambda, dentro de uma função \n", + "# (que será estudada no próximo capítulo). Isso permite aplicar sua função a cada elemento da lista\n", + "# Como descobrir a fórmula matemática que converte de Celsius para Fahrenheit? Pesquise!!!\n", + "Celsius = [39.2, 36.5, 37.3, 37.8]\n", + "Fahrenheit = map(lambda x: (float(9)/5)*x + 32, Celsius)\n", + "print (list(Fahrenheit))" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['__class__',\n", + " '__contains__',\n", + " '__delattr__',\n", + " '__delitem__',\n", + " '__dir__',\n", + " '__doc__',\n", + " '__eq__',\n", + " '__format__',\n", + " '__ge__',\n", + " '__getattribute__',\n", + " '__getitem__',\n", + " '__gt__',\n", + " '__hash__',\n", + " '__init__',\n", + " '__init_subclass__',\n", + " '__iter__',\n", + " '__le__',\n", + " '__len__',\n", + " '__lt__',\n", + " '__ne__',\n", + " '__new__',\n", + " '__reduce__',\n", + " '__reduce_ex__',\n", + " '__repr__',\n", + " '__setattr__',\n", + " '__setitem__',\n", + " '__sizeof__',\n", + " '__str__',\n", + " '__subclasshook__',\n", + " 'clear',\n", + " 'copy',\n", + " 'fromkeys',\n", + " 'get',\n", + " 'items',\n", + " 'keys',\n", + " 'pop',\n", + " 'popitem',\n", + " 'setdefault',\n", + " 'update',\n", + " 'values']" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Exercício 8\n", + "# Crie um dicionário e liste todos os métodos e atributos do dicionário\n", + "dic = {'k1': 'Natal', 'k2': 'Recife'}\n", + "dir(dic)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['Categorical',\n", + " 'CategoricalIndex',\n", + " 'DataFrame',\n", + " 'DateOffset',\n", + " 'DatetimeIndex',\n", + " 'ExcelFile',\n", + " 'ExcelWriter',\n", + " 'Expr',\n", + " 'Float64Index',\n", + " 'Grouper',\n", + " 'HDFStore',\n", + " 'Index',\n", + " 'IndexSlice',\n", + " 'Int64Index',\n", + " 'Interval',\n", + " 'IntervalIndex',\n", + " 'MultiIndex',\n", + " 'NaT',\n", + " 'Panel',\n", + " 'Panel4D',\n", + " 'Period',\n", + " 'PeriodIndex',\n", + " 'RangeIndex',\n", + " 'Series',\n", + " 'SparseArray',\n", + " 'SparseDataFrame',\n", + " 'SparseList',\n", + " 'SparseSeries',\n", + " 'Term',\n", + " 'TimeGrouper',\n", + " 'Timedelta',\n", + " 'TimedeltaIndex',\n", + " 'Timestamp',\n", + " 'UInt64Index',\n", + " 'WidePanel',\n", + " '_DeprecatedModule',\n", + " '__builtins__',\n", + " '__cached__',\n", + " '__doc__',\n", + " '__docformat__',\n", + " '__file__',\n", + " '__loader__',\n", + " '__name__',\n", + " '__package__',\n", + " '__path__',\n", + " '__spec__',\n", + " '__version__',\n", + " '_hashtable',\n", + " '_lib',\n", + " '_libs',\n", + " '_np_version_under1p10',\n", + " '_np_version_under1p11',\n", + " '_np_version_under1p12',\n", + " '_np_version_under1p13',\n", + " '_np_version_under1p14',\n", + " '_np_version_under1p8',\n", + " '_np_version_under1p9',\n", + " '_tslib',\n", + " '_version',\n", + " 'api',\n", + " 'bdate_range',\n", + " 'compat',\n", + " 'concat',\n", + " 'core',\n", + " 'crosstab',\n", + " 'cut',\n", + " 'date_range',\n", + " 'datetime',\n", + " 'datetools',\n", + " 'describe_option',\n", + " 'errors',\n", + " 'eval',\n", + " 'ewma',\n", + " 'ewmcorr',\n", + " 'ewmcov',\n", + " 'ewmstd',\n", + " 'ewmvar',\n", + " 'ewmvol',\n", + " 'expanding_apply',\n", + " 'expanding_corr',\n", + " 'expanding_count',\n", + " 'expanding_cov',\n", + " 'expanding_kurt',\n", + " 'expanding_max',\n", + " 'expanding_mean',\n", + " 'expanding_median',\n", + " 'expanding_min',\n", + " 'expanding_quantile',\n", + " 'expanding_skew',\n", + " 'expanding_std',\n", + " 'expanding_sum',\n", + " 'expanding_var',\n", + " 'factorize',\n", + " 'get_dummies',\n", + " 'get_option',\n", + " 'get_store',\n", + " 'groupby',\n", + " 'infer_freq',\n", + " 'interval_range',\n", + " 'io',\n", + " 'isnull',\n", + " 'json',\n", + " 'lib',\n", + " 'lreshape',\n", + " 'match',\n", + " 'melt',\n", + " 'merge',\n", + " 'merge_asof',\n", + " 'merge_ordered',\n", + " 'notnull',\n", + " 'np',\n", + " 'offsets',\n", + " 'option_context',\n", + " 'options',\n", + " 'ordered_merge',\n", + " 'pandas',\n", + " 'parser',\n", + " 'period_range',\n", + " 'pivot',\n", + " 'pivot_table',\n", + " 'plot_params',\n", + " 'plotting',\n", + " 'pnow',\n", + " 'qcut',\n", + " 'read_clipboard',\n", + " 'read_csv',\n", + " 'read_excel',\n", + " 'read_feather',\n", + " 'read_fwf',\n", + " 'read_gbq',\n", + " 'read_hdf',\n", + " 'read_html',\n", + " 'read_json',\n", + " 'read_msgpack',\n", + " 'read_pickle',\n", + " 'read_sas',\n", + " 'read_sql',\n", + " 'read_sql_query',\n", + " 'read_sql_table',\n", + " 'read_stata',\n", + " 'read_table',\n", + " 'reset_option',\n", + " 'rolling_apply',\n", + " 'rolling_corr',\n", + " 'rolling_count',\n", + " 'rolling_cov',\n", + " 'rolling_kurt',\n", + " 'rolling_max',\n", + " 'rolling_mean',\n", + " 'rolling_median',\n", + " 'rolling_min',\n", + " 'rolling_quantile',\n", + " 'rolling_skew',\n", + " 'rolling_std',\n", + " 'rolling_sum',\n", + " 'rolling_var',\n", + " 'rolling_window',\n", + " 'scatter_matrix',\n", + " 'set_eng_float_format',\n", + " 'set_option',\n", + " 'show_versions',\n", + " 'stats',\n", + " 'test',\n", + " 'testing',\n", + " 'timedelta_range',\n", + " 'to_datetime',\n", + " 'to_msgpack',\n", + " 'to_numeric',\n", + " 'to_pickle',\n", + " 'to_timedelta',\n", + " 'tools',\n", + " 'tseries',\n", + " 'tslib',\n", + " 'unique',\n", + " 'util',\n", + " 'value_counts',\n", + " 'wide_to_long']" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Exercício 9\n", + "# Abaixo você encontra a importação do Pandas, um dos principais pacotes Python para análise de dados.\n", + "# Analise atentamente todos os métodos disponíveis. Um deles você vai usar no próximo exercício.\n", + "import pandas as pd\n", + "dir(pd)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
admitgregparank
count5.0000005.0000005.0000005.000000
mean0.600000616.0000003.4800003.000000
std0.547723185.1485890.4213071.224745
min0.000000380.0000002.9300001.000000
25%0.000000520.0000003.1900003.000000
50%1.000000640.0000003.6100003.000000
75%1.000000660.0000003.6700004.000000
max1.000000880.0000004.0000004.000000
\n", + "
" + ], + "text/plain": [ + " admit gre gpa rank\n", + "count 5.000000 5.000000 5.000000 5.000000\n", + "mean 0.600000 616.000000 3.480000 3.000000\n", + "std 0.547723 185.148589 0.421307 1.224745\n", + "min 0.000000 380.000000 2.930000 1.000000\n", + "25% 0.000000 520.000000 3.190000 3.000000\n", + "50% 1.000000 640.000000 3.610000 3.000000\n", + "75% 1.000000 660.000000 3.670000 4.000000\n", + "max 1.000000 880.000000 4.000000 4.000000" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# ************* Desafio ************* (pesquise na documentação Python)\n", + "\n", + "# Exercício 10 - Crie uma função que receba o arquivo abaixo como argumento e retorne um resumo estatístico descritivo \n", + "# do arquivo. Dica, use Pandas e um de seus métodos, describe()\n", + "# Arquivo: \"binary.csv\"\n", + "import pandas as pd\n", + "file_name = \"binary.csv\"\n", + "\n", + "def retornaArq(file_name):\n", + " df = pd.read_csv(file_name)\n", + " return df.describe()\n", + " \n", + "retornaArq(file_name) " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Fim" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + ] + } + ], + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 1 +} diff --git "a/JupyterNotebooks/Cap\303\255tulo04/DSA-Python-Cap\303\255tulo4-Exerc\303\255cios.ipynb" b/Cap03/Notebooks/DSA-Python-Cap03-Exercicios-Funcoes.ipynb similarity index 50% rename from "JupyterNotebooks/Cap\303\255tulo04/DSA-Python-Cap\303\255tulo4-Exerc\303\255cios.ipynb" rename to Cap03/Notebooks/DSA-Python-Cap03-Exercicios-Funcoes.ipynb index 68a63dec..88bf9ef9 100644 --- "a/JupyterNotebooks/Cap\303\255tulo04/DSA-Python-Cap\303\255tulo4-Exerc\303\255cios.ipynb" +++ b/Cap03/Notebooks/DSA-Python-Cap03-Exercicios-Funcoes.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 4\n", + "# Data Science Academy - Python Fundamentos - Capítulo 3\n", "\n", "## Download: http://github.com/dsacademybr" ] @@ -13,92 +13,149 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Exercícios" + "## Exercícios - Métodos e Funções" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ "# Exercício 1 - Crie uma função que imprima a sequência de números pares entre 1 e 20 (a função não recebe parâmetro) e \n", - "# depois faça uma chamada à função para listar os números\n", - " " + "# depois faça uma chamada à função para listar os números " ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ "# Exercício 2 - Crie uam função que receba uma string como argumento e retorne a mesma string em letras maiúsculas.\n", - "# Faça uma chamada à função, passando como parâmetro uma string\n" + "# Faça uma chamada à função, passando como parâmetro uma string" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ "# Exercício 3 - Crie uma função que receba como parâmetro uma lista de 4 elementos, adicione 2 elementos a lista e \n", - "# imprima a lista\n" + "# imprima a lista" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ "# Exercício 4 - Crie uma função que receba um argumento formal e uma possível lista de elementos. Faça duas chamadas \n", - "# à função, com apenas 1 elemento e na segunda chamada com 4 elementos\n" + "# à função, com apenas 1 elemento e na segunda chamada com 4 elementos" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ "# Exercício 5 - Crie uma função anônima e atribua seu retorno a uma variável chamada soma. A expressão vai receber 2 \n", - "# números como parâmetro e retornar a soma deles\n" + "# números como parâmetro e retornar a soma deles" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ - "# Exercício 6 - Execute o código abaixo e certifique-se que compreende a diferença entre variável global e local\n" + "# Exercício 6 - Execute o código abaixo e certifique-se que compreende a diferença entre variável global e local\n", + "total = 0\n", + "def soma( arg1, arg2 ):\n", + " total = arg1 + arg2; \n", + " print (\"Dentro da função o total é: \", total)\n", + " return total;\n", + "\n", + "\n", + "soma( 10, 20 );\n", + "print (\"Fora da função o total é: \", total)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "# Exercício 7 - Abaixo você encontra uma lista com temperaturas em graus Celsius\n", + "# Crie uma função anônima que converta cada temperatura para Fahrenheit\n", + "# Dica: para conseguir realizar este exercício, você deve criar sua função lambda, dentro de uma função \n", + "# (que será estudada no próximo capítulo). Isso permite aplicar sua função a cada elemento da lista\n", + "# Como descobrir a fórmula matemática que converte de Celsius para Fahrenheit? Pesquise!!!\n", + "Celsius = [39.2, 36.5, 37.3, 37.8]\n", + "Fahrenheit = map(coloque_aqui_sua_função_lambda)\n", + "print (list(Fahrenheit))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "# Exercício 8\n", + "# Crie um dicionário e liste todos os métodos e atributos do dicionário" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ - "# Exercício 7 - Crie uma função que receba o arquivo abaixo como argumento e retorne um resumo estatístico descritivo \n", + "# Exercício 9\n", + "# Abaixo você encontra a importação do Pandas, um dos principais pacotes Python para análise de dados.\n", + "# Analise atentamente todos os métodos disponíveis. Um deles você vai usar no próximo exercício.\n", + "import pandas as pd\n", + "dir(pd)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "# ************* Desafio ************* (pesquise na documentação Python)\n", + "\n", + "# Exercício 10 - Crie uma função que receba o arquivo abaixo como argumento e retorne um resumo estatístico descritivo \n", "# do arquivo. Dica, use Pandas e um de seus métodos, describe()\n", - "# Arquivo: \"http://www.ats.ucla.edu/stat/data/binary.csv\"\n", + "# Arquivo: \"binary.csv\"\n", + "import pandas as pd\n", + "file_name = \"binary.csv\"\n", " " ] }, @@ -113,7 +170,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -133,9 +190,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-Exerc\303\255cios-Solu\303\247\303\243o.ipynb" b/Cap03/Notebooks/DSA-Python-Cap03-Exercicios-Loops-Condiconais-Solucao.ipynb similarity index 85% rename from "JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-Exerc\303\255cios-Solu\303\247\303\243o.ipynb" rename to Cap03/Notebooks/DSA-Python-Cap03-Exercicios-Loops-Condiconais-Solucao.ipynb index 4265233e..b6412c46 100644 --- "a/JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-Exerc\303\255cios-Solu\303\247\303\243o.ipynb" +++ b/Cap03/Notebooks/DSA-Python-Cap03-Exercicios-Loops-Condiconais-Solucao.ipynb @@ -13,22 +13,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Exercícios" + "## Exercícios - Loops e Condiconais - Solução" ] }, { "cell_type": "code", "execution_count": 1, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Digite o dia da semana: Sábado\n", - "Hoje é dia de descanso\n" + "Digite o dia da semana: segunda\n", + "Você precisa trabalhar!\n" ] } ], @@ -45,9 +43,7 @@ { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -68,9 +64,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -94,9 +88,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -140,9 +132,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -168,9 +158,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -205,20 +193,18 @@ "source": [ "# Exercício 6 - Crie uma variável chamada contador = 0. Enquanto counter for menor que 100, imprima os valores na tela,\n", "# mas quando for encontrado o valor 23, interrompa a execução do programa\n", - "counter = 0\n", - "while counter < 100:\n", - " if counter == 23:\n", + "contador = 0\n", + "while contador < 100:\n", + " if contador == 23:\n", " break\n", - " print(counter)\n", - " counter += 1" + " print(contador)\n", + " contador += 1" ] }, { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -242,9 +228,7 @@ { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -263,16 +247,14 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Qual a temperatura? 35\n", - "Vista roupas leves.\n" + "Qual a temperatura? 30\n", + "Busque seus casacos.\n" ] } ], @@ -288,20 +270,18 @@ { "cell_type": "code", "execution_count": 10, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "O caracter a aparece 9 vezes na frase.\n" + "O caracter r aparece 6 vezes na frase.\n" ] } ], "source": [ - "# Exercício 10 - Faça um programa que conte quantas vezes a letra \"a\" aparece na frase abaixo. Use um placeholder na \n", + "# Exercício 10 - Faça um programa que conte quantas vezes a letra \"r\" aparece na frase abaixo. Use um placeholder na \n", "# sua instrução de impressão\n", "\n", "# “É melhor, muito melhor, contentar-se com a realidade; se ela não é tão brilhante como os sonhos, tem pelo menos a \n", @@ -310,9 +290,9 @@ "frase = \"É melhor, muito melhor, contentar-se com a realidade; se ela não é tão brilhante como os sonhos, tem pelo menos a vantagem de existir.\" \n", "count = 0\n", "for caracter in frase:\n", - " if caracter == 'a':\n", + " if caracter == 'r':\n", " count += 1\n", - "print(\"O caracter a aparece %s vezes na frase.\" %(count))" + "print(\"O caracter r aparece %s vezes na frase.\" %(count))" ] }, { @@ -326,7 +306,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -346,9 +326,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-Exerc\303\255cios.ipynb" b/Cap03/Notebooks/DSA-Python-Cap03-Exercicios-Loops-Condiconais.ipynb similarity index 77% rename from "JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-Exerc\303\255cios.ipynb" rename to Cap03/Notebooks/DSA-Python-Cap03-Exercicios-Loops-Condiconais.ipynb index bf185807..d5480f48 100644 --- "a/JupyterNotebooks/Cap\303\255tulo03/DSA-Python-Cap\303\255tulo3-Exerc\303\255cios.ipynb" +++ b/Cap03/Notebooks/DSA-Python-Cap03-Exercicios-Loops-Condiconais.ipynb @@ -13,132 +13,132 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Exercícios" + "## Exercícios - Loops e Condiconais" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ "# Exercício 1 - Crie uma estrutura que pergunte ao usuário qual o dia da semana. Se o dia for igual a Domingo ou \n", - "# igual a sábado, imprima na tela \"Hoje é dia de descanso\", caso contrário imprima na tela \"Você precisa trabalhar!\"\n" + "# igual a sábado, imprima na tela \"Hoje é dia de descanso\", caso contrário imprima na tela \"Você precisa trabalhar!\"" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ - "# Exercício 2 - Crie uma lista de 5 frutas e verifique se a fruta 'Morango' faz parte da lista\n" + "# Exercício 2 - Crie uma lista de 5 frutas e verifique se a fruta 'Morango' faz parte da lista" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ "# Exercício 3 - Crie uma tupla de 4 elementos, multiplique cada elemento da tupla por 2 e guarde os resultados em uma \n", - "# lista\n" + "# lista" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ - "# Exercício 4 - Crie uma sequência de números pares entre 100 e 150 e imprima na tela\n" + "# Exercício 4 - Crie uma sequência de números pares entre 100 e 150 e imprima na tela" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ "# Exercício 5 - Crie uma variável chamada temperatura e atribua o valor 40. Enquanto temperatura for maior que 35, \n", - "# imprima as temperaturas na tela\n" + "# imprima as temperaturas na tela" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ "# Exercício 6 - Crie uma variável chamada contador = 0. Enquanto counter for menor que 100, imprima os valores na tela,\n", - "# mas quando for encontrado o valor 23, interrompa a execução do programa\n" + "# mas quando for encontrado o valor 23, interrompa a execução do programa" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ "# Exercício 7 - Crie uma lista vazia e uma variável com valor 4. Enquanto o valor da variável for menor ou igual a 20, \n", - "# adicione à lista, apenas os valores pares e imprima a lista\n" + "# adicione à lista, apenas os valores pares e imprima a lista" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ - "# Exercício 8 - Transforme o resultado desta função range em uma lista: range(5, 45, 2)\n" + "# Exercício 8 - Transforme o resultado desta função range em uma lista: range(5, 45, 2)\n", + "nums = range(5, 45, 2)" ] }, { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ "# Exercício 9 - Faça a correção dos erros no código abaixo e execute o programa. Dica: são 3 erros.\n", - "temperatura = float(input('Qual a temperatura? ')\n", - " if temperatura > 30\n", - " print('Vista roupas leves.')\n", - " else:\n", - " print('Busque seus casacos.')\n" + "temperatura = float(input('Qual a temperatura? '))\n", + "if temperatura > 30\n", + "print('Vista roupas leves.')\n", + "else\n", + " print('Busque seus casacos.')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ - "# Exercício 10 - Faça um programa que conte quantas vezes a letra \"a\" aparece na frase abaixo. Use um placeholder na \n", + "# Exercício 10 - Faça um programa que conte quantas vezes a letra \"r\" aparece na frase abaixo. Use um placeholder na \n", "# sua instrução de impressão\n", "\n", "# “É melhor, muito melhor, contentar-se com a realidade; se ela não é tão brilhante como os sonhos, tem pelo menos a \n", "# vantagem de existir.” (Machado de Assis)\n", - "\n" + "\n", + "frase = \"É melhor, muito melhor, contentar-se com a realidade; se ela não é tão brilhante como os sonhos, tem pelo menos a vantagem de existir.\" " ] }, { @@ -152,7 +152,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -172,9 +172,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git a/Cap03/Notebooks/binary.csv b/Cap03/Notebooks/binary.csv new file mode 100755 index 00000000..b2488b11 --- /dev/null +++ b/Cap03/Notebooks/binary.csv @@ -0,0 +1,6 @@ +admit,gre,gpa,rank +0,380,3.61,3 +1,660,3.67,3 +1,880,4.00,1 +1,640,3.19,4 +0,520,2.93,4 diff --git a/Cap04/Lab02/calculadora_v2.py b/Cap04/Lab02/calculadora_v2.py new file mode 100644 index 00000000..f1506e9c --- /dev/null +++ b/Cap04/Lab02/calculadora_v2.py @@ -0,0 +1,51 @@ +# Calculadora em Python + +print("\n******************* Python Calculator *******************") + +def add(x, y): + return x + y + +def subtract(x, y): + return x - y + +def multiply(x, y): + return x * y + +def divide(x, y): + return x / y + +print("\nSelecione o número da operação desejada: \n") +print("1 - Soma") +print("2 - Subtração") +print("3 - Multiplicação") +print("4 - Divisão") + +escolha = input("\nDigite sua opção (1/2/3/4): ") + +num1 = int(input("\nDigite o primeiro número: ")) +num2 = int(input("\nDigite o segundo número: ")) + +if escolha == '1': + print("\n") + print(num1, "+", num2, "=", add(num1, num2)) + print("\n") + +elif escolha == '2': + print("\n") + print(num1, "-", num2, "=", subtract(num1, num2)) + print("\n") + +elif escolha == '3': + print("\n") + print(num1, "*", num2, "=", multiply(num1, num2)) + print("\n") + +elif escolha == '4': + print("\n") + print(num1, "/", num2, "=", divide(num1, num2)) + print("\n") + +else: + print("\nOpção Inválida!") + + \ No newline at end of file diff --git "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Arquivos.ipynb" b/Cap04/Notebooks/DSA-Python-Cap04-01-Arquivos-Parte1.ipynb similarity index 99% rename from "JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Arquivos.ipynb" rename to Cap04/Notebooks/DSA-Python-Cap04-01-Arquivos-Parte1.ipynb index af80c93e..058c4d5d 100644 --- "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Arquivos.ipynb" +++ b/Cap04/Notebooks/DSA-Python-Cap04-01-Arquivos-Parte1.ipynb @@ -4,11 +4,25 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 2\n", + "# Data Science Academy - Python Fundamentos - Capítulo 4\n", "\n", "## Download: http://github.com/dsacademybr" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## ************ ATENÇÃO ************\n", + "Caso você tenha problemas com acentos nos arquivos:\n", + "\n", + "Primeiro, recomendamos a leitura do material sobre Formato Unicode, ao final do capítulo 4.\n", + "\n", + "Uma forma de resolver esse problema, é abrir o arquivo em um editor de texto como o Sublime Text, clicar em File - Save with Encoding e então salvar com encoding UTF-8.\n", + "\n", + "Outra opção é incluir o parâmetro encoding='utf8' ao abrir o arquivo para leitura ou escrita.\n" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -20,7 +34,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Obs: Crie um arquivo txt, chamado arquivo-dsc.txt no mesmo diretório onde está seu Jupyter Notebook, digite a frase: Python é uma linguagem poderosa! e salve o arquivo." + "Obs: Crie um arquivo txt, chamado arquivo1.txt no diretório \"arquivos\" na pasta onde está seu Jupyter Notebook, digite a frase: Python é uma linguagem poderosa! \n", + "e salve o arquivo." ] }, { @@ -39,21 +54,19 @@ "outputs": [], "source": [ "# Abrindo o arquivo para leitura\n", - "arq1 = open(\"arquivo-dsc.txt\", \"r\")" + "arq1 = open(\"arquivos/arquivo1.txt\", \"r\")" ] }, { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Testando gravação de arquivos em Python Acrescentando conteúdo\n" + "Python é uma linguagem poderosa!\n" ] } ], @@ -65,15 +78,13 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "65\n" + "33\n" ] } ], @@ -85,9 +96,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -105,15 +114,13 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Testando g\n" + "Python é u\n" ] } ], @@ -138,15 +145,13 @@ "outputs": [], "source": [ "# Abrindo arquivo para gravação\n", - "arq2 = open(\"arquivo-dsc.txt\", \"w\")" + "arq2 = open(\"arquivos/arquivo1.txt\", \"w\")" ] }, { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "ename": "UnsupportedOperation", @@ -168,9 +173,7 @@ { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -208,15 +211,13 @@ "outputs": [], "source": [ "# Lendo arquivo gravado\n", - "arq2 = open(\"arquivo-dsc.txt\", \"r\")" + "arq2 = open(\"arquivos/arquivo1.txt\", \"r\")" ] }, { "cell_type": "code", "execution_count": 11, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -239,20 +240,18 @@ "outputs": [], "source": [ "# Acrescentando conteúdo\n", - "arq2 = open(\"arquivo-dsc.txt\", \"a\")" + "arq2 = open(\"arquivos/arquivo1.txt\", \"a\")" ] }, { "cell_type": "code", "execution_count": 13, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "22" + "23" ] }, "execution_count": 13, @@ -261,7 +260,7 @@ } ], "source": [ - "arq2.write(\"Acrescentando conteúdo\")" + "arq2.write(\" Acrescentando conteúdo\")" ] }, { @@ -283,21 +282,19 @@ }, "outputs": [], "source": [ - "arq2 = open(\"arquivo-dsc.txt\", \"r\")" + "arq2 = open(\"arquivos/arquivo1.txt\", \"r\")" ] }, { "cell_type": "code", "execution_count": 16, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Testando gravação de arquivos em Python Acrescentando conteúdo\n" + "Testando gravação de arquivos em Python Acrescentando conteúdo\n" ] } ], @@ -308,9 +305,7 @@ { "cell_type": "code", "execution_count": 17, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -331,15 +326,13 @@ { "cell_type": "code", "execution_count": 18, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Testando gravação de arquivos em Python Acrescentando conteúdo\n" + "Testando gravação de arquivos em Python Acrescentando conteúdo\n" ] } ], @@ -357,9 +350,7 @@ { "cell_type": "code", "execution_count": 19, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -398,9 +389,7 @@ { "cell_type": "code", "execution_count": 22, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -421,7 +410,7 @@ "cell_type": "code", "execution_count": 23, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -432,7 +421,7 @@ "cell_type": "code", "execution_count": 24, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -442,9 +431,7 @@ { "cell_type": "code", "execution_count": 25, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -480,9 +467,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Faça download do arquivo salarios.csv em nosso repositório no github. Este arquivo foi obtido no sites de dados abertos do governo da cidade de Chicago, nos EUA: https://data.cityofchicago.org/\n", - "\n", - "Download od arquivo: http://github.com/dsacademybr/JupyterNotebooks/Capitulo02/salarios.csv" + "Faça download do arquivo salarios.csv em nosso repositório no github. Este arquivo foi obtido no site de dados abertos do governo da cidade de Chicago, nos EUA: https://data.cityofchicago.org/" ] }, { @@ -493,7 +478,7 @@ }, "outputs": [], "source": [ - "f = open('salarios.csv', 'r')" + "f = open('arquivos/salarios.csv', 'r')" ] }, { @@ -521,9 +506,7 @@ { "cell_type": "code", "execution_count": 30, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -552,7 +535,7 @@ }, "outputs": [], "source": [ - "f = open('salarios.csv', 'r')" + "f = open('arquivos/salarios.csv', 'r')" ] }, { @@ -592,7 +575,7 @@ "cell_type": "code", "execution_count": 35, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -604,9 +587,7 @@ { "cell_type": "code", "execution_count": 36, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -635,7 +616,7 @@ }, "outputs": [], "source": [ - "f = open('salarios.csv', 'r')" + "f = open('arquivos/salarios.csv', 'r')" ] }, { @@ -700,9 +681,7 @@ { "cell_type": "code", "execution_count": 43, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -731,7 +710,7 @@ }, "outputs": [], "source": [ - "f = open('salarios.csv', 'r')\n", + "f = open('arquivos/salarios.csv', 'r')\n", "data = f.read()\n", "rows = data.split('\\n')\n", "full_data = []" @@ -761,15 +740,17 @@ "outputs": [], "source": [ "for column in first_row:\n", - " count = count + 1" + " count = count + 1\n", + " \n", + "# Outra solução possível\n", + "# for column in full_data[0]:\n", + "# count = count + 1" ] }, { "cell_type": "code", "execution_count": 47, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -793,20 +774,18 @@ { "cell_type": "code", "execution_count": 48, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Overwriting teste.txt\n" + "Overwriting arquivos/teste.txt\n" ] } ], "source": [ - "%%writefile teste.txt \n", + "%%writefile arquivos/teste.txt \n", "Olá este arquivo foi gerado pelo próprio Jupyter Notebook.\n", "Podemos gerar quantas linhas quisermos e o Jupyter gera o arquivo final." ] @@ -815,19 +794,17 @@ "cell_type": "code", "execution_count": 49, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ - "arq4 = open(\"teste.txt\", 'r')" + "arq4 = open(\"arquivos/teste.txt\", 'r')" ] }, { "cell_type": "code", "execution_count": 50, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -847,9 +824,7 @@ { "cell_type": "code", "execution_count": 51, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -870,9 +845,7 @@ { "cell_type": "code", "execution_count": 52, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -893,9 +866,7 @@ { "cell_type": "code", "execution_count": 53, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -917,9 +888,7 @@ { "cell_type": "code", "execution_count": 54, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -933,7 +902,7 @@ ], "source": [ "# Podemos usar um loop for para ler o arquivo\n", - "for line in open('teste.txt'):\n", + "for line in open('arquivos/teste.txt'):\n", " print(line)" ] }, @@ -963,14 +932,14 @@ }, "outputs": [], "source": [ - "file_name = \"http://www.ats.ucla.edu/stat/data/binary.csv\"" + "file_name = \"arquivos/binary.csv\"" ] }, { "cell_type": "code", "execution_count": 57, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -980,14 +949,25 @@ { "cell_type": "code", "execution_count": 58, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", + "\n", "\n", " \n", " \n", @@ -1016,7 +996,7 @@ " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", @@ -1042,7 +1022,7 @@ " admit gre gpa rank\n", "0 0 380 3.61 3\n", "1 1 660 3.67 3\n", - "2 1 800 4.00 1\n", + "2 1 880 4.00 1\n", "3 1 640 3.19 4\n", "4 0 520 2.93 4" ] @@ -1060,11 +1040,11 @@ "cell_type": "code", "execution_count": 59, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ - "file2 = \"salarios.csv\"" + "file2 = \"arquivos/salarios.csv\"" ] }, { @@ -1081,14 +1061,25 @@ { "cell_type": "code", "execution_count": 61, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", + "\n", "
218008804.001
\n", " \n", " \n", @@ -1175,15 +1166,15 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], "metadata": { "kernelspec": { - "display_name": "Python [Root]", + "display_name": "Python 3", "language": "python", - "name": "Python [Root]" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -1195,9 +1186,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.2" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Manipula\303\247\303\243o de Arquivos.ipynb" b/Cap04/Notebooks/DSA-Python-Cap04-02-Arquivos-Parte2.ipynb similarity index 71% rename from "JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Manipula\303\247\303\243o de Arquivos.ipynb" rename to Cap04/Notebooks/DSA-Python-Cap04-02-Arquivos-Parte2.ipynb index 5ff7e898..43e0f191 100755 --- "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Manipula\303\247\303\243o de Arquivos.ipynb" +++ b/Cap04/Notebooks/DSA-Python-Cap04-02-Arquivos-Parte2.ipynb @@ -4,11 +4,25 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 7\n", + "# Data Science Academy - Python Fundamentos - Capítulo 4\n", "\n", "## Download: http://github.com/dsacademybr" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## ************ ATENÇÃO ************\n", + "Caso você tenha problemas com acentos nos arquivos:\n", + "\n", + "Primeiro, recomendamos a leitura do material sobre Formato Unicode, ao final do capítulo 4.\n", + "\n", + "Uma forma de resolver esse problema, é abrir o arquivo em um editor de texto como o Sublime Text, clicar em File - Save with Encoding e então salvar com encoding UTF-8.\n", + "\n", + "Outra opção é incluir o parâmetro encoding='utf8' ao abrir o arquivo para leitura ou escrita.\n" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -20,9 +34,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "- Text files\n", - "- CSV files\n", - "- JSON" + "- Arquivos TXT\n", + "- Arquivos CSV \n", + "- Arquivos JSON" ] }, { @@ -40,41 +54,39 @@ "cell_type": "code", "execution_count": 1, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ - "texto = \"Cientista de Dados é a profissão que mais tem crescido ultimamente.\\n\"\n", - "texto = texto + \"Esses profissionais precisam se especializar em Estatística, Programação e Machine Learning.\\n\"\n", + "texto = \"Cientista de Dados é a profissão que mais tem crescido em todo mundo.\\n\"\n", + "texto = texto + \"Esses profissionais precisam se especializar em Programação, Estatística e Machine Learning.\\n\"\n", "texto += \"E claro, em Big Data.\"" ] }, { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Cientista de Dados é a profissão que mais tem crescido ultimamente.\n", - "Esses profissionais precisam se especializar em Estatística, Programação e Machine Learning.\n", + "Cientista de Dados é a profissão que mais tem crescido em todo mundo.\n", + "Esses profissionais precisam se especializar em Programação, Estatística e Machine Learning.\n", "E claro, em Big Data.\n" ] } ], "source": [ - "print (texto)" + "print(texto)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -86,19 +98,19 @@ "cell_type": "code", "execution_count": 4, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ - "# Criando um arquivo (no mesmo diretório onde está o Jupyter Notebook)\n", - "arquivo = open(os.path.join('cientista.txt'),'w')" + "# Criando um arquivo \n", + "arquivo = open(os.path.join('arquivos/cientista.txt'),'w')" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -111,7 +123,7 @@ "cell_type": "code", "execution_count": 6, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -122,44 +134,23 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Cientista de Dados é a profissão que mais tem crescido ultimamente. Esses profissionais precisam se especializar em Estatística, Programação e Machine Learning. E claro, em Big Data. " - ] - } - ], - "source": [ - "!cat cientista.txt" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Cientista de Dados é a profissão que mais tem crescido ultimamente. Esses profissionais precisam se especializar em Estatística, Programação e Machine Learning. E claro, em Big Data. \n" + "Cientista de Dados é a profissão que mais tem crescido em todo mundo. Esses profissionais precisam se especializar em Programação, Estatística e Machine Learning. E claro, em Big Data. \n" ] } ], "source": [ "# Lendo o arquivo\n", - "arquivo = open('cientista.txt','r')\n", - "texto = arquivo.read()\n", + "arquivo = open('arquivos/cientista.txt','r')\n", + "conteudo = arquivo.read()\n", "arquivo.close()\n", "\n", - "print (texto)" + "print(conteudo)" ] }, { @@ -177,63 +168,59 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 8, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ - "with open('cientista.txt','r') as arquivo:\n", - " texto = arquivo.read()" + "with open('arquivos/cientista.txt','r') as arquivo:\n", + " conteudo = arquivo.read()" ] }, { "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, + "execution_count": 9, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "183\n" + "185\n" ] } ], "source": [ - "print (len(texto))" + "print(len(conteudo))" ] }, { "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false - }, + "execution_count": 10, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Cientista de Dados é a profissão que mais tem crescido ultimamente. Esses profissionais precisam se especializar em Estatística, Programação e Machine Learning. E claro, em Big Data. \n" + "Cientista de Dados é a profissão que mais tem crescido em todo mundo. Esses profissionais precisam se especializar em Programação, Estatística e Machine Learning. E claro, em Big Data. \n" ] } ], "source": [ - "print (texto)" + "print(conteudo)" ] }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 11, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ - "with open('cientista.txt','w') as arquivo:\n", + "with open('arquivos/cientista.txt','w') as arquivo:\n", " arquivo.write(texto[:21])\n", " arquivo.write('\\n')\n", " arquivo.write(texto[:33])" @@ -241,22 +228,25 @@ }, { "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, + "execution_count": 12, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Cientista de Dados é \r\n", - "Cientista de Dados é a profissão " + "Cientista de Dados é \n", + "Cientista de Dados é a profissão \n" ] } ], "source": [ - "!cat cientista.txt" + "# Lendo o arquivo\n", + "arquivo = open('arquivos/cientista.txt','r')\n", + "conteudo = arquivo.read()\n", + "arquivo.close()\n", + "\n", + "print (conteudo)" ] }, { @@ -272,9 +262,9 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 13, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -284,13 +274,13 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 14, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ - "with open('numeros.csv','w') as arquivo:\n", + "with open('arquivos/numeros.csv','w') as arquivo:\n", " writer = csv.writer(arquivo)\n", " writer.writerow(('primeira','segunda','terceira'))\n", " writer.writerow((55,93,76)) \n", @@ -299,34 +289,35 @@ }, { "cell_type": "code", - "execution_count": 16, - "metadata": { - "collapsed": false - }, + "execution_count": 15, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "primeira,segunda,terceira\r", - "\r\n", - "55,93,76\r", - "\r\n", - "62,14,86\r", - "\r\n" + "Número de colunas: 3\n", + "['primeira', 'segunda', 'terceira']\n", + "Número de colunas: 3\n", + "['55', '93', '76']\n", + "Número de colunas: 3\n", + "['62', '14', '86']\n" ] } ], "source": [ - "!cat numeros.csv" + "# Leitura de arquivos csv\n", + "with open('arquivos/numeros.csv','r') as arquivo:\n", + " leitor = csv.reader(arquivo)\n", + " for x in leitor:\n", + " print ('Número de colunas:', len(x))\n", + " print(x)" ] }, { "cell_type": "code", - "execution_count": 17, - "metadata": { - "collapsed": false - }, + "execution_count": 16, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -342,8 +333,8 @@ } ], "source": [ - "# Leitura de arquivos csv\n", - "with open('numeros.csv','r') as arquivo:\n", + "# Código alternativo para eventuais problemas com linhas em branco no arquivo\n", + "with open('arquivos/numeros.csv','r', encoding='utf8', newline = '\\r\\n') as arquivo:\n", " leitor = csv.reader(arquivo)\n", " for x in leitor:\n", " print ('Número de colunas:', len(x))\n", @@ -352,10 +343,8 @@ }, { "cell_type": "code", - "execution_count": 18, - "metadata": { - "collapsed": false - }, + "execution_count": 17, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -367,7 +356,7 @@ ], "source": [ "# Gerando uma lista com dados do arquivo csv\n", - "with open('numeros.csv','r') as arquivo:\n", + "with open('arquivos/numeros.csv','r') as arquivo:\n", " leitor = csv.reader(arquivo)\n", " dados = list(leitor)\n", " \n", @@ -377,10 +366,8 @@ }, { "cell_type": "code", - "execution_count": 19, - "metadata": { - "collapsed": false - }, + "execution_count": 18, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -411,9 +398,9 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 19, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -426,18 +413,16 @@ }, { "cell_type": "code", - "execution_count": 21, - "metadata": { - "collapsed": false - }, + "execution_count": 20, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "similar ['c', 'Modula-3', 'lisp']\n", "nome Guido van Rossum\n", "linguagem Python\n", + "similar ['c', 'Modula-3', 'lisp']\n", "users 1000000\n" ] } @@ -449,9 +434,9 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 21, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -461,18 +446,16 @@ }, { "cell_type": "code", - "execution_count": 23, - "metadata": { - "collapsed": false - }, + "execution_count": 22, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "'{\"similar\": [\"c\", \"Modula-3\", \"lisp\"], \"nome\": \"Guido van Rossum\", \"linguagem\": \"Python\", \"users\": 1000000}'" + "'{\"nome\": \"Guido van Rossum\", \"linguagem\": \"Python\", \"similar\": [\"c\", \"Modula-3\", \"lisp\"], \"users\": 1000000}'" ] }, - "execution_count": 23, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } @@ -484,43 +467,41 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 23, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ "# Criando um arquivo Json\n", - "with open('dados.json','w') as arquivo:\n", + "with open('arquivos/dados.json','w') as arquivo:\n", " arquivo.write(json.dumps(dict))" ] }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 24, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ "# Leitura de arquivos Json\n", - "with open('dados.json','r') as arquivo:\n", + "with open('arquivos/dados.json','r') as arquivo:\n", " texto = arquivo.read()\n", " data = json.loads(texto)" ] }, { "cell_type": "code", - "execution_count": 26, - "metadata": { - "collapsed": false - }, + "execution_count": 25, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "{'similar': ['c', 'Modula-3', 'lisp'], 'nome': 'Guido van Rossum', 'linguagem': 'Python', 'users': 1000000}\n" + "{'nome': 'Guido van Rossum', 'linguagem': 'Python', 'similar': ['c', 'Modula-3', 'lisp'], 'users': 1000000}\n" ] } ], @@ -530,10 +511,8 @@ }, { "cell_type": "code", - "execution_count": 27, - "metadata": { - "collapsed": false - }, + "execution_count": 26, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -549,9 +528,9 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 27, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -564,19 +543,17 @@ }, { "cell_type": "code", - "execution_count": 29, - "metadata": { - "collapsed": false - }, + "execution_count": 28, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Título: The Good Man trailer\n", - "URL: http://vimeo.com/57733101\n", + "URL: https://vimeo.com/57733101\n", "Duração: 143\n", - "Número de Visualizações: 5206\n" + "Número de Visualizações: 5514\n" ] } ], @@ -589,7 +566,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 29, "metadata": { "collapsed": true }, @@ -598,15 +575,15 @@ "# Copiando o conteúdo de um arquivo para outro\n", "import os\n", "\n", - "arquivo_fonte = 'dados.json'\n", - "arquivo_destino = 'json_data.txt'" + "arquivo_fonte = 'arquivos/dados.json'\n", + "arquivo_destino = 'arquivos/json_data.txt'" ] }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 30, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -619,10 +596,8 @@ }, { "cell_type": "code", - "execution_count": 32, - "metadata": { - "collapsed": false - }, + "execution_count": 31, + "metadata": {}, "outputs": [ { "data": { @@ -630,7 +605,7 @@ "107" ] }, - "execution_count": 32, + "execution_count": 31, "metadata": {}, "output_type": "execute_result" } @@ -642,21 +617,33 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 32, "metadata": { - "collapsed": false + "collapsed": true }, + "outputs": [], + "source": [ + "# Leitura de arquivos Json\n", + "with open('arquivos/json_data.txt','r') as arquivo:\n", + " texto = arquivo.read()\n", + " data = json.loads(texto)" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "{\"similar\": [\"c\", \"Modula-3\", \"lisp\"], \"nome\": \"Guido van Rossum\", \"linguagem\": \"Python\", \"users\": 1000000}" + "{'nome': 'Guido van Rossum', 'linguagem': 'Python', 'similar': ['c', 'Modula-3', 'lisp'], 'users': 1000000}\n" ] } ], "source": [ - "!cat json_data.txt" + "print(data)" ] }, { @@ -674,7 +661,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -697,9 +684,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git a/Cap04/Notebooks/DSA-Python-Cap04-03-Modulos-e-Pacotes.ipynb b/Cap04/Notebooks/DSA-Python-Cap04-03-Modulos-e-Pacotes.ipynb new file mode 100755 index 00000000..99d7e059 --- /dev/null +++ b/Cap04/Notebooks/DSA-Python-Cap04-03-Modulos-e-Pacotes.ipynb @@ -0,0 +1,541 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Data Science Academy - Python Fundamentos - Capítulo 4\n", + "\n", + "## Download: http://github.com/dsacademybr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Módulos e Pacotes" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "# Importando um módulo em Python\n", + "import math" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['__doc__',\n", + " '__file__',\n", + " '__loader__',\n", + " '__name__',\n", + " '__package__',\n", + " '__spec__',\n", + " 'acos',\n", + " 'acosh',\n", + " 'asin',\n", + " 'asinh',\n", + " 'atan',\n", + " 'atan2',\n", + " 'atanh',\n", + " 'ceil',\n", + " 'copysign',\n", + " 'cos',\n", + " 'cosh',\n", + " 'degrees',\n", + " 'e',\n", + " 'erf',\n", + " 'erfc',\n", + " 'exp',\n", + " 'expm1',\n", + " 'fabs',\n", + " 'factorial',\n", + " 'floor',\n", + " 'fmod',\n", + " 'frexp',\n", + " 'fsum',\n", + " 'gamma',\n", + " 'gcd',\n", + " 'hypot',\n", + " 'inf',\n", + " 'isclose',\n", + " 'isfinite',\n", + " 'isinf',\n", + " 'isnan',\n", + " 'ldexp',\n", + " 'lgamma',\n", + " 'log',\n", + " 'log10',\n", + " 'log1p',\n", + " 'log2',\n", + " 'modf',\n", + " 'nan',\n", + " 'pi',\n", + " 'pow',\n", + " 'radians',\n", + " 'sin',\n", + " 'sinh',\n", + " 'sqrt',\n", + " 'tan',\n", + " 'tanh',\n", + " 'tau',\n", + " 'trunc']" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Verificando todos os métodos disponíveis no módulo\n", + "dir(math)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "5.0" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Usando um dos métodos do módulo math\n", + "math.sqrt(25)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "# Importando apenas um dos métodos do módulo math\n", + "from math import sqrt" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3.0" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Usando o método\n", + "sqrt(9)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gamma', 'gcd', 'hypot', 'inf', 'isclose', 'isfinite', 'isinf', 'isnan', 'ldexp', 'lgamma', 'log', 'log10', 'log1p', 'log2', 'modf', 'nan', 'pi', 'pow', 'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'tau', 'trunc']\n" + ] + } + ], + "source": [ + "# Imprimindo todos os métodos do módulo math\n", + "print(dir(math))" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Help on built-in function sqrt in module math:\n", + "\n", + "sqrt(...)\n", + " sqrt(x)\n", + " \n", + " Return the square root of x.\n", + "\n" + ] + } + ], + "source": [ + "# Help do método sqrt do módulo math\n", + "help(sqrt)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import random" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'Maça'" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "random.choice(['Maça', 'Banana', 'Laranja'])" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[54, 37, 67, 23, 97, 8, 16, 10, 72, 59]" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "random.sample(range(100), 10)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import statistics" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "dados = [2.75, 1.75, 1.25, 0.25, 0.5, 1.25, 3.5]" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1.6071428571428572" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "statistics.mean(dados)" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1.25" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "statistics.median(dados)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import os" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'/Users/dmpm/Dropbox/DSA/PythonFundamentos/Cap04/Notebooks'" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "os.getcwd()" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['CLD_CONTINUED', 'CLD_DUMPED', 'CLD_EXITED', 'CLD_TRAPPED', 'DirEntry', 'EX_CANTCREAT', 'EX_CONFIG', 'EX_DATAERR', 'EX_IOERR', 'EX_NOHOST', 'EX_NOINPUT', 'EX_NOPERM', 'EX_NOUSER', 'EX_OK', 'EX_OSERR', 'EX_OSFILE', 'EX_PROTOCOL', 'EX_SOFTWARE', 'EX_TEMPFAIL', 'EX_UNAVAILABLE', 'EX_USAGE', 'F_LOCK', 'F_OK', 'F_TEST', 'F_TLOCK', 'F_ULOCK', 'MutableMapping', 'NGROUPS_MAX', 'O_ACCMODE', 'O_APPEND', 'O_ASYNC', 'O_CLOEXEC', 'O_CREAT', 'O_DIRECTORY', 'O_DSYNC', 'O_EXCL', 'O_EXLOCK', 'O_NDELAY', 'O_NOCTTY', 'O_NOFOLLOW', 'O_NONBLOCK', 'O_RDONLY', 'O_RDWR', 'O_SHLOCK', 'O_SYNC', 'O_TRUNC', 'O_WRONLY', 'PRIO_PGRP', 'PRIO_PROCESS', 'PRIO_USER', 'P_ALL', 'P_NOWAIT', 'P_NOWAITO', 'P_PGID', 'P_PID', 'P_WAIT', 'PathLike', 'RTLD_GLOBAL', 'RTLD_LAZY', 'RTLD_LOCAL', 'RTLD_NODELETE', 'RTLD_NOLOAD', 'RTLD_NOW', 'R_OK', 'SCHED_FIFO', 'SCHED_OTHER', 'SCHED_RR', 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'ST_NOSUID', 'ST_RDONLY', 'TMP_MAX', 'WCONTINUED', 'WCOREDUMP', 'WEXITED', 'WEXITSTATUS', 'WIFCONTINUED', 'WIFEXITED', 'WIFSIGNALED', 'WIFSTOPPED', 'WNOHANG', 'WNOWAIT', 'WSTOPPED', 'WSTOPSIG', 'WTERMSIG', 'WUNTRACED', 'W_OK', 'X_OK', '_Environ', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', '_execvpe', '_exists', '_exit', '_fspath', '_get_exports_list', '_putenv', '_spawnvef', '_unsetenv', '_wrap_close', 'abc', 'abort', 'access', 'altsep', 'chdir', 'chflags', 'chmod', 'chown', 'chroot', 'close', 'closerange', 'confstr', 'confstr_names', 'cpu_count', 'ctermid', 'curdir', 'defpath', 'device_encoding', 'devnull', 'dup', 'dup2', 'environ', 'environb', 'errno', 'error', 'execl', 'execle', 'execlp', 'execlpe', 'execv', 'execve', 'execvp', 'execvpe', 'extsep', 'fchdir', 'fchmod', 'fchown', 'fdopen', 'fork', 'forkpty', 'fpathconf', 'fsdecode', 'fsencode', 'fspath', 'fstat', 'fstatvfs', 'fsync', 'ftruncate', 'get_blocking', 'get_exec_path', 'get_inheritable', 'get_terminal_size', 'getcwd', 'getcwdb', 'getegid', 'getenv', 'getenvb', 'geteuid', 'getgid', 'getgrouplist', 'getgroups', 'getloadavg', 'getlogin', 'getpgid', 'getpgrp', 'getpid', 'getppid', 'getpriority', 'getsid', 'getuid', 'initgroups', 'isatty', 'kill', 'killpg', 'lchflags', 'lchmod', 'lchown', 'linesep', 'link', 'listdir', 'lockf', 'lseek', 'lstat', 'major', 'makedev', 'makedirs', 'minor', 'mkdir', 'mkfifo', 'mknod', 'name', 'nice', 'open', 'openpty', 'pardir', 'path', 'pathconf', 'pathconf_names', 'pathsep', 'pipe', 'popen', 'pread', 'putenv', 'pwrite', 'read', 'readlink', 'readv', 'remove', 'removedirs', 'rename', 'renames', 'replace', 'rmdir', 'scandir', 'sched_get_priority_max', 'sched_get_priority_min', 'sched_yield', 'sendfile', 'sep', 'set_blocking', 'set_inheritable', 'setegid', 'seteuid', 'setgid', 'setgroups', 'setpgid', 'setpgrp', 'setpriority', 'setregid', 'setreuid', 'setsid', 'setuid', 'spawnl', 'spawnle', 'spawnlp', 'spawnlpe', 'spawnv', 'spawnve', 'spawnvp', 'spawnvpe', 'st', 'stat', 'stat_float_times', 'stat_result', 'statvfs', 'statvfs_result', 'strerror', 'supports_bytes_environ', 'supports_dir_fd', 'supports_effective_ids', 'supports_fd', 'supports_follow_symlinks', 'symlink', 'sync', 'sys', 'sysconf', 'sysconf_names', 'system', 'tcgetpgrp', 'tcsetpgrp', 'terminal_size', 'times', 'times_result', 'truncate', 'ttyname', 'umask', 'uname', 'uname_result', 'unlink', 'unsetenv', 'urandom', 'utime', 'wait', 'wait3', 'wait4', 'waitpid', 'walk', 'write', 'writev']\n" + ] + } + ], + "source": [ + "print(dir(os))" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import sys" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Teste" + ] + } + ], + "source": [ + "sys.stdout.write('Teste')" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'3.6.4 |Anaconda custom (64-bit)| (default, Mar 12 2018, 20:05:31) \\n[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]'" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sys.version" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['__displayhook__', '__doc__', '__excepthook__', '__interactivehook__', '__loader__', '__name__', '__package__', '__spec__', '__stderr__', '__stdin__', '__stdout__', '_clear_type_cache', '_current_frames', '_debugmallocstats', '_getframe', '_git', '_home', '_xoptions', 'abiflags', 'api_version', 'argv', 'base_exec_prefix', 'base_prefix', 'builtin_module_names', 'byteorder', 'call_tracing', 'callstats', 'copyright', 'displayhook', 'dont_write_bytecode', 'exc_info', 'excepthook', 'exec_prefix', 'executable', 'exit', 'flags', 'float_info', 'float_repr_style', 'get_asyncgen_hooks', 'get_coroutine_wrapper', 'getallocatedblocks', 'getcheckinterval', 'getdefaultencoding', 'getdlopenflags', 'getfilesystemencodeerrors', 'getfilesystemencoding', 'getprofile', 'getrecursionlimit', 'getrefcount', 'getsizeof', 'getswitchinterval', 'gettrace', 'hash_info', 'hexversion', 'implementation', 'int_info', 'intern', 'is_finalizing', 'maxsize', 'maxunicode', 'meta_path', 'modules', 'path', 'path_hooks', 'path_importer_cache', 'platform', 'prefix', 'ps1', 'ps2', 'ps3', 'set_asyncgen_hooks', 'set_coroutine_wrapper', 'setcheckinterval', 'setdlopenflags', 'setprofile', 'setrecursionlimit', 'setswitchinterval', 'settrace', 'stderr', 'stdin', 'stdout', 'thread_info', 'version', 'version_info', 'warnoptions']\n" + ] + } + ], + "source": [ + "print(dir(sys))" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "# Importando o módulo request do pacote urllib, usado para trazer url's \n", + "# para dentro do nosso ambiente Python\n", + "import urllib.request" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "# Variável resposta armazena o objeto de conexão à url passada como \n", + "# parâmetro\n", + "resposta = urllib.request.urlopen('http://python.org')" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + } + ], + "source": [ + "# Objeto resposta\n", + "print(resposta)" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "# Chamando o método read() do objeto resposta e armazenando o código \n", + "# html na variável html\n", + "html = resposta.read()" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "b'\\n\\n\\n\\n \\n\\n\\n \\n \\n\\n \\n\\n \\n \\n \\n \\n \\n\\n \\n \\n \\n \\n \\n\\n \\n\\n \\n \\n \\n\\n \\n\\n \\n \\n \\n \\n \\n \\n \\n\\n \\n \\n \\n \\n\\n Welcome to Python.org\\n\\n \\n \\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n \\n\\n \\n \\n \\n \\n\\n \\n\\n \\n \\n\\n \\n \\n \\n\\n\\n\\n\\n
\\n\\n
\\n

Notice: While Javascript is not essential for this website, your interaction with the content will be limited. Please turn Javascript on for the full experience.

\\n
\\n\\n \\n\\n \\n
\\n\\n \\n\\n
\\n\\n \\n
\\n
\\n\\n

\\n \"python™\"\\n

\\n\\n
\\n\\n \\n Menu
\\n
\\n\\n \\n\\n \\n \\n\\n \\n\\n \\n \\n\\n
\\n
\\n \\n
\\n \\n
\\n \\n
\\n\\n
\\n\\n \\n\\n
\\n \\n
\\n\\n \\n\\n
    \\n \\n
  • \\n
    # Python 3: Fibonacci series up to n\\r\\n>>> def fib(n):\\r\\n>>>     a, b = 0, 1\\r\\n>>>     while a < n:\\r\\n>>>         print(a, end=\\' \\')\\r\\n>>>         a, b = b, a+b\\r\\n>>>     print()\\r\\n>>> fib(1000)\\r\\n0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
    \\n

    Functions Defined

    \\r\\n

    The core of extensible programming is defining functions. Python allows mandatory and optional arguments, keyword arguments, and even arbitrary argument lists. More about defining functions in Python 3

    \\n
  • \\n \\n
  • \\n
    # Python 3: List comprehensions\\r\\n>>> fruits = [\\'Banana\\', \\'Apple\\', \\'Lime\\']\\r\\n>>> loud_fruits = [fruit.upper() for fruit in fruits]\\r\\n>>> print(loud_fruits)\\r\\n[\\'BANANA\\', \\'APPLE\\', \\'LIME\\']\\r\\n\\r\\n# List and the enumerate function\\r\\n>>> list(enumerate(fruits))\\r\\n[(0, \\'Banana\\'), (1, \\'Apple\\'), (2, \\'Lime\\')]
    \\n

    Compound Data Types

    \\r\\n

    Lists (known as arrays in other languages) are one of the compound data types that Python understands. Lists can be indexed, sliced and manipulated with other built-in functions. More about lists in Python 3

    \\n
  • \\n \\n
  • \\n
    # Python 3: Simple arithmetic\\r\\n>>> 1 / 2\\r\\n0.5\\r\\n>>> 2 ** 3\\r\\n8\\r\\n>>> 17 / 3  # classic division returns a float\\r\\n5.666666666666667\\r\\n>>> 17 // 3  # floor division\\r\\n5
    \\n

    Intuitive Interpretation

    \\r\\n

    Calculations are simple with Python, and expression syntax is straightforward: the operators +, -, * and / work as expected; parentheses () can be used for grouping. More about simple math functions in Python 3.

    \\n
  • \\n \\n
  • \\n
    # Python 3: Simple output (with Unicode)\\r\\n>>> print(\"Hello, I\\'m Python!\")\\r\\nHello, I\\'m Python!\\r\\n\\r\\n# Input, assignment\\r\\n>>> name = input(\\'What is your name?\\\\n\\')\\r\\n>>> print(\\'Hi, %s.\\' % name)\\r\\nWhat is your name?\\r\\nPython\\r\\nHi, Python.
    \\n

    Quick & Easy to Learn

    \\r\\n

    Experienced programmers in any other language can pick up Python very quickly, and beginners find the clean syntax and indentation structure easy to learn. Whet your appetite with our Python 3 overview.

    \\r\\n
    \\n
  • \\n \\n
  • \\n
    # For loop on a list\\r\\n>>> numbers = [2, 4, 6, 8]\\r\\n>>> product = 1\\r\\n>>> for number in numbers:\\r\\n...    product = product * number\\r\\n... \\r\\n>>> print(\\'The product is:\\', product)\\r\\nThe product is: 384
    \\n

    All the Flow You’d Expect

    \\r\\n

    Python knows the usual control flow statements that other languages speak — if, for, while and range — with some of its own twists, of course. More control flow tools in Python 3

    \\n
  • \\n \\n
\\n
\\n\\n\\n
\\n\\n \\n
\\n

Python is a programming language that lets you work quickly and integrate systems more effectively. Learn More

\\n
\\n\\n\\n
\\n
\\n\\n
\\n \\n
\\n\\n
\\n\\n \\n \\n\\n \\n\\n \\n\\n
\\n \\n \\n \\n
\\n\\n
\\n\\n
\\n

Get Started

\\r\\n

Whether you\\'re new to programming or an experienced developer, it\\'s easy to learn and use Python.

\\r\\n

Start with our Beginner’s Guide

\\n
\\n\\n
\\n

Download

\\n

Python source code and installers are available for download for all versions! Not sure which version to use? Check here.

\\n

Latest: Python 3.6.5 - Python 2.7.14

\\n
\\n\\n
\\n

Docs

\\r\\n

Documentation for Python\\'s standard library, along with tutorials and guides, are available online.

\\r\\n

docs.python.org

\\n
\\n\\n
\\n

Jobs

\\r\\n

Looking for work or have a Python related position that you\\'re trying to hire for? Our relaunched community-run job board is the place to go.

\\r\\n

jobs.python.org

\\n
\\n\\n
\\n\\n
\\n\\n \\n\\n
\\n \\n
\\n \\n

Upcoming Events

\\n

More

\\n \\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n \\n \\n \\n \\n \\n \\n

Industrial Light & Magic Runs on Python by Tim Fortenberry

\\n
\\n \\n\\n \\n\\n \\n\\n
\\n
\\n

Use Python for…

\\r\\n

More

\\r\\n\\r\\n\\r\\n\\n
\\n
\\n\\n \\n\\n \\n
\\n\\n

\\n >>> Python Enhancement Proposals (PEPs): The future of Python is discussed here.\\n RSS\\n

\\n\\n\\n \\n \\n
\\n\\n
\\n\\n
\\n \\n

\\r\\n >>> Python Software Foundation\\r\\n

\\r\\n

The mission of the Python Software Foundation is to promote, protect, and advance the Python programming language, and to support and facilitate the growth of a diverse and international community of Python programmers. Learn more

\\r\\n

\\r\\n Become a Member\\r\\n Donate to the PSF\\r\\n

\\n
\\n\\n\\n\\n\\n \\n\\n \\n \\n\\n \\n \\n\\n\\n \\n \\n\\n \\n \\n\\n \\n\\n \\n \\n \\n\\n \\n\\n \\n \\n\\n \\n\\n \\n\\n \\n\\n \\n \\n\\n\\n\\n'\n" + ] + } + ], + "source": [ + "# Imprimindo html\n", + "print(html)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Fim" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + ] + } + ], + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 1 +} diff --git "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Datetime.ipynb" b/Cap04/Notebooks/DSA-Python-Cap04-04-Datetime.ipynb similarity index 80% rename from "JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Datetime.ipynb" rename to Cap04/Notebooks/DSA-Python-Cap04-04-Datetime.ipynb index c34e3c4c..c45e4921 100644 --- "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Datetime.ipynb" +++ b/Cap04/Notebooks/DSA-Python-Cap04-04-Datetime.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 7\n", + "# Data Science Academy - Python Fundamentos - Capítulo 4\n", "\n", "## Download: http://github.com/dsacademybr" ] @@ -21,7 +21,7 @@ "cell_type": "code", "execution_count": 1, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -30,9 +30,9 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -41,18 +41,16 @@ }, { "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, + "execution_count": 3, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "datetime.datetime(2016, 5, 30, 20, 16, 1, 751134)" + "datetime.datetime(2018, 4, 5, 14, 1, 53, 388643)" ] }, - "execution_count": 4, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -63,9 +61,9 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -74,10 +72,8 @@ }, { "cell_type": "code", - "execution_count": 6, - "metadata": { - "collapsed": false - }, + "execution_count": 5, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -93,10 +89,8 @@ }, { "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, + "execution_count": 6, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -118,10 +112,8 @@ }, { "cell_type": "code", - "execution_count": 8, - "metadata": { - "collapsed": false - }, + "execution_count": 7, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -137,7 +129,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 8, "metadata": { "collapsed": true }, @@ -148,20 +140,18 @@ }, { "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, + "execution_count": 9, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "2016-05-30\n", - "ctime: Mon May 30 00:00:00 2016\n", - "Ano: 2016\n", - "Mês : 5\n", - "Dia : 30\n" + "2018-04-05\n", + "ctime: Thu Apr 5 00:00:00 2018\n", + "Ano: 2018\n", + "Mês : 4\n", + "Dia : 5\n" ] } ], @@ -175,10 +165,8 @@ }, { "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false - }, + "execution_count": 10, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -195,10 +183,8 @@ }, { "cell_type": "code", - "execution_count": 12, - "metadata": { - "collapsed": false - }, + "execution_count": 11, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -215,10 +201,8 @@ }, { "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, + "execution_count": 12, + "metadata": {}, "outputs": [ { "data": { @@ -226,13 +210,13 @@ "datetime.timedelta(366)" ] }, - "execution_count": 13, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "# Diferença em dias emtre duas datas\n", + "# Diferença em dias entre duas datas\n", "d2 - d1" ] }, @@ -247,7 +231,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -267,9 +251,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Map.ipynb" b/Cap04/Notebooks/DSA-Python-Cap04-05-Map.ipynb similarity index 85% rename from "JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Map.ipynb" rename to Cap04/Notebooks/DSA-Python-Cap04-05-Map.ipynb index 7ac0d66d..e8c469b9 100644 --- "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Map.ipynb" +++ b/Cap04/Notebooks/DSA-Python-Cap04-05-Map.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 7\n", + "# Data Science Academy - Python Fundamentos - Capítulo 4\n", "\n", "## Download: http://github.com/dsacademybr" ] @@ -20,19 +20,17 @@ "cell_type": "code", "execution_count": 1, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ "# Criando duas funções\n", "\n", - "# Função 1 - Recebe uma temperatura como parâmetro e retorna a \n", - "# temperatura em Fahrenheit\n", + "# Função 1 - Recebe uma temperatura como parâmetro e retorna a temperatura em Fahrenheit\n", "def fahrenheit(T):\n", " return ((float(9)/5)*T + 32)\n", "\n", - "# Função 2 - Recebe uma temperatura como parâmetro e retorna a \n", - "# temperatura em Celsius\n", + "# Função 2 - Recebe uma temperatura como parâmetro e retorna a temperatura em Celsius\n", "def celsius(T):\n", " return (float(5)/9)*(T-32)" ] @@ -52,14 +50,12 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 3, @@ -76,9 +72,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -99,9 +93,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -123,14 +115,12 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 6, @@ -146,9 +136,7 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -168,14 +156,12 @@ { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 8, @@ -191,9 +177,7 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -214,7 +198,7 @@ "cell_type": "code", "execution_count": 10, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -226,9 +210,7 @@ { "cell_type": "code", "execution_count": 11, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -249,7 +231,7 @@ "cell_type": "code", "execution_count": 12, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -262,9 +244,7 @@ { "cell_type": "code", "execution_count": 13, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -292,7 +272,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -312,9 +292,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Reduce.ipynb" b/Cap04/Notebooks/DSA-Python-Cap04-06-Reduce.ipynb similarity index 97% rename from "JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Reduce.ipynb" rename to Cap04/Notebooks/DSA-Python-Cap04-06-Reduce.ipynb index 259fb2d7..c3341908 100644 --- "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Reduce.ipynb" +++ b/Cap04/Notebooks/DSA-Python-Cap04-06-Reduce.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 7\n", + "# Data Science Academy - Python Fundamentos - Capítulo 4\n", "\n", "## Download: http://github.com/dsacademybr" ] @@ -20,7 +20,7 @@ "cell_type": "code", "execution_count": 1, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -43,9 +43,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -66,7 +64,7 @@ "cell_type": "code", "execution_count": 4, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -79,9 +77,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -95,17 +91,14 @@ } ], "source": [ - "# Usando reduce com uma função e uma lista. A função vai retornar o \n", - "# valor máximo\n", + "# Usando reduce com uma função e uma lista. A função vai retornar o valor máximo\n", "reduce(soma, lista)" ] }, { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -121,14 +114,14 @@ ], "source": [ "from IPython.display import Image\n", - "Image('http://github.com/dsacademybr/PythonFundamentos/tree/master/JupyterNotebooks/Cap%C3%ADtulo07/reduce.png')" + "Image('arquivos/reduce.png')" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -139,9 +132,7 @@ { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -174,9 +165,7 @@ { "cell_type": "code", "execution_count": 10, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -196,9 +185,7 @@ { "cell_type": "code", "execution_count": 11, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -212,8 +199,7 @@ } ], "source": [ - "# Reduzindo a lista até o valor máximo, através da função criada com a \n", - "# expressão lambda\n", + "# Reduzindo a lista até o valor máximo, através da função criada com a expressão lambda\n", "reduce(max_find2, lst)" ] }, @@ -228,7 +214,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -248,9 +234,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Filter.ipynb" b/Cap04/Notebooks/DSA-Python-Cap04-07-Filter.ipynb similarity index 86% rename from "JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Filter.ipynb" rename to Cap04/Notebooks/DSA-Python-Cap04-07-Filter.ipynb index 0b5a4f37..86fd210b 100644 --- "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Filter.ipynb" +++ b/Cap04/Notebooks/DSA-Python-Cap04-07-Filter.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 7\n", + "# Data Science Academy - Python Fundamentos - Capítulo 4\n", "\n", "## Download: http://github.com/dsacademybr" ] @@ -20,7 +20,7 @@ "cell_type": "code", "execution_count": 1, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -35,9 +35,7 @@ { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -60,7 +58,7 @@ "cell_type": "code", "execution_count": 3, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -70,9 +68,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -92,14 +88,12 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 5, @@ -114,9 +108,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -136,9 +128,7 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -158,9 +148,7 @@ { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -188,7 +176,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -208,9 +196,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-List Comprehensions.ipynb" b/Cap04/Notebooks/DSA-Python-Cap04-08-List Comprehensions.ipynb similarity index 82% rename from "JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-List Comprehensions.ipynb" rename to Cap04/Notebooks/DSA-Python-Cap04-08-List Comprehensions.ipynb index f5e2f82b..c70f9166 100755 --- "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-List Comprehensions.ipynb" +++ b/Cap04/Notebooks/DSA-Python-Cap04-08-List Comprehensions.ipynb @@ -6,7 +6,7 @@ "collapsed": true }, "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 7\n", + "# Data Science Academy - Python Fundamentos - Capítulo 4\n", "\n", "## Download: http://github.com/dsacademybr" ] @@ -21,9 +21,7 @@ { "cell_type": "code", "execution_count": 1, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# Retornar cada caracter em uma sequência de caracteres\n", @@ -33,9 +31,7 @@ { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -56,9 +52,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -78,21 +72,17 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ - "# Raiz quadrada e um range de números e retornar uma lista\n", - "lst = [x**2 for x in range(0,11)]" + "# Variável x elevada ao quadrado para um range de números e retornar uma lista\n", + "lst = [x**2 for x in range(0, 11)]" ] }, { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -112,9 +102,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# Verificar os números pares em um range de números\n", @@ -124,9 +112,7 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -146,9 +132,7 @@ { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -173,9 +157,7 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ "# Operações aninhadas\n", @@ -185,9 +167,7 @@ { "cell_type": "code", "execution_count": 10, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -215,7 +195,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -235,9 +215,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Zip.ipynb" b/Cap04/Notebooks/DSA-Python-Cap04-09-Zip.ipynb similarity index 85% rename from "JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Zip.ipynb" rename to Cap04/Notebooks/DSA-Python-Cap04-09-Zip.ipynb index acdd666a..7bc86e39 100644 --- "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Zip.ipynb" +++ b/Cap04/Notebooks/DSA-Python-Cap04-09-Zip.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 7\n", + "# Data Science Academy - Python Fundamentos - Capítulo 4\n", "\n", "## Download: http://github.com/dsacademybr" ] @@ -20,7 +20,7 @@ "cell_type": "code", "execution_count": 1, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -32,14 +32,12 @@ { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 2, @@ -55,9 +53,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -78,9 +74,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -102,7 +96,7 @@ "cell_type": "code", "execution_count": 5, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -114,9 +108,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -137,7 +129,7 @@ "cell_type": "code", "execution_count": 7, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -149,14 +141,12 @@ { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "[('a', 'd'), ('b', 'c')]" + "[('a', 'c'), ('b', 'd')]" ] }, "execution_count": 8, @@ -172,14 +162,12 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "[('a', 5), ('b', 4)]" + "[('a', 4), ('b', 5)]" ] }, "execution_count": 9, @@ -196,7 +184,7 @@ "cell_type": "code", "execution_count": 10, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -213,14 +201,12 @@ { "cell_type": "code", "execution_count": 11, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'a': 5, 'b': 4}" + "{'a': 4, 'b': 5}" ] }, "execution_count": 11, @@ -243,7 +229,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -263,9 +249,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Enumerate.ipynb" b/Cap04/Notebooks/DSA-Python-Cap04-10-Enumerate.ipynb similarity index 86% rename from "JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Enumerate.ipynb" rename to Cap04/Notebooks/DSA-Python-Cap04-10-Enumerate.ipynb index 7d5d792a..f7002a89 100644 --- "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Enumerate.ipynb" +++ b/Cap04/Notebooks/DSA-Python-Cap04-10-Enumerate.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 7\n", + "# Data Science Academy - Python Fundamentos - Capítulo 4\n", "\n", "## Download: http://github.com/dsacademybr" ] @@ -20,7 +20,7 @@ "cell_type": "code", "execution_count": 1, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -31,14 +31,12 @@ { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 2, @@ -53,9 +51,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -75,9 +71,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -90,8 +84,7 @@ } ], "source": [ - "# Imprimindo os valores de uma lista com a função enumerate() e \n", - "# seus respectivos índices\n", + "# Imprimindo os valores de uma lista com a função enumerate() e seus respectivos índices\n", "for indice, valor in enumerate(seq):\n", " print (indice, valor)" ] @@ -99,9 +92,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -134,9 +125,7 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -156,9 +145,7 @@ { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -192,9 +179,7 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -229,7 +214,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -249,9 +234,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Erros-e-Exce\303\247\303\265es.ipynb" b/Cap04/Notebooks/DSA-Python-Cap04-11-Erros-e-Excecoes.ipynb similarity index 77% rename from "JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Erros-e-Exce\303\247\303\265es.ipynb" rename to Cap04/Notebooks/DSA-Python-Cap04-11-Erros-e-Excecoes.ipynb index d9b22cd2..71c1f38d 100644 --- "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Erros-e-Exce\303\247\303\265es.ipynb" +++ b/Cap04/Notebooks/DSA-Python-Cap04-11-Erros-e-Excecoes.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 7\n", + "# Data Science Academy - Python Fundamentos - Capítulo 4\n", "\n", "## Download: http://github.com/dsacademybr" ] @@ -20,7 +20,7 @@ "cell_type": "code", "execution_count": 1, "metadata": { - "collapsed": false + "scrolled": true }, "outputs": [ { @@ -54,9 +54,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -74,9 +72,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "ename": "ZeroDivisionError", @@ -106,9 +102,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "ename": "TypeError", @@ -129,9 +123,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -152,9 +144,7 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -167,7 +157,7 @@ "source": [ "# Utilizando try, except e else\n", "try:\n", - " f = open('testandoerros.txt','w')\n", + " f = open('arquivos/testandoerros.txt','w')\n", " f.write('Gravando no arquivo')\n", "except IOError:\n", " print (\"Erro: arquivo não encontrado ou não pode ser salvo.\")\n", @@ -179,9 +169,7 @@ { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -194,7 +182,7 @@ "source": [ "# Utilizando try, except e else\n", "try:\n", - " f = open('testandoerros','r')\n", + " f = open('arquivos/testandoerros','r')\n", "except IOError:\n", " print (\"Erro: arquivo não encontrado ou não pode ser lido.\")\n", "else:\n", @@ -205,9 +193,7 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -220,7 +206,7 @@ ], "source": [ "try:\n", - " f = open('testandoerros.txt','w')\n", + " f = open('arquivos/testandoerros.txt','w')\n", " f.write('Gravando no arquivo')\n", "except IOError:\n", " print (\"Erro: arquivo não encontrado ou não pode ser salvo.\")\n", @@ -233,7 +219,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 12, "metadata": { "collapsed": true }, @@ -241,8 +227,8 @@ "source": [ "def askint():\n", " try:\n", - " val = int(input(\"Digite um número: \"))\n", - " except:\n", + " val = int((input(\"Digite um número: \")))\n", + " except UnboundLocalError:\n", " print (\"Você não digitou um número!\")\n", " finally:\n", " print (\"Obrigado!\")\n", @@ -251,18 +237,27 @@ }, { "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false - }, + "execution_count": 13, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Digite um número: 2\n", - "Obrigado!\n", - "2\n" + "Digite um número: \n", + "Obrigado!\n" + ] + }, + { + "ename": "ValueError", + "evalue": "invalid literal for int() with base 10: ''", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0maskint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;32m\u001b[0m in \u001b[0;36maskint\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0maskint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mval\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minput\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Digite um número: \"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mUnboundLocalError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mprint\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;34m\"Você não digitou um número!\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mValueError\u001b[0m: invalid literal for int() with base 10: ''" ] } ], @@ -272,7 +267,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 16, "metadata": { "collapsed": true }, @@ -291,35 +286,33 @@ }, { "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, + "execution_count": 17, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Digite um número: q\n", + "Digite um número: \n", "Você não digitou um número!\n", - "Tente novamente. Digite um número: w\n", + "Tente novamente. Digite um número: \n", "Obrigado!\n" ] }, { "ename": "ValueError", - "evalue": "invalid literal for int() with base 10: 'w'", + "evalue": "invalid literal for int() with base 10: ''", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36maskint\u001b[0;34m()\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mval\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minput\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Digite um número: \"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0;32mexcept\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mValueError\u001b[0m: invalid literal for int() with base 10: 'q'", + "\u001b[0;32m\u001b[0m in \u001b[0;36maskint\u001b[0;34m()\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mval\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minput\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Digite um número: \"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0;32mexcept\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mValueError\u001b[0m: invalid literal for int() with base 10: ''", "\nDuring handling of the above exception, another exception occurred:\n", "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0maskint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m\u001b[0m in \u001b[0;36maskint\u001b[0;34m()\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32mexcept\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mprint\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;34m\"Você não digitou um número!\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m \u001b[0mval\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minput\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Tente novamente. Digite um número: \"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 7\u001b[0m \u001b[0;32mfinally\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0mprint\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;34m\"Obrigado!\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mValueError\u001b[0m: invalid literal for int() with base 10: 'w'" + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0maskint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;32m\u001b[0m in \u001b[0;36maskint\u001b[0;34m()\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32mexcept\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mprint\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;34m\"Você não digitou um número!\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m \u001b[0mval\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minput\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Tente novamente. Digite um número: \"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 7\u001b[0m \u001b[0;32mfinally\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0mprint\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;34m\"Obrigado!\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mValueError\u001b[0m: invalid literal for int() with base 10: ''" ] } ], @@ -329,7 +322,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 18, "metadata": { "collapsed": true }, @@ -352,25 +345,38 @@ }, { "cell_type": "code", - "execution_count": 15, - "metadata": { - "collapsed": false - }, + "execution_count": 19, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Digite um número: q\n", + "Digite um número: \n", + "Você não digitou um número!\n", + "Fim da execução!\n", + "Digite um número: \n", + "Você não digitou um número!\n", + "Fim da execução!\n", + "Digite um número: \n", + "Você não digitou um número!\n", + "Fim da execução!\n", + "Digite um número: \n", "Você não digitou um número!\n", "Fim da execução!\n", - "Digite um número: w\n", + "Digite um número: \n", "Você não digitou um número!\n", "Fim da execução!\n", - "Digite um número: r\n", + "Digite um número: \n", "Você não digitou um número!\n", "Fim da execução!\n", - "Digite um número: 4\n", + "Digite um número: \n", + "Você não digitou um número!\n", + "Fim da execução!\n", + "Digite um número: \n", + "Você não digitou um número!\n", + "Fim da execução!\n", + "Digite um número: 87\n", "Obrigado por digitar um número!\n", "Fim da execução!\n" ] @@ -382,10 +388,8 @@ }, { "cell_type": "code", - "execution_count": 16, - "metadata": { - "collapsed": false - }, + "execution_count": 20, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -413,7 +417,7 @@ "source": [ "Uma lista completa de exceções em Python, pode ser encontrada aqui:\n", "\n", - "https://docs.python.org/3.5/library/exceptions.html\n" + "https://docs.python.org/3.6/library/exceptions.html\n" ] }, { @@ -427,7 +431,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -447,9 +451,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git a/Cap04/Notebooks/DSA-Python-Cap04-ExercicioS.ipynb b/Cap04/Notebooks/DSA-Python-Cap04-ExercicioS.ipynb new file mode 100644 index 00000000..88709a55 --- /dev/null +++ b/Cap04/Notebooks/DSA-Python-Cap04-ExercicioS.ipynb @@ -0,0 +1,168 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Data Science Academy - Python Fundamentos - Capítulo 4\n", + "\n", + "## Download: http://github.com/dsacademybr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exercícios " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Exercício 1 - Crie uma lista de 3 elementos e calcule a terceira potência de cada elemento." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Exercício 2 - Reescreva o código abaixo, usando a função map(). O resultado final deve ser o mesmo!\n", + "palavras = 'A Data Science Academy oferce os melhores cursos de análise de dados do Brasil'.split()\n", + "resultado = [[w.upper(), w.lower(), len(w)] for w in palavras]\n", + "for i in resultado:\n", + " print (i)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Exercício 3 - Calcule a matriz transposta da matriz abaixo.\n", + "# Caso não saiba o que é matriz transposta, visite este link: https://pt.wikipedia.org/wiki/Matriz_transposta\n", + "# Matriz transposta é um conceito fundamental na construção de redes neurais artificiais, base de sistemas de IA.\n", + "matrix = [[1, 2],[3,4],[5,6],[7,8]]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Exercício 4 - Crie duas funções, uma para elevar um número ao quadrado e outra para elevar ao cubo. \n", + "# Aplique as duas funções aos elementos da lista abaixo. \n", + "# Obs: as duas funções devem ser aplicadas simultaneamente.\n", + "lista = [0, 1, 2, 3, 4]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Exercício 5 - Abaixo você encontra duas listas. Faça com que cada elemento da listaA seja elevado \n", + "# ao elemento correspondente na listaB.\n", + "listaA = [2, 3, 4]\n", + "listaB = [10, 11, 12]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Exercício 6 - Considerando o range de valores abaixo, use a função filter() para retornar apenas os valores negativos.\n", + "range(-5, 5)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Exercício 7 - Usando a função filter(), encontre os valores que são comuns às duas listas abaixo.\n", + "a = [1,2,3,5,7,9]\n", + "b = [2,3,5,6,7,8]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Exercício 8 - Considere o código abaixo. Obtenha o mesmo resultado usando o pacote time. \n", + "# Não conhece o pacote time? Pesquise!\n", + "import datetime\n", + "print (datetime.datetime.now().strftime(\"%d/%m/%Y %H:%M\"))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Exercício 9 - Considere os dois dicionários abaixo. \n", + "# Crie um terceiro dicionário com as chaves do dicionário 1 e os valores do dicionário 2.\n", + "dict1 = {'a':1,'b':2}\n", + "dict2 = {'c':4,'d':5}" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Exercício 10 - Considere a lista abaixo e retorne apenas os elementos cujo índice for maior que 5.\n", + "lista = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Fim" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + ] + } + ], + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 1 +} diff --git a/Cap04/Notebooks/DSA-Python-Cap04-Exercicios-Solucao.ipynb b/Cap04/Notebooks/DSA-Python-Cap04-Exercicios-Solucao.ipynb new file mode 100644 index 00000000..0b70a73c --- /dev/null +++ b/Cap04/Notebooks/DSA-Python-Cap04-Exercicios-Solucao.ipynb @@ -0,0 +1,344 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Data Science Academy - Python Fundamentos - Capítulo 4\n", + "\n", + "## Download: http://github.com/dsacademybr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exercícios " + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[27, 64, 125]\n" + ] + } + ], + "source": [ + "# Exercício 1 - Crie uma lista de 3 elementos e calcule a terceira potência de cada elemento.\n", + "list1 = [3,4,5]\n", + "quadrado = [item**3 for item in list1] \n", + "print(quadrado)" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['A', 'a', 1]\n", + "['DATA', 'data', 4]\n", + "['SCIENCE', 'science', 7]\n", + "['ACADEMY', 'academy', 7]\n", + "['OFERCE', 'oferce', 6]\n", + "['OS', 'os', 2]\n", + "['MELHORES', 'melhores', 8]\n", + "['CURSOS', 'cursos', 6]\n", + "['DE', 'de', 2]\n", + "['ANÁLISE', 'análise', 7]\n", + "['DE', 'de', 2]\n", + "['DADOS', 'dados', 5]\n", + "['DO', 'do', 2]\n", + "['BRASIL', 'brasil', 6]\n" + ] + } + ], + "source": [ + "# Exercício 2 - Reescreva o código abaixo, usando a função map(). O resultado final deve ser o mesmo!\n", + "palavras = 'A Data Science Academy oferce os melhores cursos de análise de dados do Brasil'.split()\n", + "resultado = [[w.upper(), w.lower(), len(w)] for w in palavras]\n", + "for i in resultado:\n", + " print (i)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['A', 'a', 1]\n", + "['DATA', 'data', 4]\n", + "['SCIENCE', 'science', 7]\n", + "['ACADEMY', 'academy', 7]\n", + "['OFERCE', 'oferce', 6]\n", + "['OS', 'os', 2]\n", + "['MELHORES', 'melhores', 8]\n", + "['CURSOS', 'cursos', 6]\n", + "['DE', 'de', 2]\n", + "['ANÁLISE', 'análise', 7]\n", + "['DE', 'de', 2]\n", + "['DADOS', 'dados', 5]\n", + "['DO', 'do', 2]\n", + "['BRASIL', 'brasil', 6]\n" + ] + } + ], + "source": [ + "resultado = map(lambda w: [w.upper(), w.lower(), len(w)], palavras)\n", + "for i in resultado:\n", + " print (i)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[1, 3, 5, 7], [2, 4, 6, 8]]\n" + ] + } + ], + "source": [ + "# Exercício 3 - Calcule a matriz transposta da matriz abaixo.\n", + "# Caso não saiba o que é matriz transposta, visite este link: https://pt.wikipedia.org/wiki/Matriz_transposta\n", + "# Matriz transposta é um conceito fundamental na construção de redes neurais artificiais, base de sistemas de IA.\n", + "matrix = [[1, 2],[3,4],[5,6],[7,8]]\n", + "transpose = [[row[i] for row in matrix] for i in range(2)]\n", + "print(transpose)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[0, 0]\n", + "[1, 1]\n", + "[4, 8]\n", + "[9, 27]\n", + "[16, 64]\n" + ] + } + ], + "source": [ + "# Exercício 4 - Crie duas funções, uma para elevar um número ao quadrado e outra para elevar ao cubo. \n", + "# Aplique as duas funções aos elementos da lista abaixo. \n", + "# Obs: as duas funções devem ser aplicadas simultaneamente.\n", + "lista = [0, 1, 2, 3, 4]\n", + "\n", + "def square(x):\n", + " return (x**2)\n", + " \n", + "def cube(x):\n", + " return (x**3)\n", + "\n", + "funcs = [square, cube]\n", + "\n", + "for i in lista:\n", + " valor = map(lambda x: x(i), funcs)\n", + " print(list((valor)))" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[1024, 177147, 16777216]" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Exercício 5 - Abaixo você encontra duas listas. Faça com que cada elemento da listaA seja elevado \n", + "# ao elemento correspondente na listaB.\n", + "listaA = [2, 3, 4]\n", + "listaB = [10, 11, 12]\n", + "list(map(pow, listaA, listaB))" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[-5, -4, -3, -2, -1]" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Exercício 6 - Considerando o range de valores abaixo, use a função filter() para retornar apenas os valores negativos.\n", + "range(-5, 5)\n", + "list(filter((lambda x: x < 0), range(-5,5)))" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2, 3, 5, 7]\n" + ] + } + ], + "source": [ + "# Exercício 7 - Usando a função filter(), encontre os valores que são comuns às duas listas abaixo.\n", + "a = [1,2,3,5,7,9]\n", + "b = [2,3,5,6,7,8]\n", + "print (list(filter(lambda x: x in a, b)))" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "05/04/2018 22:16\n", + "05/04/2018 22:16\n" + ] + } + ], + "source": [ + "# Exercício 8 - Considere o código abaixo. Obtenha o mesmo resultado usando o pacote time. \n", + "# Não conhece o pacote time? Pesquise!\n", + "import datetime\n", + "print (datetime.datetime.now().strftime(\"%d/%m/%Y %H:%M\"))\n", + "\n", + "import time\n", + "print (time.strftime(\"%d/%m/%Y %H:%M\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'a': 4, 'b': 5}\n" + ] + } + ], + "source": [ + "# Exercício 9 - Considere os dois dicionários abaixo. \n", + "# Crie um terceiro dicionário com as chaves do dicionário 1 e os valores do dicionário 2.\n", + "dict1 = {'a':1,'b':2}\n", + "dict2 = {'c':4,'d':5}\n", + "\n", + "def trocaValores(d1, d2):\n", + " dicTemp = {}\n", + " \n", + " for d1key, d2val in zip(d1,d2.values()):\n", + " dicTemp[d1key] = d2val\n", + " \n", + " return dicTemp\n", + "\n", + "dict3 = trocaValores(dict1, dict2)\n", + "print(dict3)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "g\n", + "h\n" + ] + } + ], + "source": [ + "# Exercício 10 - Considere a lista abaixo e retorne apenas os elementos cujo índice for maior que 5.\n", + "lista = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']\n", + "for indice, valor in enumerate(lista):\n", + " if indice <= 5:\n", + " continue\n", + " else:\n", + " print (valor)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Fim" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + ] + } + ], + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 1 +} diff --git a/Cap04/Notebooks/arquivos/arquivo1.txt b/Cap04/Notebooks/arquivos/arquivo1.txt new file mode 100644 index 00000000..03265a85 --- /dev/null +++ b/Cap04/Notebooks/arquivos/arquivo1.txt @@ -0,0 +1 @@ +Testando gravação de arquivos em Python Acrescentando conteúdo \ No newline at end of file diff --git a/Cap04/Notebooks/arquivos/binary.csv b/Cap04/Notebooks/arquivos/binary.csv new file mode 100755 index 00000000..b2488b11 --- /dev/null +++ b/Cap04/Notebooks/arquivos/binary.csv @@ -0,0 +1,6 @@ +admit,gre,gpa,rank +0,380,3.61,3 +1,660,3.67,3 +1,880,4.00,1 +1,640,3.19,4 +0,520,2.93,4 diff --git "a/JupyterNotebooks/Cap\303\255tulo07/cientista.txt" b/Cap04/Notebooks/arquivos/cientista.txt similarity index 100% rename from "JupyterNotebooks/Cap\303\255tulo07/cientista.txt" rename to Cap04/Notebooks/arquivos/cientista.txt diff --git a/Cap04/Notebooks/arquivos/dados.json b/Cap04/Notebooks/arquivos/dados.json new file mode 100644 index 00000000..6191d72f --- /dev/null +++ b/Cap04/Notebooks/arquivos/dados.json @@ -0,0 +1 @@ +{"nome": "Guido van Rossum", "linguagem": "Python", "similar": ["c", "Modula-3", "lisp"], "users": 1000000} \ No newline at end of file diff --git a/Cap04/Notebooks/arquivos/file.csv b/Cap04/Notebooks/arquivos/file.csv new file mode 100644 index 00000000..a94fc3b8 --- /dev/null +++ b/Cap04/Notebooks/arquivos/file.csv @@ -0,0 +1,4 @@ +01/01/2016, 4 +02/01/2016, 2 +03/01/2016, 10 +04/01/2016, 8 \ No newline at end of file diff --git a/Cap04/Notebooks/arquivos/json_data.txt b/Cap04/Notebooks/arquivos/json_data.txt new file mode 100644 index 00000000..6191d72f --- /dev/null +++ b/Cap04/Notebooks/arquivos/json_data.txt @@ -0,0 +1 @@ +{"nome": "Guido van Rossum", "linguagem": "Python", "similar": ["c", "Modula-3", "lisp"], "users": 1000000} \ No newline at end of file diff --git "a/JupyterNotebooks/Cap\303\255tulo07/numeros.csv" b/Cap04/Notebooks/arquivos/numeros.csv similarity index 100% rename from "JupyterNotebooks/Cap\303\255tulo07/numeros.csv" rename to Cap04/Notebooks/arquivos/numeros.csv diff --git "a/JupyterNotebooks/Cap\303\255tulo07/reduce.png" b/Cap04/Notebooks/arquivos/reduce.png similarity index 100% rename from "JupyterNotebooks/Cap\303\255tulo07/reduce.png" rename to Cap04/Notebooks/arquivos/reduce.png diff --git "a/JupyterNotebooks/Cap\303\255tulo02/salarios.csv" b/Cap04/Notebooks/arquivos/salarios.csv similarity index 100% rename from "JupyterNotebooks/Cap\303\255tulo02/salarios.csv" rename to Cap04/Notebooks/arquivos/salarios.csv diff --git "a/JupyterNotebooks/Cap\303\255tulo07/testandoerros.txt" b/Cap04/Notebooks/arquivos/testandoerros.txt similarity index 100% rename from "JupyterNotebooks/Cap\303\255tulo07/testandoerros.txt" rename to Cap04/Notebooks/arquivos/testandoerros.txt diff --git a/Cap04/Notebooks/arquivos/teste.txt b/Cap04/Notebooks/arquivos/teste.txt new file mode 100644 index 00000000..674e65e6 --- /dev/null +++ b/Cap04/Notebooks/arquivos/teste.txt @@ -0,0 +1,2 @@ +Olá este arquivo foi gerado pelo próprio Jupyter Notebook. +Podemos gerar quantas linhas quisermos e o Jupyter gera o arquivo final. \ No newline at end of file diff --git a/Cap05/Lab03/forca_v1.py b/Cap05/Lab03/forca_v1.py new file mode 100755 index 00000000..ea3e420c --- /dev/null +++ b/Cap05/Lab03/forca_v1.py @@ -0,0 +1,126 @@ +# Hangman Game (Jogo da Forca) +# Programação Orientada a Objetos + +# Import +import random + +# Board (tabuleiro) +board = [''' + +>>>>>>>>>>Hangman<<<<<<<<<< + ++---+ +| | + | + | + | + | +=========''', ''' + ++---+ +| | +O | + | + | + | +=========''', ''' + ++---+ +| | +O | +| | + | + | +=========''', ''' + + +---+ + | | + O | +/| | + | + | +=========''', ''' + + +---+ + | | + O | +/|\ | + | + | +=========''', ''' + + +---+ + | | + O | +/|\ | +/ | + | +=========''', ''' + + +---+ + | | + O | +/|\ | +/ \ | + | +========='''] + + +# Classe +class Hangman: + + # Método Construtor + def __init__(self, word): + + + # Método para adivinhar a letra + def guess(self, letter): + + + # Método para verificar se o jogo terminou + def hangman_over(self): + + + # Método para verificar se o jogador venceu + def hangman_won(self): + + + # Método para não mostrar a letra no board + def hide_word(self): + + + # Método para checar o status do game e imprimir o board na tela + def print_game_status(self): + + +# Função para ler uma palavra de forma aleatória do banco de palavras +def rand_word(): + with open("palavras.txt", "rt") as f: + bank = f.readlines() + return bank[random.randint(0,len(bank))].strip() + + +# Função Main - Execução do Programa +def main(): + + # Objeto + game = Hangman(rand_word()) + + # Enquanto o jogo não tiver terminado, print do status, solicita uma letra e faz a leitura do caracter + + + # Verifica o status do jogo + game.print_game_status() + + # De acordo com o status, imprime mensagem na tela para o usuário + if game.hangman_won(): + print ('\nParabéns! Você venceu!!') + else: + print ('\nGame over! Você perdeu.') + print ('A palavra era ' + game.word) + + print ('\nFoi bom jogar com você! Agora vá estudar!\n') + +# Executa o programa +if __name__ == "__main__": + main() diff --git a/Cap05/Lab03/palavras.txt b/Cap05/Lab03/palavras.txt new file mode 100644 index 00000000..c5f67c95 --- /dev/null +++ b/Cap05/Lab03/palavras.txt @@ -0,0 +1,3 @@ +bola +casa +massa \ No newline at end of file diff --git "a/JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-Classes.ipynb" b/Cap05/Notebooks/DSA-Python-Cap05-01-Classes.ipynb similarity index 88% rename from "JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-Classes.ipynb" rename to Cap05/Notebooks/DSA-Python-Cap05-01-Classes.ipynb index aeff6fb5..115fd9f7 100644 --- "a/JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-Classes.ipynb" +++ b/Cap05/Notebooks/DSA-Python-Cap05-01-Classes.ipynb @@ -38,18 +38,16 @@ " \n", " # Este método vai inicializar cada objeto criado a partir desta classe\n", " # O nome deste método é __init__\n", - " # (self) é uma referência a cada atributo de um objeto criado a partir \n", - " # desta classe\n", + " # (self) é uma referência a cada atributo de um objeto criado a partir desta classe\n", " def __init__(self):\n", " \n", - " # Atributos de cada objeto criado a partir desta classe. O self \n", - " # indica que estes são atributos dos objetos\n", + " # Atributos de cada objeto criado a partir desta classe. \n", + " # O self indica que estes são atributos dos objetos\n", " self.titulo = 'O Monge e o Executivo'\n", " self.isbn = 9988888\n", " print(\"Construtor chamado para criar um objeto desta classe\")\n", " \n", - " # Métodos são funções, que recebem como parâmetro atributos do \n", - " # objeto criado \n", + " # Métodos são funções, que recebem como parâmetro atributos do objeto criado \n", " def imprime(self):\n", " print(\"Foi criado o livro %s e ISBN %d\" %(self.titulo, self.isbn))" ] @@ -57,9 +55,7 @@ { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -77,9 +73,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -100,9 +94,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -123,9 +115,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -144,7 +134,7 @@ "cell_type": "code", "execution_count": 6, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -162,9 +152,7 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -182,9 +170,7 @@ { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -204,9 +190,7 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -239,9 +223,7 @@ { "cell_type": "code", "execution_count": 11, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -259,9 +241,7 @@ { "cell_type": "code", "execution_count": 12, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -279,9 +259,7 @@ { "cell_type": "code", "execution_count": 13, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -302,9 +280,7 @@ { "cell_type": "code", "execution_count": 14, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -333,7 +309,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -353,9 +329,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-Objetos.ipynb" b/Cap05/Notebooks/DSA-Python-Cap05-02-Objetos.ipynb similarity index 85% rename from "JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-Objetos.ipynb" rename to Cap05/Notebooks/DSA-Python-Cap05-02-Objetos.ipynb index 66de4119..821c9488 100644 --- "a/JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-Objetos.ipynb" +++ b/Cap05/Notebooks/DSA-Python-Cap05-02-Objetos.ipynb @@ -20,27 +20,25 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Em Python, tudo é objeto" + "Em Python, tudo é objeto!" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ "# Criando uma lista\n", - "lst_num = [1, 2, 3]" + "lst_num = [\"Data\", \"Science\", \"Academy\", \"Nota\", 10, 10]" ] }, { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -61,9 +59,27 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "lst_num.count(10)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -79,19 +95,17 @@ ], "source": [ "# Usamos a função type, para verificar o tipo de um objeto\n", - "print (type(10))\n", - "print (type([]))\n", - "print (type(()))\n", - "print (type({}))\n", - "print (type('a'))" + "print(type(10))\n", + "print(type([]))\n", + "print(type(()))\n", + "print(type({}))\n", + "print(type('a'))" ] }, { "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, + "execution_count": 5, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -109,14 +123,14 @@ "# Instância do Carro\n", "palio = Carro()\n", "\n", - "print (type(palio))" + "print(type(palio))" ] }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -130,7 +144,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "metadata": { "collapsed": true }, @@ -142,10 +156,8 @@ }, { "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, + "execution_count": 8, + "metadata": {}, "outputs": [ { "data": { @@ -153,7 +165,7 @@ "'Pele'" ] }, - "execution_count": 7, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -165,10 +177,8 @@ }, { "cell_type": "code", - "execution_count": 8, - "metadata": { - "collapsed": false - }, + "execution_count": 9, + "metadata": {}, "outputs": [ { "data": { @@ -176,7 +186,7 @@ "12" ] }, - "execution_count": 8, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -188,10 +198,8 @@ }, { "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, + "execution_count": 10, + "metadata": {}, "outputs": [ { "data": { @@ -199,7 +207,7 @@ "9.5" ] }, - "execution_count": 9, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -211,9 +219,9 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 11, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -229,22 +237,20 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 12, "metadata": { "collapsed": true }, "outputs": [], "source": [ - "# Criando um objeto chamado Estudante1 a partir da classe Estudantes\n", + "# Criando um objeto chamado Func1 a partir da classe Funcionarios\n", "Func1 = Funcionarios(\"Obama\", 20000)" ] }, { "cell_type": "code", - "execution_count": 12, - "metadata": { - "collapsed": false - }, + "execution_count": 13, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -261,10 +267,8 @@ }, { "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, + "execution_count": 14, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -280,10 +284,8 @@ }, { "cell_type": "code", - "execution_count": 14, - "metadata": { - "collapsed": false - }, + "execution_count": 15, + "metadata": {}, "outputs": [ { "data": { @@ -291,7 +293,7 @@ "True" ] }, - "execution_count": 14, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -302,10 +304,8 @@ }, { "cell_type": "code", - "execution_count": 15, - "metadata": { - "collapsed": false - }, + "execution_count": 16, + "metadata": {}, "outputs": [ { "data": { @@ -313,7 +313,7 @@ "True" ] }, - "execution_count": 15, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -324,7 +324,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 17, "metadata": { "collapsed": true }, @@ -335,10 +335,8 @@ }, { "cell_type": "code", - "execution_count": 17, - "metadata": { - "collapsed": false - }, + "execution_count": 18, + "metadata": {}, "outputs": [ { "data": { @@ -346,7 +344,7 @@ "True" ] }, - "execution_count": 17, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -357,10 +355,8 @@ }, { "cell_type": "code", - "execution_count": 18, - "metadata": { - "collapsed": false - }, + "execution_count": 19, + "metadata": {}, "outputs": [ { "data": { @@ -368,7 +364,7 @@ "4500" ] }, - "execution_count": 18, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -379,7 +375,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 20, "metadata": { "collapsed": true }, @@ -390,10 +386,8 @@ }, { "cell_type": "code", - "execution_count": 20, - "metadata": { - "collapsed": false - }, + "execution_count": 21, + "metadata": {}, "outputs": [ { "data": { @@ -401,7 +395,7 @@ "False" ] }, - "execution_count": 20, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -421,7 +415,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -441,9 +435,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-M\303\251todos.ipynb" b/Cap05/Notebooks/DSA-Python-Cap05-03-Metodos.ipynb similarity index 73% rename from "JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-M\303\251todos.ipynb" rename to Cap05/Notebooks/DSA-Python-Cap05-03-Metodos.ipynb index 8bae504c..65711ee1 100644 --- "a/JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-M\303\251todos.ipynb" +++ b/Cap05/Notebooks/DSA-Python-Cap05-03-Metodos.ipynb @@ -25,18 +25,16 @@ "outputs": [], "source": [ "# Criando uma classe chamada Circulo\n", - "class Circulo(object):\n", + "class Circulo():\n", " \n", " # O valor de pi é constante\n", " pi = 3.14\n", "\n", - " # Quando um objeto desta classe for criado, este método será executado \n", - " # e o valor default do raio será 5.\n", + " # Quando um objeto desta classe for criado, este método será executado e o valor default do raio será 5.\n", " def __init__(self, raio = 5):\n", " self.raio = raio \n", "\n", - " # Esse método calcula a área. Self utiliza os atributos deste mesmo \n", - " # objeto\n", + " # Esse método calcula a área. Self utiliza os atributos deste mesmo objeto\n", " def area(self):\n", " return (self.raio * self.raio) * Circulo.pi\n", "\n", @@ -64,9 +62,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -88,8 +84,40 @@ "cell_type": "code", "execution_count": 4, "metadata": { - "collapsed": false + "collapsed": true }, + "outputs": [], + "source": [ + "# Criando outro objeto chamado circ1. Uma instância da classe Circulo()\n", + "# Agora sobrescrevendo o valor do atributo\n", + "circ1 = Circulo(7)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "7" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Executando um método da classe Circulo\n", + "circ1.getRaio()" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -106,29 +134,27 @@ }, { "cell_type": "code", - "execution_count": 5, - "metadata": { - "collapsed": false - }, + "execution_count": 7, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Area é: 78.5\n" + "Area igual a: 78.5\n" ] } ], "source": [ "# Imprimindo a area\n", - "print ('Area é: ', circ.area())" + "print('Area igual a: ', circ.area())" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 8, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -138,22 +164,20 @@ }, { "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, + "execution_count": 9, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "O novo raio é: 3\n" + "Novo raio igual a: 3\n" ] } ], "source": [ "# Imprimindo o novo raio\n", - "print ('O novo raio é: ', circ.getRaio())" + "print ('Novo raio igual a: ', circ.getRaio())" ] }, { @@ -167,7 +191,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -187,9 +211,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-Heran\303\247a.ipynb" b/Cap05/Notebooks/DSA-Python-Cap05-04-Heranca.ipynb similarity index 71% rename from "JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-Heran\303\247a.ipynb" rename to Cap05/Notebooks/DSA-Python-Cap05-04-Heranca.ipynb index e6ca7f84..7882ce91 100644 --- "a/JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-Heran\303\247a.ipynb" +++ b/Cap05/Notebooks/DSA-Python-Cap05-04-Heranca.ipynb @@ -24,16 +24,17 @@ }, "outputs": [], "source": [ - "# Criando a classe Animal\n", - "class Animal(object):\n", + "# Criando a classe Animal - Super-classe\n", + "class Animal():\n", + " \n", " def __init__(self):\n", - " print (\"Animal criado\")\n", + " print(\"Animal criado\")\n", "\n", " def Identif(self):\n", - " print (\"Animal\")\n", + " print(\"Animal\")\n", "\n", " def comer(self):\n", - " print (\"Comendo\")" + " print(\"Comendo\")" ] }, { @@ -44,25 +45,24 @@ }, "outputs": [], "source": [ - "# Criando a classe Cachorro\n", + "# Criando a classe Cachorro - Sub-classe\n", "class Cachorro(Animal):\n", + " \n", " def __init__(self):\n", " Animal.__init__(self)\n", - " print (\"Objeto Cachorro criado\")\n", + " print(\"Objeto Cachorro criado\")\n", "\n", " def Identif(self):\n", - " print (\"Cachorro\")\n", + " print(\"Cachorro\")\n", "\n", " def latir(self):\n", - " print (\"Au Au!\")" + " print(\"Au Au!\")" ] }, { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -75,15 +75,13 @@ ], "source": [ "# Criando um objeto (Instanciando a classe)\n", - "puppy = Cachorro()" + "rex = Cachorro()" ] }, { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -94,16 +92,14 @@ } ], "source": [ - "# Executando o método da classe Cachorro (sub classe)\n", - "puppy.Identif()" + "# Executando o método da classe Cachorro (sub-classe)\n", + "rex.Identif()" ] }, { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -114,16 +110,14 @@ } ], "source": [ - "# Executando o método da classe Animal (super classe)\n", - "puppy.comer()" + "# Executando o método da classe Animal (super-classe)\n", + "rex.comer()" ] }, { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -134,8 +128,8 @@ } ], "source": [ - "# Executando o método da classe Cachorro (sub classe)\n", - "puppy.latir()" + "# Executando o método da classe Cachorro (sub-classe)\n", + "rex.latir()" ] }, { @@ -149,7 +143,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -169,9 +163,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-MetodosEspeciais.ipynb" b/Cap05/Notebooks/DSA-Python-Cap05-05-MetodosEspeciais.ipynb similarity index 78% rename from "JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-MetodosEspeciais.ipynb" rename to Cap05/Notebooks/DSA-Python-Cap05-05-MetodosEspeciais.ipynb index 0e21be9c..7580045a 100644 --- "a/JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-MetodosEspeciais.ipynb" +++ b/Cap05/Notebooks/DSA-Python-Cap05-05-MetodosEspeciais.ipynb @@ -4,7 +4,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 5" + "# Data Science Academy - Python Fundamentos - Capítulo 5\n", + "## Download: http://github.com/dsacademybr" ] }, { @@ -23,7 +24,7 @@ "outputs": [], "source": [ "# Criando a classe Livro\n", - "class Livro(object):\n", + "class Livro():\n", " def __init__(self, titulo, autor, paginas):\n", " print (\"Livro criado\")\n", " self.titulo = titulo\n", @@ -35,15 +36,16 @@ " %(self.titulo, self.autor, self.paginas)\n", "\n", " def __len__(self):\n", - " return self.paginas" + " return self.paginas\n", + " \n", + " def len(self):\n", + " return print(\"Páginas do livro com método comum: \", self.paginas)" ] }, { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -60,9 +62,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -80,9 +80,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -102,9 +100,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -124,8 +120,25 @@ { "cell_type": "code", "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Páginas do livro com método comum: 8816\n" + ] + } + ], + "source": [ + "livro1.len()" + ] + }, + { + "cell_type": "code", + "execution_count": 7, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -136,10 +149,8 @@ }, { "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, + "execution_count": 8, + "metadata": {}, "outputs": [ { "data": { @@ -147,7 +158,7 @@ "False" ] }, - "execution_count": 7, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -167,7 +178,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -187,9 +198,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-Exerc\303\255cios-Solu\303\247\303\243o.ipynb" b/Cap05/Notebooks/DSA-Python-Cap05-Exercicios-Solucao.ipynb similarity index 93% rename from "JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-Exerc\303\255cios-Solu\303\247\303\243o.ipynb" rename to Cap05/Notebooks/DSA-Python-Cap05-Exercicios-Solucao.ipynb index 71b52067..c319e865 100644 --- "a/JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-Exerc\303\255cios-Solu\303\247\303\243o.ipynb" +++ b/Cap05/Notebooks/DSA-Python-Cap05-Exercicios-Solucao.ipynb @@ -19,9 +19,7 @@ { "cell_type": "code", "execution_count": 1, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -62,9 +60,7 @@ { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -107,9 +103,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -150,7 +144,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -170,9 +164,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-Exerc\303\255cios.ipynb" b/Cap05/Notebooks/DSA-Python-Cap05-Exercicios.ipynb similarity index 90% rename from "JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-Exerc\303\255cios.ipynb" rename to Cap05/Notebooks/DSA-Python-Cap05-Exercicios.ipynb index 7a4d31af..5260f016 100644 --- "a/JupyterNotebooks/Cap\303\255tulo05/DSA-Python-Cap\303\255tulo5-Exerc\303\255cios.ipynb" +++ b/Cap05/Notebooks/DSA-Python-Cap05-Exercicios.ipynb @@ -20,7 +20,7 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -47,20 +47,20 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ "# Exercício 2 - Crie uma classe chamada Pessoa() com os atributos: nome, cidade, telefone e e-mail. Use pelo menos 2\n", "# métodos especiais na sua classe. Crie um objeto da sua classe e faça uma chamada a pelo menos um dos seus métodos\n", - "# especiais\n" + "# especiais.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -79,7 +79,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -99,9 +99,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git a/Cap06/Lab03/forca_v2.py b/Cap06/Lab03/forca_v2.py new file mode 100755 index 00000000..075883c8 --- /dev/null +++ b/Cap06/Lab03/forca_v2.py @@ -0,0 +1,153 @@ +# Hangman Game (Jogo da Forca) +# Programação Orientada a Objetos + +# Import +import random + +# Board (tabuleiro) +board = [''' + +>>>>>>>>>>Hangman<<<<<<<<<< + ++---+ +| | + | + | + | + | +=========''', ''' + ++---+ +| | +O | + | + | + | +=========''', ''' + ++---+ +| | +O | +| | + | + | +=========''', ''' + + +---+ + | | + O | +/| | + | + | +=========''', ''' + + +---+ + | | + O | +/|\ | + | + | +=========''', ''' + + +---+ + | | + O | +/|\ | +/ | + | +=========''', ''' + + +---+ + | | + O | +/|\ | +/ \ | + | +========='''] + + +# Classe +class Hangman: + + # Método Construtor + def __init__(self, word): + self.word = word + self.missed_letters = [] + self.guessed_letters = [] + + # Método para adivinhar a letra + def guess(self, letter): + if letter in self.word and letter not in self.guessed_letters: + self.guessed_letters.append(letter) + elif letter not in self.word and letter not in self.missed_letters: + self.missed_letters.append(letter) + else: + return False + return True + + # Método para verificar se o jogo terminou + def hangman_over(self): + return self.hangman_won() or (len(self.missed_letters) == 6) + + # Método para verificar se o jogador venceu + def hangman_won(self): + if '_' not in self.hide_word(): + return True + return False + + # Método para não mostrar a letra no board + def hide_word(self): + rtn = '' + for letter in self.word: + if letter not in self.guessed_letters: + rtn += '_' + else: + rtn += letter + return rtn + + # Método para checar o status do game e imprimir o board na tela + def print_game_status(self): + print (board[len(self.missed_letters)]) + print ('\nPalavra: ' + self.hide_word()) + print ('\nLetras erradas: ',) + for letter in self.missed_letters: + print (letter,) + print () + print ('Letras corretas: ',) + for letter in self.guessed_letters: + print (letter,) + print () + +# Método para ler uma palavra de forma aleatória do banco de palavras +def rand_word(): + with open("palavras.txt", "rt") as f: + bank = f.readlines() + return bank[random.randint(0,len(bank))].strip() + +# Método Main - Execução do Programa +def main(): + + # Objeto + game = Hangman(rand_word()) + + # Enquanto o jogo não tiver terminado, print do status, solicita uma letra e faz a leitura do caracter + while not game.hangman_over(): + game.print_game_status() + user_input = input('\nDigite uma letra: ') + game.guess(user_input) + + # Verifica o status do jogo + game.print_game_status() + + # De acordo com o status, imprime mensagem na tela para o usuário + if game.hangman_won(): + print ('\nParabéns! Você venceu!!') + else: + print ('\nGame over! Você perdeu.') + print ('A palavra era ' + game.word) + + print ('\nFoi bom jogar com você! Agora vá estudar!\n') + +# Executa o programa +if __name__ == "__main__": + main() diff --git a/Cap06/Lab03/palavras.txt b/Cap06/Lab03/palavras.txt new file mode 100644 index 00000000..dc6d8f8b --- /dev/null +++ b/Cap06/Lab03/palavras.txt @@ -0,0 +1,5 @@ +bola + +casa + +massa \ No newline at end of file diff --git "a/JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte1 - Criando um Banco de Dados SQLite.ipynb" b/Cap06/Notebooks/DSA-Python-Cap06-01-Criando um Banco de Dados SQLite.ipynb similarity index 86% rename from "JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte1 - Criando um Banco de Dados SQLite.ipynb" rename to Cap06/Notebooks/DSA-Python-Cap06-01-Criando um Banco de Dados SQLite.ipynb index 4c20b35c..c243f18a 100644 --- "a/JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte1 - Criando um Banco de Dados SQLite.ipynb" +++ b/Cap06/Notebooks/DSA-Python-Cap06-01-Criando um Banco de Dados SQLite.ipynb @@ -9,6 +9,13 @@ "## Download: http://github.com/dsacademybr" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Documentação SQLite: http://www.sqlite.org/docs.html" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -20,7 +27,20 @@ "cell_type": "code", "execution_count": 1, "metadata": { - "collapsed": false + "collapsed": true + }, + "outputs": [], + "source": [ + "# Reemove o arquivo com o banco de dados SQLite (caso exista)\n", + "import os\n", + "os.remove(\"escola.db\") if os.path.exists(\"escola.db\") else None" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": true }, "outputs": [], "source": [ @@ -30,9 +50,9 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -43,10 +63,8 @@ }, { "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": false - }, + "execution_count": 4, + "metadata": {}, "outputs": [ { "data": { @@ -54,7 +72,7 @@ "sqlite3.Connection" ] }, - "execution_count": 3, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -65,7 +83,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "metadata": { "collapsed": true }, @@ -78,10 +96,8 @@ }, { "cell_type": "code", - "execution_count": 5, - "metadata": { - "collapsed": false - }, + "execution_count": 6, + "metadata": {}, "outputs": [ { "data": { @@ -89,7 +105,7 @@ "sqlite3.Cursor" ] }, - "execution_count": 5, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -100,9 +116,9 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -115,18 +131,16 @@ }, { "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, + "execution_count": 8, + "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 7, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -138,7 +152,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": { "collapsed": true }, @@ -150,9 +164,9 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 10, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -164,9 +178,9 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 11, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -177,7 +191,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 12, "metadata": { "collapsed": true }, @@ -189,7 +203,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 13, "metadata": { "collapsed": true }, @@ -199,47 +213,23 @@ "sql_select = 'select * from cursos'" ] }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Seleciona todos os registros\n", - "cur.execute(sql_select)" - ] - }, { "cell_type": "code", "execution_count": 14, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ - "# Recupera os resultados\n", + "# Seleciona todos os registros e recupera os registros\n", + "cur.execute(sql_select)\n", "dados = cur.fetchall()" ] }, { "cell_type": "code", "execution_count": 15, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -264,7 +254,7 @@ "cell_type": "code", "execution_count": 16, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -283,9 +273,7 @@ { "cell_type": "code", "execution_count": 17, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -339,7 +327,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -359,9 +347,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte2 - Instru\303\247\303\243o Insert no SQLite.ipynb" b/Cap06/Notebooks/DSA-Python-Cap06-02-Insert no SQLite.ipynb similarity index 78% rename from "JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte2 - Instru\303\247\303\243o Insert no SQLite.ipynb" rename to Cap06/Notebooks/DSA-Python-Cap06-02-Insert no SQLite.ipynb index 3b0d8c6b..a7e51227 100644 --- "a/JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte2 - Instru\303\247\303\243o Insert no SQLite.ipynb" +++ b/Cap06/Notebooks/DSA-Python-Cap06-02-Insert no SQLite.ipynb @@ -20,7 +20,20 @@ "cell_type": "code", "execution_count": 1, "metadata": { - "collapsed": false + "collapsed": true + }, + "outputs": [], + "source": [ + "# Reemove o arquivo com o banco de dados SQLite (caso exista)\n", + "import os\n", + "os.remove(\"dsa.db\") if os.path.exists(\"dsa.db\") else None" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": true }, "outputs": [], "source": [ @@ -39,7 +52,7 @@ " \n", "# Função para inserir uma linha\n", "def data_insert():\n", - " c.execute(\"INSERT INTO produtos VALUES(10, '2016-05-02 14:32:11', 'Teclado', 90 )\")\n", + " c.execute(\"INSERT INTO produtos VALUES(10, '2018-05-02 14:32:11', 'Teclado', 90 )\")\n", " conn.commit()\n", " c.close()\n", " conn.close()" @@ -47,7 +60,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": { "collapsed": true }, @@ -59,9 +72,9 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -80,7 +93,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -100,9 +113,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte3 - Instru\303\247\303\243o Insert no SQLite usando Vari\303\241veis.ipynb" b/Cap06/Notebooks/DSA-Python-Cap06-03-Insert no SQLite usando Variaveis.ipynb similarity index 88% rename from "JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte3 - Instru\303\247\303\243o Insert no SQLite usando Vari\303\241veis.ipynb" rename to Cap06/Notebooks/DSA-Python-Cap06-03-Insert no SQLite usando Variaveis.ipynb index 5f3380ee..dd89bfab 100644 --- "a/JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte3 - Instru\303\247\303\243o Insert no SQLite usando Vari\303\241veis.ipynb" +++ b/Cap06/Notebooks/DSA-Python-Cap06-03-Insert no SQLite usando Variaveis.ipynb @@ -42,7 +42,7 @@ " \n", "# Função para inserir uma linha\n", "def data_insert():\n", - " c.execute(\"INSERT INTO produtos VALUES('2016-05-02 12:34:45', 'Teclado', 130.00 )\")\n", + " c.execute(\"INSERT INTO produtos VALUES('2018-05-02 12:34:45', 'Teclado', 130.00 )\")\n", " conn.commit()\n", " c.close()\n", " conn.close()\n", @@ -52,8 +52,7 @@ " new_date = datetime.datetime.now()\n", " new_prod_name = 'Monitor'\n", " new_valor = random.randrange(50,100)\n", - " c.execute(\"INSERT INTO produtos (date, prod_name, valor) VALUES (?, ?, ?)\", \n", - " (new_date, new_prod_name, new_valor))\n", + " c.execute(\"INSERT INTO produtos (date, prod_name, valor) VALUES (?, ?, ?)\", (new_date, new_prod_name, new_valor))\n", " conn.commit()" ] }, @@ -61,7 +60,7 @@ "cell_type": "code", "execution_count": 2, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -95,7 +94,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -115,9 +114,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte4 - Instru\303\247\303\243o Select no SQLite.ipynb" b/Cap06/Notebooks/DSA-Python-Cap06-04-Select no SQLite.ipynb similarity index 70% rename from "JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte4 - Instru\303\247\303\243o Select no SQLite.ipynb" rename to Cap06/Notebooks/DSA-Python-Cap06-04-Select no SQLite.ipynb index 904be036..7b2a9973 100644 --- "a/JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte4 - Instru\303\247\303\243o Select no SQLite.ipynb" +++ b/Cap06/Notebooks/DSA-Python-Cap06-04-Select no SQLite.ipynb @@ -78,25 +78,23 @@ { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "(10, '2016-05-02 14:32:11', 'Teclado', 90.0)\n", - "(11, '2016-05-23 14:13:21.779164', 'Monitor', 70.0)\n", - "(12, '2016-05-23 14:13:22.785889', 'Monitor', 60.0)\n", - "(13, '2016-05-23 14:13:23.791211', 'Monitor', 50.0)\n", - "(14, '2016-05-23 14:13:24.796350', 'Monitor', 92.0)\n", - "(15, '2016-05-23 14:13:25.802804', 'Monitor', 91.0)\n", - "(16, '2016-05-23 14:13:26.805365', 'Monitor', 62.0)\n", - "(17, '2016-05-23 14:13:27.810955', 'Monitor', 83.0)\n", - "(18, '2016-05-23 14:13:28.813340', 'Monitor', 82.0)\n", - "(19, '2016-05-23 14:13:29.819722', 'Monitor', 98.0)\n", - "(20, '2016-05-23 14:13:30.825445', 'Monitor', 71.0)\n" + "(10, '2018-05-02 14:32:11', 'Teclado', 90.0)\n", + "(11, '2018-04-18 15:32:15.064730', 'Monitor', 52.0)\n", + "(12, '2018-04-18 15:32:16.074631', 'Monitor', 98.0)\n", + "(13, '2018-04-18 15:32:17.083495', 'Monitor', 94.0)\n", + "(14, '2018-04-18 15:32:18.092251', 'Monitor', 64.0)\n", + "(15, '2018-04-18 15:32:19.100759', 'Monitor', 74.0)\n", + "(16, '2018-04-18 15:32:20.112758', 'Monitor', 62.0)\n", + "(17, '2018-04-18 15:32:21.120451', 'Monitor', 86.0)\n", + "(18, '2018-04-18 15:32:22.130355', 'Monitor', 57.0)\n", + "(19, '2018-04-18 15:32:23.140021', 'Monitor', 53.0)\n", + "(20, '2018-04-18 15:32:24.150483', 'Monitor', 78.0)\n" ] } ], @@ -108,23 +106,20 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "(10, '2016-05-02 14:32:11', 'Teclado', 90.0)\n", - "(11, '2016-05-23 14:13:21.779164', 'Monitor', 70.0)\n", - "(14, '2016-05-23 14:13:24.796350', 'Monitor', 92.0)\n", - "(15, '2016-05-23 14:13:25.802804', 'Monitor', 91.0)\n", - "(16, '2016-05-23 14:13:26.805365', 'Monitor', 62.0)\n", - "(17, '2016-05-23 14:13:27.810955', 'Monitor', 83.0)\n", - "(18, '2016-05-23 14:13:28.813340', 'Monitor', 82.0)\n", - "(19, '2016-05-23 14:13:29.819722', 'Monitor', 98.0)\n", - "(20, '2016-05-23 14:13:30.825445', 'Monitor', 71.0)\n" + "(10, '2018-05-02 14:32:11', 'Teclado', 90.0)\n", + "(12, '2018-04-18 15:32:16.074631', 'Monitor', 98.0)\n", + "(13, '2018-04-18 15:32:17.083495', 'Monitor', 94.0)\n", + "(14, '2018-04-18 15:32:18.092251', 'Monitor', 64.0)\n", + "(15, '2018-04-18 15:32:19.100759', 'Monitor', 74.0)\n", + "(16, '2018-04-18 15:32:20.112758', 'Monitor', 62.0)\n", + "(17, '2018-04-18 15:32:21.120451', 'Monitor', 86.0)\n", + "(20, '2018-04-18 15:32:24.150483', 'Monitor', 78.0)\n" ] } ], @@ -136,25 +131,23 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "90.0\n", - "70.0\n", - "60.0\n", - "50.0\n", - "92.0\n", - "91.0\n", - "62.0\n", - "83.0\n", - "82.0\n", + "52.0\n", "98.0\n", - "71.0\n" + "94.0\n", + "64.0\n", + "74.0\n", + "62.0\n", + "86.0\n", + "57.0\n", + "53.0\n", + "78.0\n" ] } ], @@ -187,7 +180,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -207,9 +200,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git "a/JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte5 - Instru\303\247\303\265es Update e Delete no SQLite.ipynb" b/Cap06/Notebooks/DSA-Python-Cap06-05-Update e Delete no SQLite.ipynb similarity index 69% rename from "JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte5 - Instru\303\247\303\265es Update e Delete no SQLite.ipynb" rename to Cap06/Notebooks/DSA-Python-Cap06-05-Update e Delete no SQLite.ipynb index 63607ff5..c48138c7 100644 --- "a/JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte5 - Instru\303\247\303\265es Update e Delete no SQLite.ipynb" +++ b/Cap06/Notebooks/DSA-Python-Cap06-05-Update e Delete no SQLite.ipynb @@ -18,7 +18,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 7, "metadata": { "collapsed": true }, @@ -76,20 +76,20 @@ " \n", "# Update\n", "def atualiza_dados():\n", - " c.execute(\"UPDATE produtos SET valor = 70.00 WHERE valor = 80.0\")\n", + " c.execute(\"UPDATE produtos SET valor = 70.00 WHERE valor = 98.0\")\n", " conn.commit()\n", " \n", "# Delete\n", "def remove_dados():\n", - " c.execute(\"DELETE FROM produtos WHERE valor = 60.0\")\n", + " c.execute(\"DELETE FROM produtos WHERE valor = 62.0\")\n", " conn.commit()" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 5, "metadata": { - "collapsed": false + "collapsed": true }, "outputs": [], "source": [ @@ -98,26 +98,24 @@ }, { "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": false - }, + "execution_count": 6, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "(10, '2016-05-02 14:32:11', 'Teclado', 90.0)\n", - "(11, '2016-05-23 14:13:21.779164', 'Monitor', 70.0)\n", - "(12, '2016-05-23 14:13:22.785889', 'Monitor', 60.0)\n", - "(13, '2016-05-23 14:13:23.791211', 'Monitor', 50.0)\n", - "(14, '2016-05-23 14:13:24.796350', 'Monitor', 92.0)\n", - "(15, '2016-05-23 14:13:25.802804', 'Monitor', 91.0)\n", - "(16, '2016-05-23 14:13:26.805365', 'Monitor', 62.0)\n", - "(17, '2016-05-23 14:13:27.810955', 'Monitor', 83.0)\n", - "(18, '2016-05-23 14:13:28.813340', 'Monitor', 82.0)\n", - "(19, '2016-05-23 14:13:29.819722', 'Monitor', 98.0)\n", - "(20, '2016-05-23 14:13:30.825445', 'Monitor', 71.0)\n" + "(10, '2018-05-02 14:32:11', 'Teclado', 90.0)\n", + "(11, '2018-04-18 15:32:15.064730', 'Monitor', 52.0)\n", + "(12, '2018-04-18 15:32:16.074631', 'Monitor', 70.0)\n", + "(13, '2018-04-18 15:32:17.083495', 'Monitor', 94.0)\n", + "(14, '2018-04-18 15:32:18.092251', 'Monitor', 64.0)\n", + "(15, '2018-04-18 15:32:19.100759', 'Monitor', 74.0)\n", + "(16, '2018-04-18 15:32:20.112758', 'Monitor', 62.0)\n", + "(17, '2018-04-18 15:32:21.120451', 'Monitor', 86.0)\n", + "(18, '2018-04-18 15:32:22.130355', 'Monitor', 57.0)\n", + "(19, '2018-04-18 15:32:23.140021', 'Monitor', 53.0)\n", + "(20, '2018-04-18 15:32:24.150483', 'Monitor', 78.0)\n" ] } ], @@ -127,7 +125,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 8, "metadata": { "collapsed": true }, @@ -138,25 +136,23 @@ }, { "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, + "execution_count": 9, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "(10, '2016-05-02 14:32:11', 'Teclado', 90.0)\n", - "(11, '2016-05-23 14:13:21.779164', 'Monitor', 70.0)\n", - "(13, '2016-05-23 14:13:23.791211', 'Monitor', 50.0)\n", - "(14, '2016-05-23 14:13:24.796350', 'Monitor', 92.0)\n", - "(15, '2016-05-23 14:13:25.802804', 'Monitor', 91.0)\n", - "(16, '2016-05-23 14:13:26.805365', 'Monitor', 62.0)\n", - "(17, '2016-05-23 14:13:27.810955', 'Monitor', 83.0)\n", - "(18, '2016-05-23 14:13:28.813340', 'Monitor', 82.0)\n", - "(19, '2016-05-23 14:13:29.819722', 'Monitor', 98.0)\n", - "(20, '2016-05-23 14:13:30.825445', 'Monitor', 71.0)\n" + "(10, '2018-05-02 14:32:11', 'Teclado', 90.0)\n", + "(11, '2018-04-18 15:32:15.064730', 'Monitor', 52.0)\n", + "(12, '2018-04-18 15:32:16.074631', 'Monitor', 70.0)\n", + "(13, '2018-04-18 15:32:17.083495', 'Monitor', 94.0)\n", + "(14, '2018-04-18 15:32:18.092251', 'Monitor', 64.0)\n", + "(15, '2018-04-18 15:32:19.100759', 'Monitor', 74.0)\n", + "(17, '2018-04-18 15:32:21.120451', 'Monitor', 86.0)\n", + "(18, '2018-04-18 15:32:22.130355', 'Monitor', 57.0)\n", + "(19, '2018-04-18 15:32:23.140021', 'Monitor', 53.0)\n", + "(20, '2018-04-18 15:32:24.150483', 'Monitor', 78.0)\n" ] } ], @@ -175,7 +171,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -195,9 +191,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git a/Cap06/Notebooks/DSA-Python-Cap06-06-Criando Graficos com Matplotlib e SQLite.ipynb b/Cap06/Notebooks/DSA-Python-Cap06-06-Criando Graficos com Matplotlib e SQLite.ipynb new file mode 100644 index 00000000..9bb25dfd --- /dev/null +++ b/Cap06/Notebooks/DSA-Python-Cap06-06-Criando Graficos com Matplotlib e SQLite.ipynb @@ -0,0 +1,941 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Data Science Academy - Python Fundamentos - Capítulo 6\n", + "\n", + "## Download: http://github.com/dsacademybr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Gráficos" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import sqlite3\n", + "import random\n", + "import datetime\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib notebook\n", + " \n", + "# Criando uma conexão\n", + "conn = sqlite3.connect('dsa.db') \n", + "\n", + "# Criando um cursor\n", + "c = conn.cursor()\n", + " \n", + "# Função para criar uma tabela\n", + "def create_table():\n", + " c.execute('CREATE TABLE IF NOT EXISTS produtos(id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, date TEXT, '\\\n", + " 'prod_name TEXT, valor REAL)')\n", + " \n", + "# Função para inserir uma linha\n", + "def data_insert():\n", + " c.execute(\"INSERT INTO produtos VALUES(now, 'Teclado', 130 )\")\n", + " conn.commit()\n", + " c.close()\n", + " conn.close()\n", + " \n", + "# Usando variáveis para inserir dados \n", + "def data_insert_var():\n", + " new_date = datetime.datetime.now()\n", + " new_prod_name = 'monitor'\n", + " new_valor = random.randrange(50,100)\n", + " c.execute(\"INSERT INTO produtos (date, prod_name, valor) VALUES (?, ?, ?, ?)\", \n", + " (new_date, new_prod_name, new_valor))\n", + " conn.commit()\n", + " \n", + "# Leitura de dados\n", + "def leitura_todos_dados():\n", + " c.execute(\"SELECT * FROM PRODUTOS\")\n", + " for linha in c.fetchall():\n", + " print(linha)\n", + " \n", + "# Leitura de registros específicos\n", + "def leitura_registros():\n", + " c.execute(\"SELECT * FROM PRODUTOS WHERE valor > 60.0\")\n", + " for linha in c.fetchall():\n", + " print(linha) \n", + " \n", + "# Leitura de colunas específicos\n", + "def leitura_colunas():\n", + " c.execute(\"SELECT * FROM PRODUTOS\")\n", + " for linha in c.fetchall():\n", + " print(linha[3]) \n", + " \n", + "# Update\n", + "def atualiza_dados():\n", + " c.execute(\"UPDATE produtos SET valor = 70.00 WHERE valor > 80.0\")\n", + " conn.commit()\n", + " \n", + "# Delete\n", + "def remove_dados():\n", + " c.execute(\"DELETE FROM produtos WHERE valor = 62.0\")\n", + " conn.commit()\n", + "\n", + "# Gerar gráfico com os dados no banco de dados\n", + "def dados_grafico():\n", + " c.execute(\"SELECT id, valor FROM produtos\")\n", + " ids = []\n", + " valores = []\n", + " dados = c.fetchall()\n", + " for linha in dados:\n", + " ids.append(linha[0])\n", + " valores.append(linha[1])\n", + " \n", + " plt.bar(ids, valores)\n", + " plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support.' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('
');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " if (mpl.ratio != 1) {\n", + " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", + " }\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " fig.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '
');\n", + " var titletext = $(\n", + " '
');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('
');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var backingStore = this.context.backingStorePixelRatio ||\n", + "\tthis.context.webkitBackingStorePixelRatio ||\n", + "\tthis.context.mozBackingStorePixelRatio ||\n", + "\tthis.context.msBackingStorePixelRatio ||\n", + "\tthis.context.oBackingStorePixelRatio ||\n", + "\tthis.context.backingStorePixelRatio || 1;\n", + "\n", + " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", + "\n", + " var rubberband = $('');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width * mpl.ratio);\n", + " canvas.attr('height', height * mpl.ratio);\n", + " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('
')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $(' + +
+ + + +
+

© Data Science Academy

+
+ +
+ + + diff --git a/Cap13/03-Mini-Projeto/Leiame.txt b/Cap13/03-Mini-Projeto/Leiame.txt new file mode 100644 index 00000000..89d5f105 --- /dev/null +++ b/Cap13/03-Mini-Projeto/Leiame.txt @@ -0,0 +1,8 @@ +Para treinar o modelo, execute: + +python deep_reinforcement_learning.py + + +Para executar a app, digite: + +python app.py \ No newline at end of file diff --git a/Cap13/03-Mini-Projeto/app.py b/Cap13/03-Mini-Projeto/app.py new file mode 100755 index 00000000..09d95a43 --- /dev/null +++ b/Cap13/03-Mini-Projeto/app.py @@ -0,0 +1,46 @@ +# Imports + +import json +import numpy as np +from flask import Flask, jsonify, render_template, request +from deep_reinforcement_learning import * + +app = Flask(__name__) + +# Abrindo sessão +sess = tf.InteractiveSession() + +# Previsões +x , prediction, _ = createNetwork() + +# Carregando o modelo treinado +saver = tf.train.Saver() +checkpoint = tf.train.get_checkpoint_state("model") + +if checkpoint and checkpoint.model_checkpoint_path: + s = saver.restore(sess,checkpoint.model_checkpoint_path) + print("Modelo carregado com sucesso:", checkpoint.model_checkpoint_path) +else: + print("Não foi possível carregar o modelo") +graph = tf.get_default_graph() + +@app.route('/') +def index(): + return render_template('index.html') + +def bestmove(input): + global graph + with graph.as_default(): + data = (sess.run(tf.argmax(prediction.eval(session = sess,feed_dict={x:[input]}),1))) + return data + +@app.route('/api/ticky', methods=['POST']) +def ticky_api(): + data = request.get_json() + data = np.array(data['data']) + data = data.tolist() + return jsonify(np.asscalar(bestmove(data)[0])) + +if __name__ == '__main__': + app.run(host='0.0.0.0',port=81) + diff --git a/Cap13/03-Mini-Projeto/deep_reinforcement_learning.py b/Cap13/03-Mini-Projeto/deep_reinforcement_learning.py new file mode 100755 index 00000000..e719ff1e --- /dev/null +++ b/Cap13/03-Mini-Projeto/deep_reinforcement_learning.py @@ -0,0 +1,422 @@ +# Um Programa Python para implementar o Aprendizado de Máquina para o Jogo Tic Tac Toe (3x3) +# usando Aprendizado por Reforço (técnica de aprendizado Q) e tensorflow. + +# Imports +import time +import tensorflow as tf +import random +import numpy as np +from pathlib import Path +import os +import sys + +# Variáveis +game_rows = rows = 3 +game_cols = cols = 3 +winning_length = 3 +boardSize = rows * cols +actions = rows * cols +won_games = 0 +lost_games = 0 +draw_games = 0 +layer_1_w = 750 +layer_2_w = 750 +layer_3_w = 750 + + +def weight_variable(shape): + initial = tf.truncated_normal(shape, stddev = 0.01) + return tf.Variable(initial) + +def bias_variable(shape): + initial = tf.constant(0.01, shape = shape) + return tf.Variable(initial) + + +# Política gananciosa (greedy policy) para selecionar uma ação +# Quanto maior o valor de e, maior a probabilidade de uma ação ser aleatória. +epsilon = 1.0 + +# Discount factor -- determina a importância de recompensas futuras +GAMMA = 0.9 + + +# troca X's por O's e vice-versa +def InverseBoard(board): + temp_board = np.copy(board) + rows, cols = temp_board.shape + for r in range(rows): + for c in range(cols): + temp_board[r,c] *= -1 + return temp_board.reshape([-1]) + +def isGameOver(board): + temp = None + rows , cols = board.shape + + ## Linhas + for i in range(rows): + temp = getRowSum(board, i) + if checkValue(temp): + return True + ## Colunas + for i in range(cols): + temp = getColSum(board, i) + if checkValue(temp): + return True + + ## Diagonais + temp = getRightDig(board) + if checkValue(temp): + return True + + temp = getLeftDig(board) + if checkValue(temp): + return True + + return False + +def getRowSum(board , r): + rows , cols = board.shape + sum = 0 + for c in range(cols): + sum = sum + board[r,c] + return sum + +def getColSum(board , c): + rows , cols = board.shape + sum = 0 + for r in range(rows): + sum = sum + board[r,c] + return sum + +def getLeftDig(board): + rows , cols = board.shape + sum = 0 + for i in range(rows): + sum = sum + board[i,i] + return sum + +def getRightDig(board): + rows , cols = board.shape + sum = 0 + i = rows - 1 + j = 0 + while i >= 0: + sum += board[i,j] + i = i - 1 + j = j + 1 + return sum + +def checkValue(sum): + if sum == -3 or sum == 3: + return True + + +# Cria a rede +def createNetwork(): + + W_layer1 = weight_variable([boardSize, layer_1_w]) + b_layer1 = bias_variable([layer_1_w]) + + W_layer2 = weight_variable([layer_1_w, layer_2_w]) + b_layer2 = bias_variable([layer_2_w]) + + W_layer3 = weight_variable([layer_2_w, layer_3_w]) + b_layer3 = bias_variable([layer_3_w]) + + o_layer = weight_variable([layer_3_w, actions]) + o_bais = bias_variable([actions]) + + # Input Layer + x = tf.placeholder("float", [None, boardSize]) + + # hidden layers + h_layer1 = tf.nn.relu(tf.matmul(x,W_layer1) + b_layer1) + h_layer2 = tf.nn.relu(tf.matmul(h_layer1,W_layer2) + b_layer2) + h_layer3 = tf.nn.relu(tf.matmul(h_layer2,W_layer3) + b_layer3) + + # Output layer + y = tf.matmul(h_layer3,o_layer) + o_bais + prediction = tf.argmax(y[0]) + + return x,y, prediction + + +def tainNetwork(): + print() + + # Cria a rede + inputState , Qoutputs, prediction = createNetwork() + + # Calcula a perda + targetQOutputs = tf.placeholder("float",[None,actions]) + loss = tf.reduce_mean(tf.square(tf.subtract(targetQOutputs, Qoutputs))) + + # Treina o modelo e minimiza a perda + train_step = tf.train.AdamOptimizer(1e-4).minimize(loss) + + # Cria a sessão + sess = tf.InteractiveSession() + + # Salva a rede e inicializa as variáveis + saver = tf.train.Saver() + sess.run(tf.global_variables_initializer()) + + # Carrega o modelo salvo + step = 0 + iterations = 0 + + checkpoint = tf.train.get_checkpoint_state("model") + if checkpoint and checkpoint.model_checkpoint_path: + s = saver.restore(sess,checkpoint.model_checkpoint_path) + print("Modelo carregado com sucesso:", checkpoint.model_checkpoint_path) + step = int(os.path.basename(checkpoint.model_checkpoint_path).split('-')[1]) + else: + print("Não foi possível carregar a rede") + iterations += step + + print(time.ctime()) + + ## Define número máximo de correspondências para interação inicial + tot_matches = 60000 + number_of_matches_each_episode = 500 + max_iterations = tot_matches / number_of_matches_each_episode + + e_downrate = 0.9 / max_iterations + + e = epsilon + + print("Iteração Máxima = {}".format(max_iterations)) + print() + + run_time = 0 + while "ticky" != "tacky": + sys.stdout.flush() + start_time = time.time() + episodes = number_of_matches_each_episode + global won_games + global lost_games + global draw_games + + total_loss = 0 + + epchos = 100 + GamesList = [] + + for i in range(episodes): + completeGame, victory = playaGame(e,sess,inputState, prediction,Qoutputs) + GamesList.append(completeGame) + + + for k in range(epchos): + random.shuffle(GamesList) + for i in GamesList: + len_complete_game = len(i) + loop_in = 0 + game_reward = 0 + while loop_in < len_complete_game: + j = i.pop() + currentState = j[0] + action = j[1][0] + reward = j[2][0] + nextState = j[3] + + ## Game e reward + if loop_in == 0: + game_reward = reward + else: + # Obter q valores para o próximo estado usando a rede + nextQ = sess.run(Qoutputs,feed_dict={inputState:[nextState]}) + maxNextQ = np.max(nextQ) + game_reward = GAMMA * ( maxNextQ ) + + + targetQ = sess.run(Qoutputs,feed_dict={inputState:[currentState]}) + + # Uma vez que calculamos a recompensa para a ação em particular, devemos também adicionar a recompensa -1 + # para todos os movimentos ilegais no valor q + for index,item in enumerate(currentState): + if item != 0: + targetQ[0,index] = -1 + + targetQ[0,action] = game_reward + + loop_in += 1 + t_loss = 0 + + + t_loss=sess.run([train_step,Qoutputs,loss],feed_dict={inputState:[currentState], targetQOutputs:targetQ}) + total_loss += t_loss[2] + + iterations += 1 + time_diff = time.time()-start_time + run_time += time_diff + print("Iteração {} completada com {} wins, {} losses {} draws, out of {} games played, e is {} \ncost is {} , current_time is {}, time taken is {} , total time = {} hours \n".format(iterations, + won_games,lost_games,draw_games,episodes,e*100,total_loss,time.ctime(),time_diff,(run_time)/3600)) + start_time = time.time() + total_loss = 0 + won_games = 0 + lost_games = 0 + draw_games = 0 + + if e > -0.2: + e -= e_downrate + else: + e = random.choice([0.1,0.05,0.06,0.07,0.15,0.03,0.20,0.25,0.5,0.4]) + + saver.save(sess, "./model/model.ckpt",global_step=iterations) + + + + +# Joga um jogo e retorna uma lista com todos os estados, ações e recompensa final. +def playaGame(e,sess,inputState, prediction, Qoutputs): + global won_games + global lost_games + global draw_games + + win_reward = 10 + loss_reward = -1 + draw_reward = 3 + + ## Cria o objeto de memória de jogo inteiro que contém as memórias para o jogo e um tabuleiro vazio + completeGameMemory = [] + myList = np.array([0]*(rows*cols)).reshape(3,3) + + turn = random.choice([1,-1]) + + if(turn == -1): + initial_index = random.choice(range(9)) + best_index, _= sess.run([prediction,Qoutputs], feed_dict={inputState : [np.array(np.copy(myList).reshape(-1))]}) + initial_index = random.choice([best_index,initial_index,best_index]) + myList[int(initial_index/3),initial_index%3] = -1 + turn = turn * -1 + + while(True): + + ## Criar uma memória que mantenha o estado inicial atual, a ação tomada, a recompensa recebida, o próximo estado + memory = [] + + ## Criar uma cópia do board que é linear + temp_copy = np.array(np.copy(myList).reshape(-1)) + + ## Buscar todos os índices que estão livres ou zero para que eles possam ser usados para jogar o próximo movimento + zero_indexes = [] + for index,item in enumerate(temp_copy): + if item == 0: + zero_indexes.append(index) + + if len(zero_indexes) == 0: + reward = draw_reward + completeGameMemory[-1][2][0] = reward + draw_games += 1 + break + + selectedRandomIndex = random.choice(zero_indexes) + + ## Calcular a previsão da rede que pode ser usada posteriormente como uma ação com alguma probabilidade + pred, _ = sess.run([prediction,Qoutputs], feed_dict={inputState : [temp_copy]}) + + ## Como a rede pode ser confusa e imprecisa, verifique se a previsão está correta primeiro. + isFalsePrediction = False if temp_copy[pred] == 0 else True + + ## Vamos adicionar o estado inicial à memória atual + memory.append(np.copy(myList).reshape(-1)) + + ## Vamos escolher uma ação com alguma probabilidade e exploração + if random.random() > e: + action = pred + else: + random_action = random.choice(range(9)) + action = selectedRandomIndex + + memory.append([action]) + + if action not in zero_indexes: + reward = loss_reward + memory.append([reward]) + memory.append(np.copy(myList.reshape(-1))) + completeGameMemory.append(memory) + lost_games +=1 + break + + ## Atualizar o board com a ação tomada + myList[int(action/game_rows),action%game_cols] = 1 + + ## Agora calcule a recompensa. + reward = 0 + + ## Se escolhermos uma ação inválida, não recebemos nenhuma recompensa e o oponente ganha + if isFalsePrediction == True and action == pred: + reward = loss_reward + memory.append([reward]) + memory.append(np.copy(myList.reshape(-1))) + completeGameMemory.append(memory) + lost_games +=1 + break + + ## Se depois de jogarmos o nosso jogo o jogo estiver completo, então merecemos uma recompensa e é o estado final + if(isGameOver(myList)): + reward = win_reward + memory.append([reward]) + memory.append(np.copy(myList.reshape(-1))) + completeGameMemory.append(memory) + won_games +=1 + break + + + + temp_copy_inverse = np.array(np.copy(InverseBoard(myList)).reshape(-1)) + temp_copy = np.array(np.copy(myList).reshape(-1)) + zero_indexes = [] + for index,item in enumerate(temp_copy): + if item == 0: + zero_indexes.append(index) + + if len(zero_indexes) == 0: + reward = draw_reward + memory.append([reward]) + memory.append(np.copy(myList.reshape(-1))) + completeGameMemory.append(memory) + draw_games+=1 + break + + selectedRandomIndex = random.choice(zero_indexes) + pred, _ = sess.run([prediction,Qoutputs], feed_dict={inputState : [temp_copy_inverse]}) + isFalsePrediction = False if temp_copy[pred] == 0 else True + + action = None + + if(isFalsePrediction == True): + action = random.choice([selectedRandomIndex]) + else: + action = random.choice([selectedRandomIndex,pred,pred,pred,pred]) + + temp_copy2 = np.copy(myList).reshape(-1) + if temp_copy2[action] != 0: + print("Erro ",temp_copy2 , action) + return + + myList[int(action/game_rows),action%game_cols] = -1 + + if isGameOver(myList) == True: + reward = loss_reward + memory.append([reward]) + memory.append(np.copy(myList.reshape(-1))) + completeGameMemory.append(memory) + lost_games +=1 + break + + ## Se ninguém ganhou e o jogo ainda não terminou, então vamos continuar o jogo + memory.append([0]) + memory.append(np.copy(myList.reshape(-1))) + + completeGameMemory.append(memory) + + return completeGameMemory,reward + + + +if __name__ == "__main__": + tainNetwork() diff --git a/Cap13/03-Mini-Projeto/model/checkpoint b/Cap13/03-Mini-Projeto/model/checkpoint new file mode 100644 index 00000000..62aaccb9 --- /dev/null +++ b/Cap13/03-Mini-Projeto/model/checkpoint @@ -0,0 +1,6 @@ +model_checkpoint_path: "model.ckpt-298" +all_model_checkpoint_paths: "model.ckpt-294" +all_model_checkpoint_paths: "model.ckpt-295" +all_model_checkpoint_paths: "model.ckpt-296" +all_model_checkpoint_paths: "model.ckpt-297" +all_model_checkpoint_paths: "model.ckpt-298" diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-289.data-00000-of-00001 b/Cap13/03-Mini-Projeto/model/model.ckpt-289.data-00000-of-00001 new file mode 100644 index 00000000..fda331dc Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-289.data-00000-of-00001 differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-289.index b/Cap13/03-Mini-Projeto/model/model.ckpt-289.index new file mode 100644 index 00000000..ed8003f0 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-289.index differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-289.meta b/Cap13/03-Mini-Projeto/model/model.ckpt-289.meta new file mode 100644 index 00000000..d4ecbaad Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-289.meta differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-290.data-00000-of-00001 b/Cap13/03-Mini-Projeto/model/model.ckpt-290.data-00000-of-00001 new file mode 100644 index 00000000..9dddb0d4 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-290.data-00000-of-00001 differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-290.index b/Cap13/03-Mini-Projeto/model/model.ckpt-290.index new file mode 100644 index 00000000..aed1283c Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-290.index differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-290.meta b/Cap13/03-Mini-Projeto/model/model.ckpt-290.meta new file mode 100644 index 00000000..951c2252 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-290.meta differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-291.data-00000-of-00001 b/Cap13/03-Mini-Projeto/model/model.ckpt-291.data-00000-of-00001 new file mode 100644 index 00000000..20faf81e Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-291.data-00000-of-00001 differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-291.index b/Cap13/03-Mini-Projeto/model/model.ckpt-291.index new file mode 100644 index 00000000..e8732943 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-291.index differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-291.meta b/Cap13/03-Mini-Projeto/model/model.ckpt-291.meta new file mode 100644 index 00000000..56f192a9 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-291.meta differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-292.data-00000-of-00001 b/Cap13/03-Mini-Projeto/model/model.ckpt-292.data-00000-of-00001 new file mode 100644 index 00000000..07c92120 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-292.data-00000-of-00001 differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-292.index b/Cap13/03-Mini-Projeto/model/model.ckpt-292.index new file mode 100644 index 00000000..6f6543a1 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-292.index differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-292.meta b/Cap13/03-Mini-Projeto/model/model.ckpt-292.meta new file mode 100644 index 00000000..6d5c5591 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-292.meta differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-293.data-00000-of-00001 b/Cap13/03-Mini-Projeto/model/model.ckpt-293.data-00000-of-00001 new file mode 100644 index 00000000..007caa24 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-293.data-00000-of-00001 differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-293.index b/Cap13/03-Mini-Projeto/model/model.ckpt-293.index new file mode 100644 index 00000000..e1a71bdf Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-293.index differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-293.meta b/Cap13/03-Mini-Projeto/model/model.ckpt-293.meta new file mode 100644 index 00000000..25102173 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-293.meta differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-294.data-00000-of-00001 b/Cap13/03-Mini-Projeto/model/model.ckpt-294.data-00000-of-00001 new file mode 100644 index 00000000..d3b644b8 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-294.data-00000-of-00001 differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-294.index b/Cap13/03-Mini-Projeto/model/model.ckpt-294.index new file mode 100644 index 00000000..887958eb Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-294.index differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-294.meta b/Cap13/03-Mini-Projeto/model/model.ckpt-294.meta new file mode 100644 index 00000000..e32facd8 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-294.meta differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-295.data-00000-of-00001 b/Cap13/03-Mini-Projeto/model/model.ckpt-295.data-00000-of-00001 new file mode 100644 index 00000000..ed9a5bbd Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-295.data-00000-of-00001 differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-295.index b/Cap13/03-Mini-Projeto/model/model.ckpt-295.index new file mode 100644 index 00000000..e40f2a17 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-295.index differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-295.meta b/Cap13/03-Mini-Projeto/model/model.ckpt-295.meta new file mode 100644 index 00000000..2a24a4d9 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-295.meta differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-296.data-00000-of-00001 b/Cap13/03-Mini-Projeto/model/model.ckpt-296.data-00000-of-00001 new file mode 100644 index 00000000..0c727f29 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-296.data-00000-of-00001 differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-296.index b/Cap13/03-Mini-Projeto/model/model.ckpt-296.index new file mode 100644 index 00000000..b05660bb Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-296.index differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-296.meta b/Cap13/03-Mini-Projeto/model/model.ckpt-296.meta new file mode 100644 index 00000000..011fb38b Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-296.meta differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-297.data-00000-of-00001 b/Cap13/03-Mini-Projeto/model/model.ckpt-297.data-00000-of-00001 new file mode 100644 index 00000000..8132ff86 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-297.data-00000-of-00001 differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-297.index b/Cap13/03-Mini-Projeto/model/model.ckpt-297.index new file mode 100644 index 00000000..3c1858a5 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-297.index differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-297.meta b/Cap13/03-Mini-Projeto/model/model.ckpt-297.meta new file mode 100644 index 00000000..87ebd364 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-297.meta differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-298.data-00000-of-00001 b/Cap13/03-Mini-Projeto/model/model.ckpt-298.data-00000-of-00001 new file mode 100644 index 00000000..29f7bb61 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-298.data-00000-of-00001 differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-298.index b/Cap13/03-Mini-Projeto/model/model.ckpt-298.index new file mode 100644 index 00000000..5a6618b5 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-298.index differ diff --git a/Cap13/03-Mini-Projeto/model/model.ckpt-298.meta b/Cap13/03-Mini-Projeto/model/model.ckpt-298.meta new file mode 100644 index 00000000..d623aad9 Binary files /dev/null and b/Cap13/03-Mini-Projeto/model/model.ckpt-298.meta differ diff --git a/Cap13/03-Mini-Projeto/static/css/bootstrap.css b/Cap13/03-Mini-Projeto/static/css/bootstrap.css new file mode 100755 index 00000000..ed3905e0 --- /dev/null +++ b/Cap13/03-Mini-Projeto/static/css/bootstrap.css @@ -0,0 +1,6 @@ +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} +/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/Cap13/03-Mini-Projeto/static/css/style.css b/Cap13/03-Mini-Projeto/static/css/style.css new file mode 100755 index 00000000..4bc1c8b1 --- /dev/null +++ b/Cap13/03-Mini-Projeto/static/css/style.css @@ -0,0 +1,59 @@ +body { + width: 1200px; + margin: 16px auto; +} + +.myOptions { + margin: 15px 30px; + +} + +.game { + + width: 600px; + height: 350px; + margin: 0 auto; + //border: 1px solid black; + +} + +.options { + width: 200px; + height: inherit; + padding-top: 80px; + align-self: right; + float: right; + //border: 1px solid green; + +} + +.status-pl { + width: 700px; + height: auto; + margin: 0 auto; + + text-align: center; +} + +#myCanvas { + width: 300px; + height: 300px; + margin: 0 auto; + //border: 1px solid gray; + +} + +.canvas-container { + width: 300px; + height: 300px; + margin: 25px auto; + +} + +.canvas { + width: 398px; + height: inherit; + float: left; + //border: 1px solid gold; + +} \ No newline at end of file diff --git a/Cap13/03-Mini-Projeto/static/js/jquery.js b/Cap13/03-Mini-Projeto/static/js/jquery.js new file mode 100755 index 00000000..644d35e2 --- /dev/null +++ b/Cap13/03-Mini-Projeto/static/js/jquery.js @@ -0,0 +1,4 @@ +/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext;function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function E(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):D.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(E(this,a||[],!1))},not:function(a){return this.pushStack(E(this,a||[],!0))},is:function(a){return!!E(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var F,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||F,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:G.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),C.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};H.prototype=r.fn,F=r(d);var I=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function K(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return K(a,"nextSibling")},prev:function(a){return K(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return B(a,"iframe")?a.contentDocument:(B(a,"template")&&(a=a.content||a),r.merge([],a.childNodes))}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(J[a]||r.uniqueSort(e),I.test(a)&&e.reverse()),this.pushStack(e)}});var L=/[^\x20\t\r\n\f]+/g;function M(a){var b={};return r.each(a.match(L)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?M(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=e||a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function N(a){return a}function O(a){throw a}function P(a,b,c,d){var e;try{a&&r.isFunction(e=a.promise)?e.call(a).done(b).fail(c):a&&r.isFunction(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==O&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:N,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:N)),c[2][3].add(g(0,a,r.isFunction(d)?d:O))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(P(a,g.done(h(c)).resolve,g.reject,!b),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)P(e[c],h(c),g.reject);return g.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Q.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var R=r.Deferred();r.fn.ready=function(a){return R.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||R.resolveWith(d,[r]))}}),r.ready.then=R.then;function S(){d.removeEventListener("DOMContentLoaded",S), +a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,la=/^$|\/(?:java|ecma)script/i,ma={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ma.optgroup=ma.option,ma.tbody=ma.tfoot=ma.colgroup=ma.caption=ma.thead,ma.th=ma.td;function na(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&B(a,b)?r.merge([a],c):c}function oa(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=na(l.appendChild(f),"script"),j&&oa(g),c){k=0;while(f=g[k++])la.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ra=d.documentElement,sa=/^key/,ta=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ua=/^([^.]*)(?:\.(.+)|)/;function va(){return!0}function wa(){return!1}function xa(){try{return d.activeElement}catch(a){}}function ya(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ya(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=wa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(ra,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(L)||[""],j=b.length;while(j--)h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.hasData(a)&&W.get(a);if(q&&(i=q.events)){b=(b||"").match(L)||[""],j=b.length;while(j--)if(h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&W.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(W.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,Aa=/\s*$/g;function Ea(a,b){return B(a,"table")&&B(11!==b.nodeType?b:b.firstChild,"tr")?r(">tbody",a)[0]||a:a}function Fa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ga(a){var b=Ca.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ha(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(W.hasData(a)&&(f=W.access(a),g=W.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c1&&"string"==typeof q&&!o.checkClone&&Ba.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ja(f,b,c,d)});if(m&&(e=qa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(na(e,"script"),Fa),i=h.length;l")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=na(h),f=na(a),d=0,e=f.length;d0&&oa(g,!i&&na(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(U(c)){if(b=c[W.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[W.expando]=void 0}c[X.expando]&&(c[X.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ka(this,a,!0)},remove:function(a){return Ka(this,a)},text:function(a){return T(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.appendChild(a)}})},prepend:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(na(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return T(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Aa.test(a)&&!ma[(ka.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c1)}});function _a(a,b,c,d,e){return new _a.prototype.init(a,b,c,d,e)}r.Tween=_a,_a.prototype={constructor:_a,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=_a.propHooks[this.prop];return a&&a.get?a.get(this):_a.propHooks._default.get(this)},run:function(a){var b,c=_a.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):_a.propHooks._default.set(this),this}},_a.prototype.init.prototype=_a.prototype,_a.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},_a.propHooks.scrollTop=_a.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=_a.prototype.init,r.fx.step={};var ab,bb,cb=/^(?:toggle|show|hide)$/,db=/queueHooks$/;function eb(){bb&&(d.hidden===!1&&a.requestAnimationFrame?a.requestAnimationFrame(eb):a.setTimeout(eb,r.fx.interval),r.fx.tick())}function fb(){return a.setTimeout(function(){ab=void 0}),ab=r.now()}function gb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ca[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function hb(a,b,c){for(var d,e=(kb.tweeners[b]||[]).concat(kb.tweeners["*"]),f=0,g=e.length;f1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?lb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b), +null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),lb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=mb[b]||r.find.attr;mb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=mb[g],mb[g]=e,e=null!=c(a,b,d)?g:null,mb[g]=f),e}});var nb=/^(?:input|select|textarea|button)$/i,ob=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return T(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):nb.test(a.nodeName)||ob.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function pb(a){var b=a.match(L)||[];return b.join(" ")}function qb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,qb(this)))});if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,qb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,qb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(L)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=qb(this),b&&W.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":W.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+pb(qb(c))+" ").indexOf(b)>-1)return!0;return!1}});var rb=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:pb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var sb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!sb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,sb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(W.get(h,"events")||{})[b.type]&&W.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&U(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!U(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=W.access(d,b);e||d.addEventListener(a,c,!0),W.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=W.access(d,b)-1;e?W.access(d,b,e):(d.removeEventListener(a,c,!0),W.remove(d,b))}}});var tb=a.location,ub=r.now(),vb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(Array.isArray(b))r.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(Array.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!ja.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:Array.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}});var Bb=/%20/g,Cb=/#.*$/,Db=/([?&])_=[^&]*/,Eb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Fb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Gb=/^(?:GET|HEAD)$/,Hb=/^\/\//,Ib={},Jb={},Kb="*/".concat("*"),Lb=d.createElement("a");Lb.href=tb.href;function Mb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(L)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nb(a,b,c,d){var e={},f=a===Jb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Ob(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Pb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Qb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:tb.href,type:"GET",isLocal:Fb.test(tb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Ob(Ob(a,r.ajaxSettings),b):Ob(r.ajaxSettings,a)},ajaxPrefilter:Mb(Ib),ajaxTransport:Mb(Jb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Eb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||tb.href)+"").replace(Hb,tb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(L)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Lb.protocol+"//"+Lb.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Nb(Ib,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Gb.test(o.type),f=o.url.replace(Cb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(Bb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(vb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Db,"$1"),n=(vb.test(f)?"&":"?")+"_="+ub++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Kb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Nb(Jb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Pb(o,y,d)),v=Qb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Rb={0:200,1223:204},Sb=r.ajaxSettings.xhr();o.cors=!!Sb&&"withCredentials"in Sb,o.ajax=Sb=!!Sb,r.ajaxTransport(function(b){var c,d;if(o.cors||Sb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Rb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r(" + + + + \ No newline at end of file diff --git a/Cap14/DSA-Python-Cap14-01-WebScraping.ipynb b/Cap14/DSA-Python-Cap14-01-WebScraping.ipynb new file mode 100644 index 00000000..13b57795 --- /dev/null +++ b/Cap14/DSA-Python-Cap14-01-WebScraping.ipynb @@ -0,0 +1,433 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Data Science Academy - Python Fundamentos - Capítulo 14\n", + "\n", + "## Download: http://github.com/dsacademybr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Web Scraping" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "# Biblioteca usada para requisitar uma página de um web site\n", + "import urllib.request" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "# Definimos a url\n", + "# Verifique as permissões em https://www.python.org/robots.txt\n", + "with urllib.request.urlopen(\"https://www.python.org\") as url:\n", + " page = url.read()" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "b'\\n\\n\\n\\n \\n\\n\\n \\n \\n\\n \\n\\n \\n \\n \\n \\n \\n\\n \\n \\n \\n \\n \\n\\n \\n\\n \\n \\n \\n\\n \\n\\n \\n \\n \\n \\n \\n \\n \\n\\n \\n \\n \\n \\n\\n Welcome to Python.org\\n\\n \\n \\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n \\n\\n \\n \\n \\n \\n\\n \\n\\n \\n \\n\\n \\n \\n \\n\\n\\n\\n\\n
\\n\\n
\\n

Notice: While Javascript is not essential for this website, your interaction with the content will be limited. Please turn Javascript on for the full experience.

\\n
\\n\\n \\n\\n \\n
\\n\\n \\n\\n
\\n\\n \\n
\\n
\\n\\n

\\n \"python™\"\\n

\\n\\n
\\n\\n \\n Menu
\\n
\\n\\n \\n\\n \\n \\n\\n \\n\\n \\n \\n\\n
\\n
\\n \\n
\\n \\n
\\n \\n
\\n\\n
\\n\\n \\n\\n
\\n \\n
\\n\\n \\n\\n
    \\n \\n
  • \\n
    # Python 3: Fibonacci series up to n\\r\\n>>> def fib(n):\\r\\n>>>     a, b = 0, 1\\r\\n>>>     while a < n:\\r\\n>>>         print(a, end=\\' \\')\\r\\n>>>         a, b = b, a+b\\r\\n>>>     print()\\r\\n>>> fib(1000)\\r\\n0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
    \\n

    Functions Defined

    \\r\\n

    The core of extensible programming is defining functions. Python allows mandatory and optional arguments, keyword arguments, and even arbitrary argument lists. More about defining functions in Python 3

    \\n
  • \\n \\n
  • \\n
    # Python 3: List comprehensions\\r\\n>>> fruits = [\\'Banana\\', \\'Apple\\', \\'Lime\\']\\r\\n>>> loud_fruits = [fruit.upper() for fruit in fruits]\\r\\n>>> print(loud_fruits)\\r\\n[\\'BANANA\\', \\'APPLE\\', \\'LIME\\']\\r\\n\\r\\n# List and the enumerate function\\r\\n>>> list(enumerate(fruits))\\r\\n[(0, \\'Banana\\'), (1, \\'Apple\\'), (2, \\'Lime\\')]
    \\n

    Compound Data Types

    \\r\\n

    Lists (known as arrays in other languages) are one of the compound data types that Python understands. Lists can be indexed, sliced and manipulated with other built-in functions. More about lists in Python 3

    \\n
  • \\n \\n
  • \\n
    # Python 3: Simple arithmetic\\r\\n>>> 1 / 2\\r\\n0.5\\r\\n>>> 2 ** 3\\r\\n8\\r\\n>>> 17 / 3  # classic division returns a float\\r\\n5.666666666666667\\r\\n>>> 17 // 3  # floor division\\r\\n5
    \\n

    Intuitive Interpretation

    \\r\\n

    Calculations are simple with Python, and expression syntax is straightforward: the operators +, -, * and / work as expected; parentheses () can be used for grouping. More about simple math functions in Python 3.

    \\n
  • \\n \\n
  • \\n
    # Python 3: Simple output (with Unicode)\\r\\n>>> print(\"Hello, I\\'m Python!\")\\r\\nHello, I\\'m Python!\\r\\n\\r\\n# Input, assignment\\r\\n>>> name = input(\\'What is your name?\\\\n\\')\\r\\n>>> print(\\'Hi, %s.\\' % name)\\r\\nWhat is your name?\\r\\nPython\\r\\nHi, Python.
    \\n

    Quick & Easy to Learn

    \\r\\n

    Experienced programmers in any other language can pick up Python very quickly, and beginners find the clean syntax and indentation structure easy to learn. Whet your appetite with our Python 3 overview.

    \\r\\n
    \\n
  • \\n \\n
  • \\n
    # For loop on a list\\r\\n>>> numbers = [2, 4, 6, 8]\\r\\n>>> product = 1\\r\\n>>> for number in numbers:\\r\\n...    product = product * number\\r\\n... \\r\\n>>> print(\\'The product is:\\', product)\\r\\nThe product is: 384
    \\n

    All the Flow You’d Expect

    \\r\\n

    Python knows the usual control flow statements that other languages speak — if, for, while and range — with some of its own twists, of course. More control flow tools in Python 3

    \\n
  • \\n \\n
\\n
\\n\\n\\n
\\n\\n \\n
\\n

Python is a programming language that lets you work quickly and integrate systems more effectively. Learn More

\\n
\\n\\n\\n
\\n
\\n\\n
\\n \\n
\\n\\n
\\n\\n \\n \\n\\n \\n\\n \\n\\n
\\n\\n
\\n

Get Started

\\r\\n

Whether you\\'re new to programming or an experienced developer, it\\'s easy to learn and use Python.

\\r\\n

Start with our Beginner’s Guide

\\n
\\n\\n
\\n

Download

\\n

Python source code and installers are available for download for all versions!

\\n

Latest: Python 3.7.0

\\n
\\n\\n
\\n

Docs

\\r\\n

Documentation for Python\\'s standard library, along with tutorials and guides, are available online.

\\r\\n

docs.python.org

\\n
\\n\\n
\\n

Jobs

\\r\\n

Looking for work or have a Python related position that you\\'re trying to hire for? Our relaunched community-run job board is the place to go.

\\r\\n

jobs.python.org

\\n
\\n\\n
\\n\\n
\\n\\n \\n\\n
\\n \\n
\\n \\n

Upcoming Events

\\n

More

\\n \\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n\\n \\n\\n
\\n
\\n

Use Python for…

\\r\\n

More

\\r\\n\\r\\n\\r\\n\\n
\\n
\\n\\n
\\n\\n \\n
\\n\\n

\\n >>> Python Enhancement Proposals (PEPs): The future of Python is discussed here.\\n RSS\\n

\\n\\n\\n \\n \\n
\\n\\n
\\n\\n
\\n \\n

\\r\\n >>> Python Software Foundation\\r\\n

\\r\\n

The mission of the Python Software Foundation is to promote, protect, and advance the Python programming language, and to support and facilitate the growth of a diverse and international community of Python programmers. Learn more

\\r\\n

\\r\\n Become a Member\\r\\n Donate to the PSF\\r\\n

\\n
\\n\\n\\n\\n\\n
\\n\\n \\n \\n\\n \\n \\n\\n\\n
\\n
\\n\\n \\n \\n\\n
\\n\\n \\n \\n \\n\\n \\n\\n \\n \\n\\n \\n\\n \\n\\n \\n\\n \\n \\n\\n\\n\\n'\n" + ] + } + ], + "source": [ + "# Imprime o conteúdo\n", + "print(page)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "from bs4 import BeautifulSoup" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "# Analise o html na variável 'page' e armazene-o no formato Beautiful Soup\n", + "soup = BeautifulSoup(page, \"html.parser\")" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Welcome to Python.org" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "soup.title" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'Welcome to Python.org'" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "soup.title.string" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Skip to content" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "soup.a " + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[Skip to content,\n", + " \n", + " Close\n", + " ,\n", + " Python,\n", + " PSF,\n", + " Docs,\n", + " PyPI,\n", + " Jobs,\n", + " Community,\n", + " \n", + " The Python Network\n", + " ,\n", + " \"python™\",\n", + " Menu,\n", + " A A,\n", + " Smaller,\n", + " Larger,\n", + " Reset,\n", + " Socialize,\n", + " Google+,\n", + " Facebook,\n", + " Twitter,\n", + " Chat on IRC,\n", + " Sign In,\n", + " Sign Up / Register,\n", + " Sign In,\n", + " About,\n", + " Applications,\n", + " Quotes,\n", + " Getting Started,\n", + " Help,\n", + " Python Brochure,\n", + " Downloads,\n", + " All releases,\n", + " Source code,\n", + " Windows,\n", + " Mac OS X,\n", + " Other Platforms,\n", + " License,\n", + " Alternative Implementations,\n", + " Documentation,\n", + " Docs,\n", + " Audio/Visual Talks,\n", + " Beginner's Guide,\n", + " Developer's Guide,\n", + " FAQ,\n", + " Non-English Docs,\n", + " PEP Index,\n", + " Python Books,\n", + " Python Essays,\n", + " Community,\n", + " Diversity,\n", + " Mailing Lists,\n", + " IRC,\n", + " Forums,\n", + " Python Conferences,\n", + " Special Interest Groups,\n", + " Python Wiki,\n", + " Python Logo,\n", + " Merchandise,\n", + " Community Awards,\n", + " Code of Conduct,\n", + " Success Stories,\n", + " Arts,\n", + " Business,\n", + " Education,\n", + " Engineering,\n", + " Government,\n", + " Scientific,\n", + " Software Development,\n", + " News,\n", + " Python News,\n", + " Community News,\n", + " PSF News,\n", + " PyCon News,\n", + " Events,\n", + " Python Events,\n", + " User Group Events,\n", + " Python Events Archive,\n", + " User Group Events Archive,\n", + " Submit an Event,\n", + " >_\n", + " Launch Interactive Shell\n", + " ,\n", + " More about defining functions in Python 3,\n", + " More about lists in Python 3,\n", + " More about simple math functions in Python 3,\n", + " Whet your appetite,\n", + " More control flow tools in Python 3,\n", + " Learn More,\n", + " Start with our Beginner’s Guide,\n", + " Python 3.7.0,\n", + " docs.python.org,\n", + " jobs.python.org,\n", + " More,\n", + " Python 3.7.0 is now available (and so is 3.6.6)! On behalf of ...,\n", + " Python 3.7.0rc1 and 3.6.6rc1 are now available. 3.7.0rc1 is the final planned release preview of Python 3.7, ...,\n", + " A 3.7 update: Python 3.7.0b5 is now the final beta preview of Python 3.7, the ...,\n", + " Python 3.7.0b4 is the final beta preview of Python 3.7, the next feature release of ...,\n", + " The bugfix release Python 2.7.15 is now available for download.,\n", + " More,\n", + " PyHEP 2018,\n", + " Django Girls Bo,\n", + " SciPy 2018,\n", + " Django Girls Barranquilla,\n", + " Django Girls Kampala,\n", + " More,\n", + " ILM runs a batch processing environment capable of modeling, rendering and compositing tens of thousands of motion picture frames per day. Thousands of machines running Linux, IRIX, Compaq Tru64, OS X, Solaris, and Windows join together to provide a production pipeline used by ~800 users daily. Speed of development is key, and Python was a faster way to code (and re-code) the programs that control this production pipeline.,\n", + " Industrial Light & Magic Runs on Python,\n", + " More,\n", + " Django,\n", + " Pyramid,\n", + " Bottle,\n", + " Tornado,\n", + " Flask,\n", + " web2py,\n", + " tkInter,\n", + " PyGObject,\n", + " PyQt,\n", + " PySide,\n", + " Kivy,\n", + " wxPython,\n", + " SciPy,\n", + " Pandas,\n", + " IPython,\n", + " Buildbot,\n", + " Trac,\n", + " Roundup,\n", + " Ansible,\n", + " Salt,\n", + " OpenStack,\n", + " Python Enhancement Proposals (PEPs),\n", + " RSS,\n", + " Python Software Foundation,\n", + " Learn more,\n", + " Become a Member,\n", + " Donate to the PSF,\n", + " Back to Top,\n", + " About,\n", + " Applications,\n", + " Quotes,\n", + " Getting Started,\n", + " Help,\n", + " Python Brochure,\n", + " Downloads,\n", + " All releases,\n", + " Source code,\n", + " Windows,\n", + " Mac OS X,\n", + " Other Platforms,\n", + " License,\n", + " Alternative Implementations,\n", + " Documentation,\n", + " Docs,\n", + " Audio/Visual Talks,\n", + " Beginner's Guide,\n", + " Developer's Guide,\n", + " FAQ,\n", + " Non-English Docs,\n", + " PEP Index,\n", + " Python Books,\n", + " Python Essays,\n", + " Community,\n", + " Diversity,\n", + " Mailing Lists,\n", + " IRC,\n", + " Forums,\n", + " Python Conferences,\n", + " Special Interest Groups,\n", + " Python Wiki,\n", + " Python Logo,\n", + " Merchandise,\n", + " Community Awards,\n", + " Code of Conduct,\n", + " Success Stories,\n", + " Arts,\n", + " Business,\n", + " Education,\n", + " Engineering,\n", + " Government,\n", + " Scientific,\n", + " Software Development,\n", + " News,\n", + " Python News,\n", + " Community News,\n", + " PSF News,\n", + " PyCon News,\n", + " Events,\n", + " Python Events,\n", + " User Group Events,\n", + " Python Events Archive,\n", + " User Group Events Archive,\n", + " Submit an Event,\n", + " Contributing,\n", + " Developer's Guide,\n", + " Issue Tracker,\n", + " python-dev list,\n", + " Core Mentorship,\n", + " Back to Top,\n", + " Help & General Contact,\n", + " Diversity Initiatives,\n", + " Submit Website Bug,\n", + " Status ,\n", + " Python Software Foundation,\n", + " Legal Statements,\n", + " Privacy Policy,\n", + " Powered by Rackspace]" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "soup.find_all(\"a\")" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [], + "source": [ + "tables = soup.find('table')" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "

Industrial Light & Magic Runs on Python by Tim Fortenberry

\n" + ] + } + ], + "source": [ + "print(tables)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Fim" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + ] + } + ], + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Python-Express\303\265es-Regulares.ipynb" b/Cap14/DSA-Python-Cap14-02-Expressoes-Regulares.ipynb similarity index 92% rename from "JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Python-Express\303\265es-Regulares.ipynb" rename to Cap14/DSA-Python-Cap14-02-Expressoes-Regulares.ipynb index da2bef6d..33631fcc 100644 --- "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Python-Express\303\265es-Regulares.ipynb" +++ b/Cap14/DSA-Python-Cap14-02-Expressoes-Regulares.ipynb @@ -4,9 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 7\n", - "\n", - "## Download: http://github.com/dsacademybr" + "# Data Science Academy - Python Fundamentos - Capítulo 14" ] }, { @@ -23,9 +21,7 @@ { "cell_type": "code", "execution_count": 1, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ "# Importando o módulo re (regular expression)\n", @@ -36,9 +32,7 @@ { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# Lista de termos para busca\n", @@ -48,12 +42,10 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ - "# Text to parse\n", + "# Texto para o parse\n", "texto = 'Existem muitos desafios para o Big Data. O primeiro deles é a coleta dos dados, pois fala-se aqui de '\\\n", "'enormes quantidades sendo geradas em uma taxa maior do que um servidor comum seria capaz de processar e armazenar. '\\\n", "'O segundo desafio é justamente o de processar essas informações. Com elas então distribuídas, a aplicação deve ser '\\\n", @@ -65,9 +57,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -112,9 +102,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# Termo usado para dividir uma string\n", @@ -124,9 +112,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "frase = 'Qual o domínio de alguém com o e-mail: aluno@gmail.com'" @@ -135,9 +121,7 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -158,9 +142,7 @@ { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "def encontra_padrao(lista, frase):\n", @@ -174,9 +156,7 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ "frase_padrao = 'zLzL..zzzLLL...zLLLzLLL...LzLz...dzzzzz...zLLLL'\n", @@ -192,9 +172,7 @@ { "cell_type": "code", "execution_count": 10, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -229,10 +207,8 @@ }, { "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, + "execution_count": 11, + "metadata": {}, "outputs": [], "source": [ "frase = 'Esta é uma string com pontuação. Isso pode ser um problema quando fazemos mineração de dados em busca '\\\n", @@ -241,10 +217,8 @@ }, { "cell_type": "code", - "execution_count": 14, - "metadata": { - "collapsed": false - }, + "execution_count": 12, + "metadata": {}, "outputs": [ { "data": { @@ -282,7 +256,7 @@ " 'frase']" ] }, - "execution_count": 14, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -297,10 +271,8 @@ }, { "cell_type": "code", - "execution_count": 15, - "metadata": { - "collapsed": false - }, + "execution_count": 13, + "metadata": {}, "outputs": [], "source": [ "frase = 'Esta é uma frase de exemplo. Vamos verificar quais padrões serão encontrados.'\n", @@ -313,10 +285,8 @@ }, { "cell_type": "code", - "execution_count": 16, - "metadata": { - "collapsed": false - }, + "execution_count": 14, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -393,10 +363,8 @@ }, { "cell_type": "code", - "execution_count": 17, - "metadata": { - "collapsed": false - }, + "execution_count": 15, + "metadata": {}, "outputs": [ { "data": { @@ -404,7 +372,7 @@ "'\\\\b'" ] }, - "execution_count": 17, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -418,10 +386,8 @@ }, { "cell_type": "code", - "execution_count": 18, - "metadata": { - "collapsed": false - }, + "execution_count": 16, + "metadata": {}, "outputs": [ { "data": { @@ -429,7 +395,7 @@ "'\\x08'" ] }, - "execution_count": 18, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -440,10 +406,8 @@ }, { "cell_type": "code", - "execution_count": 19, - "metadata": { - "collapsed": false - }, + "execution_count": 17, + "metadata": {}, "outputs": [], "source": [ "frase = 'Esta é uma string com alguns números, como 1287 e um símbolo #hashtag'\n", @@ -459,10 +423,8 @@ }, { "cell_type": "code", - "execution_count": 20, - "metadata": { - "collapsed": false - }, + "execution_count": 18, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -510,7 +472,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" ] } ], @@ -530,9 +492,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.6.5" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git a/Cap14/DSA-Python-Cap14-03-WebScraping-Pandas.ipynb b/Cap14/DSA-Python-Cap14-03-WebScraping-Pandas.ipynb new file mode 100644 index 00000000..49cee5d1 --- /dev/null +++ b/Cap14/DSA-Python-Cap14-03-WebScraping-Pandas.ipynb @@ -0,0 +1,5085 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Data Science Academy - Python Fundamentos - Capítulo 14\n", + "\n", + "## Download: http://github.com/dsacademybr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Web Scraping e Pandas" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "# Imports\n", + "import pandas as pd\n", + "import requests\n", + "from bs4 import BeautifulSoup \n", + "from tabulate import tabulate" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "# URL\n", + "res = requests.get(\"http://www.nationmaster.com/country-info/stats/Media/Internet-users\")" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "# Parser\n", + "soup = BeautifulSoup(res.content,'lxml')" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "# Extrai a tabela do código HTML\n", + "table = soup.find_all('table')[0] " + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
#COUNTRYAMOUNTDATEGRAPHHISTORY
1\n", + "China\n", + "\r\n", + " 389 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
2\n", + "United States\n", + "\r\n", + " 245 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
3\n", + "Japan\n", + "\r\n", + " 99.18 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Group of 7 countries (G7) average\n", + "(profile)\n", + "\r\n", + " 80.32 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
4\n", + "Brazil\n", + "\r\n", + " 75.98 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
5\n", + "Germany\n", + "\r\n", + " 65.12 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
6\n", + "India\n", + "\r\n", + " 61.34 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
7\n", + "Russia\n", + "\r\n", + " 59.7 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Non-religious countries average\n", + "(profile)\n", + "\r\n", + " 51.56 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
8\n", + "United Kingdom\n", + "\r\n", + " 51.44 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
9\n", + "France\n", + "\r\n", + " 44.63 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
10\n", + "Nigeria\n", + "\r\n", + " 43.99 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
11\n", + "South Korea\n", + "\r\n", + " 39.4 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
12\n", + "Turkey\n", + "\r\n", + " 35 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Emerging markets average\n", + "(profile)\n", + "\r\n", + " 32.99 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
13\n", + "Mexico\n", + "\r\n", + " 31.02 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
14\n", + "Italy\n", + "\r\n", + " 30.03 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
15\n", + "Spain\n", + "\r\n", + " 29.09 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
16\n", + "Canada\n", + "\r\n", + " 26.96 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "East Asia and Pacific average\n", + "(profile)\n", + "\r\n", + " 25.43 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "High income OECD countries average\n", + "(profile)\n", + "\r\n", + " 24.75 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Cold countries average\n", + "(profile)\n", + "\r\n", + " 23.69 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
17\n", + "Vietnam\n", + "\r\n", + " 23.38 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
18\n", + "Colombia\n", + "\r\n", + " 22.54 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
19\n", + "Poland\n", + "\r\n", + " 22.45 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
20\n", + "Pakistan\n", + "\r\n", + " 20.43 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
21\n", + "Egypt\n", + "\r\n", + " 20.14 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
22\n", + "Indonesia\n", + "\r\n", + " 20 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Heavily indebted countries average\n", + "(profile)\n", + "\r\n", + " 17.81 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
23\n", + "Thailand\n", + "\r\n", + " 17.48 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "South Asia average\n", + "(profile)\n", + "\r\n", + " 16.69 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
24\n", + "Taiwan\n", + "\r\n", + " 16.15 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
25\n", + "Australia\n", + "\r\n", + " 15.81 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
26\n", + "Malaysia\n", + "\r\n", + " 15.36 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
27\n", + "Ukraine\n", + "\r\n", + " 15.3 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
28\n", + "Netherlands\n", + "\r\n", + " 14.87 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
29\n", + "Argentina\n", + "\r\n", + " 13.69 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Religious countries average\n", + "(profile)\n", + "\r\n", + " 13.59 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
30\n", + "Morocco\n", + "\r\n", + " 13.21 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Eurozone average\n", + "(profile)\n", + "\r\n", + " 12.48 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "NATO countries average\n", + "(profile)\n", + "\r\n", + " 12.27 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "European Union average\n", + "(profile)\n", + "\r\n", + " 10.69 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Former British colonies average\n", + "(profile)\n", + "\r\n", + " 10.17 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
31\n", + "Saudi Arabia\n", + "\r\n", + " 9.77 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Europe average\n", + "(profile)\n", + "\r\n", + " 9.61 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Catholic countries average\n", + "(profile)\n", + "\r\n", + " 9.37 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
32\n", + "Peru\n", + "\r\n", + " 9.16 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
33\n", + "Venezuela\n", + "\r\n", + " 8.92 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Eastern Europe average\n", + "(profile)\n", + "\r\n", + " 8.4 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
34\n", + "Sweden\n", + "\r\n", + " 8.4 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
35\n", + "Philippines\n", + "\r\n", + " 8.28 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Christian countries average\n", + "(profile)\n", + "\r\n", + " 8.26 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
36\n", + "Iran\n", + "\r\n", + " 8.21 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
37\n", + "Belgium\n", + "\r\n", + " 8.11 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
38\n", + "Romania\n", + "\r\n", + " 7.79 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "South and Central Asia average\n", + "(profile)\n", + "\r\n", + " 7.6 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "OPEC countries average\n", + "(profile)\n", + "\r\n", + " 7.45 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
39\n", + "Chile\n", + "\r\n", + " 7.01 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
40\n", + "Czech Republic\n", + "\r\n", + " 6.68 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
41\n", + "Hungary\n", + "\r\n", + " 6.18 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
42\n", + "Austria\n", + "\r\n", + " 6.14 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Former Spanish colonies average\n", + "(profile)\n", + "\r\n", + " 6.14 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
43\n", + "Switzerland\n", + "\r\n", + " 5.74 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Latin America and Caribbean average\n", + "(profile)\n", + "\r\n", + " 5.71 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "failed states average\n", + "(profile)\n", + "\r\n", + " 5.53 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
44\n", + "Kazakhstan\n", + "\r\n", + " 5.3 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
45\n", + "Portugal\n", + "\r\n", + " 5.17 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Potential Future EU Members average\n", + "(profile)\n", + "\r\n", + " 5.1 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Muslim countries average\n", + "(profile)\n", + "\r\n", + " 5.01 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
46\n", + "Greece\n", + "\r\n", + " 4.97 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Former Soviet republics average\n", + "(profile)\n", + "\r\n", + " 4.93 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
47\n", + "Hong Kong\n", + "\r\n", + " 4.87 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
48\n", + "Denmark\n", + "\r\n", + " 4.75 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
49\n", + "Algeria\n", + "\r\n", + " 4.7 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
50\n", + "Uzbekistan\n", + "\r\n", + " 4.69 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Hot countries average\n", + "(profile)\n", + "\r\n", + " 4.66 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
51\n", + "Israel\n", + "\r\n", + " 4.53 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Middle Eastern and North Africa average\n", + "(profile)\n", + "\r\n", + " 4.51 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
52\n", + "Finland\n", + "\r\n", + " 4.48 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
53\n", + "Syria\n", + "\r\n", + " 4.47 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
54\n", + "Belarus\n", + "\r\n", + " 4.44 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
55\n", + "Norway\n", + "\r\n", + " 4.43 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
56\n", + "South Africa\n", + "\r\n", + " 4.42 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
57\n", + "Sudan\n", + "\r\n", + " 4.2 million\r\n", + " 2008\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
58\n", + "Serbia\n", + "\r\n", + " 4.11 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
59\n", + "Slovakia\n", + "\r\n", + " 4.06 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
60\n", + "Kenya\n", + "\r\n", + " 4 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
61\n", + "Azerbaijan\n", + "\r\n", + " 3.69 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
62\n", + "Tunisia\n", + "\r\n", + " 3.5 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
63\n", + "United Arab Emirates\n", + "\r\n", + " 3.45 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Tourist destinations average\n", + "(profile)\n", + "\r\n", + " 3.42 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
64\n", + "New Zealand\n", + "\r\n", + " 3.4 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
65\n", + "Bulgaria\n", + "\r\n", + " 3.4 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
66\n", + "Ecuador\n", + "\r\n", + " 3.35 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
67\n", + "Singapore\n", + "\r\n", + " 3.23 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
68\n", + "Uganda\n", + "\r\n", + " 3.2 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
69\n", + "Ireland\n", + "\r\n", + " 3.04 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
70\n", + "Dominican Republic\n", + "\r\n", + " 2.7 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
71\n", + "Yemen\n", + "\r\n", + " 2.35 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Former French colonies average\n", + "(profile)\n", + "\r\n", + " 2.31 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
72\n", + "Guatemala\n", + "\r\n", + " 2.28 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
73\n", + "Croatia\n", + "\r\n", + " 2.24 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
74\n", + "Kyrgyzstan\n", + "\r\n", + " 2.19 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
75\n", + "Lithuania\n", + "\r\n", + " 2.1 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
76\n", + "Senegal\n", + "\r\n", + " 1.82 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
77\n", + "Sri Lanka\n", + "\r\n", + " 1.78 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Landlocked countries average\n", + "(profile)\n", + "\r\n", + " 1.64 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
78\n", + "Jordan\n", + "\r\n", + " 1.64 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n", + "Sub-Saharan Africa average\n", + "(profile)\n", + "\r\n", + " 1.62 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
79\n", + "Cuba\n", + "\r\n", + " 1.61 million\r\n", + " 2013\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
80\n", + "Jamaica\n", + "\r\n", + " 1.58 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
81\n", + "Latvia\n", + "\r\n", + " 1.5 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
82\n", + "Costa Rica\n", + "\r\n", + " 1.49 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
83\n", + "Oman\n", + "\r\n", + " 1.47 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
84\n", + "Bosnia and Herzegovina\n", + "\r\n", + " 1.44 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
85\n", + "Zimbabwe\n", + "\r\n", + " 1.42 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
86\n", + "Uruguay\n", + "\r\n", + " 1.41 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=87\n", + "Gaza Strip\n", + "\r\n", + " 1.38 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=87\n", + "West Bank\n", + "\r\n", + " 1.38 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=89\n", + "Georgia\n", + "\r\n", + " 1.3 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=89\n", + "Albania\n", + "\r\n", + " 1.3 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
91\n", + "Slovenia\n", + "\r\n", + " 1.3 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
92\n", + "Ghana\n", + "\r\n", + " 1.3 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
93\n", + "Moldova\n", + "\r\n", + " 1.29 million\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
94\n", + "Paraguay\n", + "\r\n", + " 1.1 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
95\n", + "Bolivia\n", + "\r\n", + " 1.1 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
96\n", + "Kuwait\n", + "\r\n", + " 1.1 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
97\n", + "Republic of Macedonia\n", + "\r\n", + " 1.06 million\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=98\n", + "Afghanistan\n", + "\r\n", + " 1,000,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=98\n", + "Lebanon\n", + "\r\n", + " 1,000,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=98\n", + "Puerto Rico\n", + "\r\n", + " 1,000,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=98\n", + "Haiti\n", + "\r\n", + " 1,000,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
102\n", + "Estonia\n", + "\r\n", + " 969,700\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
103\n", + "Cote d'Ivoire\n", + "\r\n", + " 967,300\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
104\n", + "Panama\n", + "\r\n", + " 959,800\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
105\n", + "Zambia\n", + "\r\n", + " 816,200\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
106\n", + "Cameroon\n", + "\r\n", + " 749,600\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
107\n", + "El Salvador\n", + "\r\n", + " 746,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
108\n", + "Honduras\n", + "\r\n", + " 731,700\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
109\n", + "Malawi\n", + "\r\n", + " 716,400\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
110\n", + "Tajikistan\n", + "\r\n", + " 700,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
111\n", + "Tanzania\n", + "\r\n", + " 678,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
112\n", + "Bangladesh\n", + "\r\n", + " 617,300\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
113\n", + "Mozambique\n", + "\r\n", + " 613,600\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
114\n", + "Angola\n", + "\r\n", + " 606,700\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
115\n", + "Trinidad and Tobago\n", + "\r\n", + " 593,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
116\n", + "Nepal\n", + "\r\n", + " 577,800\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
117\n", + "Qatar\n", + "\r\n", + " 563,800\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
118\n", + "Rwanda\n", + "\r\n", + " 450,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
119\n", + "Ethiopia\n", + "\r\n", + " 447,300\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
120\n", + "Cyprus\n", + "\r\n", + " 433,800\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
121\n", + "Luxembourg\n", + "\r\n", + " 424,500\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
122\n", + "Bahrain\n", + "\r\n", + " 419,500\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
123\n", + "Togo\n", + "\r\n", + " 356,300\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
124\n", + "Libya\n", + "\r\n", + " 353,900\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
125\n", + "Mongolia\n", + "\r\n", + " 330,000\r\n", + " 2008\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
126\n", + "Iraq\n", + "\r\n", + " 325,900\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
127\n", + "Madagascar\n", + "\r\n", + " 319,900\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
128\n", + "Brunei\n", + "\r\n", + " 314,900\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
129\n", + "Iceland\n", + "\r\n", + " 301,600\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
130\n", + "Laos\n", + "\r\n", + " 300,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=131\n", + "Mauritius\n", + "\r\n", + " 290,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=131\n", + "Democratic Republic of the Congo\n", + "\r\n", + " 290,000\r\n", + " 2008\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
133\n", + "Montenegro\n", + "\r\n", + " 280,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
134\n", + "Macau\n", + "\r\n", + " 270,200\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
135\n", + "Mali\n", + "\r\n", + " 249,800\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
136\n", + "Congo, Republic of the\n", + "\r\n", + " 245,200\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
137\n", + "Malta\n", + "\r\n", + " 240,600\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
138\n", + "Armenia\n", + "\r\n", + " 208,200\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
139\n", + "Benin\n", + "\r\n", + " 200,100\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
140\n", + "Eritrea\n", + "\r\n", + " 200,000\r\n", + " 2008\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
141\n", + "Nicaragua\n", + "\r\n", + " 199,800\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
142\n", + "Guyana\n", + "\r\n", + " 189,600\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
143\n", + "Barbados\n", + "\r\n", + " 188,000\r\n", + " 2008\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
144\n", + "Burkina Faso\n", + "\r\n", + " 178,100\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
145\n", + "Chad\n", + "\r\n", + " 168,100\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
146\n", + "Suriname\n", + "\r\n", + " 163,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
147\n", + "Burundi\n", + "\r\n", + " 157,800\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
148\n", + "Cape Verde\n", + "\r\n", + " 150,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
149\n", + "Saint Lucia\n", + "\r\n", + " 142,900\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
150\n", + "The Gambia\n", + "\r\n", + " 130,100\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
151\n", + "Namibia\n", + "\r\n", + " 127,500\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
152\n", + "Papua New Guinea\n", + "\r\n", + " 125,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=153\n", + "Botswana\n", + "\r\n", + " 120,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=153\n", + "French Polynesia\n", + "\r\n", + " 120,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
155\n", + "Niger\n", + "\r\n", + " 115,900\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
156\n", + "The Bahamas\n", + "\r\n", + " 115,800\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
157\n", + "Fiji\n", + "\r\n", + " 114,200\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
158\n", + "Burma\n", + "\r\n", + " 110,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
159\n", + "Somalia\n", + "\r\n", + " 106,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
160\n", + "Gabon\n", + "\r\n", + " 98,800\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
161\n", + "Guinea\n", + "\r\n", + " 95,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
162\n", + "Swaziland\n", + "\r\n", + " 90,100\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
163\n", + "Guam\n", + "\r\n", + " 90,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
164\n", + "Maldives\n", + "\r\n", + " 86,400\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
165\n", + "New Caledonia\n", + "\r\n", + " 85,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
166\n", + "Turkmenistan\n", + "\r\n", + " 80,400\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
167\n", + "Cambodia\n", + "\r\n", + " 78,500\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
168\n", + "Lesotho\n", + "\r\n", + " 76,800\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
169\n", + "Saint Vincent and the Grenadines\n", + "\r\n", + " 76,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
170\n", + "Mauritania\n", + "\r\n", + " 75,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
171\n", + "Andorra\n", + "\r\n", + " 67,200\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
172\n", + "Antigua and Barbuda\n", + "\r\n", + " 65,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
173\n", + "Bermuda\n", + "\r\n", + " 54,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
174\n", + "Bhutan\n", + "\r\n", + " 50,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
175\n", + "Guernsey\n", + "\r\n", + " 48,300\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
176\n", + "Faroe Islands\n", + "\r\n", + " 37,500\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
177\n", + "Guinea-Bissau\n", + "\r\n", + " 37,100\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=178\n", + "Belize\n", + "\r\n", + " 36,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=178\n", + "Greenland\n", + "\r\n", + " 36,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
180\n", + "Seychelles\n", + "\r\n", + " 32,000\r\n", + " 2008\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
181\n", + "Virgin Islands\n", + "\r\n", + " 30,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
182\n", + "Jersey\n", + "\r\n", + " 29,500\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
183\n", + "Dominica\n", + "\r\n", + " 28,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
184\n", + "Sao Tome and Principe\n", + "\r\n", + " 26,700\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
185\n", + "Djibouti\n", + "\r\n", + " 25,900\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
186\n", + "Grenada\n", + "\r\n", + " 25,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
187\n", + "Comoros\n", + "\r\n", + " 24,300\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
188\n", + "Aruba\n", + "\r\n", + " 24,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=189\n", + "Monaco\n", + "\r\n", + " 23,000\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=189\n", + "Liechtenstein\n", + "\r\n", + " 23,000\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=189\n", + "Cayman Islands\n", + "\r\n", + " 23,000\r\n", + " 2008\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
192\n", + "Central African Republic\n", + "\r\n", + " 22,600\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
193\n", + "Gibraltar\n", + "\r\n", + " 20,200\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
194\n", + "Liberia\n", + "\r\n", + " 20,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=195\n", + "Vanuatu\n", + "\r\n", + " 17,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=195\n", + "San Marino\n", + "\r\n", + " 17,000\r\n", + " 2010\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=195\n", + "Federated States of Micronesia\n", + "\r\n", + " 17,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=195\n", + "Saint Kitts and Nevis\n", + "\r\n", + " 17,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
199\n", + "Sierra Leone\n", + "\r\n", + " 14,900\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
200\n", + "Equatorial Guinea\n", + "\r\n", + " 14,400\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
201\n", + "Solomon Islands\n", + "\r\n", + " 10,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
202\n", + "Samoa\n", + "\r\n", + " 9,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
203\n", + "Tonga\n", + "\r\n", + " 8,400\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
204\n", + "Kiribati\n", + "\r\n", + " 7,800\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
205\n", + "Cook Islands\n", + "\r\n", + " 6,000\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
206\n", + "Tuvalu\n", + "\r\n", + " 4,200\r\n", + " 2008\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
207\n", + "British Virgin Islands\n", + "\r\n", + " 4,000\r\n", + " 2002\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
208\n", + "Anguilla\n", + "\r\n", + " 3,700\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
209\n", + "Falkland Islands (Islas Malvinas)\n", + "\r\n", + " 2,900\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
210\n", + "Marshall Islands\n", + "\r\n", + " 2,200\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
211\n", + "East Timor\n", + "\r\n", + " 2,100\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
212\n", + "Wallis and Futuna\n", + "\r\n", + " 1,300\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
213\n", + "Montserrat\n", + "\r\n", + " 1,200\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
214\n", + "Niue\n", + "\r\n", + " 1,100\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=215\n", + "Saint Helena, Ascension, and Tristan da Cunha\n", + "\r\n", + " 900\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
=215\n", + "Saint Helena\n", + "\r\n", + " 900\r\n", + " 2009\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
217\n", + "Tokelau\n", + "\r\n", + " 800\r\n", + " 2008\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
218\n", + "Christmas Island\n", + "\r\n", + " 464\r\n", + " 2001\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n" + ] + } + ], + "source": [ + "print(table)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "# Conversão da tabela HTML em um dataframe do Pandas\n", + "df = pd.read_html(str(table))" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[ # COUNTRY AMOUNT DATE \\\n", + "0 1 China 389 million 2009 \n", + "1 2 United States 245 million 2009 \n", + "2 3 Japan 99.18 million 2009 \n", + "3 NaN Group of 7 countries (G7) average (profile) 80.32 million 2009 \n", + "4 4 Brazil 75.98 million 2009 \n", + "5 5 Germany 65.12 million 2010 \n", + "6 6 India 61.34 million 2009 \n", + "7 7 Russia 59.7 million 2010 \n", + "8 NaN Non-religious countries average (profile) 51.56 million 2009 \n", + "9 8 United Kingdom 51.44 million 2009 \n", + "10 9 France 44.63 million 2010 \n", + "11 10 Nigeria 43.99 million 2009 \n", + "12 11 South Korea 39.4 million 2009 \n", + "13 12 Turkey 35 million 2010 \n", + "14 NaN Emerging markets average (profile) 32.99 million 2009 \n", + "15 13 Mexico 31.02 million 2009 \n", + "16 14 Italy 30.03 million 2010 \n", + "17 15 Spain 29.09 million 2010 \n", + "18 16 Canada 26.96 million 2009 \n", + "19 NaN East Asia and Pacific average (profile) 25.43 million 2009 \n", + "20 NaN High income OECD countries average (profile) 24.75 million 2009 \n", + "21 NaN Cold countries average (profile) 23.69 million 2009 \n", + "22 17 Vietnam 23.38 million 2009 \n", + "23 18 Colombia 22.54 million 2009 \n", + "24 19 Poland 22.45 million 2010 \n", + "25 20 Pakistan 20.43 million 2009 \n", + "26 21 Egypt 20.14 million 2009 \n", + "27 22 Indonesia 20 million 2009 \n", + "28 NaN Heavily indebted countries average (profile) 17.81 million 2009 \n", + "29 23 Thailand 17.48 million 2009 \n", + ".. ... ... ... ... \n", + "219 =189 Monaco 23000 2010 \n", + "220 =189 Liechtenstein 23000 2010 \n", + "221 =189 Cayman Islands 23000 2008 \n", + "222 192 Central African Republic 22600 2009 \n", + "223 193 Gibraltar 20200 2009 \n", + "224 194 Liberia 20000 2009 \n", + "225 =195 Vanuatu 17000 2009 \n", + "226 =195 San Marino 17000 2010 \n", + "227 =195 Federated States of Micronesia 17000 2009 \n", + "228 =195 Saint Kitts and Nevis 17000 2009 \n", + "229 199 Sierra Leone 14900 2009 \n", + "230 200 Equatorial Guinea 14400 2009 \n", + "231 201 Solomon Islands 10000 2009 \n", + "232 202 Samoa 9000 2009 \n", + "233 203 Tonga 8400 2009 \n", + "234 204 Kiribati 7800 2009 \n", + "235 205 Cook Islands 6000 2009 \n", + "236 206 Tuvalu 4200 2008 \n", + "237 207 British Virgin Islands 4000 2002 \n", + "238 208 Anguilla 3700 2009 \n", + "239 209 Falkland Islands (Islas Malvinas) 2900 2009 \n", + "240 210 Marshall Islands 2200 2009 \n", + "241 211 East Timor 2100 2009 \n", + "242 212 Wallis and Futuna 1300 2009 \n", + "243 213 Montserrat 1200 2009 \n", + "244 214 Niue 1100 2009 \n", + "245 =215 Saint Helena, Ascension, and Tristan da Cunha 900 2009 \n", + "246 =215 Saint Helena 900 2009 \n", + "247 217 Tokelau 800 2008 \n", + "248 218 Christmas Island 464 2001 \n", + "\n", + " GRAPH HISTORY \n", + "0 NaN NaN \n", + "1 NaN NaN \n", + "2 NaN NaN \n", + "3 NaN NaN \n", + "4 NaN NaN \n", + "5 NaN NaN \n", + "6 NaN NaN \n", + "7 NaN NaN \n", + "8 NaN NaN \n", + "9 NaN NaN \n", + "10 NaN NaN \n", + "11 NaN NaN \n", + "12 NaN NaN \n", + "13 NaN NaN \n", + "14 NaN NaN \n", + "15 NaN NaN \n", + "16 NaN NaN \n", + "17 NaN NaN \n", + "18 NaN NaN \n", + "19 NaN NaN \n", + "20 NaN NaN \n", + "21 NaN NaN \n", + "22 NaN NaN \n", + "23 NaN NaN \n", + "24 NaN NaN \n", + "25 NaN NaN \n", + "26 NaN NaN \n", + "27 NaN NaN \n", + "28 NaN NaN \n", + "29 NaN NaN \n", + ".. ... ... \n", + "219 NaN NaN \n", + "220 NaN NaN \n", + "221 NaN NaN \n", + "222 NaN NaN \n", + "223 NaN NaN \n", + "224 NaN NaN \n", + "225 NaN NaN \n", + "226 NaN NaN \n", + "227 NaN NaN \n", + "228 NaN NaN \n", + "229 NaN NaN \n", + "230 NaN NaN \n", + "231 NaN NaN \n", + "232 NaN NaN \n", + "233 NaN NaN \n", + "234 NaN NaN \n", + "235 NaN NaN \n", + "236 NaN NaN \n", + "237 NaN NaN \n", + "238 NaN NaN \n", + "239 NaN NaN \n", + "240 NaN NaN \n", + "241 NaN NaN \n", + "242 NaN NaN \n", + "243 NaN NaN \n", + "244 NaN NaN \n", + "245 NaN NaN \n", + "246 NaN NaN \n", + "247 NaN NaN \n", + "248 NaN NaN \n", + "\n", + "[249 rows x 6 columns]]\n" + ] + } + ], + "source": [ + "print(df)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[{\"#\":\"1\",\"COUNTRY\":\"China\",\"AMOUNT\":\"389 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"2\",\"COUNTRY\":\"United States\",\"AMOUNT\":\"245 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"3\",\"COUNTRY\":\"Japan\",\"AMOUNT\":\"99.18 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Group of 7 countries (G7) average (profile)\",\"AMOUNT\":\"80.32 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"4\",\"COUNTRY\":\"Brazil\",\"AMOUNT\":\"75.98 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"5\",\"COUNTRY\":\"Germany\",\"AMOUNT\":\"65.12 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"6\",\"COUNTRY\":\"India\",\"AMOUNT\":\"61.34 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"7\",\"COUNTRY\":\"Russia\",\"AMOUNT\":\"59.7 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Non-religious countries average (profile)\",\"AMOUNT\":\"51.56 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"8\",\"COUNTRY\":\"United Kingdom\",\"AMOUNT\":\"51.44 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"9\",\"COUNTRY\":\"France\",\"AMOUNT\":\"44.63 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"10\",\"COUNTRY\":\"Nigeria\",\"AMOUNT\":\"43.99 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"11\",\"COUNTRY\":\"South Korea\",\"AMOUNT\":\"39.4 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"12\",\"COUNTRY\":\"Turkey\",\"AMOUNT\":\"35 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Emerging markets average (profile)\",\"AMOUNT\":\"32.99 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"13\",\"COUNTRY\":\"Mexico\",\"AMOUNT\":\"31.02 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"14\",\"COUNTRY\":\"Italy\",\"AMOUNT\":\"30.03 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"15\",\"COUNTRY\":\"Spain\",\"AMOUNT\":\"29.09 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"16\",\"COUNTRY\":\"Canada\",\"AMOUNT\":\"26.96 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"East Asia and Pacific average (profile)\",\"AMOUNT\":\"25.43 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"High income OECD countries average (profile)\",\"AMOUNT\":\"24.75 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Cold countries average (profile)\",\"AMOUNT\":\"23.69 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"17\",\"COUNTRY\":\"Vietnam\",\"AMOUNT\":\"23.38 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"18\",\"COUNTRY\":\"Colombia\",\"AMOUNT\":\"22.54 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"19\",\"COUNTRY\":\"Poland\",\"AMOUNT\":\"22.45 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"20\",\"COUNTRY\":\"Pakistan\",\"AMOUNT\":\"20.43 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"21\",\"COUNTRY\":\"Egypt\",\"AMOUNT\":\"20.14 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"22\",\"COUNTRY\":\"Indonesia\",\"AMOUNT\":\"20 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Heavily indebted countries average (profile)\",\"AMOUNT\":\"17.81 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"23\",\"COUNTRY\":\"Thailand\",\"AMOUNT\":\"17.48 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"South Asia average (profile)\",\"AMOUNT\":\"16.69 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"24\",\"COUNTRY\":\"Taiwan\",\"AMOUNT\":\"16.15 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"25\",\"COUNTRY\":\"Australia\",\"AMOUNT\":\"15.81 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"26\",\"COUNTRY\":\"Malaysia\",\"AMOUNT\":\"15.36 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"27\",\"COUNTRY\":\"Ukraine\",\"AMOUNT\":\"15.3 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"28\",\"COUNTRY\":\"Netherlands\",\"AMOUNT\":\"14.87 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"29\",\"COUNTRY\":\"Argentina\",\"AMOUNT\":\"13.69 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Religious countries average (profile)\",\"AMOUNT\":\"13.59 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"30\",\"COUNTRY\":\"Morocco\",\"AMOUNT\":\"13.21 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Eurozone average (profile)\",\"AMOUNT\":\"12.48 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"NATO countries average (profile)\",\"AMOUNT\":\"12.27 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"European Union average (profile)\",\"AMOUNT\":\"10.69 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Former British colonies average (profile)\",\"AMOUNT\":\"10.17 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"31\",\"COUNTRY\":\"Saudi Arabia\",\"AMOUNT\":\"9.77 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Europe average (profile)\",\"AMOUNT\":\"9.61 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Catholic countries average (profile)\",\"AMOUNT\":\"9.37 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"32\",\"COUNTRY\":\"Peru\",\"AMOUNT\":\"9.16 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"33\",\"COUNTRY\":\"Venezuela\",\"AMOUNT\":\"8.92 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Eastern Europe average (profile)\",\"AMOUNT\":\"8.4 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"34\",\"COUNTRY\":\"Sweden\",\"AMOUNT\":\"8.4 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"35\",\"COUNTRY\":\"Philippines\",\"AMOUNT\":\"8.28 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Christian countries average (profile)\",\"AMOUNT\":\"8.26 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"36\",\"COUNTRY\":\"Iran\",\"AMOUNT\":\"8.21 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"37\",\"COUNTRY\":\"Belgium\",\"AMOUNT\":\"8.11 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"38\",\"COUNTRY\":\"Romania\",\"AMOUNT\":\"7.79 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"South and Central Asia average (profile)\",\"AMOUNT\":\"7.6 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"OPEC countries average (profile)\",\"AMOUNT\":\"7.45 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"39\",\"COUNTRY\":\"Chile\",\"AMOUNT\":\"7.01 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"40\",\"COUNTRY\":\"Czech Republic\",\"AMOUNT\":\"6.68 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"41\",\"COUNTRY\":\"Hungary\",\"AMOUNT\":\"6.18 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"42\",\"COUNTRY\":\"Austria\",\"AMOUNT\":\"6.14 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Former Spanish colonies average (profile)\",\"AMOUNT\":\"6.14 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"43\",\"COUNTRY\":\"Switzerland\",\"AMOUNT\":\"5.74 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Latin America and Caribbean average (profile)\",\"AMOUNT\":\"5.71 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"failed states average (profile)\",\"AMOUNT\":\"5.53 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"44\",\"COUNTRY\":\"Kazakhstan\",\"AMOUNT\":\"5.3 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"45\",\"COUNTRY\":\"Portugal\",\"AMOUNT\":\"5.17 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Potential Future EU Members average (profile)\",\"AMOUNT\":\"5.1 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Muslim countries average (profile)\",\"AMOUNT\":\"5.01 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"46\",\"COUNTRY\":\"Greece\",\"AMOUNT\":\"4.97 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Former Soviet republics average (profile)\",\"AMOUNT\":\"4.93 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"47\",\"COUNTRY\":\"Hong Kong\",\"AMOUNT\":\"4.87 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"48\",\"COUNTRY\":\"Denmark\",\"AMOUNT\":\"4.75 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"49\",\"COUNTRY\":\"Algeria\",\"AMOUNT\":\"4.7 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"50\",\"COUNTRY\":\"Uzbekistan\",\"AMOUNT\":\"4.69 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Hot countries average (profile)\",\"AMOUNT\":\"4.66 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"51\",\"COUNTRY\":\"Israel\",\"AMOUNT\":\"4.53 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Middle Eastern and North Africa average (profile)\",\"AMOUNT\":\"4.51 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"52\",\"COUNTRY\":\"Finland\",\"AMOUNT\":\"4.48 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"53\",\"COUNTRY\":\"Syria\",\"AMOUNT\":\"4.47 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"54\",\"COUNTRY\":\"Belarus\",\"AMOUNT\":\"4.44 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"55\",\"COUNTRY\":\"Norway\",\"AMOUNT\":\"4.43 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"56\",\"COUNTRY\":\"South Africa\",\"AMOUNT\":\"4.42 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"57\",\"COUNTRY\":\"Sudan\",\"AMOUNT\":\"4.2 million\",\"DATE\":2008,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"58\",\"COUNTRY\":\"Serbia\",\"AMOUNT\":\"4.11 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"59\",\"COUNTRY\":\"Slovakia\",\"AMOUNT\":\"4.06 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"60\",\"COUNTRY\":\"Kenya\",\"AMOUNT\":\"4 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"61\",\"COUNTRY\":\"Azerbaijan\",\"AMOUNT\":\"3.69 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"62\",\"COUNTRY\":\"Tunisia\",\"AMOUNT\":\"3.5 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"63\",\"COUNTRY\":\"United Arab Emirates\",\"AMOUNT\":\"3.45 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Tourist destinations average (profile)\",\"AMOUNT\":\"3.42 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"64\",\"COUNTRY\":\"New Zealand\",\"AMOUNT\":\"3.4 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"65\",\"COUNTRY\":\"Bulgaria\",\"AMOUNT\":\"3.4 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"66\",\"COUNTRY\":\"Ecuador\",\"AMOUNT\":\"3.35 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"67\",\"COUNTRY\":\"Singapore\",\"AMOUNT\":\"3.23 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"68\",\"COUNTRY\":\"Uganda\",\"AMOUNT\":\"3.2 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"69\",\"COUNTRY\":\"Ireland\",\"AMOUNT\":\"3.04 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"70\",\"COUNTRY\":\"Dominican Republic\",\"AMOUNT\":\"2.7 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"71\",\"COUNTRY\":\"Yemen\",\"AMOUNT\":\"2.35 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Former French colonies average (profile)\",\"AMOUNT\":\"2.31 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"72\",\"COUNTRY\":\"Guatemala\",\"AMOUNT\":\"2.28 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"73\",\"COUNTRY\":\"Croatia\",\"AMOUNT\":\"2.24 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"74\",\"COUNTRY\":\"Kyrgyzstan\",\"AMOUNT\":\"2.19 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"75\",\"COUNTRY\":\"Lithuania\",\"AMOUNT\":\"2.1 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"76\",\"COUNTRY\":\"Senegal\",\"AMOUNT\":\"1.82 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"77\",\"COUNTRY\":\"Sri Lanka\",\"AMOUNT\":\"1.78 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Landlocked countries average (profile)\",\"AMOUNT\":\"1.64 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"78\",\"COUNTRY\":\"Jordan\",\"AMOUNT\":\"1.64 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":null,\"COUNTRY\":\"Sub-Saharan Africa average (profile)\",\"AMOUNT\":\"1.62 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"79\",\"COUNTRY\":\"Cuba\",\"AMOUNT\":\"1.61 million\",\"DATE\":2013,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"80\",\"COUNTRY\":\"Jamaica\",\"AMOUNT\":\"1.58 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"81\",\"COUNTRY\":\"Latvia\",\"AMOUNT\":\"1.5 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"82\",\"COUNTRY\":\"Costa Rica\",\"AMOUNT\":\"1.49 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"83\",\"COUNTRY\":\"Oman\",\"AMOUNT\":\"1.47 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"84\",\"COUNTRY\":\"Bosnia and Herzegovina\",\"AMOUNT\":\"1.44 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"85\",\"COUNTRY\":\"Zimbabwe\",\"AMOUNT\":\"1.42 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"86\",\"COUNTRY\":\"Uruguay\",\"AMOUNT\":\"1.41 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=87\",\"COUNTRY\":\"Gaza Strip\",\"AMOUNT\":\"1.38 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=87\",\"COUNTRY\":\"West Bank\",\"AMOUNT\":\"1.38 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=89\",\"COUNTRY\":\"Georgia\",\"AMOUNT\":\"1.3 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=89\",\"COUNTRY\":\"Albania\",\"AMOUNT\":\"1.3 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"91\",\"COUNTRY\":\"Slovenia\",\"AMOUNT\":\"1.3 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"92\",\"COUNTRY\":\"Ghana\",\"AMOUNT\":\"1.3 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"93\",\"COUNTRY\":\"Moldova\",\"AMOUNT\":\"1.29 million\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"94\",\"COUNTRY\":\"Paraguay\",\"AMOUNT\":\"1.1 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"95\",\"COUNTRY\":\"Bolivia\",\"AMOUNT\":\"1.1 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"96\",\"COUNTRY\":\"Kuwait\",\"AMOUNT\":\"1.1 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"97\",\"COUNTRY\":\"Republic of Macedonia\",\"AMOUNT\":\"1.06 million\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=98\",\"COUNTRY\":\"Afghanistan\",\"AMOUNT\":\"1000000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=98\",\"COUNTRY\":\"Lebanon\",\"AMOUNT\":\"1000000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=98\",\"COUNTRY\":\"Puerto Rico\",\"AMOUNT\":\"1000000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=98\",\"COUNTRY\":\"Haiti\",\"AMOUNT\":\"1000000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"102\",\"COUNTRY\":\"Estonia\",\"AMOUNT\":\"969700\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"103\",\"COUNTRY\":\"Cote d'Ivoire\",\"AMOUNT\":\"967300\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"104\",\"COUNTRY\":\"Panama\",\"AMOUNT\":\"959800\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"105\",\"COUNTRY\":\"Zambia\",\"AMOUNT\":\"816200\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"106\",\"COUNTRY\":\"Cameroon\",\"AMOUNT\":\"749600\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"107\",\"COUNTRY\":\"El Salvador\",\"AMOUNT\":\"746000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"108\",\"COUNTRY\":\"Honduras\",\"AMOUNT\":\"731700\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"109\",\"COUNTRY\":\"Malawi\",\"AMOUNT\":\"716400\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"110\",\"COUNTRY\":\"Tajikistan\",\"AMOUNT\":\"700000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"111\",\"COUNTRY\":\"Tanzania\",\"AMOUNT\":\"678000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"112\",\"COUNTRY\":\"Bangladesh\",\"AMOUNT\":\"617300\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"113\",\"COUNTRY\":\"Mozambique\",\"AMOUNT\":\"613600\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"114\",\"COUNTRY\":\"Angola\",\"AMOUNT\":\"606700\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"115\",\"COUNTRY\":\"Trinidad and Tobago\",\"AMOUNT\":\"593000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"116\",\"COUNTRY\":\"Nepal\",\"AMOUNT\":\"577800\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"117\",\"COUNTRY\":\"Qatar\",\"AMOUNT\":\"563800\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"118\",\"COUNTRY\":\"Rwanda\",\"AMOUNT\":\"450000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"119\",\"COUNTRY\":\"Ethiopia\",\"AMOUNT\":\"447300\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"120\",\"COUNTRY\":\"Cyprus\",\"AMOUNT\":\"433800\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"121\",\"COUNTRY\":\"Luxembourg\",\"AMOUNT\":\"424500\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"122\",\"COUNTRY\":\"Bahrain\",\"AMOUNT\":\"419500\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"123\",\"COUNTRY\":\"Togo\",\"AMOUNT\":\"356300\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"124\",\"COUNTRY\":\"Libya\",\"AMOUNT\":\"353900\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"125\",\"COUNTRY\":\"Mongolia\",\"AMOUNT\":\"330000\",\"DATE\":2008,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"126\",\"COUNTRY\":\"Iraq\",\"AMOUNT\":\"325900\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"127\",\"COUNTRY\":\"Madagascar\",\"AMOUNT\":\"319900\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"128\",\"COUNTRY\":\"Brunei\",\"AMOUNT\":\"314900\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"129\",\"COUNTRY\":\"Iceland\",\"AMOUNT\":\"301600\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"130\",\"COUNTRY\":\"Laos\",\"AMOUNT\":\"300000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=131\",\"COUNTRY\":\"Mauritius\",\"AMOUNT\":\"290000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=131\",\"COUNTRY\":\"Democratic Republic of the Congo\",\"AMOUNT\":\"290000\",\"DATE\":2008,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"133\",\"COUNTRY\":\"Montenegro\",\"AMOUNT\":\"280000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"134\",\"COUNTRY\":\"Macau\",\"AMOUNT\":\"270200\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"135\",\"COUNTRY\":\"Mali\",\"AMOUNT\":\"249800\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"136\",\"COUNTRY\":\"Congo, Republic of the\",\"AMOUNT\":\"245200\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"137\",\"COUNTRY\":\"Malta\",\"AMOUNT\":\"240600\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"138\",\"COUNTRY\":\"Armenia\",\"AMOUNT\":\"208200\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"139\",\"COUNTRY\":\"Benin\",\"AMOUNT\":\"200100\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"140\",\"COUNTRY\":\"Eritrea\",\"AMOUNT\":\"200000\",\"DATE\":2008,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"141\",\"COUNTRY\":\"Nicaragua\",\"AMOUNT\":\"199800\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"142\",\"COUNTRY\":\"Guyana\",\"AMOUNT\":\"189600\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"143\",\"COUNTRY\":\"Barbados\",\"AMOUNT\":\"188000\",\"DATE\":2008,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"144\",\"COUNTRY\":\"Burkina Faso\",\"AMOUNT\":\"178100\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"145\",\"COUNTRY\":\"Chad\",\"AMOUNT\":\"168100\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"146\",\"COUNTRY\":\"Suriname\",\"AMOUNT\":\"163000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"147\",\"COUNTRY\":\"Burundi\",\"AMOUNT\":\"157800\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"148\",\"COUNTRY\":\"Cape Verde\",\"AMOUNT\":\"150000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"149\",\"COUNTRY\":\"Saint Lucia\",\"AMOUNT\":\"142900\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"150\",\"COUNTRY\":\"The Gambia\",\"AMOUNT\":\"130100\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"151\",\"COUNTRY\":\"Namibia\",\"AMOUNT\":\"127500\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"152\",\"COUNTRY\":\"Papua New Guinea\",\"AMOUNT\":\"125000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=153\",\"COUNTRY\":\"Botswana\",\"AMOUNT\":\"120000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=153\",\"COUNTRY\":\"French Polynesia\",\"AMOUNT\":\"120000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"155\",\"COUNTRY\":\"Niger\",\"AMOUNT\":\"115900\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"156\",\"COUNTRY\":\"The Bahamas\",\"AMOUNT\":\"115800\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"157\",\"COUNTRY\":\"Fiji\",\"AMOUNT\":\"114200\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"158\",\"COUNTRY\":\"Burma\",\"AMOUNT\":\"110000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"159\",\"COUNTRY\":\"Somalia\",\"AMOUNT\":\"106000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"160\",\"COUNTRY\":\"Gabon\",\"AMOUNT\":\"98800\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"161\",\"COUNTRY\":\"Guinea\",\"AMOUNT\":\"95000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"162\",\"COUNTRY\":\"Swaziland\",\"AMOUNT\":\"90100\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"163\",\"COUNTRY\":\"Guam\",\"AMOUNT\":\"90000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"164\",\"COUNTRY\":\"Maldives\",\"AMOUNT\":\"86400\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"165\",\"COUNTRY\":\"New Caledonia\",\"AMOUNT\":\"85000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"166\",\"COUNTRY\":\"Turkmenistan\",\"AMOUNT\":\"80400\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"167\",\"COUNTRY\":\"Cambodia\",\"AMOUNT\":\"78500\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"168\",\"COUNTRY\":\"Lesotho\",\"AMOUNT\":\"76800\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"169\",\"COUNTRY\":\"Saint Vincent and the Grenadines\",\"AMOUNT\":\"76000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"170\",\"COUNTRY\":\"Mauritania\",\"AMOUNT\":\"75000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"171\",\"COUNTRY\":\"Andorra\",\"AMOUNT\":\"67200\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"172\",\"COUNTRY\":\"Antigua and Barbuda\",\"AMOUNT\":\"65000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"173\",\"COUNTRY\":\"Bermuda\",\"AMOUNT\":\"54000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"174\",\"COUNTRY\":\"Bhutan\",\"AMOUNT\":\"50000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"175\",\"COUNTRY\":\"Guernsey\",\"AMOUNT\":\"48300\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"176\",\"COUNTRY\":\"Faroe Islands\",\"AMOUNT\":\"37500\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"177\",\"COUNTRY\":\"Guinea-Bissau\",\"AMOUNT\":\"37100\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=178\",\"COUNTRY\":\"Belize\",\"AMOUNT\":\"36000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=178\",\"COUNTRY\":\"Greenland\",\"AMOUNT\":\"36000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"180\",\"COUNTRY\":\"Seychelles\",\"AMOUNT\":\"32000\",\"DATE\":2008,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"181\",\"COUNTRY\":\"Virgin Islands\",\"AMOUNT\":\"30000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"182\",\"COUNTRY\":\"Jersey\",\"AMOUNT\":\"29500\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"183\",\"COUNTRY\":\"Dominica\",\"AMOUNT\":\"28000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"184\",\"COUNTRY\":\"Sao Tome and Principe\",\"AMOUNT\":\"26700\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"185\",\"COUNTRY\":\"Djibouti\",\"AMOUNT\":\"25900\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"186\",\"COUNTRY\":\"Grenada\",\"AMOUNT\":\"25000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"187\",\"COUNTRY\":\"Comoros\",\"AMOUNT\":\"24300\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"188\",\"COUNTRY\":\"Aruba\",\"AMOUNT\":\"24000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=189\",\"COUNTRY\":\"Monaco\",\"AMOUNT\":\"23000\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=189\",\"COUNTRY\":\"Liechtenstein\",\"AMOUNT\":\"23000\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=189\",\"COUNTRY\":\"Cayman Islands\",\"AMOUNT\":\"23000\",\"DATE\":2008,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"192\",\"COUNTRY\":\"Central African Republic\",\"AMOUNT\":\"22600\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"193\",\"COUNTRY\":\"Gibraltar\",\"AMOUNT\":\"20200\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"194\",\"COUNTRY\":\"Liberia\",\"AMOUNT\":\"20000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=195\",\"COUNTRY\":\"Vanuatu\",\"AMOUNT\":\"17000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=195\",\"COUNTRY\":\"San Marino\",\"AMOUNT\":\"17000\",\"DATE\":2010,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=195\",\"COUNTRY\":\"Federated States of Micronesia\",\"AMOUNT\":\"17000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=195\",\"COUNTRY\":\"Saint Kitts and Nevis\",\"AMOUNT\":\"17000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"199\",\"COUNTRY\":\"Sierra Leone\",\"AMOUNT\":\"14900\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"200\",\"COUNTRY\":\"Equatorial Guinea\",\"AMOUNT\":\"14400\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"201\",\"COUNTRY\":\"Solomon Islands\",\"AMOUNT\":\"10000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"202\",\"COUNTRY\":\"Samoa\",\"AMOUNT\":\"9000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"203\",\"COUNTRY\":\"Tonga\",\"AMOUNT\":\"8400\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"204\",\"COUNTRY\":\"Kiribati\",\"AMOUNT\":\"7800\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"205\",\"COUNTRY\":\"Cook Islands\",\"AMOUNT\":\"6000\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"206\",\"COUNTRY\":\"Tuvalu\",\"AMOUNT\":\"4200\",\"DATE\":2008,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"207\",\"COUNTRY\":\"British Virgin Islands\",\"AMOUNT\":\"4000\",\"DATE\":2002,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"208\",\"COUNTRY\":\"Anguilla\",\"AMOUNT\":\"3700\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"209\",\"COUNTRY\":\"Falkland Islands (Islas Malvinas)\",\"AMOUNT\":\"2900\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"210\",\"COUNTRY\":\"Marshall Islands\",\"AMOUNT\":\"2200\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"211\",\"COUNTRY\":\"East Timor\",\"AMOUNT\":\"2100\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"212\",\"COUNTRY\":\"Wallis and Futuna\",\"AMOUNT\":\"1300\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"213\",\"COUNTRY\":\"Montserrat\",\"AMOUNT\":\"1200\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"214\",\"COUNTRY\":\"Niue\",\"AMOUNT\":\"1100\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=215\",\"COUNTRY\":\"Saint Helena, Ascension, and Tristan da Cunha\",\"AMOUNT\":\"900\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"=215\",\"COUNTRY\":\"Saint Helena\",\"AMOUNT\":\"900\",\"DATE\":2009,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"217\",\"COUNTRY\":\"Tokelau\",\"AMOUNT\":\"800\",\"DATE\":2008,\"GRAPH\":null,\"HISTORY\":null},{\"#\":\"218\",\"COUNTRY\":\"Christmas Island\",\"AMOUNT\":\"464\",\"DATE\":2001,\"GRAPH\":null,\"HISTORY\":null}]\n" + ] + } + ], + "source": [ + "# Conversão do dataframe para o formato JSON\n", + "print(df[0].to_json(orient='records'))" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+-----+------+---------------------------------------------------+---------------+--------+---------+-----------+\n", + "| | # | COUNTRY | AMOUNT | DATE | GRAPH | HISTORY |\n", + "|-----+------+---------------------------------------------------+---------------+--------+---------+-----------|\n", + "| 0 | 1 | China | 389 million | 2009 | nan | nan |\n", + "| 1 | 2 | United States | 245 million | 2009 | nan | nan |\n", + "| 2 | 3 | Japan | 99.18 million | 2009 | nan | nan |\n", + "| 3 | nan | Group of 7 countries (G7) average (profile) | 80.32 million | 2009 | nan | nan |\n", + "| 4 | 4 | Brazil | 75.98 million | 2009 | nan | nan |\n", + "| 5 | 5 | Germany | 65.12 million | 2010 | nan | nan |\n", + "| 6 | 6 | India | 61.34 million | 2009 | nan | nan |\n", + "| 7 | 7 | Russia | 59.7 million | 2010 | nan | nan |\n", + "| 8 | nan | Non-religious countries average (profile) | 51.56 million | 2009 | nan | nan |\n", + "| 9 | 8 | United Kingdom | 51.44 million | 2009 | nan | nan |\n", + "| 10 | 9 | France | 44.63 million | 2010 | nan | nan |\n", + "| 11 | 10 | Nigeria | 43.99 million | 2009 | nan | nan |\n", + "| 12 | 11 | South Korea | 39.4 million | 2009 | nan | nan |\n", + "| 13 | 12 | Turkey | 35 million | 2010 | nan | nan |\n", + "| 14 | nan | Emerging markets average (profile) | 32.99 million | 2009 | nan | nan |\n", + "| 15 | 13 | Mexico | 31.02 million | 2009 | nan | nan |\n", + "| 16 | 14 | Italy | 30.03 million | 2010 | nan | nan |\n", + "| 17 | 15 | Spain | 29.09 million | 2010 | nan | nan |\n", + "| 18 | 16 | Canada | 26.96 million | 2009 | nan | nan |\n", + "| 19 | nan | East Asia and Pacific average (profile) | 25.43 million | 2009 | nan | nan |\n", + "| 20 | nan | High income OECD countries average (profile) | 24.75 million | 2009 | nan | nan |\n", + "| 21 | nan | Cold countries average (profile) | 23.69 million | 2009 | nan | nan |\n", + "| 22 | 17 | Vietnam | 23.38 million | 2009 | nan | nan |\n", + "| 23 | 18 | Colombia | 22.54 million | 2009 | nan | nan |\n", + "| 24 | 19 | Poland | 22.45 million | 2010 | nan | nan |\n", + "| 25 | 20 | Pakistan | 20.43 million | 2009 | nan | nan |\n", + "| 26 | 21 | Egypt | 20.14 million | 2009 | nan | nan |\n", + "| 27 | 22 | Indonesia | 20 million | 2009 | nan | nan |\n", + "| 28 | nan | Heavily indebted countries average (profile) | 17.81 million | 2009 | nan | nan |\n", + "| 29 | 23 | Thailand | 17.48 million | 2009 | nan | nan |\n", + "| 30 | nan | South Asia average (profile) | 16.69 million | 2009 | nan | nan |\n", + "| 31 | 24 | Taiwan | 16.15 million | 2009 | nan | nan |\n", + "| 32 | 25 | Australia | 15.81 million | 2009 | nan | nan |\n", + "| 33 | 26 | Malaysia | 15.36 million | 2009 | nan | nan |\n", + "| 34 | 27 | Ukraine | 15.3 million | 2010 | nan | nan |\n", + "| 35 | 28 | Netherlands | 14.87 million | 2010 | nan | nan |\n", + "| 36 | 29 | Argentina | 13.69 million | 2009 | nan | nan |\n", + "| 37 | nan | Religious countries average (profile) | 13.59 million | 2009 | nan | nan |\n", + "| 38 | 30 | Morocco | 13.21 million | 2009 | nan | nan |\n", + "| 39 | nan | Eurozone average (profile) | 12.48 million | 2010 | nan | nan |\n", + "| 40 | nan | NATO countries average (profile) | 12.27 million | 2010 | nan | nan |\n", + "| 41 | nan | European Union average (profile) | 10.69 million | 2010 | nan | nan |\n", + "| 42 | nan | Former British colonies average (profile) | 10.17 million | 2009 | nan | nan |\n", + "| 43 | 31 | Saudi Arabia | 9.77 million | 2009 | nan | nan |\n", + "| 44 | nan | Europe average (profile) | 9.61 million | 2010 | nan | nan |\n", + "| 45 | nan | Catholic countries average (profile) | 9.37 million | 2009 | nan | nan |\n", + "| 46 | 32 | Peru | 9.16 million | 2009 | nan | nan |\n", + "| 47 | 33 | Venezuela | 8.92 million | 2009 | nan | nan |\n", + "| 48 | nan | Eastern Europe average (profile) | 8.4 million | 2010 | nan | nan |\n", + "| 49 | 34 | Sweden | 8.4 million | 2010 | nan | nan |\n", + "| 50 | 35 | Philippines | 8.28 million | 2009 | nan | nan |\n", + "| 51 | nan | Christian countries average (profile) | 8.26 million | 2009 | nan | nan |\n", + "| 52 | 36 | Iran | 8.21 million | 2009 | nan | nan |\n", + "| 53 | 37 | Belgium | 8.11 million | 2010 | nan | nan |\n", + "| 54 | 38 | Romania | 7.79 million | 2010 | nan | nan |\n", + "| 55 | nan | South and Central Asia average (profile) | 7.6 million | 2009 | nan | nan |\n", + "| 56 | nan | OPEC countries average (profile) | 7.45 million | 2009 | nan | nan |\n", + "| 57 | 39 | Chile | 7.01 million | 2009 | nan | nan |\n", + "| 58 | 40 | Czech Republic | 6.68 million | 2010 | nan | nan |\n", + "| 59 | 41 | Hungary | 6.18 million | 2010 | nan | nan |\n", + "| 60 | 42 | Austria | 6.14 million | 2010 | nan | nan |\n", + "| 61 | nan | Former Spanish colonies average (profile) | 6.14 million | 2009 | nan | nan |\n", + "| 62 | 43 | Switzerland | 5.74 million | 2010 | nan | nan |\n", + "| 63 | nan | Latin America and Caribbean average (profile) | 5.71 million | 2009 | nan | nan |\n", + "| 64 | nan | failed states average (profile) | 5.53 million | 2009 | nan | nan |\n", + "| 65 | 44 | Kazakhstan | 5.3 million | 2010 | nan | nan |\n", + "| 66 | 45 | Portugal | 5.17 million | 2010 | nan | nan |\n", + "| 67 | nan | Potential Future EU Members average (profile) | 5.1 million | 2009 | nan | nan |\n", + "| 68 | nan | Muslim countries average (profile) | 5.01 million | 2009 | nan | nan |\n", + "| 69 | 46 | Greece | 4.97 million | 2010 | nan | nan |\n", + "| 70 | nan | Former Soviet republics average (profile) | 4.93 million | 2009 | nan | nan |\n", + "| 71 | 47 | Hong Kong | 4.87 million | 2009 | nan | nan |\n", + "| 72 | 48 | Denmark | 4.75 million | 2010 | nan | nan |\n", + "| 73 | 49 | Algeria | 4.7 million | 2009 | nan | nan |\n", + "| 74 | 50 | Uzbekistan | 4.69 million | 2009 | nan | nan |\n", + "| 75 | nan | Hot countries average (profile) | 4.66 million | 2009 | nan | nan |\n", + "| 76 | 51 | Israel | 4.53 million | 2009 | nan | nan |\n", + "| 77 | nan | Middle Eastern and North Africa average (profile) | 4.51 million | 2009 | nan | nan |\n", + "| 78 | 52 | Finland | 4.48 million | 2010 | nan | nan |\n", + "| 79 | 53 | Syria | 4.47 million | 2009 | nan | nan |\n", + "| 80 | 54 | Belarus | 4.44 million | 2010 | nan | nan |\n", + "| 81 | 55 | Norway | 4.43 million | 2010 | nan | nan |\n", + "| 82 | 56 | South Africa | 4.42 million | 2009 | nan | nan |\n", + "| 83 | 57 | Sudan | 4.2 million | 2008 | nan | nan |\n", + "| 84 | 58 | Serbia | 4.11 million | 2009 | nan | nan |\n", + "| 85 | 59 | Slovakia | 4.06 million | 2010 | nan | nan |\n", + "| 86 | 60 | Kenya | 4 million | 2009 | nan | nan |\n", + "| 87 | 61 | Azerbaijan | 3.69 million | 2010 | nan | nan |\n", + "| 88 | 62 | Tunisia | 3.5 million | 2009 | nan | nan |\n", + "| 89 | 63 | United Arab Emirates | 3.45 million | 2009 | nan | nan |\n", + "| 90 | nan | Tourist destinations average (profile) | 3.42 million | 2009 | nan | nan |\n", + "| 91 | 64 | New Zealand | 3.4 million | 2009 | nan | nan |\n", + "| 92 | 65 | Bulgaria | 3.4 million | 2010 | nan | nan |\n", + "| 93 | 66 | Ecuador | 3.35 million | 2009 | nan | nan |\n", + "| 94 | 67 | Singapore | 3.23 million | 2009 | nan | nan |\n", + "| 95 | 68 | Uganda | 3.2 million | 2009 | nan | nan |\n", + "| 96 | 69 | Ireland | 3.04 million | 2010 | nan | nan |\n", + "| 97 | 70 | Dominican Republic | 2.7 million | 2009 | nan | nan |\n", + "| 98 | 71 | Yemen | 2.35 million | 2009 | nan | nan |\n", + "| 99 | nan | Former French colonies average (profile) | 2.31 million | 2009 | nan | nan |\n", + "| 100 | 72 | Guatemala | 2.28 million | 2009 | nan | nan |\n", + "| 101 | 73 | Croatia | 2.24 million | 2010 | nan | nan |\n", + "| 102 | 74 | Kyrgyzstan | 2.19 million | 2009 | nan | nan |\n", + "| 103 | 75 | Lithuania | 2.1 million | 2010 | nan | nan |\n", + "| 104 | 76 | Senegal | 1.82 million | 2009 | nan | nan |\n", + "| 105 | 77 | Sri Lanka | 1.78 million | 2009 | nan | nan |\n", + "| 106 | nan | Landlocked countries average (profile) | 1.64 million | 2009 | nan | nan |\n", + "| 107 | 78 | Jordan | 1.64 million | 2009 | nan | nan |\n", + "| 108 | nan | Sub-Saharan Africa average (profile) | 1.62 million | 2009 | nan | nan |\n", + "| 109 | 79 | Cuba | 1.61 million | 2013 | nan | nan |\n", + "| 110 | 80 | Jamaica | 1.58 million | 2009 | nan | nan |\n", + "| 111 | 81 | Latvia | 1.5 million | 2010 | nan | nan |\n", + "| 112 | 82 | Costa Rica | 1.49 million | 2009 | nan | nan |\n", + "| 113 | 83 | Oman | 1.47 million | 2009 | nan | nan |\n", + "| 114 | 84 | Bosnia and Herzegovina | 1.44 million | 2010 | nan | nan |\n", + "| 115 | 85 | Zimbabwe | 1.42 million | 2009 | nan | nan |\n", + "| 116 | 86 | Uruguay | 1.41 million | 2009 | nan | nan |\n", + "| 117 | =87 | Gaza Strip | 1.38 million | 2009 | nan | nan |\n", + "| 118 | =87 | West Bank | 1.38 million | 2009 | nan | nan |\n", + "| 119 | =89 | Georgia | 1.3 million | 2010 | nan | nan |\n", + "| 120 | =89 | Albania | 1.3 million | 2010 | nan | nan |\n", + "| 121 | 91 | Slovenia | 1.3 million | 2010 | nan | nan |\n", + "| 122 | 92 | Ghana | 1.3 million | 2009 | nan | nan |\n", + "| 123 | 93 | Moldova | 1.29 million | 2010 | nan | nan |\n", + "| 124 | 94 | Paraguay | 1.1 million | 2009 | nan | nan |\n", + "| 125 | 95 | Bolivia | 1.1 million | 2009 | nan | nan |\n", + "| 126 | 96 | Kuwait | 1.1 million | 2009 | nan | nan |\n", + "| 127 | 97 | Republic of Macedonia | 1.06 million | 2009 | nan | nan |\n", + "| 128 | =98 | Afghanistan | 1000000 | 2009 | nan | nan |\n", + "| 129 | =98 | Lebanon | 1000000 | 2009 | nan | nan |\n", + "| 130 | =98 | Puerto Rico | 1000000 | 2009 | nan | nan |\n", + "| 131 | =98 | Haiti | 1000000 | 2009 | nan | nan |\n", + "| 132 | 102 | Estonia | 969700 | 2010 | nan | nan |\n", + "| 133 | 103 | Cote d'Ivoire | 967300 | 2009 | nan | nan |\n", + "| 134 | 104 | Panama | 959800 | 2009 | nan | nan |\n", + "| 135 | 105 | Zambia | 816200 | 2009 | nan | nan |\n", + "| 136 | 106 | Cameroon | 749600 | 2009 | nan | nan |\n", + "| 137 | 107 | El Salvador | 746000 | 2009 | nan | nan |\n", + "| 138 | 108 | Honduras | 731700 | 2009 | nan | nan |\n", + "| 139 | 109 | Malawi | 716400 | 2009 | nan | nan |\n", + "| 140 | 110 | Tajikistan | 700000 | 2009 | nan | nan |\n", + "| 141 | 111 | Tanzania | 678000 | 2009 | nan | nan |\n", + "| 142 | 112 | Bangladesh | 617300 | 2009 | nan | nan |\n", + "| 143 | 113 | Mozambique | 613600 | 2009 | nan | nan |\n", + "| 144 | 114 | Angola | 606700 | 2009 | nan | nan |\n", + "| 145 | 115 | Trinidad and Tobago | 593000 | 2009 | nan | nan |\n", + "| 146 | 116 | Nepal | 577800 | 2009 | nan | nan |\n", + "| 147 | 117 | Qatar | 563800 | 2009 | nan | nan |\n", + "| 148 | 118 | Rwanda | 450000 | 2009 | nan | nan |\n", + "| 149 | 119 | Ethiopia | 447300 | 2009 | nan | nan |\n", + "| 150 | 120 | Cyprus | 433800 | 2010 | nan | nan |\n", + "| 151 | 121 | Luxembourg | 424500 | 2010 | nan | nan |\n", + "| 152 | 122 | Bahrain | 419500 | 2009 | nan | nan |\n", + "| 153 | 123 | Togo | 356300 | 2009 | nan | nan |\n", + "| 154 | 124 | Libya | 353900 | 2009 | nan | nan |\n", + "| 155 | 125 | Mongolia | 330000 | 2008 | nan | nan |\n", + "| 156 | 126 | Iraq | 325900 | 2009 | nan | nan |\n", + "| 157 | 127 | Madagascar | 319900 | 2009 | nan | nan |\n", + "| 158 | 128 | Brunei | 314900 | 2009 | nan | nan |\n", + "| 159 | 129 | Iceland | 301600 | 2010 | nan | nan |\n", + "| 160 | 130 | Laos | 300000 | 2009 | nan | nan |\n", + "| 161 | =131 | Mauritius | 290000 | 2009 | nan | nan |\n", + "| 162 | =131 | Democratic Republic of the Congo | 290000 | 2008 | nan | nan |\n", + "| 163 | 133 | Montenegro | 280000 | 2009 | nan | nan |\n", + "| 164 | 134 | Macau | 270200 | 2009 | nan | nan |\n", + "| 165 | 135 | Mali | 249800 | 2009 | nan | nan |\n", + "| 166 | 136 | Congo, Republic of the | 245200 | 2009 | nan | nan |\n", + "| 167 | 137 | Malta | 240600 | 2010 | nan | nan |\n", + "| 168 | 138 | Armenia | 208200 | 2010 | nan | nan |\n", + "| 169 | 139 | Benin | 200100 | 2009 | nan | nan |\n", + "| 170 | 140 | Eritrea | 200000 | 2008 | nan | nan |\n", + "| 171 | 141 | Nicaragua | 199800 | 2009 | nan | nan |\n", + "| 172 | 142 | Guyana | 189600 | 2009 | nan | nan |\n", + "| 173 | 143 | Barbados | 188000 | 2008 | nan | nan |\n", + "| 174 | 144 | Burkina Faso | 178100 | 2009 | nan | nan |\n", + "| 175 | 145 | Chad | 168100 | 2009 | nan | nan |\n", + "| 176 | 146 | Suriname | 163000 | 2009 | nan | nan |\n", + "| 177 | 147 | Burundi | 157800 | 2009 | nan | nan |\n", + "| 178 | 148 | Cape Verde | 150000 | 2009 | nan | nan |\n", + "| 179 | 149 | Saint Lucia | 142900 | 2009 | nan | nan |\n", + "| 180 | 150 | The Gambia | 130100 | 2009 | nan | nan |\n", + "| 181 | 151 | Namibia | 127500 | 2009 | nan | nan |\n", + "| 182 | 152 | Papua New Guinea | 125000 | 2009 | nan | nan |\n", + "| 183 | =153 | Botswana | 120000 | 2009 | nan | nan |\n", + "| 184 | =153 | French Polynesia | 120000 | 2009 | nan | nan |\n", + "| 185 | 155 | Niger | 115900 | 2009 | nan | nan |\n", + "| 186 | 156 | The Bahamas | 115800 | 2009 | nan | nan |\n", + "| 187 | 157 | Fiji | 114200 | 2009 | nan | nan |\n", + "| 188 | 158 | Burma | 110000 | 2009 | nan | nan |\n", + "| 189 | 159 | Somalia | 106000 | 2009 | nan | nan |\n", + "| 190 | 160 | Gabon | 98800 | 2009 | nan | nan |\n", + "| 191 | 161 | Guinea | 95000 | 2009 | nan | nan |\n", + "| 192 | 162 | Swaziland | 90100 | 2009 | nan | nan |\n", + "| 193 | 163 | Guam | 90000 | 2009 | nan | nan |\n", + "| 194 | 164 | Maldives | 86400 | 2009 | nan | nan |\n", + "| 195 | 165 | New Caledonia | 85000 | 2009 | nan | nan |\n", + "| 196 | 166 | Turkmenistan | 80400 | 2009 | nan | nan |\n", + "| 197 | 167 | Cambodia | 78500 | 2009 | nan | nan |\n", + "| 198 | 168 | Lesotho | 76800 | 2009 | nan | nan |\n", + "| 199 | 169 | Saint Vincent and the Grenadines | 76000 | 2009 | nan | nan |\n", + "| 200 | 170 | Mauritania | 75000 | 2009 | nan | nan |\n", + "| 201 | 171 | Andorra | 67200 | 2010 | nan | nan |\n", + "| 202 | 172 | Antigua and Barbuda | 65000 | 2009 | nan | nan |\n", + "| 203 | 173 | Bermuda | 54000 | 2009 | nan | nan |\n", + "| 204 | 174 | Bhutan | 50000 | 2009 | nan | nan |\n", + "| 205 | 175 | Guernsey | 48300 | 2009 | nan | nan |\n", + "| 206 | 176 | Faroe Islands | 37500 | 2009 | nan | nan |\n", + "| 207 | 177 | Guinea-Bissau | 37100 | 2009 | nan | nan |\n", + "| 208 | =178 | Belize | 36000 | 2009 | nan | nan |\n", + "| 209 | =178 | Greenland | 36000 | 2009 | nan | nan |\n", + "| 210 | 180 | Seychelles | 32000 | 2008 | nan | nan |\n", + "| 211 | 181 | Virgin Islands | 30000 | 2009 | nan | nan |\n", + "| 212 | 182 | Jersey | 29500 | 2009 | nan | nan |\n", + "| 213 | 183 | Dominica | 28000 | 2009 | nan | nan |\n", + "| 214 | 184 | Sao Tome and Principe | 26700 | 2009 | nan | nan |\n", + "| 215 | 185 | Djibouti | 25900 | 2009 | nan | nan |\n", + "| 216 | 186 | Grenada | 25000 | 2009 | nan | nan |\n", + "| 217 | 187 | Comoros | 24300 | 2009 | nan | nan |\n", + "| 218 | 188 | Aruba | 24000 | 2009 | nan | nan |\n", + "| 219 | =189 | Monaco | 23000 | 2010 | nan | nan |\n", + "| 220 | =189 | Liechtenstein | 23000 | 2010 | nan | nan |\n", + "| 221 | =189 | Cayman Islands | 23000 | 2008 | nan | nan |\n", + "| 222 | 192 | Central African Republic | 22600 | 2009 | nan | nan |\n", + "| 223 | 193 | Gibraltar | 20200 | 2009 | nan | nan |\n", + "| 224 | 194 | Liberia | 20000 | 2009 | nan | nan |\n", + "| 225 | =195 | Vanuatu | 17000 | 2009 | nan | nan |\n", + "| 226 | =195 | San Marino | 17000 | 2010 | nan | nan |\n", + "| 227 | =195 | Federated States of Micronesia | 17000 | 2009 | nan | nan |\n", + "| 228 | =195 | Saint Kitts and Nevis | 17000 | 2009 | nan | nan |\n", + "| 229 | 199 | Sierra Leone | 14900 | 2009 | nan | nan |\n", + "| 230 | 200 | Equatorial Guinea | 14400 | 2009 | nan | nan |\n", + "| 231 | 201 | Solomon Islands | 10000 | 2009 | nan | nan |\n", + "| 232 | 202 | Samoa | 9000 | 2009 | nan | nan |\n", + "| 233 | 203 | Tonga | 8400 | 2009 | nan | nan |\n", + "| 234 | 204 | Kiribati | 7800 | 2009 | nan | nan |\n", + "| 235 | 205 | Cook Islands | 6000 | 2009 | nan | nan |\n", + "| 236 | 206 | Tuvalu | 4200 | 2008 | nan | nan |\n", + "| 237 | 207 | British Virgin Islands | 4000 | 2002 | nan | nan |\n", + "| 238 | 208 | Anguilla | 3700 | 2009 | nan | nan |\n", + "| 239 | 209 | Falkland Islands (Islas Malvinas) | 2900 | 2009 | nan | nan |\n", + "| 240 | 210 | Marshall Islands | 2200 | 2009 | nan | nan |\n", + "| 241 | 211 | East Timor | 2100 | 2009 | nan | nan |\n", + "| 242 | 212 | Wallis and Futuna | 1300 | 2009 | nan | nan |\n", + "| 243 | 213 | Montserrat | 1200 | 2009 | nan | nan |\n", + "| 244 | 214 | Niue | 1100 | 2009 | nan | nan |\n", + "| 245 | =215 | Saint Helena, Ascension, and Tristan da Cunha | 900 | 2009 | nan | nan |\n", + "| 246 | =215 | Saint Helena | 900 | 2009 | nan | nan |\n", + "| 247 | 217 | Tokelau | 800 | 2008 | nan | nan |\n", + "| 248 | 218 | Christmas Island | 464 | 2001 | nan | nan |\n", + "+-----+------+---------------------------------------------------+---------------+--------+---------+-----------+\n" + ] + } + ], + "source": [ + "res = requests.get(\"http://www.nationmaster.com/country-info/stats/Media/Internet-users\")\n", + "soup = BeautifulSoup(res.content,'lxml')\n", + "table = soup.find_all('table')[0] \n", + "df = pd.read_html(str(table))\n", + "print( tabulate(df[0], headers='keys', tablefmt='psql') )" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Fim" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Obrigado - Data Science Academy - facebook.com/dsacademybr" + ] + } + ], + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Cap14/index.html b/Cap14/index.html new file mode 100644 index 00000000..da46720a --- /dev/null +++ b/Cap14/index.html @@ -0,0 +1,13 @@ + + + + + +

Título 1

+ +

Primeiro Parágrafo

+ + + + + diff --git "a/JupyterNotebooks/Cap\303\255tulo01/Instalando Anaconda Python no Linux Ubuntu 16.04 LTS.pdf" "b/JupyterNotebooks/Cap\303\255tulo01/Instalando Anaconda Python no Linux Ubuntu 16.04 LTS.pdf" deleted file mode 100644 index b10cc512..00000000 Binary files "a/JupyterNotebooks/Cap\303\255tulo01/Instalando Anaconda Python no Linux Ubuntu 16.04 LTS.pdf" and /dev/null differ diff --git "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Exerc\303\255cios-Solu\303\247\303\243o.ipynb" "b/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Exerc\303\255cios-Solu\303\247\303\243o.ipynb" deleted file mode 100644 index f208f5cc..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo02/DSA-Python-Cap\303\255tulo2-Exerc\303\255cios-Solu\303\247\303\243o.ipynb" +++ /dev/null @@ -1,331 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 2\n", - "\n", - "## Download: http://github.com/dsacademybr" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exercícios" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n" - ] - } - ], - "source": [ - "# Exercício 1 - Imprima na tela os números de 1 a 10\n", - "lista = [1,2,3,4,5,6,7,8,9,10]\n", - "print(lista)" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['chocolate', 'maça', 'abacaxi', 'uva', 'morango']\n" - ] - } - ], - "source": [ - "# Exercício 2 - Crie uma lista de 5 objetos e imprima na tela\n", - "lista = ['chocolate', 'maça', 'abacaxi', 'uva', 'morango']\n", - "print(lista)" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Se beber não dirija!\n" - ] - } - ], - "source": [ - "# Exercício 3 - Crie duas strings e concatene as duas em uma terceira string\n", - "frase1 = 'Se beber '\n", - "frase2 = 'não dirija!'\n", - "frase_final = frase1 + frase2\n", - "print(frase_final)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "3" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Exercício 4 - Crie uma tupla com os seguintes elementos: 1, 2, 2, 3, 4, 4, 4, 5 e depois utilize a função count do \n", - "# objeto tupla para verificar quantas vezes o número 4 aparece na tupla\n", - "tup1 = (1, 2, 2, 3, 4, 4, 4, 5)\n", - "tup1.count(4)" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'k2': 'serrote', 'k1': 'martelo', 'k3': 'machado'}\n" - ] - } - ], - "source": [ - "# Exercício 5 - Crie um dicionário com 3 chaves e 3 valores e imprima na tela\n", - "dict = {'k1':'martelo', 'k2':'serrote', 'k3':'machado'}\n", - "print(dict)" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'k2': 'serrote', 'k1': 'martelo', 'k4': 'parafuso', 'k3': 'machado'}\n" - ] - } - ], - "source": [ - "# Exercício 6 - Adicione mais uma ferramenta ao dicionário criado no exercício anterior e imprima na tela\n", - "dict['k4'] = 'parafuso'\n", - "print(dict)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Exercício 7 - Crie um arquivo chamado nomes.txt no diretório onde está este notebook, grave 5 nomes no arquivo e \n", - "# feche-o.\n", - "arq1 = open(\"nomes.txt\", \"w\")\n", - "arq1.write('Brian, Peter, John, Eric, Bernard')\n", - "arq1.close()" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "'Brian, Peter, John, Eric, Bernard'" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Exercício 8 - Abra o arquivo criado no item anterior e leia o arquivo na tela.\n", - "arq1 = open(\"nomes.txt\", \"r\")\n", - "arq1.read()" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{}\n" - ] - } - ], - "source": [ - "# Exercício 9 - Crie um dicionário vazio e imrpima na tela\n", - "dict2 = {}\n", - "print(dict2)" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
admitgregparank
39506204.002
39605603.043
39704602.632
39807003.652
39906003.893
\n", - "
" - ], - "text/plain": [ - " admit gre gpa rank\n", - "395 0 620 4.00 2\n", - "396 0 560 3.04 3\n", - "397 0 460 2.63 2\n", - "398 0 700 3.65 2\n", - "399 0 600 3.89 3" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Exercício 10 - Complelete o trecho de código abaixo criado com Pandas e use a função tail() para ler os últimos \n", - "# elementos do dataset.\n", - "import pandas as pd\n", - "file_name = \"http://www.ats.ucla.edu/stat/data/binary.csv\"\n", - "df = pd.read_csv(file_name)\n", - "df.tail()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Fim" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" - ] - } - ], - "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.5.1" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git "a/JupyterNotebooks/Cap\303\255tulo02/arquivo-dsc.txt" "b/JupyterNotebooks/Cap\303\255tulo02/arquivo-dsc.txt" deleted file mode 100644 index 7110485b..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo02/arquivo-dsc.txt" +++ /dev/null @@ -1 +0,0 @@ -Testando gravação de arquivos em Python Acrescentando conteúdo \ No newline at end of file diff --git "a/JupyterNotebooks/Cap\303\255tulo02/nomes.txt" "b/JupyterNotebooks/Cap\303\255tulo02/nomes.txt" deleted file mode 100644 index 7b230869..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo02/nomes.txt" +++ /dev/null @@ -1 +0,0 @@ -Brian, Peter, John, Eric, Bernard \ No newline at end of file diff --git "a/JupyterNotebooks/Cap\303\255tulo04/DSA-Python-Cap\303\255tulo4-Exerc\303\255cios-Solu\303\247\303\243o.ipynb" "b/JupyterNotebooks/Cap\303\255tulo04/DSA-Python-Cap\303\255tulo4-Exerc\303\255cios-Solu\303\247\303\243o.ipynb" deleted file mode 100644 index a3bd4f49..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo04/DSA-Python-Cap\303\255tulo4-Exerc\303\255cios-Solu\303\247\303\243o.ipynb" +++ /dev/null @@ -1,340 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 4\n", - "\n", - "## Download: http://github.com/dsacademybr" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exercícios" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2\n", - "4\n", - "6\n", - "8\n", - "10\n", - "12\n", - "14\n", - "16\n", - "18\n", - "20\n" - ] - } - ], - "source": [ - "# Exercício 1 - Crie uma função que imprima a sequência de números pares entre 1 e 20 (a função não recebe parâmetro) e \n", - "# depois faça uma chamada à função para listar os números\n", - "def listaPar():\n", - " for i in range(2, 21, 2): \n", - " print(i)\n", - " \n", - "listaPar() " - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "RUMO À ANÁLISE DE DADOS\n" - ] - } - ], - "source": [ - "# Exercício 2 - Crie uam função que receba uma string como argumento e retorne a mesma string em letras maiúsculas.\n", - "# Faça uma chamada à função, passando como parâmetro uma string\n", - "def listaString(texto):\n", - " print(texto.upper())\n", - " return\n", - "\n", - "listaString('Rumo à Análise de Dados')" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "None\n", - "None\n", - "[1, 2, 3, 4, 5, 6]\n" - ] - } - ], - "source": [ - "# Exercício 3 - Crie uma função que receba como parâmetro uma lista de 4 elementos, adicione 2 elementos a lista e \n", - "# imprima a lista\n", - "def novaLista(lista):\n", - " print(lista.append(5))\n", - " print(lista.append(6))\n", - " \n", - "lista1 = [1, 2, 3, 4] \n", - "novaLista(lista1)\n", - "print(lista1)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "100\n", - "A\n", - "B\n", - "C\n" - ] - } - ], - "source": [ - "# Exercício 4 - Crie uma função que receba um argumento formal e uma possível lista de elementos. Faça duas chamadas \n", - "# à função, com apenas 1 elemento e na segunda chamada com 4 elementos\n", - "def printNum( arg1, *lista ):\n", - " print (arg1)\n", - " for i in lista:\n", - " print (i)\n", - " return;\n", - "\n", - "# Chamada à função\n", - "printNum( 100 )\n", - "printNum( 'A', 'B', 'C' )" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "A soma é : 750\n" - ] - } - ], - "source": [ - "# Exercício 5 - Crie uma função anônima e atribua seu retorno a uma variável chamada soma. A expressão vai receber 2 \n", - "# números como parâmetro e retornar a soma deles\n", - "soma = lambda arg1, arg2: arg1 + arg2;\n", - "print (\"A soma é : \", soma( 452, 298 ))" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Dentro da função o total é : 30\n", - "Fora da função o total é : 0\n" - ] - } - ], - "source": [ - "# Exercício 6 - Execute o código abaixo e certifique-se que compreende a diferença entre variável global e local\n", - "\n", - "total = 0; \n", - "def soma( arg1, arg2 ):\n", - " total = arg1 + arg2; \n", - " print (\"Dentro da função o total é : \", total)\n", - " return total;\n", - "\n", - "\n", - "soma( 10, 20 );\n", - "print (\"Fora da função o total é : \", total)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
admitgregparank
count400.000000400.000000400.000000400.00000
mean0.317500587.7000003.3899002.48500
std0.466087115.5165360.3805670.94446
min0.000000220.0000002.2600001.00000
25%0.000000520.0000003.1300002.00000
50%0.000000580.0000003.3950002.00000
75%1.000000660.0000003.6700003.00000
max1.000000800.0000004.0000004.00000
\n", - "
" - ], - "text/plain": [ - " admit gre gpa rank\n", - "count 400.000000 400.000000 400.000000 400.00000\n", - "mean 0.317500 587.700000 3.389900 2.48500\n", - "std 0.466087 115.516536 0.380567 0.94446\n", - "min 0.000000 220.000000 2.260000 1.00000\n", - "25% 0.000000 520.000000 3.130000 2.00000\n", - "50% 0.000000 580.000000 3.395000 2.00000\n", - "75% 1.000000 660.000000 3.670000 3.00000\n", - "max 1.000000 800.000000 4.000000 4.00000" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Exercício 7 - Crie uma função que receba o arquivo abaixo como argumento e retorne um resumo estatístico descritivo \n", - "# do arquivo. Dica, use Pandas e um de seus métodos, describe()\n", - "# Arquivo: \"http://www.ats.ucla.edu/stat/data/binary.csv\"\n", - "import pandas as pd\n", - "file_name = \"http://www.ats.ucla.edu/stat/data/binary.csv\"\n", - "\n", - "def retornaArq(file_name):\n", - " df = pd.read_csv(file_name)\n", - " return df.describe()\n", - " \n", - "retornaArq(file_name) " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Fim" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" - ] - } - ], - "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.5.1" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git "a/JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte6 - Criando Gr\303\241ficos com Matplotlib e SQLite.ipynb" "b/JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte6 - Criando Gr\303\241ficos com Matplotlib e SQLite.ipynb" deleted file mode 100644 index b8d7744e..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo06/Jupyter Notebook Parte6 - Criando Gr\303\241ficos com Matplotlib e SQLite.ipynb" +++ /dev/null @@ -1,927 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 6\n", - "\n", - "## Download: http://github.com/dsacademybr" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Gráficos" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "import sqlite3\n", - "import random\n", - "import datetime\n", - "import matplotlib.pyplot as plt\n", - "%matplotlib notebook\n", - " \n", - "# Criando uma conexão\n", - "conn = sqlite3.connect('dsa.db') \n", - "\n", - "# Criando um cursor\n", - "c = conn.cursor()\n", - " \n", - "# Função para criar uma tabela\n", - "def create_table():\n", - " c.execute('CREATE TABLE IF NOT EXISTS produtos(id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, date TEXT, '\\\n", - " 'prod_name TEXT, valor REAL)')\n", - " \n", - "# Função para inserir uma linha\n", - "def data_insert():\n", - " c.execute(\"INSERT INTO produtos VALUES(now, 'Teclado', 130 )\")\n", - " conn.commit()\n", - " c.close()\n", - " conn.close()\n", - " \n", - "# Usando variáveis para inserir dados \n", - "def data_insert_var():\n", - " new_date = datetime.datetime.now()\n", - " new_prod_name = 'monitor'\n", - " new_valor = random.randrange(50,100)\n", - " c.execute(\"INSERT INTO produtos (date, prod_name, valor) VALUES (?, ?, ?, ?)\", \n", - " (new_date, new_prod_name, new_valor))\n", - " conn.commit()\n", - " \n", - "# Leitura de dados\n", - "def leitura_todos_dados():\n", - " c.execute(\"SELECT * FROM PRODUTOS\")\n", - " for linha in c.fetchall():\n", - " print(linha)\n", - " \n", - "# Leitura de registros específicos\n", - "def leitura_registros():\n", - " c.execute(\"SELECT * FROM PRODUTOS WHERE valor > 60.0\")\n", - " for linha in c.fetchall():\n", - " print(linha) \n", - " \n", - "# Leitura de colunas específicos\n", - "def leitura_colunas():\n", - " c.execute(\"SELECT * FROM PRODUTOS\")\n", - " for linha in c.fetchall():\n", - " print(linha[3]) \n", - " \n", - "# Update\n", - "def atualiza_dados():\n", - " c.execute(\"UPDATE produtos SET valor = 70.00 WHERE valor > 80.0\")\n", - " conn.commit()\n", - " \n", - "# Delete\n", - "def remove_dados():\n", - " c.execute(\"DELETE FROM produtos WHERE valor = 65.0\")\n", - " conn.commit()\n", - " \n", - "# Gerar gráficos com os dados \n", - "def dados_grafico():\n", - " c.execute(\"SELECT id, valor FROM produtos\")\n", - " ids = []\n", - " valores = []\n", - " dados = c.fetchall()\n", - " for linha in dados:\n", - " ids.append(linha[0])\n", - " valores.append(linha[1])\n", - " \n", - " plt.bar(ids, valores)\n", - " plt.show()" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "application/javascript": [ - "/* Put everything inside the global mpl namespace */\n", - "window.mpl = {};\n", - "\n", - "mpl.get_websocket_type = function() {\n", - " if (typeof(WebSocket) !== 'undefined') {\n", - " return WebSocket;\n", - " } else if (typeof(MozWebSocket) !== 'undefined') {\n", - " return MozWebSocket;\n", - " } else {\n", - " alert('Your browser does not have WebSocket support.' +\n", - " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", - " 'Firefox 4 and 5 are also supported but you ' +\n", - " 'have to enable WebSockets in about:config.');\n", - " };\n", - "}\n", - "\n", - "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", - " this.id = figure_id;\n", - "\n", - " this.ws = websocket;\n", - "\n", - " this.supports_binary = (this.ws.binaryType != undefined);\n", - "\n", - " if (!this.supports_binary) {\n", - " var warnings = document.getElementById(\"mpl-warnings\");\n", - " if (warnings) {\n", - " warnings.style.display = 'block';\n", - " warnings.textContent = (\n", - " \"This browser does not support binary websocket messages. \" +\n", - " \"Performance may be slow.\");\n", - " }\n", - " }\n", - "\n", - " this.imageObj = new Image();\n", - "\n", - " this.context = undefined;\n", - " this.message = undefined;\n", - " this.canvas = undefined;\n", - " this.rubberband_canvas = undefined;\n", - " this.rubberband_context = undefined;\n", - " this.format_dropdown = undefined;\n", - "\n", - " this.image_mode = 'full';\n", - "\n", - " this.root = $('
');\n", - " this._root_extra_style(this.root)\n", - " this.root.attr('style', 'display: inline-block');\n", - "\n", - " $(parent_element).append(this.root);\n", - "\n", - " this._init_header(this);\n", - " this._init_canvas(this);\n", - " this._init_toolbar(this);\n", - "\n", - " var fig = this;\n", - "\n", - " this.waiting = false;\n", - "\n", - " this.ws.onopen = function () {\n", - " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", - " fig.send_message(\"send_image_mode\", {});\n", - " fig.send_message(\"refresh\", {});\n", - " }\n", - "\n", - " this.imageObj.onload = function() {\n", - " if (fig.image_mode == 'full') {\n", - " // Full images could contain transparency (where diff images\n", - " // almost always do), so we need to clear the canvas so that\n", - " // there is no ghosting.\n", - " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", - " }\n", - " fig.context.drawImage(fig.imageObj, 0, 0);\n", - " };\n", - "\n", - " this.imageObj.onunload = function() {\n", - " this.ws.close();\n", - " }\n", - "\n", - " this.ws.onmessage = this._make_on_message_function(this);\n", - "\n", - " this.ondownload = ondownload;\n", - "}\n", - "\n", - "mpl.figure.prototype._init_header = function() {\n", - " var titlebar = $(\n", - " '
');\n", - " var titletext = $(\n", - " '
');\n", - " titlebar.append(titletext)\n", - " this.root.append(titlebar);\n", - " this.header = titletext[0];\n", - "}\n", - "\n", - "\n", - "\n", - "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "\n", - "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "mpl.figure.prototype._init_canvas = function() {\n", - " var fig = this;\n", - "\n", - " var canvas_div = $('
');\n", - "\n", - " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", - "\n", - " function canvas_keyboard_event(event) {\n", - " return fig.key_event(event, event['data']);\n", - " }\n", - "\n", - " canvas_div.keydown('key_press', canvas_keyboard_event);\n", - " canvas_div.keyup('key_release', canvas_keyboard_event);\n", - " this.canvas_div = canvas_div\n", - " this._canvas_extra_style(canvas_div)\n", - " this.root.append(canvas_div);\n", - "\n", - " var canvas = $('');\n", - " canvas.addClass('mpl-canvas');\n", - " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", - "\n", - " this.canvas = canvas[0];\n", - " this.context = canvas[0].getContext(\"2d\");\n", - "\n", - " var rubberband = $('');\n", - " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", - "\n", - " var pass_mouse_events = true;\n", - "\n", - " canvas_div.resizable({\n", - " start: function(event, ui) {\n", - " pass_mouse_events = false;\n", - " },\n", - " resize: function(event, ui) {\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " stop: function(event, ui) {\n", - " pass_mouse_events = true;\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " });\n", - "\n", - " function mouse_event_fn(event) {\n", - " if (pass_mouse_events)\n", - " return fig.mouse_event(event, event['data']);\n", - " }\n", - "\n", - " rubberband.mousedown('button_press', mouse_event_fn);\n", - " rubberband.mouseup('button_release', mouse_event_fn);\n", - " // Throttle sequential mouse events to 1 every 20ms.\n", - " rubberband.mousemove('motion_notify', mouse_event_fn);\n", - "\n", - " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", - " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", - "\n", - " canvas_div.on(\"wheel\", function (event) {\n", - " event = event.originalEvent;\n", - " event['data'] = 'scroll'\n", - " if (event.deltaY < 0) {\n", - " event.step = 1;\n", - " } else {\n", - " event.step = -1;\n", - " }\n", - " mouse_event_fn(event);\n", - " });\n", - "\n", - " canvas_div.append(canvas);\n", - " canvas_div.append(rubberband);\n", - "\n", - " this.rubberband = rubberband;\n", - " this.rubberband_canvas = rubberband[0];\n", - " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", - " this.rubberband_context.strokeStyle = \"#000000\";\n", - "\n", - " this._resize_canvas = function(width, height) {\n", - " // Keep the size of the canvas, canvas container, and rubber band\n", - " // canvas in synch.\n", - " canvas_div.css('width', width)\n", - " canvas_div.css('height', height)\n", - "\n", - " canvas.attr('width', width);\n", - " canvas.attr('height', height);\n", - "\n", - " rubberband.attr('width', width);\n", - " rubberband.attr('height', height);\n", - " }\n", - "\n", - " // Set the figure to an initial 600x600px, this will subsequently be updated\n", - " // upon first draw.\n", - " this._resize_canvas(600, 600);\n", - "\n", - " // Disable right mouse context menu.\n", - " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", - " return false;\n", - " });\n", - "\n", - " function set_focus () {\n", - " canvas.focus();\n", - " canvas_div.focus();\n", - " }\n", - "\n", - " window.setTimeout(set_focus, 100);\n", - "}\n", - "\n", - "mpl.figure.prototype._init_toolbar = function() {\n", - " var fig = this;\n", - "\n", - " var nav_element = $('
')\n", - " nav_element.attr('style', 'width: 100%');\n", - " this.root.append(nav_element);\n", - "\n", - " // Define a callback function for later on.\n", - " function toolbar_event(event) {\n", - " return fig.toolbar_button_onclick(event['data']);\n", - " }\n", - " function toolbar_mouse_event(event) {\n", - " return fig.toolbar_button_onmouseover(event['data']);\n", - " }\n", - "\n", - " for(var toolbar_ind in mpl.toolbar_items) {\n", - " var name = mpl.toolbar_items[toolbar_ind][0];\n", - " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", - " var image = mpl.toolbar_items[toolbar_ind][2];\n", - " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", - "\n", - " if (!name) {\n", - " // put a spacer in here.\n", - " continue;\n", - " }\n", - " var button = $('\\n\\n \\n \\n\\n \\n
\\n \\n
\\n \\n
\\n \\n
\\n\\n
\\n\\n \\n\\n
\\n \\n
\\n\\n \\n\\n
    \\n \\n
  • \\n
    # Python 3: Fibonacci series up to n\\r\\n>>> def fib(n):\\r\\n>>>     a, b = 0, 1\\r\\n>>>     while a < n:\\r\\n>>>         print(a, end=\\' \\')\\r\\n>>>         a, b = b, a+b\\r\\n>>>     print()\\r\\n>>> fib(1000)\\r\\n0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
    \\n

    Functions Defined

    \\r\\n

    The core of extensible programming is defining functions. Python allows mandatory and optional arguments, keyword arguments, and even arbitrary argument lists. More about defining functions in Python 3

    \\n
  • \\n \\n
  • \\n
    # Python 3: List comprehensions\\r\\n>>> fruits = [\\'Banana\\', \\'Apple\\', \\'Lime\\']\\r\\n>>> loud_fruits = [fruit.upper() for fruit in fruits]\\r\\n>>> print(loud_fruits)\\r\\n[\\'BANANA\\', \\'APPLE\\', \\'LIME\\']\\r\\n\\r\\n# List and the enumerate function\\r\\n>>> list(enumerate(fruits))\\r\\n[(0, \\'Banana\\'), (1, \\'Apple\\'), (2, \\'Lime\\')]
    \\n

    Compound Data Types

    \\r\\n

    Lists (known as arrays in other languages) are one of the compound data types that Python understands. Lists can be indexed, sliced and manipulated with other built-in functions. More about lists in Python 3

    \\n
  • \\n \\n
  • \\n
    # Python 3: Simple arithmetic\\r\\n>>> 1 / 2\\r\\n0.5\\r\\n>>> 2 ** 3\\r\\n8\\r\\n>>> 17 / 3  # classic division returns a float\\r\\n5.666666666666667\\r\\n>>> 17 // 3  # floor division\\r\\n5
    \\n

    Intuitive Interpretation

    \\r\\n

    Calculations are simple with Python, and expression syntax is straightforward: the operators +, -, * and / work as expected; parentheses () can be used for grouping. More about simple math functions in Python 3.

    \\n
  • \\n \\n
  • \\n
    # Python 3: Simple output (with Unicode)\\r\\n>>> print(\"Hello, I\\'m Python!\")\\r\\nHello, I\\'m Python!\\r\\n\\r\\n# Input, assignment\\r\\n>>> name = input(\\'What is your name?\\\\n\\')\\r\\n>>> print(\\'Hi, %s.\\' % name)\\r\\nWhat is your name?\\r\\nPython\\r\\nHi, Python.
    \\n

    Quick & Easy to Learn

    \\r\\n

    Experienced programmers in any other language can pick up Python very quickly, and beginners find the clean syntax and indentation structure easy to learn. Whet your appetite with our Python 3 overview.

    \\r\\n
    \\n
  • \\n \\n
  • \\n
    # For loop on a list\\r\\n>>> numbers = [2, 4, 6, 8]\\r\\n>>> product = 1\\r\\n>>> for number in numbers:\\r\\n...    product = product * number\\r\\n... \\r\\n>>> print(\\'The product is:\\', product)\\r\\nThe product is: 384
    \\n

    All the Flow You’d Expect

    \\r\\n

    Python knows the usual control flow statements that other languages speak — if, for, while and range — with some of its own twists, of course. More control flow tools in Python 3

    \\n
  • \\n \\n
\\n
\\n\\n\\n
\\n\\n \\n
\\n

Python is a programming language that lets you work quickly and integrate systems more effectively. Learn More

\\n
\\n\\n\\n
\\n \\n\\n
\\n \\n
\\n\\n
\\n\\n \\n \\n\\n \\n\\n \\n\\n
\\n\\n
\\n

Get Started

\\r\\n

Whether you\\'re new to programming or an experienced developer, it\\'s easy to learn and use Python.

\\r\\n

Start with our Beginner’s Guide

\\n
\\n\\n
\\n

Download

\\n

Python source code and installers are available for download for all versions! Not sure which version to use? Check here.

\\n

Latest: Python 3.5.1 - Python 2.7.11

\\n
\\n\\n
\\n

Docs

\\r\\n

Documentation for Python\\'s standard library, along with tutorials and guides, are available online.

\\r\\n

docs.python.org

\\n
\\n\\n
\\n

Jobs

\\r\\n

Looking for work or have a Python related position that you\\'re trying to hire for? Our relaunched community-run job board is the place to go.

\\r\\n

jobs.python.org

\\n
\\n\\n
\\n\\n
\\n\\n \\n\\n
\\n \\n
\\n \\n

Upcoming Events

\\n

More

\\n \\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n\\n \\n\\n
\\n
\\n

Use Python for…

\\r\\n

More

\\r\\n\\r\\n\\r\\n\\n
\\n
\\n\\n
\\n\\n \\n
\\n\\n

\\n >>> Python Enhancement Proposals (PEPs): The future of Python is discussed here.\\n RSS\\n

\\n\\n\\n \\n \\n
\\n\\n
\\n\\n
\\n \\n

\\r\\n >>> Python Software Foundation\\r\\n

\\r\\n

The mission of the Python Software Foundation is to promote, protect, and advance the Python programming language, and to support and facilitate the growth of a diverse and international community of Python programmers. Learn more

\\r\\n

\\r\\n Become a Member\\r\\n Donate to the PSF\\r\\n

\\n
\\n\\n\\n\\n\\n
\\n\\n \\n \\n\\n \\n \\n\\n\\n
\\n
\\n\\n \\n \\n\\n
\\n\\n \\n \\n \\n\\n \\n\\n \\n \\n\\n \\n\\n \\n\\n \\n\\n \\n \\n\\n\\n\\n'\n" - ] - } - ], - "source": [ - "# Imprimindo html\n", - "print(html)" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAEFCAYAAADgylzDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXmYFNXVxt/DIqsCbrixuIGIKGrElc9RRMVEJYkaXFCj\nUeISt8S4B9S4R42JmsV9QxEVwQ2UyLhHXFAIoqICisAgILLDDHO+P05dq7q7epvp6uqefn/P009V\n3a7qOtPT9datc889R1QVhBBCmj7N4jaAEEJIcaDgE0JIhUDBJ4SQCoGCTwghFQIFnxBCKgQKPiGE\nVAgtoj6BiMwG8AOAegC1qtpPRDoBGAWgG4DZAI5T1R+itoUQQiqZYvTw6wFUqeruqtrPa7sUwERV\n7QngVQCXFcEOQgipaIoh+BJynqMBPOStPwRgcBHsIISQiqYYgq8AXhGR90TkN15bZ1WtAQBVXQBg\n8yLYQQghFU3kPnwA+6vqfBHZDMDLIvIZ7CYQhPkdCCEkYiIXfFWd7y2/E5FnAfQDUCMinVW1RkS2\nALAw7FgR4Y2AEEIagKpKclukLh0RaSsi7b31dgAOBTANwDgAp3q7nQJgbLrPUNWSfw0fPjx2G5qa\nreViZznZSjsrx9Z0RN3D7wxgjNdTbwHgMVV9WUTeB/CkiJwGYA6A4yK2gxBCKp5IBV9VZwHoG9K+\nBMAhUZ6bEEJIIpxpWwCqqqriNiFnysXWcrETKB9baWfhKSdbAUAy+XviRkS0lO0jhJBSRESgxR60\nJYQQUjpQ8AkhpEKg4BNCSIVAwSeEkAqBgk8IIRUCBZ8QQioECj4hhFQIFHxCCKkQKPiEEFIhUPAJ\nIaRCoOATQkiFQMEnJEIWLgSYDoqUChR8QiKkc2dg1Ki4rSDEoOATEjHffRe3BYQYFHxCIkZSktQS\nEg/Mh09IhDix58+YFBPmwyeEkAqHgk8IIRUCBZ8QQioECj4hEbPLLnFbQIhBwSckYnr0iNsCQgxG\n6RASIYzSIXHAKB1CC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C\n1TwN4zMA3URkO297KIDXimAnIXlBwScklV8BGJPU9gwsaieYXlYBwEu7+2sAT4nIx7Ce/z+LYCch\necH0yIQQUiGwh08IIRUCBZ8QQioECj4hhFQIFHxCCKkQKPiEEFIhUPAJIaRCoOATQkiFQMEnhJAK\n4f8B3j55GpAY3JcAAAAASUVORK5CYII=\n", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "# Importando o arquivo com a cotação das ações da Petrobras, lendo o \n", - "# arquivo com o Pandas e gerando um gráfico com Matplotlib\n", - "from urllib.request import urlopen\n", - "import matplotlib.pyplot as plt\n", - "import pandas\n", - "%matplotlib inline\n", - " \n", - "endereco = 'http://real-chart.finance.yahoo.com/table.csv?s=PETR4.SA&d=9&e=17&f=2015&g=d&a=0&b=3&c=2000&ignore=.csv'\n", - "arquivo = urlopen(endereco)\n", - " \n", - "petrobras = pandas.read_csv(arquivo, index_col=0, parse_dates=True)\n", - "petrobras.plot(y='Adj Close')\n", - " \n", - "plt.xlabel('Ano')\n", - "plt.ylabel('Cotação')\n", - "plt.legend().set_visible(False)\n", - "plt.show()" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "import pandas " - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "import pandas as pd" - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "from pandas import DataFrame" - ] - }, - { - "cell_type": "code", - "execution_count": 31, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
OpenHighLowCloseVolumeAdj Close
Date
2015-10-167.998.087.817.95429638007.95
2015-10-158.008.077.678.00614441008.00
2015-10-148.078.237.897.96753391007.96
2015-10-138.368.478.078.13561006008.13
2015-10-128.808.808.808.8008.80
\n", - "
" - ], - "text/plain": [ - " Open High Low Close Volume Adj Close\n", - "Date \n", - "2015-10-16 7.99 8.08 7.81 7.95 42963800 7.95\n", - "2015-10-15 8.00 8.07 7.67 8.00 61444100 8.00\n", - "2015-10-14 8.07 8.23 7.89 7.96 75339100 7.96\n", - "2015-10-13 8.36 8.47 8.07 8.13 56100600 8.13\n", - "2015-10-12 8.80 8.80 8.80 8.80 0 8.80" - ] - }, - "execution_count": 31, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "petrobras.head()" - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "df = pd.DataFrame(petrobras)" - ] - }, - { - "cell_type": "code", - "execution_count": 33, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
OpenHighLowCloseVolumeAdj Close
Date
2015-10-167.990008.080007.810007.95000429638007.95000
2015-10-158.000008.070007.670008.00000614441008.00000
2015-10-148.070008.230007.890007.96000753391007.96000
2015-10-138.360008.470008.070008.13000561006008.13000
2015-10-128.800008.800008.800008.8000008.80000
2015-10-099.020009.070008.580008.80000718852008.80000
2015-10-088.460008.840008.280008.75000686700008.75000
2015-10-078.510008.900008.270008.470001166106008.47000
2015-10-067.860008.340007.840008.19000812593008.19000
2015-10-057.900008.140007.750007.82000683503007.82000
2015-10-026.990007.830006.900007.77000888914007.77000
2015-10-017.310007.460006.990007.02000692965007.02000
2015-09-307.250007.260006.970007.240001077795007.24000
2015-09-296.540006.790006.500006.59000523876006.59000
2015-09-286.740006.750006.440006.44000374669006.44000
2015-09-257.120007.220006.770006.82000448431006.82000
2015-09-246.610007.140006.600006.96000565773006.96000
2015-09-236.960007.160006.700006.82000647748006.82000
2015-09-227.240007.240006.810006.97000667207006.97000
2015-09-217.660007.680007.300007.30000410636007.30000
2015-09-187.750007.760007.500007.60000680970007.60000
2015-09-178.050008.110007.860007.86000728876007.86000
2015-09-167.770008.240007.740008.14000666134008.14000
2015-09-157.650007.870007.540007.65000351029007.65000
2015-09-147.700007.820007.460007.72000528514007.72000
2015-09-117.940007.990007.590007.66000536473007.66000
2015-09-107.900008.150007.810007.97000628587007.97000
2015-09-098.810008.900008.360008.39000387063008.39000
2015-09-088.700008.790008.580008.64000293830008.64000
2015-09-078.510008.510008.510008.5100008.51000
.....................
2000-02-110.423040.423040.423040.42304252979200003.92447
2000-02-100.437040.437040.437040.43704186009600004.05435
2000-02-090.450000.450000.450000.45000156006400004.17458
2000-02-080.460000.460000.460000.46000314982400004.26735
2000-02-070.450000.450000.450000.45000206131200004.17458
2000-02-040.447040.447040.447040.44704211993600004.14712
2000-02-030.436000.436000.436000.43600259507200004.04470
2000-02-020.424000.424000.424000.42400142720000003.93338
2000-02-010.416000.416000.416000.41600236723200003.85917
2000-01-310.408080.408080.408080.40808322662400003.78569
2000-01-280.415040.415040.415040.41504178944000003.85026
2000-01-270.415040.415040.415040.41504383795200003.85026
2000-01-260.418000.418000.418000.41800259174400003.87772
2000-01-250.413040.413040.413040.4130403.83171
2000-01-240.413040.413040.413040.41304183859200003.83171
2000-01-210.416000.416000.416000.41600175129600003.85917
2000-01-200.425040.425040.425040.42504262681600003.94303
2000-01-190.426000.426000.426000.42600388838400003.95193
2000-01-180.429040.429040.429040.42904179251200003.98014
2000-01-170.427040.427040.427040.42704165734400003.96158
2000-01-140.432000.432000.432000.43200166579200004.00760
2000-01-130.426000.426000.426000.42600263833600003.95193
2000-01-120.438640.438640.438640.43864233011200004.06919
2000-01-110.438000.438000.438000.43800239872000004.06326
2000-01-100.449040.449040.449040.44904195635200004.16567
2000-01-070.440000.440000.440000.44000209126400004.08181
2000-01-060.438000.438000.438000.43800340556800004.06326
2000-01-050.439520.439520.439520.43952430336000004.07736
2000-01-040.444000.444000.444000.44400288614400004.11892
2000-01-030.470000.470000.470000.47000353894400004.36012
\n", - "

3874 rows × 6 columns

\n", - "
" - ], - "text/plain": [ - " Open High Low Close Volume Adj Close\n", - "Date \n", - "2015-10-16 7.99000 8.08000 7.81000 7.95000 42963800 7.95000\n", - "2015-10-15 8.00000 8.07000 7.67000 8.00000 61444100 8.00000\n", - "2015-10-14 8.07000 8.23000 7.89000 7.96000 75339100 7.96000\n", - "2015-10-13 8.36000 8.47000 8.07000 8.13000 56100600 8.13000\n", - "2015-10-12 8.80000 8.80000 8.80000 8.80000 0 8.80000\n", - "2015-10-09 9.02000 9.07000 8.58000 8.80000 71885200 8.80000\n", - "2015-10-08 8.46000 8.84000 8.28000 8.75000 68670000 8.75000\n", - "2015-10-07 8.51000 8.90000 8.27000 8.47000 116610600 8.47000\n", - "2015-10-06 7.86000 8.34000 7.84000 8.19000 81259300 8.19000\n", - "2015-10-05 7.90000 8.14000 7.75000 7.82000 68350300 7.82000\n", - "2015-10-02 6.99000 7.83000 6.90000 7.77000 88891400 7.77000\n", - "2015-10-01 7.31000 7.46000 6.99000 7.02000 69296500 7.02000\n", - "2015-09-30 7.25000 7.26000 6.97000 7.24000 107779500 7.24000\n", - "2015-09-29 6.54000 6.79000 6.50000 6.59000 52387600 6.59000\n", - "2015-09-28 6.74000 6.75000 6.44000 6.44000 37466900 6.44000\n", - "2015-09-25 7.12000 7.22000 6.77000 6.82000 44843100 6.82000\n", - "2015-09-24 6.61000 7.14000 6.60000 6.96000 56577300 6.96000\n", - "2015-09-23 6.96000 7.16000 6.70000 6.82000 64774800 6.82000\n", - "2015-09-22 7.24000 7.24000 6.81000 6.97000 66720700 6.97000\n", - "2015-09-21 7.66000 7.68000 7.30000 7.30000 41063600 7.30000\n", - "2015-09-18 7.75000 7.76000 7.50000 7.60000 68097000 7.60000\n", - "2015-09-17 8.05000 8.11000 7.86000 7.86000 72887600 7.86000\n", - "2015-09-16 7.77000 8.24000 7.74000 8.14000 66613400 8.14000\n", - "2015-09-15 7.65000 7.87000 7.54000 7.65000 35102900 7.65000\n", - "2015-09-14 7.70000 7.82000 7.46000 7.72000 52851400 7.72000\n", - "2015-09-11 7.94000 7.99000 7.59000 7.66000 53647300 7.66000\n", - "2015-09-10 7.90000 8.15000 7.81000 7.97000 62858700 7.97000\n", - "2015-09-09 8.81000 8.90000 8.36000 8.39000 38706300 8.39000\n", - "2015-09-08 8.70000 8.79000 8.58000 8.64000 29383000 8.64000\n", - "2015-09-07 8.51000 8.51000 8.51000 8.51000 0 8.51000\n", - "... ... ... ... ... ... ...\n", - "2000-02-11 0.42304 0.42304 0.42304 0.42304 25297920000 3.92447\n", - "2000-02-10 0.43704 0.43704 0.43704 0.43704 18600960000 4.05435\n", - "2000-02-09 0.45000 0.45000 0.45000 0.45000 15600640000 4.17458\n", - "2000-02-08 0.46000 0.46000 0.46000 0.46000 31498240000 4.26735\n", - "2000-02-07 0.45000 0.45000 0.45000 0.45000 20613120000 4.17458\n", - "2000-02-04 0.44704 0.44704 0.44704 0.44704 21199360000 4.14712\n", - "2000-02-03 0.43600 0.43600 0.43600 0.43600 25950720000 4.04470\n", - "2000-02-02 0.42400 0.42400 0.42400 0.42400 14272000000 3.93338\n", - "2000-02-01 0.41600 0.41600 0.41600 0.41600 23672320000 3.85917\n", - "2000-01-31 0.40808 0.40808 0.40808 0.40808 32266240000 3.78569\n", - "2000-01-28 0.41504 0.41504 0.41504 0.41504 17894400000 3.85026\n", - "2000-01-27 0.41504 0.41504 0.41504 0.41504 38379520000 3.85026\n", - "2000-01-26 0.41800 0.41800 0.41800 0.41800 25917440000 3.87772\n", - "2000-01-25 0.41304 0.41304 0.41304 0.41304 0 3.83171\n", - "2000-01-24 0.41304 0.41304 0.41304 0.41304 18385920000 3.83171\n", - "2000-01-21 0.41600 0.41600 0.41600 0.41600 17512960000 3.85917\n", - "2000-01-20 0.42504 0.42504 0.42504 0.42504 26268160000 3.94303\n", - "2000-01-19 0.42600 0.42600 0.42600 0.42600 38883840000 3.95193\n", - "2000-01-18 0.42904 0.42904 0.42904 0.42904 17925120000 3.98014\n", - "2000-01-17 0.42704 0.42704 0.42704 0.42704 16573440000 3.96158\n", - "2000-01-14 0.43200 0.43200 0.43200 0.43200 16657920000 4.00760\n", - "2000-01-13 0.42600 0.42600 0.42600 0.42600 26383360000 3.95193\n", - "2000-01-12 0.43864 0.43864 0.43864 0.43864 23301120000 4.06919\n", - "2000-01-11 0.43800 0.43800 0.43800 0.43800 23987200000 4.06326\n", - "2000-01-10 0.44904 0.44904 0.44904 0.44904 19563520000 4.16567\n", - "2000-01-07 0.44000 0.44000 0.44000 0.44000 20912640000 4.08181\n", - "2000-01-06 0.43800 0.43800 0.43800 0.43800 34055680000 4.06326\n", - "2000-01-05 0.43952 0.43952 0.43952 0.43952 43033600000 4.07736\n", - "2000-01-04 0.44400 0.44400 0.44400 0.44400 28861440000 4.11892\n", - "2000-01-03 0.47000 0.47000 0.47000 0.47000 35389440000 4.36012\n", - "\n", - "[3874 rows x 6 columns]" - ] - }, - "execution_count": 33, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Fim" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "collapsed": true - }, - "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" - ] - } - ], - "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.5.1" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Python-Debugger.ipynb" "b/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Python-Debugger.ipynb" deleted file mode 100644 index e3754872..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo07/DSA-Python-Cap\303\255tulo7-Python-Debugger.ipynb" +++ /dev/null @@ -1,158 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 7\n", - "\n", - "## Download: http://github.com/dsacademybr" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Python Debugger" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "a = [4,5,6]\n", - "b = 2\n", - "c = 3" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "5\n" - ] - } - ], - "source": [ - "resultado = b + c\n", - "print (resultado)" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "ename": "TypeError", - "evalue": "can only concatenate list (not \"int\") to list", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mresultado2\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0ma\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mb\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mprint\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mresultado2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mTypeError\u001b[0m: can only concatenate list (not \"int\") to list" - ] - } - ], - "source": [ - "resultado2 = a + b\n", - "print (resultado2)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "import pdb" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "5\n", - "--Return--\n", - "> (8)()->None\n", - "-> pdb.set_trace()\n", - "(Pdb) a + b\n", - "(Pdb) [4,5,6] + 2\n", - "*** TypeError: can only concatenate list (not \"int\") to list\n" - ] - } - ], - "source": [ - "a = [4,5,6]\n", - "b = 2\n", - "c = 3\n", - "\n", - "resultado = b + c\n", - "print (resultado)\n", - "\n", - "pdb.set_trace()\n", - "\n", - "resultado2 = a + b\n", - "print (resultado2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# FIM" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" - ] - } - ], - "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.5.1" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git "a/JupyterNotebooks/Cap\303\255tulo07/dados.json" "b/JupyterNotebooks/Cap\303\255tulo07/dados.json" deleted file mode 100644 index b20dc428..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo07/dados.json" +++ /dev/null @@ -1 +0,0 @@ -{"similar": ["c", "Modula-3", "lisp"], "nome": "Guido van Rossum", "linguagem": "Python", "users": 1000000} \ No newline at end of file diff --git "a/JupyterNotebooks/Cap\303\255tulo07/json_data.txt" "b/JupyterNotebooks/Cap\303\255tulo07/json_data.txt" deleted file mode 100644 index b20dc428..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo07/json_data.txt" +++ /dev/null @@ -1 +0,0 @@ -{"similar": ["c", "Modula-3", "lisp"], "nome": "Guido van Rossum", "linguagem": "Python", "users": 1000000} \ No newline at end of file diff --git "a/JupyterNotebooks/Cap\303\255tulo07/logfile.txt" "b/JupyterNotebooks/Cap\303\255tulo07/logfile.txt" deleted file mode 100644 index 1c6fa192..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo07/logfile.txt" +++ /dev/null @@ -1 +0,0 @@ -Gravando no log... \ No newline at end of file diff --git "a/JupyterNotebooks/Cap\303\255tulo07/testfile.txt" "b/JupyterNotebooks/Cap\303\255tulo07/testfile.txt" deleted file mode 100644 index 5bcd3549..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo07/testfile.txt" +++ /dev/null @@ -1 +0,0 @@ -Gravando no arquivo \ No newline at end of file diff --git "a/JupyterNotebooks/Cap\303\255tulo08/Bokeh-Chart-Interativo.html" "b/JupyterNotebooks/Cap\303\255tulo08/Bokeh-Chart-Interativo.html" deleted file mode 100644 index 386e4035..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo08/Bokeh-Chart-Interativo.html" +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - Bokeh Plot - - - - - - - - -
- - - - \ No newline at end of file diff --git "a/JupyterNotebooks/Cap\303\255tulo08/Bokeh-Datetime.html" "b/JupyterNotebooks/Cap\303\255tulo08/Bokeh-Datetime.html" deleted file mode 100644 index 33c38e8a..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo08/Bokeh-Datetime.html" +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - Bokeh Plot - - - - - - - - -
- - - - \ No newline at end of file diff --git "a/JupyterNotebooks/Cap\303\255tulo08/Bokeh-GeoJSON.html" "b/JupyterNotebooks/Cap\303\255tulo08/Bokeh-GeoJSON.html" deleted file mode 100644 index 22f49f4d..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo08/Bokeh-GeoJSON.html" +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - Bokeh Plot - - - - - - - - -
- - - - \ No newline at end of file diff --git "a/JupyterNotebooks/Cap\303\255tulo08/Bokeh-Grafico-Interativo.html" "b/JupyterNotebooks/Cap\303\255tulo08/Bokeh-Grafico-Interativo.html" deleted file mode 100644 index c8142c86..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo08/Bokeh-Grafico-Interativo.html" +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - Bokeh Plot - - - - - - - - -
- - - - \ No newline at end of file diff --git "a/JupyterNotebooks/Cap\303\255tulo08/Bokeh-Grafico-Linha.html" "b/JupyterNotebooks/Cap\303\255tulo08/Bokeh-Grafico-Linha.html" deleted file mode 100644 index 4f46e53d..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo08/Bokeh-Grafico-Linha.html" +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - Bokeh Plot - - - - - - - - -
- - - - \ No newline at end of file diff --git "a/JupyterNotebooks/Cap\303\255tulo08/Bokeh-ViolinPlot.html" "b/JupyterNotebooks/Cap\303\255tulo08/Bokeh-ViolinPlot.html" deleted file mode 100644 index 6cb60de2..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo08/Bokeh-ViolinPlot.html" +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - Bokeh Plot - - - - - - - - -
- - - - \ No newline at end of file diff --git "a/JupyterNotebooks/Cap\303\255tulo08/DSA-Python-Cap\303\255tulo8-Bokeh.ipynb" "b/JupyterNotebooks/Cap\303\255tulo08/DSA-Python-Cap\303\255tulo8-Bokeh.ipynb" deleted file mode 100644 index 4c83423f..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo08/DSA-Python-Cap\303\255tulo8-Bokeh.ipynb" +++ /dev/null @@ -1,1381 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 8\n", - "\n", - "## Download: http://github.com/dsacademybr" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Bokeh" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Caso o Bokeh não esteja instalado, executar:\n", - "### pip install bokeh" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Importando o módulo Bokeh\n", - "import bokeh" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "# Usando output_file para gravar as visualizações\n", - "from bokeh.plotting import figure, output_file, show\n", - "\n", - "# Usando output_notebook para visualizar no iPython Notebook\n", - "from bokeh.charts import Bar, output_notebook, show" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "
\n", - " \n", - " Loading BokehJS ...\n", - "
" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/javascript": [ - "\n", - "(function(global) {\n", - " function now() {\n", - " return new Date();\n", - " }\n", - "\n", - " if (typeof (window._bokeh_onload_callbacks) === \"undefined\") {\n", - " window._bokeh_onload_callbacks = [];\n", - " }\n", - "\n", - " function run_callbacks() {\n", - " window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n", - " delete window._bokeh_onload_callbacks\n", - " console.info(\"Bokeh: all callbacks have finished\");\n", - " }\n", - "\n", - " function load_libs(js_urls, callback) {\n", - " window._bokeh_onload_callbacks.push(callback);\n", - " if (window._bokeh_is_loading > 0) {\n", - " console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", - " return null;\n", - " }\n", - " if (js_urls == null || js_urls.length === 0) {\n", - " run_callbacks();\n", - " return null;\n", - " }\n", - " console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", - " window._bokeh_is_loading = js_urls.length;\n", - " for (var i = 0; i < js_urls.length; i++) {\n", - " var url = js_urls[i];\n", - " var s = document.createElement('script');\n", - " s.src = url;\n", - " s.async = false;\n", - " s.onreadystatechange = s.onload = function() {\n", - " window._bokeh_is_loading--;\n", - " if (window._bokeh_is_loading === 0) {\n", - " console.log(\"Bokeh: all BokehJS libraries loaded\");\n", - " run_callbacks()\n", - " }\n", - " };\n", - " s.onerror = function() {\n", - " console.warn(\"failed to load library \" + url);\n", - " };\n", - " console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", - " document.getElementsByTagName(\"head\")[0].appendChild(s);\n", - " }\n", - " };\n", - "\n", - " var js_urls = ['https://cdn.pydata.org/bokeh/release/bokeh-0.11.1.min.js', 'https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.11.1.min.js', 'https://cdn.pydata.org/bokeh/release/bokeh-compiler-0.11.1.min.js'];\n", - "\n", - " var inline_js = [\n", - " function(Bokeh) {\n", - " Bokeh.set_log_level(\"info\");\n", - " },\n", - " \n", - " function(Bokeh) {\n", - " Bokeh.$(\"#6cb2911e-4ab9-4f80-b50e-01c5c7f2b681\").text(\"BokehJS successfully loaded\");\n", - " },\n", - " function(Bokeh) {\n", - " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.11.1.min.css\");\n", - " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.11.1.min.css\");\n", - " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.11.1.min.css\");\n", - " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.11.1.min.css\");\n", - " }\n", - " ];\n", - "\n", - " function run_inline_js() {\n", - " for (var i = 0; i < inline_js.length; i++) {\n", - " inline_js[i](window.Bokeh);\n", - " }\n", - " }\n", - "\n", - " if (window._bokeh_is_loading === 0) {\n", - " console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n", - " run_inline_js();\n", - " } else {\n", - " load_libs(js_urls, function() {\n", - " console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n", - " run_inline_js();\n", - " });\n", - " }\n", - "}(this));" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "# Output \n", - "output_notebook() " - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "# Arquivo gerado pela visualização\n", - "output_file(\"Bokeh-Grafico-Interativo.html\")" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "p = figure()" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "bokeh.plotting.figure.Figure" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "type(p)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "p.line([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], line_width = 2)" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "
\n", - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "

<Bokeh Notebook handle for In[8]>

" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "show(p)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "# Usando output_notebook para visualizar no iPython Notebook\n", - "from bokeh.charts import Bar, output_notebook, show" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "# Preparando dados\n", - "data = {\"y\": [1, 2, 3, 4, 5]}" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "
\n", - " \n", - " Loading BokehJS ...\n", - "
" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/javascript": [ - "\n", - "(function(global) {\n", - " function now() {\n", - " return new Date();\n", - " }\n", - "\n", - " if (typeof (window._bokeh_onload_callbacks) === \"undefined\") {\n", - " window._bokeh_onload_callbacks = [];\n", - " }\n", - "\n", - " function run_callbacks() {\n", - " window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n", - " delete window._bokeh_onload_callbacks\n", - " console.info(\"Bokeh: all callbacks have finished\");\n", - " }\n", - "\n", - " function load_libs(js_urls, callback) {\n", - " window._bokeh_onload_callbacks.push(callback);\n", - " if (window._bokeh_is_loading > 0) {\n", - " console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", - " return null;\n", - " }\n", - " if (js_urls == null || js_urls.length === 0) {\n", - " run_callbacks();\n", - " return null;\n", - " }\n", - " console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", - " window._bokeh_is_loading = js_urls.length;\n", - " for (var i = 0; i < js_urls.length; i++) {\n", - " var url = js_urls[i];\n", - " var s = document.createElement('script');\n", - " s.src = url;\n", - " s.async = false;\n", - " s.onreadystatechange = s.onload = function() {\n", - " window._bokeh_is_loading--;\n", - " if (window._bokeh_is_loading === 0) {\n", - " console.log(\"Bokeh: all BokehJS libraries loaded\");\n", - " run_callbacks()\n", - " }\n", - " };\n", - " s.onerror = function() {\n", - " console.warn(\"failed to load library \" + url);\n", - " };\n", - " console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", - " document.getElementsByTagName(\"head\")[0].appendChild(s);\n", - " }\n", - " };\n", - "\n", - " var js_urls = ['https://cdn.pydata.org/bokeh/release/bokeh-0.11.1.min.js', 'https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.11.1.min.js', 'https://cdn.pydata.org/bokeh/release/bokeh-compiler-0.11.1.min.js'];\n", - "\n", - " var inline_js = [\n", - " function(Bokeh) {\n", - " Bokeh.set_log_level(\"info\");\n", - " },\n", - " \n", - " function(Bokeh) {\n", - " Bokeh.$(\"#98902fd3-4a20-4733-92ac-03c857fd1808\").text(\"BokehJS successfully loaded\");\n", - " },\n", - " function(Bokeh) {\n", - " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.11.1.min.css\");\n", - " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.11.1.min.css\");\n", - " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.11.1.min.css\");\n", - " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.11.1.min.css\");\n", - " }\n", - " ];\n", - "\n", - " function run_inline_js() {\n", - " for (var i = 0; i < inline_js.length; i++) {\n", - " inline_js[i](window.Bokeh);\n", - " }\n", - " }\n", - "\n", - " if (window._bokeh_is_loading === 0) {\n", - " console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n", - " run_inline_js();\n", - " } else {\n", - " load_libs(js_urls, function() {\n", - " console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n", - " run_inline_js();\n", - " });\n", - " }\n", - "}(this));" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "# Output \n", - "output_notebook() " - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "# Criando um novo gráfico\n", - "gr = Bar(data, title = \"Gráfico Bokeh\", xlabel = 'x', ylabel = 'valores', \n", - " width = 400, height = 400)" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "
\n", - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "

<Bokeh Notebook handle for In[13]>

" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Mostrando os resultados\n", - "show(gr)" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "
\n", - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "

<Bokeh Notebook handle for In[14]>

" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Construindo um ScatterPlot\n", - "from bokeh.charts import Scatter, output_file, show\n", - "\n", - "# Preparando os dados\n", - "from bokeh.sampledata.autompg import autompg as df\n", - "\n", - "# Criando um Scatter Plot\n", - "p = Scatter(df, x = 'mpg', y = 'hp', color = 'cyl',\n", - " title = \"Consumo x Potência\",\n", - " legend = 'top_right',\n", - " xlabel = \"Km/Litro\",\n", - " ylabel = \"Potência do Motor\")\n", - "\n", - "# Especificando o arquivo de saída\n", - "output_file(\"Bokeh-Chart-Interativo.html\")\n", - "\n", - "# Visualizando o gráfico\n", - "show(p)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "
\n", - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "

<Bokeh Notebook handle for In[15]>

" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Criando Violin Plots - Seaborn e Bokeh\n", - "import seaborn as sea\n", - "\n", - "from bokeh import mpl\n", - "from bokeh.plotting import output_file, show\n", - "\n", - "tips = sea.load_dataset(\"tips\")\n", - "\n", - "sea.set_style(\"whitegrid\")\n", - "\n", - "ax = sea.violinplot(x = \"day\", y = \"total_bill\", hue = \"sex\", data = tips, \n", - " palette = \"Set2\", split = True, \n", - " scale = \"count\", inner = \"stick\")\n", - "\n", - "output_file(\"Bokeh-ViolinPlot.html\")\n", - "\n", - "show(mpl.to_bokeh())" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "
\n", - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "

<Bokeh Notebook handle for In[16]>

" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 16, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Gráficos de Linha\n", - "from bokeh.plotting import figure, output_file, show\n", - "\n", - "# Outuput\n", - "output_file(\"Bokeh-Grafico-Linha.html\")\n", - "\n", - "p = figure(plot_width = 400, plot_height = 400)\n", - "\n", - "# Adicionando círculos ao gráfico\n", - "p.circle([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], size = 20, color = \"navy\", alpha = 0.5)\n", - "\n", - "# Mostrando o resultado\n", - "show(p)" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "
\n", - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "

<Bokeh Notebook handle for In[17]>

" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Geojson\n", - "from bokeh.io import output_file, show\n", - "from bokeh.models import GeoJSONDataSource\n", - "from bokeh.plotting import figure\n", - "from bokeh.sampledata.sample_geojson import geojson\n", - "\n", - "geo_source = GeoJSONDataSource(geojson=geojson)\n", - "\n", - "p = figure()\n", - "p.circle(x = 'x', y = 'y', alpha = 0.9, source = geo_source)\n", - "output_file(\"Bokeh-GeoJSON.html\")\n", - "show(p)" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "
\n", - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "

<Bokeh Notebook handle for In[18]>

" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Plots de Séries Temporais com Pandas\n", - "import pandas as pd\n", - "from bokeh.plotting import figure, output_file, show\n", - "\n", - "AAPL = pd.read_csv(\n", - " \"http://ichart.yahoo.com/table.csv?s=AAPL&a=0&b=1&c=2000&d=0&e=1&f=2010\",\n", - " parse_dates=['Date']\n", - " )\n", - "\n", - "output_file(\"Bokeh-Datetime.html\")\n", - "\n", - "# create a new plot with a datetime axis type\n", - "p = figure(width=800, height=250, x_axis_type=\"datetime\")\n", - "\n", - "p.line(AAPL['Date'], AAPL['Close'], color='navy', alpha=0.5)\n", - "\n", - "show(p)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Google Maps\n", - "from bokeh.io import output_file, show\n", - "from bokeh.models import (\n", - " GMapPlot, GMapOptions, ColumnDataSource, Circle, DataRange1d, PanTool, WheelZoomTool, BoxSelectTool\n", - ")\n", - "\n", - "map_options = GMapOptions(lat=-23.5431786, lng=-46.62918450000001, map_type=\"roadmap\", zoom=11)\n", - "\n", - "plot = GMapPlot(\n", - " x_range=DataRange1d(), y_range=DataRange1d(), map_options=map_options, title=\"São Paulo\"\n", - ")\n", - "\n", - "source = ColumnDataSource(\n", - " data=dict(\n", - " lat=[-23.54, -46.62],\n", - " lon=[97.70, 97.74],\n", - " )\n", - ")\n", - "\n", - "circle = Circle(x=\"lon\", y=\"lat\", size=15, fill_color=\"blue\", fill_alpha=0.8, line_color=None)\n", - "plot.add_glyph(source, circle)\n", - "\n", - "plot.add_tools(PanTool(), WheelZoomTool(), BoxSelectTool())\n", - "output_file(\"gmap_plot.html\")\n", - "show(plot)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Fim" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" - ] - } - ], - "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.5.1" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git "a/JupyterNotebooks/Cap\303\255tulo08/DSA-Python-Cap\303\255tulo8-Matplotlib-Mapas.ipynb" "b/JupyterNotebooks/Cap\303\255tulo08/DSA-Python-Cap\303\255tulo8-Matplotlib-Mapas.ipynb" deleted file mode 100644 index 213da98e..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo08/DSA-Python-Cap\303\255tulo8-Matplotlib-Mapas.ipynb" +++ /dev/null @@ -1,280 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 8\n", - "\n", - "## Download: http://github.com/dsacademybr" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Matplotlib" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Criando Mapas" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Para usuários do Windows, executar o procedimento abaixo para instalar o basemap." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 1- Acessar o site http://www.lfd.uci.edu/~gohlke/pythonlibs/\n", - "### 2- Baixar o arquivo basemap-1.0.8-cp35-none-win_amd64.whl\n", - "### 3- Colocar o arquivo no diretório de instalação do Anaconda\n", - "### 4- No prompt de comando, nevegar até o diretório de instalação do Anaconda e executar\n", - "### 5- pip install basemap-1.0.8-cp35-none-win_amd64.whl" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Usuários Mac e Linux, executar: pip install basemap" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "from mpl_toolkits.basemap import Basemap\n", - "from mpl_toolkits.mplot3d.axes3d import Axes3D\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "# Mapa do globo terrestre\n", - "map = Basemap(projection = 'ortho', lat_0 = 0, lon_0 = 0)\n", - "\n", - "# Definindo a cor do globo\n", - "map.drawmapboundary(fill_color = 'aqua')\n", - "\n", - "# Preenchendo a cor dos continentes\n", - "map.fillcontinents(color = 'coral', lake_color = 'aqua')\n", - "\n", - "map.drawcoastlines()\n", - "\n", - "plt.show()\n", - "plt.savefig('Globo.png')" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Mapa do globo terrestre expandido\n", - "from mpl_toolkits.basemap import Basemap\n", - "import matplotlib.pyplot as plt\n", - "\n", - "map = Basemap()\n", - "\n", - "map.drawcoastlines()\n", - "\n", - "# Mostrar e gravar\n", - "plt.show()\n", - "plt.savefig('Globo-expandido.png')" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Cria um mapa usando Basemap\n", - "from mpl_toolkits.basemap import Basemap\n", - "from mpl_toolkits.mplot3d import Axes3D\n", - "from matplotlib import pyplot\n", - "from numpy import arange\n", - "\n", - "mapa = Basemap(projection = 'robin', lat_0 = -20, lon_0 = -50,\n", - "resolution = 'l', area_thresh = 1e3)\n", - "\n", - "# desenha a costa dos continentes\n", - "mapa.drawcoastlines(color='#777799')\n", - "\n", - "# Desenha as fronteiras\n", - "mapa.drawcountries(color='#ccccee')\n", - "\n", - "# Pinta os continentes\n", - "mapa.fillcontinents(color='#ddddcc')\n", - "\n", - "# Desenha os meridianos\n", - "mapa.drawmeridians(arange(0, 360, 30), color='#ccccee')\n", - "\n", - "# Desenha os paralelos\n", - "mapa.drawparallels(arange(-180, 180, 30), color='#ccccee')\n", - "\n", - "# Desenha os limites do mapa\n", - "mapa.drawmapboundary()\n", - "\n", - "# Mostrar e gravar\n", - "plt.show()\n", - "pyplot.savefig('Mapa.png', dpi=150)" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Plot contour\n", - "from mpl_toolkits.basemap import Basemap\n", - "import matplotlib.pyplot as plt\n", - "import numpy as np\n", - "\n", - "# Criando o mapa base\n", - "map = Basemap(projection = 'ortho', lat_0 = 45, lon_0 = -100, resolution = 'l')\n", - "\n", - "# Definindo as linhas dos continentes\n", - "map.drawcoastlines(linewidth = 0.25)\n", - "map.drawcountries(linewidth = 0.25)\n", - "map.fillcontinents(color = 'coral', lake_color = 'aqua')\n", - "\n", - "# Desenhando os limites\n", - "map.drawmapboundary(fill_color = 'aqua')\n", - "\n", - "# Desenhando latitude e longitude\n", - "map.drawmeridians(np.arange(0,360,30))\n", - "map.drawparallels(np.arange(-90,90,30))\n", - "\n", - "# Desenhando os grids\n", - "nlats = 73; nlons = 145; delta = 2.*np.pi/(nlons-1)\n", - "lats = (0.5*np.pi-delta*np.indices((nlats,nlons))[0,:,:])\n", - "lons = (delta*np.indices((nlats,nlons))[1,:,:])\n", - "wave = 0.75*(np.sin(2.*lats)**8*np.cos(4.*lons))\n", - "mean = 0.5*np.cos(2.*lats)*((np.sin(2.*lats))**2 + 2.)\n", - "\n", - "# Projetando coordeandas.\n", - "x, y = map(lons*180./np.pi, lats*180./np.pi)\n", - "\n", - "# Dados do mapa\n", - "cs = map.contour(x,y,wave+mean,15,linewidths=1.5)\n", - "plt.title('Linhas sobre o continente')\n", - "\n", - "# Mostrar e gravar\n", - "plt.show()\n", - "pyplot.savefig('Continentes.png')" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "# Mapas dia e noite\n", - "import numpy as np\n", - "from mpl_toolkits.basemap import Basemap\n", - "import matplotlib.pyplot as plt\n", - "from datetime import datetime\n", - "\n", - "# Projeção\n", - "map = Basemap(projection='mill',lon_0=180)\n", - "\n", - "# Linhas meridianas e paralelas.\n", - "map.drawcoastlines()\n", - "map.drawparallels(np.arange(-90,90,30),labels=[1,0,0,0])\n", - "map.drawmeridians(np.arange(map.lonmin,map.lonmax+30,60),labels=[0,0,0,1])\n", - "\n", - "# Cores\n", - "map.drawmapboundary(fill_color='aqua')\n", - "map.fillcontinents(color='coral',lake_color='aqua')\n", - "\n", - "# Sombreando as noites. Time em UTC.\n", - "date = datetime.utcnow()\n", - "CS=map.nightshade(date)\n", - "# plt.title('Mapa Dia/Noite %s (UTC)' % date.strftime(\"%d %b %Y %H:%M:%S\"))\n", - "plt.title('Mapa Dia/Noite')\n", - "\n", - "# Mostrar e gravar\n", - "plt.show()\n", - "pyplot.savefig('Dia-Noite.png')" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "# Acesse esse site para mais exemplos com Basemap\n", - "# http://matplotlib.org/basemap/users/examples.html" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Fim" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Obrigado - Data Science Academy - facebook.com/dsacademybr" - ] - } - ], - "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.5.1" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git "a/JupyterNotebooks/Cap\303\255tulo08/DSA-Python-Cap\303\255tulo8-Matplotlib-Plots-e-Graficos.ipynb" "b/JupyterNotebooks/Cap\303\255tulo08/DSA-Python-Cap\303\255tulo8-Matplotlib-Plots-e-Graficos.ipynb" deleted file mode 100644 index a563b146..00000000 --- "a/JupyterNotebooks/Cap\303\255tulo08/DSA-Python-Cap\303\255tulo8-Matplotlib-Plots-e-Graficos.ipynb" +++ /dev/null @@ -1,11035 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Data Science Academy - Python Fundamentos - Capítulo 8\n", - "\n", - "## Download: http://github.com/dsacademybr" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Matplotlib" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "collapsed": true - }, - "source": [ - "## Construindo Plots" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "# O matplotlib.pyplot é uma coleção de funções e estilos que fazem com que o Matplotlib \n", - "# funcione como o Matlab.\n", - "import matplotlib.pyplot as plt\n", - "%matplotlib inline" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW8AAAEACAYAAAB8nvebAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEERJREFUeJzt3H+sZHV5x/H3s4AbUFhpVWqkQiUaQmO6GFlqloQxlFKQ\nH/9AbIOSGGJLQwLWRktIu3v1H42JFZptTKrdCvgjphi2ULEuhk6QpGwBwQVBUsqagmU3mKobxKDI\n0z9mwMvde++cmTlnzvfMvF/JzZ2998yZJ9/dfe73fs5zJjITSVK3bGi7AEnS+GzektRBNm9J6iCb\ntyR1kM1bkjrI5i1JHTSyeUfE2yLigYj4zvDzTyPiqlkUJ0laXYwz5x0RG4CngNMz88nGqpIkrWvc\n2OQPgP+2cUtSu8Zt3u8FvtJEIZKk6irHJhFxBPC/wCmZ+UyjVUmS1nX4GMeeC9y/VuOOCN8kRZLG\nlJkxyfPGiU3+hBGRSWYW/bF9+/bWa7BO67TOxavzhReSL3whOeGE5Pzzk717B1+fRqWdd0QcxeBi\n5Z9O9WqStEAy4bbb4Npr4bWvhS9+Ec44o55zV2remfkc8Pp6XlKS5t+3vw3XXAMHD8InPgHnnw8x\nUUCyunEy787r9Xptl1CJddbLOutl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4HzgM+v8Yh\nRaxlhTqhgH+bDGpYr9+OvZ513wP5JuDJZX/+IWvcjVmAdw1/Pfl6RJzSZiHr3PxU1HqOuEmr9fUc\n/vr8ALAfuCMz711xSBHrWaFOaH89PwN8hNV/sEAha8noOqH9tYRBfXdExL0R8cFVvj/2ehZ2A/vM\n3A+8OTM3AzuAXW0VUuXmpxKMqLOI9czMFzPzVOB44PS2fyivpUKdra5nRLwHODD8jSsoY+d6iIp1\nFvFvE9iame9g8FvClRFxxrQnrLt5/xD47WV/Pn74taJk5rMv/eqamd8AjoiI35h1HcObn24GbsrM\nf1nlkCLWc1SdpaznsnoOAv8O/NGKbxWxni9Zq84C1nMrcGFEPAF8BXj38F6P5UpYy5F1FrCWL9Xx\n9PDzM8AtwJYVh4y9npM07/V+Et8KXAYQEb8P/CQzD0zwGnVYs87lWVJEbGEwMvl/sypsmZ3AI7nG\nXauUs57r1lnCekbE6yJi0/DxkcDZwPdXHNb6elaps+31zMxrM/PNmfkW4I+BOzPzshWHtb6WVeps\ney2Hr3vU8DdXIuLVwB8CD684bOz1HPeNqb4M9IDfjIj/AbYDrwIyM/8hM2+PiPMi4nHgZ8AHxjl/\nXUbVCVwcEX8O/BL4OfDeFmrcClwKPDTMPxO4FjiBgtazSp0UsJ7AG4EbImIDg03JV4fr92cUtJ5V\n6qSM9TxEgWu5qgLX8jjglhi8hcjhwJcyc/e06+lNOpLUQYt6wVKSOs3mLUkdZPOWpA6yeUtSB9m8\nJamDbN6S1EE2b0nqIJu3JHXQ/wOgkr70yrZwiwAAAABJRU5ErkJggg==\n", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "# O método plot() define os eixos do gráfico\n", - "plt.plot([1, 3, 5], [2, 5, 7])\n", - "plt.show()" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "x = [1, 4, 5]" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "y = [3, 7, 2]" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEZCAYAAACQK04eAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X2clXW57/HPhYIJ+QCKFgKGL8opcSsPqRjqoClIlpod\nMnwg2mw45wXswnPoJMQmrW1kbNqltjdosBXEQtpQ8WDDQYaGBGl4MKigCMppm0ROYwS4Z4Dr/PFb\no8thHtaaWfe677XW9/16zWvWrHXPuq/u8Jrf+v2u+/qZuyMiIqWjU9wBiIhIfinxi4iUGCV+EZES\no8QvIlJilPhFREqMEr+ISIlR4heJiJk9Y2bT445DpCklfikIZnbIzP6a+jpuZkfSnvtUB953k5mN\n6cDvbzazo6k4DpjZUjM7N8v3OM3MTphZr/bGIZINJX4pCO5+hruf6e5nAr8HPpL23DNxhgZ8JhXX\n+4F3AQ9n+R6Weh+RvFDil0Jkqa+3njDrZGYzzey3ZvYnM1tkZmemXuuamnZ5zcz+khrln2Vmc4AP\nAk+kRuxfTx0/wMzWmVmtmf3CzG7NIB7cvRZYAQxo9iCzSWa218wOmtkyM+uZemlD6vuvU3F8rD0X\nRSRTSvxSLKYBHwauBnoDDcA3Uq+NB04B3g2cA0wG6t39/wA/A/4+9clhmpmdAVQAj7t7D+Be4Dtm\ndlFbAZjZecDtwLZmXhsFzABuBS4AXgMWp16+lvDH472pOH7Yjv/9IhlT4pdiMRH4grsfcPd64MvA\nnanXGoCehMR6wt23uvvRtN9N//RwO7DT3b8L4O5bgZXAHa2ce56Z1QLVwG+ALzRzzBhgvrv/IhXf\n54EPp/5YNBeHSGROjTsAkRzpA6w2s8a5cgMwsx7Adwhz78vMrBuwCPiiN9+h8ELgulQib3yfU4Da\nZo5tNCGDdYZewLrGH9z9dTP7K2H0/3obvyuSU0r8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output_type": "display_data" - } - ], - "source": [ - "plt.plot(x, y)\n", - "plt.xlabel('Variável 1')\n", - "plt.ylabel('Variável 2')\n", - "plt.title('Teste Plot')\n", - "plt.show()" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "x2 = [1, 2, 3]\n", - "y2 = [11, 12, 15]" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEACAYAAABbMHZzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGQNJREFUeJzt3X2QXHWd7/H3Z26Eykw2PAWTgcAk944I8hSwbm6UlNth\nCwgsEbhKkYAiUIW7arxSohVwqZqB4g+gLKnd1a3SGGOCG7LLbgUMDzJY0mhUJJiQABtM4iWPxICX\njDBEIZX53j+mE5qme/pMPz98XlVddJ+HPr/pOrz7zJk+aUUEZmbWXjrqPQAzM6s9x9/MrA05/mZm\nbcjxNzNrQ46/mVkbcvzNzNpQ0fhLWiJpr6SNWdP6JO2StC5zm1tg3bmSXpK0WdKiSg7czMxKp2Kf\n85c0GxgClkfEWZlpfcCbEfGtUdbrADYDfwO8AqwF5kfESxUau5mZlajokX9ErAH25ZmlIqvOBLZE\nxPaIOACsBC4b+xDNzKzSyjnnv1DSc5K+L+moPPNPBHZmPd6VmWZmZnVWavz/BfjvETED+ANQ8PSP\nmZk1nnGlrBQRr2U9XAyszrPYbuDkrMdTM9PykuR/ZMjMbIwiotgp+LySHvmLrHP8kqZkzfvfwAt5\n1lkL9ErqkXQEMB/48WgbiQjfKnDr6+ur+xha6ebX069nI90efzyYNCn4xS/KO14ueuQvaQWQAo6T\ntAPoA+ZImgEMA9uAv8ss2w0sjohLI+KgpIXAACNvMksiYlNZozUza2MDA3DNNbBqFcyeXd5zFY1/\nRFydZ/LSAsvuAS7NevwT4MMlj87MzIDKhh98hW9LSqVS9R5CS/HrWVl+Pceu0uGHBBd51YqkaJSx\nmJk1itHCL4ko8Q++jr9ZA5s2bRrbt2+v9zCszk44oYfdu7e9b7rjb9aiMv9z13sYVmeF9oNy4u9z\n/mZmbcjxNzNrQ46/mVkbcvzNrCYuueQS7rvvvoo/75o1azjttNMq/rz5nHHGGfz85z9PtOz06dP5\n2c9+VuURlc5/8DVrYI38B99p06bx6quvMm7cOLq6upg7dy7f+c536OzsrPfQynL77bezdevWst+o\npk+fzpIlSzj//PPLHpP/4GtmDUMSjzzyCG+88Qbr1q3j2Wef5c4778y7bL3ewA4ePFjSelJJPW0q\njr+ZlexQ1Lu7u7n44ot54YWRf+Nxzpw53HbbbcyePZuuri5efvll5syZww9+8AMAli1bxuzZs/nq\nV7/KMcccQ29vL7/+9a9ZtmwZJ598MlOmTGH58uWHt/POO+/wta99jZ6eHrq7u/niF7/I22+/DcBT\nTz3FSSeddHjZ6dOnc88993D22WczYcIEhoeHufvuu+nt7WXixImcccYZPPjggyX9vNmncm6//Xau\nuuoqPve5zzFx4kTOPPNM1q1b957l169fz9lnn80xxxzDggULeOeddwAYHBxk3rx5fPCDH+S4445j\n3rx5vPLKKyWNqVSOv5mVbefOnTz66KOce+65h6f96Ec/4vvf/z5vvvkmJ5988vvWeeaZZ5gxYwav\nv/46CxYsYP78+Tz77LP8/ve/57777mPhwoXs378fgEWLFrF161Y2btzI1q1b2b17N3fcccfh58o9\nUl+5ciWPPfYYg4ODdHR00Nvbyy9/+UveeOMN+vr6+MxnPsPevXvL/rlXr17N1VdfzZ/+9CfmzZvH\nl770pffMf+CBBxgYGODll19mw4YN/PCHPwRgeHiYG264gZ07d7Jjxw46OztZuHBh2eMZC8ffrIlJ\nlbmV6vLLL+fYY4/lE5/4BHPmzOHWW289PO+6667j1FNPpaOjg3Hj3v9vSE6fPp1rr70WSVx11VXs\n2rWLvr4+PvCBD3DBBRdwxBFHsHXrVgAWL17Mvffey1FHHUVXVxe33HIL999/f8FxfeUr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leP9MTFKHpPXAH4AnImJtziJj3jcb6iIvq6jfAidHxH5JFwMPAqfUeUwNT9IE\n4D+Ar2SOWq1ERV5L759jEBHDwDmSJgIPSvpIRPxXOc/ZaEf+u4GTsh5PzUyzMYqIoUO/KkbEY8AH\nJB1b52E1NEnjGInVfRHxUJ5FvH8mVOy19P5Zmoh4A3gSmJsza8z7Zj3iP9oFYz8GroXDVwgPRsTe\nWg2sCRV8LbPP90maycjHel+v1cCa1A+A/4qIfyww3/tncqO+lt4/k5M0SdJRmfvjgQuAl3IWG/O+\nWdPTPpkLxlLAcZJ2AH3AEYz8sw/fi4hHJV0iaSvwFnB9LcfXTIq9lsCnJX0BOAD8GbiqXmNtBpLO\nA64Bns+cWw3gG0AP3j/HJMlriffPsegGlmX+mfwO4N8y++LfUca+6Yu8zMzaUKOd8zczsxpw/M3M\n2pDjb2bWhhx/M7M25PibmbUhx9/MrA05/mZmbcjxNzNrQ/8fv4OdegR1uPIAAAAASUVORK5CYII=\n", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "plt.plot(x2, y2, label = 'Primeira Linha')\n", - "plt.legend()\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Gráficos de Barras" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "x = [2,4,6,8,10]\n", - "y = [6,7,8,2,4]" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW0AAAEACAYAAAB4ayemAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEqBJREFUeJzt3X+M3HWdx/HXa3ehUtpuC9pdoDDbnuGu1vNHMSKg3tKi\nAl4tXLiC9sKdd3om5wHhLkbQNC2JuZx/gEeQRKtAoKEcoSgFWy2Y3hzh7mxRil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[ - "plt.bar(x, y, label = 'Barras', color = 'r')\n", - "plt.legend()\n", - "plt.show()" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "x2 = [1,3,5,7,9]\n", - "y2 = [7,8,2,4,2]" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW0AAAEACAYAAAB4ayemAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAE/ZJREFUeJzt3XuMXOV9xvHn2V1zMb7GjXfB9u4aISh1lBJHTYIpZBYH\ncB05ECVggisaoiCUgo1IFIWLEGMlqtpK0EYUKZAAAstOEZdwqSEmyB4QoRgSIEAMuWC8dgxeILA2\nBsUY+9c/dtjae/HM7M6Z2Xf8/Ugrnzl75j2/d2b87Jn33BwRAgCkoaneBQAAykdoA0BCCG0ASAih\nDQAJIbQBICGENgAkpKzQtn2Z7RdtP297pe1Dsi4MADBYydC2fZSkpZLmRsQnJbVIOjfrwgAAg7WU\nuVyzpCNs75U0XtJr2ZUEABhOyS3tiHhN0rWSNkvaKqk3Ih7JujAAwGDlDI9MkXSmpA5JR0maYPu8\nrAsDAAxWzvDIFyRtjIi3Jcn2PZLmSVq170K2uYgJAFQoIlzJ8uWE9mZJn7N9mKRdkuZLenqYlVey\n7mTk83nl8/marc+21q3Lpu2ursHvU637V2u2lcUn0xobn/lGf/8auX92RXktqbwx7ack3SXpWUm/\nUd9n9aaK1wQAGLWyjh6JiOWSlmdcCwCgBM6ILEMul6t3CZlq9P41ukZ//xq9f5VytcbkbMdYGN9r\nBLUe0250jT6mjXTZzmRHJIAG1dnZqe7u7nqX0fA6Ojq0adOmqrRFaAMHse7ubr4t1MBIjhIZDmPa\nAJAQQhsAEkJoA0BCCG0ASAihDWA/nW1tsp3ZT2dbW3l1dHZq/PjxmjRpkqZNm6ZFixZp69atGfe+\ntN27d+vss8/W7Nmz1dTUpMcee6ym6ye0Aeynu6dHIWX2093TU1YdtrV69Wrt2LFDr7/+uqZPn66l\nS5dW3J89e/aUNa8SJ598slauXKkjjzxyVO2MBKENYMz66HDEQw45RF/96le1YcMGSdKDDz6ouXPn\navLkyero6NDy5f9/lY3u7m41NTXplltuUUdHh+bPnz/kPEk655xzdOSRR2rq1KnK5XL97X+0jjlz\n5mjSpEmaNWuWrrvuOknSuHHjtGzZMs2bN09NTbWPUEIbwJj3/vvv64477tCJJ54oSZowYYJWrFih\n7du3a/Xq1frRj36k+++/f7/nPPbYY3r55Ze1Zs2aYectXLhQr7zyit544w3NnTtXS5Ys6V/2m9/8\npn784x9rx44devHFF3XqqafWoKelcRr7GMRp7NXFaezDK55GPXhelutUea/b7Nmz9ec//1ktLS3a\nuXOnpk+frjVr1mjOnDmDlr3sssvU1NSka6+9Vt3d3Tr66KO1ceNGdXR0SNKQ8wbq7e3Vxz72MW3f\nvl0TJ05UZ2enrrrqKp177rmaOHHikM+ZNWuWVq5cqVNOOeXAfR7idd5nfkVn3rClDWDMuu+++/T2\n229r165duv7663XKKafojTfe0Pr163Xqqadq+vTpmjJlim688Ua99dZb+z135syZg9rbd97evXt1\n+eWX65hjjtGUKVM0e/Zs2e5v5+6779bq1avV0dGhrq4uPfnkk9l2tkyENoAx66OtU9v68pe/rObm\nZj3++ONasmSJzjrrLG3dulW9vb266KKLhvzGMNC+81atWqUHHnhAa9euVW9vrzZt2qSI6G/n05/+\ntO699169+eabOvPMM3XOOedk2NPyEdoAknDfffept7dXxx9/vHbu3KmpU6dq3Lhxeuqpp7Rq1X53\nPxxyKGLgvHfffVeHHnqopk6dqvfee09XXHFFf6jv3r1bq1at0o4dO9Tc3KyJEyequbm5/7kffPCB\n/vKXv0iSdu3apV27dlW7u8MitAHsp6O1VZYy++lobS27lkWLFmnSpEmaPHmyrr76at1+++06/vjj\ndcMNN+jqq6/W5MmT9YMf/ECLFy/e73mltrIl6fzzz1d7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eMlvVbnekYlIh6X9M6A2WdKuq04fZuks2paVBUN1b+IeCQi9hYfPilpZql2\nRhvaB82JN7Y7JZ0gaX19K6mq/5D0XUmNumNjtqS3bN9aHAK6yfbh9S6qGiLiNUnXStosaauk3oh4\npL5VZWJ6RPRIfRtRkqbXuZ4sfUPSQ6UW4uSaMtieIOkuSZcWt7iTZ/uLknqK3yRc/Gk0LZLmSroh\nIuZKel99X7eTZ3uK+rZCOyQdJWmC7fPqW1VNNOQGhu2rJO2OiFWllh1taG+V1L7P45nFeQ2j+NXz\nLkkrIuK+etdTRSdJ+pLtjZJ+KqnL9u11rqna/iRpS0T8qvj4LvWFeCP4gqSNEfF2ROyRdI+keXWu\nKQs9tlslyXabpDfqXE/V2f66+oYpy/qjO9rQflrSMbY7inuuz5XUaEch3CJpQ0T8sN6FVFNEXBkR\n7RFxtPret7URcX6966qm4tfqLbaPLc6ar8bZ6bpZ0udsH2bb6utbI+xkHfit735JXy9O/5Ok1Dec\n9uuf7QXqG6L8UkTsKqeBkifXHEijn3hj+yRJSyS9YPtZ9X01uzIifl7fylCBZZJW2h4naaOkC+pc\nT1VExFO275L0rKTdxX9vqm9Vo2N7laScpGm2N0u6RtK/SrrT9jckdUs6p34Vjs4w/btS0iGSftH3\nt1dPRsQ/H7AdTq4BgHSwIxIAEkJoA0BCCG0ASAihDQAJIbQBICGENgAkhNAGgIQQ2gCQkP8DAfVC\nhgoywMgAAAAASUVORK5CYII=\n", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "plt.bar(x, y, label = 'Barras1', color = 'r')\n", - "plt.bar(x2, y2, label = 'Barras2', color = 'y')\n", - "plt.legend()\n", - "plt.show()" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "idades = [22,65,45,55,21,22,34,42,41,4,99,101,120,122,130,111,115,80,75,54,44,64,13,18,48]" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "ids = [x for x in range(len(idades))]" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEUBJREFUeJzt3W2sZVV9x/HvT6ekPlJqMnNTRhmQiKMJUttSG016KhHQ\nJkCaBlFrQBvTxCfSNqYz9MXcV1VMWkPS8MKKZNpICdAoY2NlJMNNQ1rEFhBkhpHEMCA6V9ugKW8a\nqP++OHtmLneezj3n3vOwzveTnLDPOnuftbLZ8zvrrr332qkqJEntetmkGyBJ2lgGvSQ1zqCXpMYZ\n9JLUOINekhpn0EtS404b9EluSbKc5NETfPbnSX6R5FdXlO1M8mSSA0kuXe8GS5LWZpAe/a3AZasL\nk2wF3gMcWlG2Hbga2A68F7g5SdanqZKkYZw26KvqfuC5E3z0BeAzq8quBG6vqher6ingSeDiURsp\nSRreUGP0Sa4Anqmqx1Z9dDbwzIr3z3ZlkqQJ2bTWDZK8AriB/rCNJGnKrTnogTcC24DvduPvW4GH\nklxMvwf/hhXrbu3KjpPESXYkaQhVtaZzn4MO3aR7UVXfq6qFqjqvqs4Ffgj8elX9BNgDvD/JGUnO\nBc4HHjxFY31VsWvXrom3YVpe7gv3hfvi1K9hDHJ55W3AvwFvSvJ0ko+szusVPwL7gTuA/cA3gI/X\nsC2TJK2L0w7dVNUHT/P5eavefxb47IjtkiStE++MnQK9Xm/STZga7otj3BfHuC9Gk0mNrCRxVEeS\n1igJtUEnYyVJM8qgl6TGGfSS1DiDXpIaZ9BLUuMMeklqnEEvSY0z6CWpcQa9JDXOoJekxhn00hgs\nLGwjyUCvhYVtk26uGuNcN9IY9J/RM+jxnqHnHVf7nOtGknQcg16SGmfQS1LjDHpJapxBL0mNM+gl\nqXEGvSQ1zqCXpMYZ9J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6Sh5M8OOn2jFOSW5IsJ3l0RdlZSfYmOZjkniRnTrKN43KSfbEryQ+TPNS9Lp9k\nG8clydYk+5I8nuSxJJ/uyufu2DjBvvhUV76mY2PsPfruZqrv0x+//xHwHeCaqnpirA2ZEkl+APxG\nVT036baMW5J3Ac8Df19VF3ZlNwL/XVWf7zoBZ1XVjkm2cxxOsi92Af9TVX8z0caNWZIFYKGqHkny\nauA/6d+H8xHm7Ng4xb54P2s4NibRo/dmqpcKc3qZa1XdD6z+gbsS2N0t7wauGmujJuQk+wLWcilH\nI6rqcFU90i0/Dxygf+Xe3B0bJ9kXR+5JGvjYmETAeDPVSxXwrSTfSfKxSTdmCmyuqmXoH+TA5gm3\nZ9I+meSRJF+ah6GK1ZJsAy4CHgC2zPOxsWJffLsrGvjYmMue5JR5Z1W9HXgf8InuT3gdM89XC9wM\nnFdVFwGHgXkbwnk1cBdwfdebXX0szM2xcYJ9saZjYxJBP+DNVPOhqn7c/fenwFfpD23Ns+UkW+Do\n+ORPJtyeiamqn9axk2h/B/zWJNszTkk20Q+2f6iqu7viuTw2TrQv1npsTCLovwOcn+ScJGcA1wB7\nJtCOiUvyyu6XmiSvAi4FvjfZVo1deOlY4x7gum75WuDu1Rs07CX7oguzI/6A+To2vgzsr6qbVpTN\n67Fx3L5Y67Exkevou0uBbuLYzVSfG3sjpkCSc+n34ov+zWtfmad9keQ2oAe8DlgGdgFfA+4EXg8c\nAq6uqp9Nqo3jcpJ98Xv0x2R/ATwF/MmRMeqWJXkn8K/AY/T/bRRwA/077O9gjo6NU+yLD7KGY8Mb\npiSpcZ6MlaTGGfSS1DiDXpIaZ9BLUuMMeklqnEEvSY0z6CWpcQa9JDXu/wGQpaJ6rmCdJwAAAABJ\nRU5ErkJggg==\n", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "plt.bar(ids, idades)\n", - "plt.show()" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "bins = [0,10,20,30,40,50,60,70,80,90,100,110,120,130]" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAAEACAYAAABF+UbAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAADV5JREFUeJzt3H+M5PVdx/Hn6+4AoVhaUrm1PctRmyolqZQ/aJUom6L0\nbFPwLy0UtTXxLxUiTS2tf3D+Y9TENk2UpKaASPor0hKuCUmB4GiokaIH8rulofyQclcbCKY2Kb/e\n/jEDLgu7M3szs7Pv4/lIJp2d/d5n3zuz8+x3vt8ZUlVIknratugBJEmHzohLUmNGXJIaM+KS1JgR\nl6TGjLgkNbZjko2SPAQ8BTwPPFNVp89zKEnSZCaKOMN4L1fVk/McRpK0MZMeTskGtpUkbZJJw1zA\njUluS/L78xxIkjS5SQ+nnFFVjyf5KYYxv6+qbpnnYJKk8SaKeFU9Pvrf/05yLXA68JKIJ/E/wiJJ\nG1RVmebfjz2ckuSYJMeOrr8GOBu4e41hWl4uvfTShc8wq/lHj8SMLpvzmB5O93/Hi/Mv7jILk+yJ\n7wSuHe1p7wA+X1U3zOSnS5KmMjbiVfVd4NRNmEWStEG+bRBYXl5e9AhTcf7Fcv7F6j7/tDKr4zJJ\nalZr6dAl4YXj2TNYbWbH7SS9XBJq3ic2JUlblxGXpMaMuCQ1ZsQlqTEjLkmNGXFJasyIS1JjRlyS\nGjPiktSYEZekxoy4JDVmxCWpMSMuSY0ZcUlqzIhLUmNGXJIaM+KS1JgRl6TGjLgkNWbEJakxIy5J\njRlxSWrMiEtSY0Zckhoz4pLUmBGXpMaMuCQ1ZsQlqTEjLkmNGXFJasyIS1JjRlySGjPiktSYEZek\nxiaOeJJtSfYn2TfPgSRJk9vInvhFwL3zGkSStHETRTzJLuB9wOfmO44kaSMm3RP/NPAxoOY4iyRp\ng3aM2yD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S2e15rQRfwx484qvd41u29JGL4WvAa6uqutGNx9MsnP0/SXg+4uabx1nAOck\neRD4IvCeJFcDBxrMDsNXao9W1b+Pvv4Kw6h3uO8BfhV4sKqeqKrngGuBX6LP/C9Ya97HgJ9Zsd2W\nfT4n+TDDw4rnr7i5w/w/C+wG/jPJdxnOuD/JCRxiT6eN+G3AW5OcmORI4IPAvinX3AxXAPdW1WdW\n3LYP+PDo+u8C163+R4tWVZ+sqjdX1VsY3tc3V9VvA19ji88OMHoJ/2iSt41uOgu4hwb3/cgjwLuT\n/MTohNNZDE8wb/X5w0tfua017z7gg6N33JwEvJXhh/sW7SXzJ9nD8JDiOVX14xXbbfn5q+ruqlqq\nqrdU1UkMd2zeWVXfZzj/b214/qqa6gLsYfiJzgeAS6Zdb94XhnuzzwF3ALcD+0e/w/HATaPf5Qbg\ndYuedczvcSawb3S9zewM35Fy2+j+/ypwXLP5L2V4MvxOhicFj9jK8wNfAL4H/Jjh/wl9BHj9WvMy\nfKfHd0a/49lbdP4HGL6rY//oclmn+Vd9/0Hg+Gnm98M+ktTYq/bEpiQdDoy4JDVmxCWpMSMuSY0Z\ncUlqzIhLUmNGXJIaM+KS1Nj/AZxcXD1LkAxhAAAAAElFTkSuQmCC\n", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "plt.hist(idades, bins, histtype = 'bar', rwidth = 0.8)\n", - "plt.show()" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAAEACAYAAABF+UbAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAADiVJREFUeJzt3G+MHPV9x/HPx7c2xgETaGrSYP6YprQYKSV+QEtR1C00\nxCXC9FFrkqYNkfogahsLqqiBVvKdVCmoVRWQ2jxAIYhSEkhJKA6iqoOcTUX6BzfGMdiGOjGJKWCn\nVikI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1xFYcVP9J3d4b5f1bSRZK+a/t5FTNus71C8+xp\n3YhvlfRe2xfaXiJpvaRNNddcCF+UtCsi7uy7b5Okj5fXf0/SI9P/Utsi4raIuCAiLlbxWG+JiI9J\n+rpGfHZJKp/Cv2D7kvKuayTtVILHvrRP0i/bXlq+4HSNiheYR31+6+3P3Gaad5Ok9eUZN6skvVfF\nm/va9rb5ba9VcUhxXUQc6dtu5OePiGci4t0RcXFErFKxY/P+iPiRivl/e87zR0Sti6S1Kt7RuUfS\nZ+qu1/RFxd7sm5K2S3pK0rbyazhH0uPl17JZ0jvbnnXA1/GrkjaV19PMruKMlK3l4/81SWclm3+j\nihfDd6h4UXDxKM8v6UuSXpJ0RMU/QjdJOnumeVWc6fG98mu8dkTn36PirI5t5eXzmeaf9vG9ks6p\nMz9v9gGAxE7ZFzYB4GRAxAEgMSIOAIkRcQBIjIgDQGJEHAASI+IAkBgRB4DE/g+QXuBOPpe6JQAA\nAABJRU5ErkJggg==\n", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "plt.hist(idades, bins, histtype = 'stepfilled', rwidth = 0.8)\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Scatterplot" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "x = [1,2,3,4,5,6,7,8]\n", - "y = [5,2,4,5,6,8,4,8]" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAEACAYAAACatzzfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFtpJREFUeJzt3XuQnHWd7/H3N5kBMsFBw6aEmJBArJRIBC8rWohsw+JC\nvLDuiuBqgoWr80d0sTh6ysSqY8Zi93igCHHL3aqzHDisLMJBxgtYiLUspFc9nAO4g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32Z1Rg2KNhM/DOiDgmIoLiuXq8zTUREXMb5ycBfwLcOlzbskcmDikzX46Iz1B8YzkD\nuDEzq/AE3ArUgOMjYjOw5sCXLm2s6V3Ax4CfNcaEE/hiZv6gjWWdCHw9ImZQvH63Z+b321hPVb0W\n+E7jZxI6gG9k5j+2uSaAK4BvNIYZNgGVOBitMeZ6PtDT7loAMvOhiOijGF4YaJxf396qAPhWRMyh\nqGnlSF8Ge8CLJFWcXyZKUsUZ1JJUcQa1JFWcQS1JFWdQS1LFGdSSVHEGtSRVnEEtSRX3/wErZ9YA\nxaVGagAAAABJRU5ErkJggg==\n", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "plt.scatter(x, y, label = 'Pontos', color = 'r', marker = 'o', s = 100)\n", - "plt.legend()\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Stack Plots" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "dias = [1,2,3,4,5]\n", - "dormir = [7,8,6,77,7]\n", - "comer = [2,3,4,5,3]\n", - "trabalhar = [7,8,7,2,2]\n", - "passear = [8,5,7,8,13]" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAEACAYAAACwB81wAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3Xl8VNX9+P/XOTcJSQgSUURFRBEX8KNSrVZq8YOifqxY\nt/qlFT9iKx9ZZF8CBAJqtWq11qWEVRBEEFBBxQX9UUQtLlAXqsiiiFCVHUKSmcls5/z+mElmEhJm\nMpns72ce80jmPTcz70Dyvu+599xzlLUWIYQQTZ+u7wSEEELUDSn4QgjRTEjBF0KIZkIKvhBCNBNS\n8IUQopmQgi+EEM1EzIKvlJqjlNqjlPp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cnFPD9lDQCbAJe71BSRJ41PKGAPKkcuvXoOeeZe/K01gu0jlPuBVq3pmHTLkk35JaRdB3VqGSy\nZVVRmXbxhMyZpmH9QeAUsMf2gZaSIrKs4QllfD9fAp6l/QYJCsmT3p5QRp4G9kg6IOnRNuvnnGfu\nhj8ofAGssT1KNUfQRzllJK0EPgSeTnvQRdLDM3umtv+1fRMwAqwrYUPejhqe2bOUdC8wk0Z2oow9\n5Auo6Zk9z8S47ZupRiNPSFq/0B+Yu+EfB66Z9XokvVcUts+eH1bb/hS4SFKWu19LWkbVRN+y/XGb\nkiIy7eVZUqa2/wA+Aza2rCoiy/N08iwky3HgPknHgPeA2yXtaKkpIc+enoXkie2T6flXYCfVHGWz\nmXOei9Hwu23tJ4At8P/VuWdszyyCUzs6es4+LiZpjOrfWX9bLLEW3gC+tf1yh/WlZNrVM3emkq6Q\ntCotXwLcCXzXUpY9yzqeubMEsL3V9hrb1wMPAXttb2kpy55nHc8S8pS0Io2QkXQpcBfwdUvZnPNs\ndC4dSe8CtwGXS/oJ2AZcTDXNwmu2P5G0SdL3wJ/AI036zNcTeEDS48A54G/gwUye48DDwOF0TNfA\nVuBaCsq0jif5M70KeFPVVN5LgA9Sdo9RUJZ1PMmfZUcKzLMtBea5GtipagqaZcA7tncvNM+48CoI\ngmBIyH0MPwiCIFgkouEHQRAMCdHwgyAIhoRo+EEQBENCNPwgCIIhIRp+EATBkBANPwiCYEiIhh8E\nQTAk/Ae3XznFu0SZQQAAAABJRU5ErkJggg==\n", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "plt.stackplot(dias, dormir, comer, trabalhar, passear, colors = ['m','c','r','k','b'])\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Pie Chart" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "fatias = [7, 2, 2, 13]\n", - "atividades = ['dormir','comer','trabalhar','passear']\n", - "colunas = ['c','m','r','k']" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAADtCAYAAACiY/4rAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8nGW5//HPNUu2SZru+562SVsobdlk2EFAtsqOgCII\neBAOYjmgHMCfu+D5uZ5zVPiJR1EU8AgC4nE94IJhEQWFQumS7qVpm63ZZyZz/f64n2mHkjZJm+SZ\nZ+Z69zWvmaaTmStp8p1r7vt+7kdUFWOMMcEV8rsAY4wxB8eC3BhjAs6C3BhjAs6C3BhjAs6C3Bhj\nAs6C3BhjAs6C3BhjAs6C3BhjAs6C3BhjAs6C3BhjAs6C3BhjAs6C3BhjAs6C3BhjAs6C3BhjAs6C\n3BhjAs6C3BhjAs6C3BhjAs6C3BhjAs6C3BhjAs6C3BhjAs6C3BhjAs6C3BhjAs6C3BhjAs6C3Bhj\nAs6C3BhjAs6C3BhjAs6C3BhjAi7idwHGZIiIACOAscAY7zpzuxyIEApFEIkQDkcRiSISIZmcTk/P\ndqATSHmXZNbtVqDRuzRk3W5U1e5h/SKNGQIW5GZIeeE8FagGJgNjCIfHU1IylXB4IjCOdHo0yWQl\noVCMcLiHWCxBRUUPI0fCqFFhRo8uIhaLEokIoRCEw7zt+t57FZD9lJEEEkAPkLlvFCgWkRTQBuxi\nT9DXA1uBLcBq77JeVVND8C0y5qCJqvpdg8kDIlIKzAVqCIXmE4sdDiygs3MaJSUppkxJMnGiC+XR\no4sYMQIqK9l9XVkJFRVQVDTwJz/jDCWR2F+QH6guoBvX8BQDO4G1wKvACvaE/EYLeeMn68hNv3nd\n9QSgBqimuHgRxcVLSCbnEg6PZMyYTmbOhKqqMmbODDN9OkybBrHYAaRzTijxLhkTvcuxuGGcBF7I\ni8gOYA3wD+Al4Hlglaqmh7ViU5Asy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yI0xJuAsyI0xJuAsyI0xJuAsyI0xJuAsyI0xJuAs\nyI0xJuAsyI0xJuAsyI0xJuAsyI0xJuAsyI0xJuAsyI0xJuAsyI0xJuAsyI0xJuAsyI0xJuAsyI0x\nJuAsyI0xJuAsyI0xJuAsyI0xJuAsyI0xJuAsyI0xJuAsyI0xJuAsyI0xJuD+P68X0FtJcLLbAAAA\nAElFTkSuQmCC\n", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "plt.pie(fatias, labels = atividades, colors = colunas, startangle = 90, \n", - " shadow = True, explode = (0,0.1,0,0))\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "collapsed": true - }, - "source": [ - "## Gráficos " - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "# Visualizando os gráfico dentro do Jupyter Notebook\n", - "# O Pylab combina funcionalidades do pyplot com funcionalidades do Numpy\n", - "%matplotlib inline\n", - "from pylab import *" - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEgCAYAAACq+TSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHddJREFUeJzt3Xu8lXPe//HXJ01SkZhGDtEY8/MztwhzIwxrHHMWUYaQ\ne2IME4O5+ZkxIsaNcXZjHKIYpFBOmYxaNXXrZIgOjjeJlEMHHRjV/vz++F5p2+29Wru91vpea633\n8/FYD2uvdV1rfaxqvffn+72+12XujoiISEOaxS5ARETSTUEhIiI5KShERCQnBYWIiOSkoBARkZwU\nFCIikpOCQiqKmT1nZmfXeay7mX1oZl+aWRczm25m+xe5jgfM7KoCv+YvzOyFPLc93cz+Ucj3l+ql\noJBUMbNeZjbRzJaa2Twze9nMzslz397AF+7+lzpP3QD82t03cffX3H1ndx9X8OILxMxqzGz7uo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KERFJFwWFiIjkpKAQEZGcFBQiIpKTgkJERHJSUIiI\nSE4KChERyUlBISIiOSkoRJrIzH6aXACmhZm1NrPp1X4iPqksWpktUgBmdhWwUXKb4+7XRS5JpGAU\nFCIFYGbfI5zQ8itgH9c/LKkgGnoSKYzvA22AjYGWkWsRKSh1FCIFYGYjCNc6+CGwlbv/JnJJIgXT\nPHYBIuXOzHoD37j7Y2bWDJhgZhl3z0YuTaQg1FGIiEhOmqMQEZGcFBQiIpKTgkJERHJSUIiISE4K\nChERyUlBISIiOSkoREQkp/8PhU06p8R+dREAAAAASUVORK5CYII=\n", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "x = linspace(0, 5, 10)\n", - "y = x ** 2\n", - "\n", - "fig = plt.figure()\n", - "\n", - "# Definindo os eixos\n", - "axes = fig.add_axes([0.1, 0.1, 0.8, 0.8])\n", - "\n", - "axes.plot(x, y, 'r')\n", - "\n", - "axes.set_xlabel('x')\n", - "axes.set_ylabel('y')\n", - "axes.set_title('Gráfico de Linha');" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEgCAYAAACq+TSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4VHXWwPHvCUUIHcWA1CBGYSkBpAisRKXpAgqLiCAi\nsFixob7sqitBbKhYdl2xLFWlrFgoUgWCgiCgFClKj7RQDL0ISc77xx1igJSBzMydcj7PMw+TuffO\nPXOZmTO/LqqKMcYYk5MotwMwxhgT3CxRGGOMyZUlCmOMMbmyRGGMMSZXliiMMcbkyhKFMcaYXFmi\nMCFFRCqLyGEREbdjuRgickREquXzOf4hIh/4KJ4MEanui+cy4UtsHIUJRiKyDbgcSAMEUCBOVVPc\njCsrEakKbAWOeh7aD7yvqkPdi+rCiEg6cJWqbnE7FhO8C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gBs9Xfx+9KxzEskqAPNFZCVOe80sVZ3uckwm+MQACz1tWUuAqao6O6edg657rDHG\nmOASdCUKY4wxwcUShTHGmFxZojDGGJMrSxTGGGNyZYnCGGNMrixRGGOMyZUlCmOMMbmyRGGMMSZX\nliiMyScRudazAExhESkmImsifSI+E15sZLYxPiAizwNFPbftqjrU5ZCM8RlLFMb4gIgUwpnQ8gTQ\nTO2DZcKIVT0Z4xuXAcWBEkARl2MxxqesRGGMD4jIZJy1DmKBK1T1YZdDMsZnCrodgDGhTkR6AqdU\ndYKIRAGLRCRBVZNcDs0Yn7AShTHGmFxZG4UxxphcWaIwxhiTK0sUxhhjcmWJwhhjTK4sURhjjMmV\nJQpjjDG5skRhjDEmV/8PHq4MHQ++4S0AAAAASUVORK5CYII=\n", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "# Gráficos com 2 figuras\n", - "x = linspace(0, 5, 10)\n", - "y = x ** 2\n", - "\n", - "fig = plt.figure()\n", - "\n", - "axes1 = fig.add_axes([0.1, 0.1, 0.8, 0.8]) # eixos da figura principal\n", - "axes2 = fig.add_axes([0.2, 0.5, 0.4, 0.3]) # eixos da figura secundária\n", - "\n", - "# Figura principal\n", - "axes1.plot(x, y, 'r')\n", - "axes1.set_xlabel('x')\n", - "axes1.set_ylabel('y')\n", - "axes1.set_title('Figura Principal')\n", - "\n", - "# Figura secundária\n", - "axes2.plot(y, x, 'g')\n", - "axes2.set_xlabel('y')\n", - "axes2.set_ylabel('x')\n", - "axes2.set_title('Figura Secundária');" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAakAAAEbCAYAAABgLnslAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm81mP+x/HXxxJStmmEmPwYmqZBikKW09jC2NcwmDEG\ng+ymsZXBGK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Z3sCpQJdcv3f5GESzZjZHtUR06ijx/kFrKSJ1BEnUUhQLrqLFiUH+QkWJme0LNATG\nBXjvrczsA2ARMNw5NyHXGYBi4HYCNMhyHDDczCaY2VUBc1SVamkjIeso8f6haykKdQRJ1FIUm5Rs\nJHGLYiBwY+JKMKecc6XOuUPxa3CamllOjys2s9OAxYmrYUv8CqGZc64R/kr0usRtLImJ0HUEYWsp\nQnUESdRSFJtUlRYnFgoz2wZfWD2dc4NDZnHO/QCMAlrk+K2bAWck7mO/ADQ3s+dznAHn3FeJ35cA\nL7G57YeiQ7WUEKU6gmC1FIk6guRqKYpNKkqLE0NfbQA8B8xwznUM8eZmVsvMdk58vANwIhVtXppF\nzrk7nXO/cc7th//7MNI5d1kuM5hZ9cSVOGa2I3ASMC2XGVKgWvpZ0DqC8LUUhTqC5Gspck3KObcB\nKFucOB3oG2Jxopn1Ad4DDjSzz8zsLwEyNAMuAf6YmKo52cxyPYrZExhlZlPw9/HfdM69luMMUVAb\nGJN4njAWGOKcGxY4U6VUSz+9fxTqCFRLZZKqpchNQRcRESkTuZGUiIhIGTUpERGJLDUpERGJLDUp\nERGJLDUpERGJLDUpERGJLDUpERGJLDUpERGJLDWpPGZmhyUOFqtmZjua2bRcbw4rkg9US+Fox4k8\nZ2b/BnZI/PrcOfdw4EgisaRaCkNNKs+Z2bb4jUZXAUc5/Q8XSYlqKQzd7st/tYAaQE1g+8BZROJM\ntRSARlJ5zswG48+O+T9gL+fcDYEjicSSaimMbUIHkOwxsz8Da51zfc1sK+BdMytyzpUEjiYSK6ql\ncDSSEhGRyNIzKRERiSw1KRERiSw1KRERiSw1KRERiSw1KRERiSw1KRERiSw1KRERiaz/B72nbO9X\nU2T5AAAAAElFTkSuQmCC\n", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "# Gráficos em Paralelo\n", - "fig, axes = plt.subplots(nrows = 1, ncols = 2)\n", - "\n", - "for ax in axes:\n", - " ax.plot(x, y, 'r')\n", - " ax.set_xlabel('x')\n", - " ax.set_ylabel('y')\n", - " ax.set_title('Título')\n", - " \n", - "fig.tight_layout()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Gráficos a partir do NumPy" - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "%matplotlib notebook\n", - "import matplotlib.pyplot as plt\n", - "import numpy as np" - ] - }, - { - "cell_type": "code", - "execution_count": 31, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "application/javascript": [ - "/* Put everything inside the global mpl namespace */\n", - "window.mpl = {};\n", - "\n", - "mpl.get_websocket_type = function() {\n", - " if (typeof(WebSocket) !== 'undefined') {\n", - " return WebSocket;\n", - " } else if (typeof(MozWebSocket) !== 'undefined') {\n", - " return MozWebSocket;\n", - " } else {\n", - " alert('Your browser does not have WebSocket support.' +\n", - " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", - " 'Firefox 4 and 5 are also supported but you ' +\n", - " 'have to enable WebSockets in about:config.');\n", - " };\n", - "}\n", - "\n", - "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", - " this.id = figure_id;\n", - "\n", - " this.ws = websocket;\n", - "\n", - " this.supports_binary = (this.ws.binaryType != undefined);\n", - "\n", - " if (!this.supports_binary) {\n", - " var warnings = document.getElementById(\"mpl-warnings\");\n", - " if (warnings) {\n", - " warnings.style.display = 'block';\n", - " warnings.textContent = (\n", - " \"This browser does not support binary websocket messages. \" +\n", - " \"Performance may be slow.\");\n", - " }\n", - " }\n", - "\n", - " this.imageObj = new Image();\n", - "\n", - " this.context = undefined;\n", - " this.message = undefined;\n", - " this.canvas = undefined;\n", - " this.rubberband_canvas = undefined;\n", - " this.rubberband_context = undefined;\n", - " this.format_dropdown = undefined;\n", - "\n", - " this.image_mode = 'full';\n", - "\n", - " this.root = $('
');\n", - " this._root_extra_style(this.root)\n", - " this.root.attr('style', 'display: inline-block');\n", - "\n", - " $(parent_element).append(this.root);\n", - "\n", - " this._init_header(this);\n", - " this._init_canvas(this);\n", - " this._init_toolbar(this);\n", - "\n", - " var fig = this;\n", - "\n", - " this.waiting = false;\n", - "\n", - " this.ws.onopen = function () {\n", - " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", - " fig.send_message(\"send_image_mode\", {});\n", - " fig.send_message(\"refresh\", {});\n", - " }\n", - "\n", - " this.imageObj.onload = function() {\n", - " if (fig.image_mode == 'full') {\n", - " // Full images could contain transparency (where diff images\n", - " // almost always do), so we need to clear the canvas so that\n", - " // there is no ghosting.\n", - " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", - " }\n", - " fig.context.drawImage(fig.imageObj, 0, 0);\n", - " };\n", - "\n", - " this.imageObj.onunload = function() {\n", - " this.ws.close();\n", - " }\n", - "\n", - " this.ws.onmessage = this._make_on_message_function(this);\n", - "\n", - " this.ondownload = ondownload;\n", - "}\n", - "\n", - "mpl.figure.prototype._init_header = function() {\n", - " var titlebar = $(\n", - " '
');\n", - " var titletext = $(\n", - " '
');\n", - " titlebar.append(titletext)\n", - " this.root.append(titlebar);\n", - " this.header = titletext[0];\n", - "}\n", - "\n", - "\n", - "\n", - "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "\n", - "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "mpl.figure.prototype._init_canvas = function() {\n", - " var fig = this;\n", - "\n", - " var canvas_div = $('
');\n", - "\n", - " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", - "\n", - " function canvas_keyboard_event(event) {\n", - " return fig.key_event(event, event['data']);\n", - " }\n", - "\n", - " canvas_div.keydown('key_press', canvas_keyboard_event);\n", - " canvas_div.keyup('key_release', canvas_keyboard_event);\n", - " this.canvas_div = canvas_div\n", - " this._canvas_extra_style(canvas_div)\n", - " this.root.append(canvas_div);\n", - "\n", - " var canvas = $('');\n", - " canvas.addClass('mpl-canvas');\n", - " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", - "\n", - " this.canvas = canvas[0];\n", - " this.context = canvas[0].getContext(\"2d\");\n", - "\n", - " var rubberband = $('');\n", - " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", - "\n", - " var pass_mouse_events = true;\n", - "\n", - " canvas_div.resizable({\n", - " start: function(event, ui) {\n", - " pass_mouse_events = false;\n", - " },\n", - " resize: function(event, ui) {\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " stop: function(event, ui) {\n", - " pass_mouse_events = true;\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " });\n", - "\n", - " function mouse_event_fn(event) {\n", - " if (pass_mouse_events)\n", - " return fig.mouse_event(event, event['data']);\n", - " }\n", - "\n", - " rubberband.mousedown('button_press', mouse_event_fn);\n", - " rubberband.mouseup('button_release', mouse_event_fn);\n", - " // Throttle sequential mouse events to 1 every 20ms.\n", - " rubberband.mousemove('motion_notify', mouse_event_fn);\n", - "\n", - " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", - " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", - "\n", - " canvas_div.on(\"wheel\", function (event) {\n", - " event = event.originalEvent;\n", - " event['data'] = 'scroll'\n", - " if (event.deltaY < 0) {\n", - " event.step = 1;\n", - " } else {\n", - " event.step = -1;\n", - " }\n", - " mouse_event_fn(event);\n", - " });\n", - "\n", - " canvas_div.append(canvas);\n", - " canvas_div.append(rubberband);\n", - "\n", - " this.rubberband = rubberband;\n", - " this.rubberband_canvas = rubberband[0];\n", - " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", - " this.rubberband_context.strokeStyle = \"#000000\";\n", - "\n", - " this._resize_canvas = function(width, height) {\n", - " // Keep the size of the canvas, canvas container, and rubber band\n", - " // canvas in synch.\n", - " canvas_div.css('width', width)\n", - " canvas_div.css('height', height)\n", - "\n", - " canvas.attr('width', width);\n", - " canvas.attr('height', height);\n", - "\n", - " rubberband.attr('width', width);\n", - " rubberband.attr('height', height);\n", - " }\n", - "\n", - " // Set the figure to an initial 600x600px, this will subsequently be updated\n", - " // upon first draw.\n", - " this._resize_canvas(600, 600);\n", - "\n", - " // Disable right mouse context menu.\n", - " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", - " return false;\n", - " });\n", - "\n", - " function set_focus () {\n", - " canvas.focus();\n", - " canvas_div.focus();\n", - " }\n", - "\n", - " window.setTimeout(set_focus, 100);\n", - "}\n", - "\n", - "mpl.figure.prototype._init_toolbar = function() {\n", - " var fig = this;\n", - "\n", - " var nav_element = $('
')\n", - " nav_element.attr('style', 'width: 100%');\n", - " this.root.append(nav_element);\n", - "\n", - " // Define a callback function for later on.\n", - " function toolbar_event(event) {\n", - " return fig.toolbar_button_onclick(event['data']);\n", - " }\n", - " function toolbar_mouse_event(event) {\n", - " return fig.toolbar_button_onmouseover(event['data']);\n", - " }\n", - "\n", - " for(var toolbar_ind in mpl.toolbar_items) {\n", - " var name = mpl.toolbar_items[toolbar_ind][0];\n", - " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", - " var image = mpl.toolbar_items[toolbar_ind][2];\n", - " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", - "\n", - " if (!name) {\n", - " // put a spacer in here.\n", - " continue;\n", - " }\n", - " var button = $('');\n", - " button.click(method_name, toolbar_event);\n", - " button.mouseover(tooltip, toolbar_mouse_event);\n", - " nav_element.append(button);\n", - " }\n", - "\n", - " // Add the status bar.\n", - " var status_bar = $('');\n", - " nav_element.append(status_bar);\n", - " this.message = status_bar[0];\n", - "\n", - " // Add the close button to the window.\n", - " var buttongrp = $('
');\n", - " var button = $('');\n", - " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", - " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", - " buttongrp.append(button);\n", - " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", - " titlebar.prepend(buttongrp);\n", - "}\n", - "\n", - "mpl.figure.prototype._root_extra_style = function(el){\n", - " var fig = this\n", - " el.on(\"remove\", function(){\n", - "\tfig.close_ws(fig, {});\n", - " });\n", - "}\n", - "\n", - "mpl.figure.prototype._canvas_extra_style = function(el){\n", - " // this is important to make the div 'focusable\n", - " el.attr('tabindex', 0)\n", - " // reach out to IPython and tell the keyboard manager to turn it's self\n", - " // off when our div gets focus\n", - "\n", - " // location in version 3\n", - " if (IPython.notebook.keyboard_manager) {\n", - " IPython.notebook.keyboard_manager.register_events(el);\n", - " }\n", - " else {\n", - " // location in version 2\n", - " IPython.keyboard_manager.register_events(el);\n", - " }\n", - "\n", - "}\n", - "\n", - "mpl.figure.prototype._key_event_extra = function(event, name) {\n", - " var manager = IPython.notebook.keyboard_manager;\n", - " if (!manager)\n", - " manager = IPython.keyboard_manager;\n", - "\n", - " // Check for shift+enter\n", - " if (event.shiftKey && event.which == 13) {\n", - " this.canvas_div.blur();\n", - " event.shiftKey = false;\n", - " // Send a \"J\" for go to next cell\n", - " event.which = 74;\n", - " event.keyCode = 74;\n", - " manager.command_mode();\n", - " manager.handle_keydown(event);\n", - " }\n", - "}\n", - "\n", - "mpl.figure.prototype.handle_save = function(fig, msg) {\n", - " fig.ondownload(fig, null);\n", - "}\n", - "\n", - "\n", - "mpl.find_output_cell = function(html_output) {\n", - " // Return the cell and output element which can be found *uniquely* in the notebook.\n", - " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", - " // IPython event is triggered only after the cells have been serialised, which for\n", - " // our purposes (turning an active figure into a static one), is too late.\n", - " var cells = IPython.notebook.get_cells();\n", - " var ncells = cells.length;\n", - " for (var i=0; i= 3 moved mimebundle to data attribute of output\n", - " data = data.data;\n", - " }\n", - " if (data['text/html'] == html_output) {\n", - " return [cell, data, j];\n", - " }\n", - " }\n", - " }\n", - " }\n", - "}\n", - "\n", - "// Register the function which deals with the matplotlib target/channel.\n", - "// The kernel may be null if the page has been refreshed.\n", - "if (IPython.notebook.kernel != null) {\n", - " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", - "}\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "# Plot e Scatter\n", - "fig = plt.figure()\n", - "\n", - "ax1 = fig.add_subplot(1,2,1)\n", - "ax1.plot(np.random.randn(50), color='red')\n", - "\n", - "ax2 = fig.add_subplot(1,2,2)\n", - "ax2.scatter(np.arange(50), np.random.randn(50))\n", - "plt.show()" - ] - }, - { - "cell_type": "code", - "execution_count": 33, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "application/javascript": [ - "/* Put everything inside the global mpl namespace */\n", - "window.mpl = {};\n", - "\n", - "mpl.get_websocket_type = function() {\n", - " if (typeof(WebSocket) !== 'undefined') {\n", - " return WebSocket;\n", - " } else if (typeof(MozWebSocket) !== 'undefined') {\n", - " return MozWebSocket;\n", - " } else {\n", - " alert('Your browser does not have WebSocket support.' +\n", - " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", - " 'Firefox 4 and 5 are also supported but you ' +\n", - " 'have to enable WebSockets in about:config.');\n", - " };\n", - "}\n", - "\n", - "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", - " this.id = figure_id;\n", - "\n", - " this.ws = websocket;\n", - "\n", - " this.supports_binary = (this.ws.binaryType != undefined);\n", - "\n", - " if (!this.supports_binary) {\n", - " var warnings = document.getElementById(\"mpl-warnings\");\n", - " if (warnings) {\n", - " warnings.style.display = 'block';\n", - " warnings.textContent = (\n", - " \"This browser does not support binary websocket messages. \" +\n", - " \"Performance may be slow.\");\n", - " }\n", - " }\n", - "\n", - " this.imageObj = new Image();\n", - "\n", - " this.context = undefined;\n", - " this.message = undefined;\n", - " this.canvas = undefined;\n", - " this.rubberband_canvas = undefined;\n", - " this.rubberband_context = undefined;\n", - " this.format_dropdown = undefined;\n", - "\n", - " this.image_mode = 'full';\n", - "\n", - " this.root = $('
');\n", - " this._root_extra_style(this.root)\n", - " this.root.attr('style', 'display: inline-block');\n", - "\n", - " $(parent_element).append(this.root);\n", - "\n", - " this._init_header(this);\n", - " this._init_canvas(this);\n", - " this._init_toolbar(this);\n", - "\n", - " var fig = this;\n", - "\n", - " this.waiting = false;\n", - "\n", - " this.ws.onopen = function () {\n", - " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", - " fig.send_message(\"send_image_mode\", {});\n", - " fig.send_message(\"refresh\", {});\n", - " }\n", - "\n", - " this.imageObj.onload = function() {\n", - " if (fig.image_mode == 'full') {\n", - " // Full images could contain transparency (where diff images\n", - " // almost always do), so we need to clear the canvas so that\n", - " // there is no ghosting.\n", - " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", - " }\n", - " fig.context.drawImage(fig.imageObj, 0, 0);\n", - " };\n", - "\n", - " this.imageObj.onunload = function() {\n", - " this.ws.close();\n", - " }\n", - "\n", - " this.ws.onmessage = this._make_on_message_function(this);\n", - "\n", - " this.ondownload = ondownload;\n", - "}\n", - "\n", - "mpl.figure.prototype._init_header = function() {\n", - " var titlebar = $(\n", - " '
');\n", - " var titletext = $(\n", - " '
');\n", - " titlebar.append(titletext)\n", - " this.root.append(titlebar);\n", - " this.header = titletext[0];\n", - "}\n", - "\n", - "\n", - "\n", - "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "\n", - "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "mpl.figure.prototype._init_canvas = function() {\n", - " var fig = this;\n", - "\n", - " var canvas_div = $('
');\n", - "\n", - " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", - "\n", - " function canvas_keyboard_event(event) {\n", - " return fig.key_event(event, event['data']);\n", - " }\n", - "\n", - " canvas_div.keydown('key_press', canvas_keyboard_event);\n", - " canvas_div.keyup('key_release', canvas_keyboard_event);\n", - " this.canvas_div = canvas_div\n", - " this._canvas_extra_style(canvas_div)\n", - " this.root.append(canvas_div);\n", - "\n", - " var canvas = $('');\n", - " canvas.addClass('mpl-canvas');\n", - " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", - "\n", - " this.canvas = canvas[0];\n", - " this.context = canvas[0].getContext(\"2d\");\n", - "\n", - " var rubberband = $('');\n", - " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", - "\n", - " var pass_mouse_events = true;\n", - "\n", - " canvas_div.resizable({\n", - " start: function(event, ui) {\n", - " pass_mouse_events = false;\n", - " },\n", - " resize: function(event, ui) {\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " stop: function(event, ui) {\n", - " pass_mouse_events = true;\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " });\n", - "\n", - " function mouse_event_fn(event) {\n", - " if (pass_mouse_events)\n", - " return fig.mouse_event(event, event['data']);\n", - " }\n", - "\n", - " rubberband.mousedown('button_press', mouse_event_fn);\n", - " rubberband.mouseup('button_release', mouse_event_fn);\n", - " // Throttle sequential mouse events to 1 every 20ms.\n", - " rubberband.mousemove('motion_notify', mouse_event_fn);\n", - "\n", - " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", - " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", - "\n", - " canvas_div.on(\"wheel\", function (event) {\n", - " event = event.originalEvent;\n", - " event['data'] = 'scroll'\n", - " if (event.deltaY < 0) {\n", - " event.step = 1;\n", - " } else {\n", - " event.step = -1;\n", - " }\n", - " mouse_event_fn(event);\n", - " });\n", - "\n", - " canvas_div.append(canvas);\n", - " canvas_div.append(rubberband);\n", - "\n", - " this.rubberband = rubberband;\n", - " this.rubberband_canvas = rubberband[0];\n", - " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", - " this.rubberband_context.strokeStyle = \"#000000\";\n", - "\n", - " this._resize_canvas = function(width, height) {\n", - " // Keep the size of the canvas, canvas container, and rubber band\n", - " // canvas in synch.\n", - " canvas_div.css('width', width)\n", - " canvas_div.css('height', height)\n", - "\n", - " canvas.attr('width', width);\n", - " canvas.attr('height', height);\n", - "\n", - " rubberband.attr('width', width);\n", - " rubberband.attr('height', height);\n", - " }\n", - "\n", - " // Set the figure to an initial 600x600px, this will subsequently be updated\n", - " // upon first draw.\n", - " this._resize_canvas(600, 600);\n", - "\n", - " // Disable right mouse context menu.\n", - " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", - " return false;\n", - " });\n", - "\n", - " function set_focus () {\n", - " canvas.focus();\n", - " canvas_div.focus();\n", - " }\n", - "\n", - " window.setTimeout(set_focus, 100);\n", - "}\n", - "\n", - "mpl.figure.prototype._init_toolbar = function() {\n", - " var fig = this;\n", - "\n", - " var nav_element = $('
')\n", - " nav_element.attr('style', 'width: 100%');\n", - " this.root.append(nav_element);\n", - "\n", - " // Define a callback function for later on.\n", - " function toolbar_event(event) {\n", - " return fig.toolbar_button_onclick(event['data']);\n", - " }\n", - " function toolbar_mouse_event(event) {\n", - " return fig.toolbar_button_onmouseover(event['data']);\n", - " }\n", - "\n", - " for(var toolbar_ind in mpl.toolbar_items) {\n", - " var name = mpl.toolbar_items[toolbar_ind][0];\n", - " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", - " var image = mpl.toolbar_items[toolbar_ind][2];\n", - " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", - "\n", - " if (!name) {\n", - " // put a spacer in here.\n", - " continue;\n", - " }\n", - " var button = $('');\n", - " button.click(method_name, toolbar_event);\n", - " button.mouseover(tooltip, toolbar_mouse_event);\n", - " nav_element.append(button);\n", - " }\n", - "\n", - " // Add the status bar.\n", - " var status_bar = $('');\n", - " nav_element.append(status_bar);\n", - " this.message = status_bar[0];\n", - "\n", - " // Add the close button to the window.\n", - " var buttongrp = $('
');\n", - " var button = $('');\n", - " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", - " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", - " buttongrp.append(button);\n", - " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", - " titlebar.prepend(buttongrp);\n", - "}\n", - "\n", - "mpl.figure.prototype._root_extra_style = function(el){\n", - " var fig = this\n", - " el.on(\"remove\", function(){\n", - "\tfig.close_ws(fig, {});\n", - " });\n", - "}\n", - "\n", - "mpl.figure.prototype._canvas_extra_style = function(el){\n", - " // this is important to make the div 'focusable\n", - " el.attr('tabindex', 0)\n", - " // reach out to IPython and tell the keyboard manager to turn it's self\n", - " // off when our div gets focus\n", - "\n", - " // location in version 3\n", - " if (IPython.notebook.keyboard_manager) {\n", - " IPython.notebook.keyboard_manager.register_events(el);\n", - " }\n", - " else {\n", - " // location in version 2\n", - " IPython.keyboard_manager.register_events(el);\n", - " }\n", - "\n", - "}\n", - "\n", - "mpl.figure.prototype._key_event_extra = function(event, name) {\n", - " var manager = IPython.notebook.keyboard_manager;\n", - " if (!manager)\n", - " manager = IPython.keyboard_manager;\n", - "\n", - " // Check for shift+enter\n", - " if (event.shiftKey && event.which == 13) {\n", - " this.canvas_div.blur();\n", - " event.shiftKey = false;\n", - " // Send a \"J\" for go to next cell\n", - " event.which = 74;\n", - " event.keyCode = 74;\n", - " manager.command_mode();\n", - " manager.handle_keydown(event);\n", - " }\n", - "}\n", - "\n", - "mpl.figure.prototype.handle_save = function(fig, msg) {\n", - " fig.ondownload(fig, null);\n", - "}\n", - "\n", - "\n", - "mpl.find_output_cell = function(html_output) {\n", - " // Return the cell and output element which can be found *uniquely* in the notebook.\n", - " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", - " // IPython event is triggered only after the cells have been serialised, which for\n", - " // our purposes (turning an active figure into a static one), is too late.\n", - " var cells = IPython.notebook.get_cells();\n", - " var ncells = cells.length;\n", - " for (var i=0; i= 3 moved mimebundle to data attribute of output\n", - " data = data.data;\n", - " }\n", - " if (data['text/html'] == html_output) {\n", - " return [cell, data, j];\n", - " }\n", - " }\n", - " }\n", - " }\n", - "}\n", - "\n", - "// Register the function which deals with the matplotlib target/channel.\n", - "// The kernel may be null if the page has been refreshed.\n", - "if (IPython.notebook.kernel != null) {\n", - " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", - "}\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "# Controle dos eixos\n", - "fig, axes = plt.subplots(1, 3, figsize = (12, 4))\n", - "\n", - "axes[0].plot(x, x**2, x, x**3)\n", - "axes[0].set_title(\"Eixos com range padrão\")\n", - "\n", - "axes[1].plot(x, x**2, x, x**3)\n", - "axes[1].axis('tight')\n", - "axes[1].set_title(\"Eixos menores\")\n", - "\n", - "axes[2].plot(x, x**2, x, x**3)\n", - "axes[2].set_ylim([0, 60])\n", - "axes[2].set_xlim([2, 5])\n", - "axes[2].set_title(\"Eixos customizados\");" - ] - }, - { - "cell_type": "code", - "execution_count": 35, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "application/javascript": [ - "/* Put everything inside the global mpl namespace */\n", - "window.mpl = {};\n", - "\n", - "mpl.get_websocket_type = function() {\n", - " if (typeof(WebSocket) !== 'undefined') {\n", - " return WebSocket;\n", - " } else if (typeof(MozWebSocket) !== 'undefined') {\n", - " return MozWebSocket;\n", - " } else {\n", - " alert('Your browser does not have WebSocket support.' +\n", - " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", - " 'Firefox 4 and 5 are also supported but you ' +\n", - " 'have to enable WebSockets in about:config.');\n", - " };\n", - "}\n", - "\n", - "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", - " this.id = figure_id;\n", - "\n", - " this.ws = websocket;\n", - "\n", - " this.supports_binary = (this.ws.binaryType != undefined);\n", - "\n", - " if (!this.supports_binary) {\n", - " var warnings = document.getElementById(\"mpl-warnings\");\n", - " if (warnings) {\n", - " warnings.style.display = 'block';\n", - " warnings.textContent = (\n", - " \"This browser does not support binary websocket messages. \" +\n", - " \"Performance may be slow.\");\n", - " }\n", - " }\n", - "\n", - " this.imageObj = new Image();\n", - "\n", - " this.context = undefined;\n", - " this.message = undefined;\n", - " this.canvas = undefined;\n", - " this.rubberband_canvas = undefined;\n", - " this.rubberband_context = undefined;\n", - " this.format_dropdown = undefined;\n", - "\n", - " this.image_mode = 'full';\n", - "\n", - " this.root = $('
');\n", - " this._root_extra_style(this.root)\n", - " this.root.attr('style', 'display: inline-block');\n", - "\n", - " $(parent_element).append(this.root);\n", - "\n", - " this._init_header(this);\n", - " this._init_canvas(this);\n", - " this._init_toolbar(this);\n", - "\n", - " var fig = this;\n", - "\n", - " this.waiting = false;\n", - "\n", - " this.ws.onopen = function () {\n", - " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", - " fig.send_message(\"send_image_mode\", {});\n", - " fig.send_message(\"refresh\", {});\n", - " }\n", - "\n", - " this.imageObj.onload = function() {\n", - " if (fig.image_mode == 'full') {\n", - " // Full images could contain transparency (where diff images\n", - " // almost always do), so we need to clear the canvas so that\n", - " // there is no ghosting.\n", - " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", - " }\n", - " fig.context.drawImage(fig.imageObj, 0, 0);\n", - " };\n", - "\n", - " this.imageObj.onunload = function() {\n", - " this.ws.close();\n", - " }\n", - "\n", - " this.ws.onmessage = this._make_on_message_function(this);\n", - "\n", - " this.ondownload = ondownload;\n", - "}\n", - "\n", - "mpl.figure.prototype._init_header = function() {\n", - " var titlebar = $(\n", - " '
');\n", - " var titletext = $(\n", - " '
');\n", - " titlebar.append(titletext)\n", - " this.root.append(titlebar);\n", - " this.header = titletext[0];\n", - "}\n", - "\n", - "\n", - "\n", - "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "\n", - "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "mpl.figure.prototype._init_canvas = function() {\n", - " var fig = this;\n", - "\n", - " var canvas_div = $('
');\n", - "\n", - " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", - "\n", - " function canvas_keyboard_event(event) {\n", - " return fig.key_event(event, event['data']);\n", - " }\n", - "\n", - " canvas_div.keydown('key_press', canvas_keyboard_event);\n", - " canvas_div.keyup('key_release', canvas_keyboard_event);\n", - " this.canvas_div = canvas_div\n", - " this._canvas_extra_style(canvas_div)\n", - " this.root.append(canvas_div);\n", - "\n", - " var canvas = $('');\n", - " canvas.addClass('mpl-canvas');\n", - " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", - "\n", - " this.canvas = canvas[0];\n", - " this.context = canvas[0].getContext(\"2d\");\n", - "\n", - " var rubberband = $('');\n", - " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", - "\n", - " var pass_mouse_events = true;\n", - "\n", - " canvas_div.resizable({\n", - " start: function(event, ui) {\n", - " pass_mouse_events = false;\n", - " },\n", - " resize: function(event, ui) {\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " stop: function(event, ui) {\n", - " pass_mouse_events = true;\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " });\n", - "\n", - " function mouse_event_fn(event) {\n", - " if (pass_mouse_events)\n", - " return fig.mouse_event(event, event['data']);\n", - " }\n", - "\n", - " rubberband.mousedown('button_press', mouse_event_fn);\n", - " rubberband.mouseup('button_release', mouse_event_fn);\n", - " // Throttle sequential mouse events to 1 every 20ms.\n", - " rubberband.mousemove('motion_notify', mouse_event_fn);\n", - "\n", - " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", - " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", - "\n", - " canvas_div.on(\"wheel\", function (event) {\n", - " event = event.originalEvent;\n", - " event['data'] = 'scroll'\n", - " if (event.deltaY < 0) {\n", - " event.step = 1;\n", - " } else {\n", - " event.step = -1;\n", - " }\n", - " mouse_event_fn(event);\n", - " });\n", - "\n", - " canvas_div.append(canvas);\n", - " canvas_div.append(rubberband);\n", - "\n", - " this.rubberband = rubberband;\n", - " this.rubberband_canvas = rubberband[0];\n", - " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", - " this.rubberband_context.strokeStyle = \"#000000\";\n", - "\n", - " this._resize_canvas = function(width, height) {\n", - " // Keep the size of the canvas, canvas container, and rubber band\n", - " // canvas in synch.\n", - " canvas_div.css('width', width)\n", - " canvas_div.css('height', height)\n", - "\n", - " canvas.attr('width', width);\n", - " canvas.attr('height', height);\n", - "\n", - " rubberband.attr('width', width);\n", - " rubberband.attr('height', height);\n", - " }\n", - "\n", - " // Set the figure to an initial 600x600px, this will subsequently be updated\n", - " // upon first draw.\n", - " this._resize_canvas(600, 600);\n", - "\n", - " // Disable right mouse context menu.\n", - " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", - " return false;\n", - " });\n", - "\n", - " function set_focus () {\n", - " canvas.focus();\n", - " canvas_div.focus();\n", - " }\n", - "\n", - " window.setTimeout(set_focus, 100);\n", - "}\n", - "\n", - "mpl.figure.prototype._init_toolbar = function() {\n", - " var fig = this;\n", - "\n", - " var nav_element = $('
')\n", - " nav_element.attr('style', 'width: 100%');\n", - " this.root.append(nav_element);\n", - "\n", - " // Define a callback function for later on.\n", - " function toolbar_event(event) {\n", - " return fig.toolbar_button_onclick(event['data']);\n", - " }\n", - " function toolbar_mouse_event(event) {\n", - " return fig.toolbar_button_onmouseover(event['data']);\n", - " }\n", - "\n", - " for(var toolbar_ind in mpl.toolbar_items) {\n", - " var name = mpl.toolbar_items[toolbar_ind][0];\n", - " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", - " var image = mpl.toolbar_items[toolbar_ind][2];\n", - " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", - "\n", - " if (!name) {\n", - " // put a spacer in here.\n", - " continue;\n", - " }\n", - " var button = $('');\n", - " button.click(method_name, toolbar_event);\n", - " button.mouseover(tooltip, toolbar_mouse_event);\n", - " nav_element.append(button);\n", - " }\n", - "\n", - " // Add the status bar.\n", - " var status_bar = $('');\n", - " nav_element.append(status_bar);\n", - " this.message = status_bar[0];\n", - "\n", - " // Add the close button to the window.\n", - " var buttongrp = $('
');\n", - " var button = $('');\n", - " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", - " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", - " buttongrp.append(button);\n", - " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", - " titlebar.prepend(buttongrp);\n", - "}\n", - "\n", - "mpl.figure.prototype._root_extra_style = function(el){\n", - " var fig = this\n", - " el.on(\"remove\", function(){\n", - "\tfig.close_ws(fig, {});\n", - " });\n", - "}\n", - "\n", - "mpl.figure.prototype._canvas_extra_style = function(el){\n", - " // this is important to make the div 'focusable\n", - " el.attr('tabindex', 0)\n", - " // reach out to IPython and tell the keyboard manager to turn it's self\n", - " // off when our div gets focus\n", - "\n", - " // location in version 3\n", - " if (IPython.notebook.keyboard_manager) {\n", - " IPython.notebook.keyboard_manager.register_events(el);\n", - " }\n", - " else {\n", - " // location in version 2\n", - " IPython.keyboard_manager.register_events(el);\n", - " }\n", - "\n", - "}\n", - "\n", - "mpl.figure.prototype._key_event_extra = function(event, name) {\n", - " var manager = IPython.notebook.keyboard_manager;\n", - " if (!manager)\n", - " manager = IPython.keyboard_manager;\n", - "\n", - " // Check for shift+enter\n", - " if (event.shiftKey && event.which == 13) {\n", - " this.canvas_div.blur();\n", - " event.shiftKey = false;\n", - " // Send a \"J\" for go to next cell\n", - " event.which = 74;\n", - " event.keyCode = 74;\n", - " manager.command_mode();\n", - " manager.handle_keydown(event);\n", - " }\n", - "}\n", - "\n", - "mpl.figure.prototype.handle_save = function(fig, msg) {\n", - " fig.ondownload(fig, null);\n", - "}\n", - "\n", - "\n", - "mpl.find_output_cell = function(html_output) {\n", - " // Return the cell and output element which can be found *uniquely* in the notebook.\n", - " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", - " // IPython event is triggered only after the cells have been serialised, which for\n", - " // our purposes (turning an active figure into a static one), is too late.\n", - " var cells = IPython.notebook.get_cells();\n", - " var ncells = cells.length;\n", - " for (var i=0; i= 3 moved mimebundle to data attribute of output\n", - " data = data.data;\n", - " }\n", - " if (data['text/html'] == html_output) {\n", - " return [cell, data, j];\n", - " }\n", - " }\n", - " }\n", - " }\n", - "}\n", - "\n", - "// Register the function which deals with the matplotlib target/channel.\n", - "// The kernel may be null if the page has been refreshed.\n", - "if (IPython.notebook.kernel != null) {\n", - " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", - "}\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "# Grid\n", - "fig, axes = plt.subplots(1, 2, figsize=(10,3))\n", - "\n", - "# Grid padrão\n", - "axes[0].plot(x, x**2, x, x**3, lw = 2)\n", - "axes[0].grid(True)\n", - "\n", - "# Grid customizado\n", - "axes[1].plot(x, x**2, x, x**3, lw = 2)\n", - "axes[1].grid(color = 'b', alpha = 0.5, linestyle = 'dashed', linewidth = 0.5)" - ] - }, - { - "cell_type": "code", - "execution_count": 37, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "application/javascript": [ - "/* Put everything inside the global mpl namespace */\n", - "window.mpl = {};\n", - "\n", - "mpl.get_websocket_type = function() {\n", - " if (typeof(WebSocket) !== 'undefined') {\n", - " return WebSocket;\n", - " } else if (typeof(MozWebSocket) !== 'undefined') {\n", - " return MozWebSocket;\n", - " } else {\n", - " alert('Your browser does not have WebSocket support.' +\n", - " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", - " 'Firefox 4 and 5 are also supported but you ' +\n", - " 'have to enable WebSockets in about:config.');\n", - " };\n", - "}\n", - "\n", - "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", - " this.id = figure_id;\n", - "\n", - " this.ws = websocket;\n", - "\n", - " this.supports_binary = (this.ws.binaryType != undefined);\n", - "\n", - " if (!this.supports_binary) {\n", - " var warnings = document.getElementById(\"mpl-warnings\");\n", - " if (warnings) {\n", - " warnings.style.display = 'block';\n", - " warnings.textContent = (\n", - " \"This browser does not support binary websocket messages. \" +\n", - " \"Performance may be slow.\");\n", - " }\n", - " }\n", - "\n", - " this.imageObj = new Image();\n", - "\n", - " this.context = undefined;\n", - " this.message = undefined;\n", - " this.canvas = undefined;\n", - " this.rubberband_canvas = undefined;\n", - " this.rubberband_context = undefined;\n", - " this.format_dropdown = undefined;\n", - "\n", - " this.image_mode = 'full';\n", - "\n", - " this.root = $('
');\n", - " this._root_extra_style(this.root)\n", - " this.root.attr('style', 'display: inline-block');\n", - "\n", - " $(parent_element).append(this.root);\n", - "\n", - " this._init_header(this);\n", - " this._init_canvas(this);\n", - " this._init_toolbar(this);\n", - "\n", - " var fig = this;\n", - "\n", - " this.waiting = false;\n", - "\n", - " this.ws.onopen = function () {\n", - " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", - " fig.send_message(\"send_image_mode\", {});\n", - " fig.send_message(\"refresh\", {});\n", - " }\n", - "\n", - " this.imageObj.onload = function() {\n", - " if (fig.image_mode == 'full') {\n", - " // Full images could contain transparency (where diff images\n", - " // almost always do), so we need to clear the canvas so that\n", - " // there is no ghosting.\n", - " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", - " }\n", - " fig.context.drawImage(fig.imageObj, 0, 0);\n", - " };\n", - "\n", - " this.imageObj.onunload = function() {\n", - " this.ws.close();\n", - " }\n", - "\n", - " this.ws.onmessage = this._make_on_message_function(this);\n", - "\n", - " this.ondownload = ondownload;\n", - "}\n", - "\n", - "mpl.figure.prototype._init_header = function() {\n", - " var titlebar = $(\n", - " '
');\n", - " var titletext = $(\n", - " '
');\n", - " titlebar.append(titletext)\n", - " this.root.append(titlebar);\n", - " this.header = titletext[0];\n", - "}\n", - "\n", - "\n", - "\n", - "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "\n", - "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "mpl.figure.prototype._init_canvas = function() {\n", - " var fig = this;\n", - "\n", - " var canvas_div = $('
');\n", - "\n", - " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", - "\n", - " function canvas_keyboard_event(event) {\n", - " return fig.key_event(event, event['data']);\n", - " }\n", - "\n", - " canvas_div.keydown('key_press', canvas_keyboard_event);\n", - " canvas_div.keyup('key_release', canvas_keyboard_event);\n", - " this.canvas_div = canvas_div\n", - " this._canvas_extra_style(canvas_div)\n", - " this.root.append(canvas_div);\n", - "\n", - " var canvas = $('');\n", - " canvas.addClass('mpl-canvas');\n", - " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", - "\n", - " this.canvas = canvas[0];\n", - " this.context = canvas[0].getContext(\"2d\");\n", - "\n", - " var rubberband = $('');\n", - " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", - "\n", - " var pass_mouse_events = true;\n", - "\n", - " canvas_div.resizable({\n", - " start: function(event, ui) {\n", - " pass_mouse_events = false;\n", - " },\n", - " resize: function(event, ui) {\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " stop: function(event, ui) {\n", - " pass_mouse_events = true;\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " });\n", - "\n", - " function mouse_event_fn(event) {\n", - " if (pass_mouse_events)\n", - " return fig.mouse_event(event, event['data']);\n", - " }\n", - "\n", - " rubberband.mousedown('button_press', mouse_event_fn);\n", - " rubberband.mouseup('button_release', mouse_event_fn);\n", - " // Throttle sequential mouse events to 1 every 20ms.\n", - " rubberband.mousemove('motion_notify', mouse_event_fn);\n", - "\n", - " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", - " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", - "\n", - " canvas_div.on(\"wheel\", function (event) {\n", - " event = event.originalEvent;\n", - " event['data'] = 'scroll'\n", - " if (event.deltaY < 0) {\n", - " event.step = 1;\n", - " } else {\n", - " event.step = -1;\n", - " }\n", - " mouse_event_fn(event);\n", - " });\n", - "\n", - " canvas_div.append(canvas);\n", - " canvas_div.append(rubberband);\n", - "\n", - " this.rubberband = rubberband;\n", - " this.rubberband_canvas = rubberband[0];\n", - " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", - " this.rubberband_context.strokeStyle = \"#000000\";\n", - "\n", - " this._resize_canvas = function(width, height) {\n", - " // Keep the size of the canvas, canvas container, and rubber band\n", - " // canvas in synch.\n", - " canvas_div.css('width', width)\n", - " canvas_div.css('height', height)\n", - "\n", - " canvas.attr('width', width);\n", - " canvas.attr('height', height);\n", - "\n", - " rubberband.attr('width', width);\n", - " rubberband.attr('height', height);\n", - " }\n", - "\n", - " // Set the figure to an initial 600x600px, this will subsequently be updated\n", - " // upon first draw.\n", - " this._resize_canvas(600, 600);\n", - "\n", - " // Disable right mouse context menu.\n", - " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", - " return false;\n", - " });\n", - "\n", - " function set_focus () {\n", - " canvas.focus();\n", - " canvas_div.focus();\n", - " }\n", - "\n", - " window.setTimeout(set_focus, 100);\n", - "}\n", - "\n", - "mpl.figure.prototype._init_toolbar = function() {\n", - " var fig = this;\n", - "\n", - " var nav_element = $('
')\n", - " nav_element.attr('style', 'width: 100%');\n", - " this.root.append(nav_element);\n", - "\n", - " // Define a callback function for later on.\n", - " function toolbar_event(event) {\n", - " return fig.toolbar_button_onclick(event['data']);\n", - " }\n", - " function toolbar_mouse_event(event) {\n", - " return fig.toolbar_button_onmouseover(event['data']);\n", - " }\n", - "\n", - " for(var toolbar_ind in mpl.toolbar_items) {\n", - " var name = mpl.toolbar_items[toolbar_ind][0];\n", - " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", - " var image = mpl.toolbar_items[toolbar_ind][2];\n", - " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", - "\n", - " if (!name) {\n", - " // put a spacer in here.\n", - " continue;\n", - " }\n", - " var button = $('');\n", - " button.click(method_name, toolbar_event);\n", - " button.mouseover(tooltip, toolbar_mouse_event);\n", - " nav_element.append(button);\n", - " }\n", - "\n", - " // Add the status bar.\n", - " var status_bar = $('');\n", - " nav_element.append(status_bar);\n", - " this.message = status_bar[0];\n", - "\n", - " // Add the close button to the window.\n", - " var buttongrp = $('
');\n", - " var button = $('');\n", - " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", - " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", - " buttongrp.append(button);\n", - " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", - " titlebar.prepend(buttongrp);\n", - "}\n", - "\n", - "mpl.figure.prototype._root_extra_style = function(el){\n", - " var fig = this\n", - " el.on(\"remove\", function(){\n", - "\tfig.close_ws(fig, {});\n", - " });\n", - "}\n", - "\n", - "mpl.figure.prototype._canvas_extra_style = function(el){\n", - " // this is important to make the div 'focusable\n", - " el.attr('tabindex', 0)\n", - " // reach out to IPython and tell the keyboard manager to turn it's self\n", - " // off when our div gets focus\n", - "\n", - " // location in version 3\n", - " if (IPython.notebook.keyboard_manager) {\n", - " IPython.notebook.keyboard_manager.register_events(el);\n", - " }\n", - " else {\n", - " // location in version 2\n", - " IPython.keyboard_manager.register_events(el);\n", - " }\n", - "\n", - "}\n", - "\n", - "mpl.figure.prototype._key_event_extra = function(event, name) {\n", - " var manager = IPython.notebook.keyboard_manager;\n", - " if (!manager)\n", - " manager = IPython.keyboard_manager;\n", - "\n", - " // Check for shift+enter\n", - " if (event.shiftKey && event.which == 13) {\n", - " this.canvas_div.blur();\n", - " event.shiftKey = false;\n", - " // Send a \"J\" for go to next cell\n", - " event.which = 74;\n", - " event.keyCode = 74;\n", - " manager.command_mode();\n", - " manager.handle_keydown(event);\n", - " }\n", - "}\n", - "\n", - "mpl.figure.prototype.handle_save = function(fig, msg) {\n", - " fig.ondownload(fig, null);\n", - "}\n", - "\n", - "\n", - "mpl.find_output_cell = function(html_output) {\n", - " // Return the cell and output element which can be found *uniquely* in the notebook.\n", - " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", - " // IPython event is triggered only after the cells have been serialised, which for\n", - " // our purposes (turning an active figure into a static one), is too late.\n", - " var cells = IPython.notebook.get_cells();\n", - " var ncells = cells.length;\n", - " for (var i=0; i= 3 moved mimebundle to data attribute of output\n", - " data = data.data;\n", - " }\n", - " if (data['text/html'] == html_output) {\n", - " return [cell, data, j];\n", - " }\n", - " }\n", - " }\n", - " }\n", - "}\n", - "\n", - "// Register the function which deals with the matplotlib target/channel.\n", - "// The kernel may be null if the page has been refreshed.\n", - "if (IPython.notebook.kernel != null) {\n", - " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", - "}\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "# Diferentes estilos de Plots\n", - "xx = np.linspace(-0.75, 1., 100)\n", - "n = np.array([0,1,2,3,4,5])\n", - "\n", - "fig, axes = plt.subplots(1, 4, figsize=(12,3))\n", - "\n", - "axes[0].scatter(xx, xx + 0.25*randn(len(xx)))\n", - "axes[0].set_title(\"scatter\")\n", - "\n", - "axes[1].step(n, n**2, lw=2)\n", - "axes[1].set_title(\"step\")\n", - "\n", - "axes[2].bar(n, n**2, align=\"center\", width=0.5, alpha=0.5)\n", - "axes[2].set_title(\"bar\")\n", - "\n", - "axes[3].fill_between(x, x**2, x**3, color=\"green\", alpha=0.5);\n", - "axes[3].set_title(\"fill_between\");" - ] - }, - { - "cell_type": "code", - "execution_count": 39, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "application/javascript": [ - "/* Put everything inside the global mpl namespace */\n", - "window.mpl = {};\n", - "\n", - "mpl.get_websocket_type = function() {\n", - " if (typeof(WebSocket) !== 'undefined') {\n", - " return WebSocket;\n", - " } else if (typeof(MozWebSocket) !== 'undefined') {\n", - " return MozWebSocket;\n", - " } else {\n", - " alert('Your browser does not have WebSocket support.' +\n", - " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", - " 'Firefox 4 and 5 are also supported but you ' +\n", - " 'have to enable WebSockets in about:config.');\n", - " };\n", - "}\n", - "\n", - "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", - " this.id = figure_id;\n", - "\n", - " this.ws = websocket;\n", - "\n", - " this.supports_binary = (this.ws.binaryType != undefined);\n", - "\n", - " if (!this.supports_binary) {\n", - " var warnings = document.getElementById(\"mpl-warnings\");\n", - " if (warnings) {\n", - " warnings.style.display = 'block';\n", - " warnings.textContent = (\n", - " \"This browser does not support binary websocket messages. \" +\n", - " \"Performance may be slow.\");\n", - " }\n", - " }\n", - "\n", - " this.imageObj = new Image();\n", - "\n", - " this.context = undefined;\n", - " this.message = undefined;\n", - " this.canvas = undefined;\n", - " this.rubberband_canvas = undefined;\n", - " this.rubberband_context = undefined;\n", - " this.format_dropdown = undefined;\n", - "\n", - " this.image_mode = 'full';\n", - "\n", - " this.root = $('
');\n", - " this._root_extra_style(this.root)\n", - " this.root.attr('style', 'display: inline-block');\n", - "\n", - " $(parent_element).append(this.root);\n", - "\n", - " this._init_header(this);\n", - " this._init_canvas(this);\n", - " this._init_toolbar(this);\n", - "\n", - " var fig = this;\n", - "\n", - " this.waiting = false;\n", - "\n", - " this.ws.onopen = function () {\n", - " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", - " fig.send_message(\"send_image_mode\", {});\n", - " fig.send_message(\"refresh\", {});\n", - " }\n", - "\n", - " this.imageObj.onload = function() {\n", - " if (fig.image_mode == 'full') {\n", - " // Full images could contain transparency (where diff images\n", - " // almost always do), so we need to clear the canvas so that\n", - " // there is no ghosting.\n", - " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", - " }\n", - " fig.context.drawImage(fig.imageObj, 0, 0);\n", - " };\n", - "\n", - " this.imageObj.onunload = function() {\n", - " this.ws.close();\n", - " }\n", - "\n", - " this.ws.onmessage = this._make_on_message_function(this);\n", - "\n", - " this.ondownload = ondownload;\n", - "}\n", - "\n", - "mpl.figure.prototype._init_header = function() {\n", - " var titlebar = $(\n", - " '
');\n", - " var titletext = $(\n", - " '
');\n", - " titlebar.append(titletext)\n", - " this.root.append(titlebar);\n", - " this.header = titletext[0];\n", - "}\n", - "\n", - "\n", - "\n", - "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "\n", - "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "mpl.figure.prototype._init_canvas = function() {\n", - " var fig = this;\n", - "\n", - " var canvas_div = $('
');\n", - "\n", - " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", - "\n", - " function canvas_keyboard_event(event) {\n", - " return fig.key_event(event, event['data']);\n", - " }\n", - "\n", - " canvas_div.keydown('key_press', canvas_keyboard_event);\n", - " canvas_div.keyup('key_release', canvas_keyboard_event);\n", - " this.canvas_div = canvas_div\n", - " this._canvas_extra_style(canvas_div)\n", - " this.root.append(canvas_div);\n", - "\n", - " var canvas = $('');\n", - " canvas.addClass('mpl-canvas');\n", - " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", - "\n", - " this.canvas = canvas[0];\n", - " this.context = canvas[0].getContext(\"2d\");\n", - "\n", - " var rubberband = $('');\n", - " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", - "\n", - " var pass_mouse_events = true;\n", - "\n", - " canvas_div.resizable({\n", - " start: function(event, ui) {\n", - " pass_mouse_events = false;\n", - " },\n", - " resize: function(event, ui) {\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " stop: function(event, ui) {\n", - " pass_mouse_events = true;\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " });\n", - "\n", - " function mouse_event_fn(event) {\n", - " if (pass_mouse_events)\n", - " return fig.mouse_event(event, event['data']);\n", - " }\n", - "\n", - " rubberband.mousedown('button_press', mouse_event_fn);\n", - " rubberband.mouseup('button_release', mouse_event_fn);\n", - " // Throttle sequential mouse events to 1 every 20ms.\n", - " rubberband.mousemove('motion_notify', mouse_event_fn);\n", - "\n", - " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", - " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", - "\n", - " canvas_div.on(\"wheel\", function (event) {\n", - " event = event.originalEvent;\n", - " event['data'] = 'scroll'\n", - " if (event.deltaY < 0) {\n", - " event.step = 1;\n", - " } else {\n", - " event.step = -1;\n", - " }\n", - " mouse_event_fn(event);\n", - " });\n", - "\n", - " canvas_div.append(canvas);\n", - " canvas_div.append(rubberband);\n", - "\n", - " this.rubberband = rubberband;\n", - " this.rubberband_canvas = rubberband[0];\n", - " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", - " this.rubberband_context.strokeStyle = \"#000000\";\n", - "\n", - " this._resize_canvas = function(width, height) {\n", - " // Keep the size of the canvas, canvas container, and rubber band\n", - " // canvas in synch.\n", - " canvas_div.css('width', width)\n", - " canvas_div.css('height', height)\n", - "\n", - " canvas.attr('width', width);\n", - " canvas.attr('height', height);\n", - "\n", - " rubberband.attr('width', width);\n", - " rubberband.attr('height', height);\n", - " }\n", - "\n", - " // Set the figure to an initial 600x600px, this will subsequently be updated\n", - " // upon first draw.\n", - " this._resize_canvas(600, 600);\n", - "\n", - " // Disable right mouse context menu.\n", - " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", - " return false;\n", - " });\n", - "\n", - " function set_focus () {\n", - " canvas.focus();\n", - " canvas_div.focus();\n", - " }\n", - "\n", - " window.setTimeout(set_focus, 100);\n", - "}\n", - "\n", - "mpl.figure.prototype._init_toolbar = function() {\n", - " var fig = this;\n", - "\n", - " var nav_element = $('
')\n", - " nav_element.attr('style', 'width: 100%');\n", - " this.root.append(nav_element);\n", - "\n", - " // Define a callback function for later on.\n", - " function toolbar_event(event) {\n", - " return fig.toolbar_button_onclick(event['data']);\n", - " }\n", - " function toolbar_mouse_event(event) {\n", - " return fig.toolbar_button_onmouseover(event['data']);\n", - " }\n", - "\n", - " for(var toolbar_ind in mpl.toolbar_items) {\n", - " var name = mpl.toolbar_items[toolbar_ind][0];\n", - " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", - " var image = mpl.toolbar_items[toolbar_ind][2];\n", - " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", - "\n", - " if (!name) {\n", - " // put a spacer in here.\n", - " continue;\n", - " }\n", - " var button = $('');\n", - " button.click(method_name, toolbar_event);\n", - " button.mouseover(tooltip, toolbar_mouse_event);\n", - " nav_element.append(button);\n", - " }\n", - "\n", - " // Add the status bar.\n", - " var status_bar = $('');\n", - " nav_element.append(status_bar);\n", - " this.message = status_bar[0];\n", - "\n", - " // Add the close button to the window.\n", - " var buttongrp = $('
');\n", - " var button = $('');\n", - " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", - " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", - " buttongrp.append(button);\n", - " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", - " titlebar.prepend(buttongrp);\n", - "}\n", - "\n", - "mpl.figure.prototype._root_extra_style = function(el){\n", - " var fig = this\n", - " el.on(\"remove\", function(){\n", - "\tfig.close_ws(fig, {});\n", - " });\n", - "}\n", - "\n", - "mpl.figure.prototype._canvas_extra_style = function(el){\n", - " // this is important to make the div 'focusable\n", - " el.attr('tabindex', 0)\n", - " // reach out to IPython and tell the keyboard manager to turn it's self\n", - " // off when our div gets focus\n", - "\n", - " // location in version 3\n", - " if (IPython.notebook.keyboard_manager) {\n", - " IPython.notebook.keyboard_manager.register_events(el);\n", - " }\n", - " else {\n", - " // location in version 2\n", - " IPython.keyboard_manager.register_events(el);\n", - " }\n", - "\n", - "}\n", - "\n", - "mpl.figure.prototype._key_event_extra = function(event, name) {\n", - " var manager = IPython.notebook.keyboard_manager;\n", - " if (!manager)\n", - " manager = IPython.keyboard_manager;\n", - "\n", - " // Check for shift+enter\n", - " if (event.shiftKey && event.which == 13) {\n", - " this.canvas_div.blur();\n", - " event.shiftKey = false;\n", - " // Send a \"J\" for go to next cell\n", - " event.which = 74;\n", - " event.keyCode = 74;\n", - " manager.command_mode();\n", - " manager.handle_keydown(event);\n", - " }\n", - "}\n", - "\n", - "mpl.figure.prototype.handle_save = function(fig, msg) {\n", - " fig.ondownload(fig, null);\n", - "}\n", - "\n", - "\n", - "mpl.find_output_cell = function(html_output) {\n", - " // Return the cell and output element which can be found *uniquely* in the notebook.\n", - " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", - " // IPython event is triggered only after the cells have been serialised, which for\n", - " // our purposes (turning an active figure into a static one), is too late.\n", - " var cells = IPython.notebook.get_cells();\n", - " var ncells = cells.length;\n", - " for (var i=0; i= 3 moved mimebundle to data attribute of output\n", - " data = data.data;\n", - " }\n", - " if (data['text/html'] == html_output) {\n", - " return [cell, data, j];\n", - " }\n", - " }\n", - " }\n", - " }\n", - "}\n", - "\n", - "// Register the function which deals with the matplotlib target/channel.\n", - "// The kernel may be null if the page has been refreshed.\n", - "if (IPython.notebook.kernel != null) {\n", - " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", - "}\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "# Color Map\n", - "alpha = 0.7\n", - "phi_ext = 2 * np.pi * 0.5\n", - "\n", - "def ColorMap(phi_m, phi_p):\n", - " return ( + alpha - 2 * np.cos(phi_p)*cos(phi_m) - alpha * np.cos(phi_ext - 2*phi_p))\n", - "\n", - "phi_m = np.linspace(0, 2*np.pi, 100)\n", - "phi_p = np.linspace(0, 2*np.pi, 100)\n", - "X,Y = np.meshgrid(phi_p, phi_m)\n", - "Z = ColorMap(X, Y).T\n", - "\n", - "fig, ax = plt.subplots()\n", - "\n", - "p = ax.pcolor(X/(2*np.pi), Y/(2*np.pi), Z, cmap=cm.RdBu, vmin=abs(Z).min(), vmax=abs(Z).max())\n", - "cb = fig.colorbar(p, ax=ax)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Gráficos 3D" - ] - }, - { - "cell_type": "code", - "execution_count": 41, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "from mpl_toolkits.mplot3d.axes3d import Axes3D" - ] - }, - { - "cell_type": "code", - "execution_count": 42, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "application/javascript": [ - "/* Put everything inside the global mpl namespace */\n", - "window.mpl = {};\n", - "\n", - "mpl.get_websocket_type = function() {\n", - " if (typeof(WebSocket) !== 'undefined') {\n", - " return WebSocket;\n", - " } else if (typeof(MozWebSocket) !== 'undefined') {\n", - " return MozWebSocket;\n", - " } else {\n", - " alert('Your browser does not have WebSocket support.' +\n", - " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", - " 'Firefox 4 and 5 are also supported but you ' +\n", - " 'have to enable WebSockets in about:config.');\n", - " };\n", - "}\n", - "\n", - "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", - " this.id = figure_id;\n", - "\n", - " this.ws = websocket;\n", - "\n", - " this.supports_binary = (this.ws.binaryType != undefined);\n", - "\n", - " if (!this.supports_binary) {\n", - " var warnings = document.getElementById(\"mpl-warnings\");\n", - " if (warnings) {\n", - " warnings.style.display = 'block';\n", - " warnings.textContent = (\n", - " \"This browser does not support binary websocket messages. \" +\n", - " \"Performance may be slow.\");\n", - " }\n", - " }\n", - "\n", - " this.imageObj = new Image();\n", - "\n", - " this.context = undefined;\n", - " this.message = undefined;\n", - " this.canvas = undefined;\n", - " this.rubberband_canvas = undefined;\n", - " this.rubberband_context = undefined;\n", - " this.format_dropdown = undefined;\n", - "\n", - " this.image_mode = 'full';\n", - "\n", - " this.root = $('
');\n", - " this._root_extra_style(this.root)\n", - " this.root.attr('style', 'display: inline-block');\n", - "\n", - " $(parent_element).append(this.root);\n", - "\n", - " this._init_header(this);\n", - " this._init_canvas(this);\n", - " this._init_toolbar(this);\n", - "\n", - " var fig = this;\n", - "\n", - " this.waiting = false;\n", - "\n", - " this.ws.onopen = function () {\n", - " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", - " fig.send_message(\"send_image_mode\", {});\n", - " fig.send_message(\"refresh\", {});\n", - " }\n", - "\n", - " this.imageObj.onload = function() {\n", - " if (fig.image_mode == 'full') {\n", - " // Full images could contain transparency (where diff images\n", - " // almost always do), so we need to clear the canvas so that\n", - " // there is no ghosting.\n", - " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", - " }\n", - " fig.context.drawImage(fig.imageObj, 0, 0);\n", - " };\n", - "\n", - " this.imageObj.onunload = function() {\n", - " this.ws.close();\n", - " }\n", - "\n", - " this.ws.onmessage = this._make_on_message_function(this);\n", - "\n", - " this.ondownload = ondownload;\n", - "}\n", - "\n", - "mpl.figure.prototype._init_header = function() {\n", - " var titlebar = $(\n", - " '
');\n", - " var titletext = $(\n", - " '
');\n", - " titlebar.append(titletext)\n", - " this.root.append(titlebar);\n", - " this.header = titletext[0];\n", - "}\n", - "\n", - "\n", - "\n", - "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "\n", - "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "mpl.figure.prototype._init_canvas = function() {\n", - " var fig = this;\n", - "\n", - " var canvas_div = $('
');\n", - "\n", - " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", - "\n", - " function canvas_keyboard_event(event) {\n", - " return fig.key_event(event, event['data']);\n", - " }\n", - "\n", - " canvas_div.keydown('key_press', canvas_keyboard_event);\n", - " canvas_div.keyup('key_release', canvas_keyboard_event);\n", - " this.canvas_div = canvas_div\n", - " this._canvas_extra_style(canvas_div)\n", - " this.root.append(canvas_div);\n", - "\n", - " var canvas = $('');\n", - " canvas.addClass('mpl-canvas');\n", - " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", - "\n", - " this.canvas = canvas[0];\n", - " this.context = canvas[0].getContext(\"2d\");\n", - "\n", - " var rubberband = $('');\n", - " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", - "\n", - " var pass_mouse_events = true;\n", - "\n", - " canvas_div.resizable({\n", - " start: function(event, ui) {\n", - " pass_mouse_events = false;\n", - " },\n", - " resize: function(event, ui) {\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " stop: function(event, ui) {\n", - " pass_mouse_events = true;\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " });\n", - "\n", - " function mouse_event_fn(event) {\n", - " if (pass_mouse_events)\n", - " return fig.mouse_event(event, event['data']);\n", - " }\n", - "\n", - " rubberband.mousedown('button_press', mouse_event_fn);\n", - " rubberband.mouseup('button_release', mouse_event_fn);\n", - " // Throttle sequential mouse events to 1 every 20ms.\n", - " rubberband.mousemove('motion_notify', mouse_event_fn);\n", - "\n", - " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", - " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", - "\n", - " canvas_div.on(\"wheel\", function (event) {\n", - " event = event.originalEvent;\n", - " event['data'] = 'scroll'\n", - " if (event.deltaY < 0) {\n", - " event.step = 1;\n", - " } else {\n", - " event.step = -1;\n", - " }\n", - " mouse_event_fn(event);\n", - " });\n", - "\n", - " canvas_div.append(canvas);\n", - " canvas_div.append(rubberband);\n", - "\n", - " this.rubberband = rubberband;\n", - " this.rubberband_canvas = rubberband[0];\n", - " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", - " this.rubberband_context.strokeStyle = \"#000000\";\n", - "\n", - " this._resize_canvas = function(width, height) {\n", - " // Keep the size of the canvas, canvas container, and rubber band\n", - " // canvas in synch.\n", - " canvas_div.css('width', width)\n", - " canvas_div.css('height', height)\n", - "\n", - " canvas.attr('width', width);\n", - " canvas.attr('height', height);\n", - "\n", - " rubberband.attr('width', width);\n", - " rubberband.attr('height', height);\n", - " }\n", - "\n", - " // Set the figure to an initial 600x600px, this will subsequently be updated\n", - " // upon first draw.\n", - " this._resize_canvas(600, 600);\n", - "\n", - " // Disable right mouse context menu.\n", - " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", - " return false;\n", - " });\n", - "\n", - " function set_focus () {\n", - " canvas.focus();\n", - " canvas_div.focus();\n", - " }\n", - "\n", - " window.setTimeout(set_focus, 100);\n", - "}\n", - "\n", - "mpl.figure.prototype._init_toolbar = function() {\n", - " var fig = this;\n", - "\n", - " var nav_element = $('
')\n", - " nav_element.attr('style', 'width: 100%');\n", - " this.root.append(nav_element);\n", - "\n", - " // Define a callback function for later on.\n", - " function toolbar_event(event) {\n", - " return fig.toolbar_button_onclick(event['data']);\n", - " }\n", - " function toolbar_mouse_event(event) {\n", - " return fig.toolbar_button_onmouseover(event['data']);\n", - " }\n", - "\n", - " for(var toolbar_ind in mpl.toolbar_items) {\n", - " var name = mpl.toolbar_items[toolbar_ind][0];\n", - " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", - " var image = mpl.toolbar_items[toolbar_ind][2];\n", - " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", - "\n", - " if (!name) {\n", - " // put a spacer in here.\n", - " continue;\n", - " }\n", - " var button = $('');\n", - " button.click(method_name, toolbar_event);\n", - " button.mouseover(tooltip, toolbar_mouse_event);\n", - " nav_element.append(button);\n", - " }\n", - "\n", - " // Add the status bar.\n", - " var status_bar = $('');\n", - " nav_element.append(status_bar);\n", - " this.message = status_bar[0];\n", - "\n", - " // Add the close button to the window.\n", - " var buttongrp = $('
');\n", - " var button = $('');\n", - " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", - " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", - " buttongrp.append(button);\n", - " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", - " titlebar.prepend(buttongrp);\n", - "}\n", - "\n", - "mpl.figure.prototype._root_extra_style = function(el){\n", - " var fig = this\n", - " el.on(\"remove\", function(){\n", - "\tfig.close_ws(fig, {});\n", - " });\n", - "}\n", - "\n", - "mpl.figure.prototype._canvas_extra_style = function(el){\n", - " // this is important to make the div 'focusable\n", - " el.attr('tabindex', 0)\n", - " // reach out to IPython and tell the keyboard manager to turn it's self\n", - " // off when our div gets focus\n", - "\n", - " // location in version 3\n", - " if (IPython.notebook.keyboard_manager) {\n", - " IPython.notebook.keyboard_manager.register_events(el);\n", - " }\n", - " else {\n", - " // location in version 2\n", - " IPython.keyboard_manager.register_events(el);\n", - " }\n", - "\n", - "}\n", - "\n", - "mpl.figure.prototype._key_event_extra = function(event, name) {\n", - " var manager = IPython.notebook.keyboard_manager;\n", - " if (!manager)\n", - " manager = IPython.keyboard_manager;\n", - "\n", - " // Check for shift+enter\n", - " if (event.shiftKey && event.which == 13) {\n", - " this.canvas_div.blur();\n", - " event.shiftKey = false;\n", - " // Send a \"J\" for go to next cell\n", - " event.which = 74;\n", - " event.keyCode = 74;\n", - " manager.command_mode();\n", - " manager.handle_keydown(event);\n", - " }\n", - "}\n", - "\n", - "mpl.figure.prototype.handle_save = function(fig, msg) {\n", - " fig.ondownload(fig, null);\n", - "}\n", - "\n", - "\n", - "mpl.find_output_cell = function(html_output) {\n", - " // Return the cell and output element which can be found *uniquely* in the notebook.\n", - " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", - " // IPython event is triggered only after the cells have been serialised, which for\n", - " // our purposes (turning an active figure into a static one), is too late.\n", - " var cells = IPython.notebook.get_cells();\n", - " var ncells = cells.length;\n", - " for (var i=0; i= 3 moved mimebundle to data attribute of output\n", - " data = data.data;\n", - " }\n", - " if (data['text/html'] == html_output) {\n", - " return [cell, data, j];\n", - " }\n", - " }\n", - " }\n", - " }\n", - "}\n", - "\n", - "// Register the function which deals with the matplotlib target/channel.\n", - "// The kernel may be null if the page has been refreshed.\n", - "if (IPython.notebook.kernel != null) {\n", - " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", - "}\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "# Wire frame\n", - "fig = plt.figure(figsize=(8,6))\n", - "\n", - "ax = fig.add_subplot(1, 1, 1, projection = '3d')\n", - "\n", - "p = ax.plot_wireframe(X, Y, Z, rstride=4, cstride=4)" - ] - }, - { - "cell_type": "code", - "execution_count": 44, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "application/javascript": [ - "/* Put everything inside the global mpl namespace */\n", - "window.mpl = {};\n", - "\n", - "mpl.get_websocket_type = function() {\n", - " if (typeof(WebSocket) !== 'undefined') {\n", - " return WebSocket;\n", - " } else if (typeof(MozWebSocket) !== 'undefined') {\n", - " return MozWebSocket;\n", - " } else {\n", - " alert('Your browser does not have WebSocket support.' +\n", - " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", - " 'Firefox 4 and 5 are also supported but you ' +\n", - " 'have to enable WebSockets in about:config.');\n", - " };\n", - "}\n", - "\n", - "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", - " this.id = figure_id;\n", - "\n", - " this.ws = websocket;\n", - "\n", - " this.supports_binary = (this.ws.binaryType != undefined);\n", - "\n", - " if (!this.supports_binary) {\n", - " var warnings = document.getElementById(\"mpl-warnings\");\n", - " if (warnings) {\n", - " warnings.style.display = 'block';\n", - " warnings.textContent = (\n", - " \"This browser does not support binary websocket messages. \" +\n", - " \"Performance may be slow.\");\n", - " }\n", - " }\n", - "\n", - " this.imageObj = new Image();\n", - "\n", - " this.context = undefined;\n", - " this.message = undefined;\n", - " this.canvas = undefined;\n", - " this.rubberband_canvas = undefined;\n", - " this.rubberband_context = undefined;\n", - " this.format_dropdown = undefined;\n", - "\n", - " this.image_mode = 'full';\n", - "\n", - " this.root = $('
');\n", - " this._root_extra_style(this.root)\n", - " this.root.attr('style', 'display: inline-block');\n", - "\n", - " $(parent_element).append(this.root);\n", - "\n", - " this._init_header(this);\n", - " this._init_canvas(this);\n", - " this._init_toolbar(this);\n", - "\n", - " var fig = this;\n", - "\n", - " this.waiting = false;\n", - "\n", - " this.ws.onopen = function () {\n", - " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", - " fig.send_message(\"send_image_mode\", {});\n", - " fig.send_message(\"refresh\", {});\n", - " }\n", - "\n", - " this.imageObj.onload = function() {\n", - " if (fig.image_mode == 'full') {\n", - " // Full images could contain transparency (where diff images\n", - " // almost always do), so we need to clear the canvas so that\n", - " // there is no ghosting.\n", - " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", - " }\n", - " fig.context.drawImage(fig.imageObj, 0, 0);\n", - " };\n", - "\n", - " this.imageObj.onunload = function() {\n", - " this.ws.close();\n", - " }\n", - "\n", - " this.ws.onmessage = this._make_on_message_function(this);\n", - "\n", - " this.ondownload = ondownload;\n", - "}\n", - "\n", - "mpl.figure.prototype._init_header = function() {\n", - " var titlebar = $(\n", - " '
');\n", - " var titletext = $(\n", - " '
');\n", - " titlebar.append(titletext)\n", - " this.root.append(titlebar);\n", - " this.header = titletext[0];\n", - "}\n", - "\n", - "\n", - "\n", - "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "\n", - "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "mpl.figure.prototype._init_canvas = function() {\n", - " var fig = this;\n", - "\n", - " var canvas_div = $('
');\n", - "\n", - " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", - "\n", - " function canvas_keyboard_event(event) {\n", - " return fig.key_event(event, event['data']);\n", - " }\n", - "\n", - " canvas_div.keydown('key_press', canvas_keyboard_event);\n", - " canvas_div.keyup('key_release', canvas_keyboard_event);\n", - " this.canvas_div = canvas_div\n", - " this._canvas_extra_style(canvas_div)\n", - " this.root.append(canvas_div);\n", - "\n", - " var canvas = $('');\n", - " canvas.addClass('mpl-canvas');\n", - " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", - "\n", - " this.canvas = canvas[0];\n", - " this.context = canvas[0].getContext(\"2d\");\n", - "\n", - " var rubberband = $('');\n", - " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", - "\n", - " var pass_mouse_events = true;\n", - "\n", - " canvas_div.resizable({\n", - " start: function(event, ui) {\n", - " pass_mouse_events = false;\n", - " },\n", - " resize: function(event, ui) {\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " stop: function(event, ui) {\n", - " pass_mouse_events = true;\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " });\n", - "\n", - " function mouse_event_fn(event) {\n", - " if (pass_mouse_events)\n", - " return fig.mouse_event(event, event['data']);\n", - " }\n", - "\n", - " rubberband.mousedown('button_press', mouse_event_fn);\n", - " rubberband.mouseup('button_release', mouse_event_fn);\n", - " // Throttle sequential mouse events to 1 every 20ms.\n", - " rubberband.mousemove('motion_notify', mouse_event_fn);\n", - "\n", - " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", - " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", - "\n", - " canvas_div.on(\"wheel\", function (event) {\n", - " event = event.originalEvent;\n", - " event['data'] = 'scroll'\n", - " if (event.deltaY < 0) {\n", - " event.step = 1;\n", - " } else {\n", - " event.step = -1;\n", - " }\n", - " mouse_event_fn(event);\n", - " });\n", - "\n", - " canvas_div.append(canvas);\n", - " canvas_div.append(rubberband);\n", - "\n", - " this.rubberband = rubberband;\n", - " this.rubberband_canvas = rubberband[0];\n", - " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", - " this.rubberband_context.strokeStyle = \"#000000\";\n", - "\n", - " this._resize_canvas = function(width, height) {\n", - " // Keep the size of the canvas, canvas container, and rubber band\n", - " // canvas in synch.\n", - " canvas_div.css('width', width)\n", - " canvas_div.css('height', height)\n", - "\n", - " canvas.attr('width', width);\n", - " canvas.attr('height', height);\n", - "\n", - " rubberband.attr('width', width);\n", - " rubberband.attr('height', height);\n", - " }\n", - "\n", - " // Set the figure to an initial 600x600px, this will subsequently be updated\n", - " // upon first draw.\n", - " this._resize_canvas(600, 600);\n", - "\n", - " // Disable right mouse context menu.\n", - " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", - " return false;\n", - " });\n", - "\n", - " function set_focus () {\n", - " canvas.focus();\n", - " canvas_div.focus();\n", - " }\n", - "\n", - " window.setTimeout(set_focus, 100);\n", - "}\n", - "\n", - "mpl.figure.prototype._init_toolbar = function() {\n", - " var fig = this;\n", - "\n", - " var nav_element = $('
')\n", - " nav_element.attr('style', 'width: 100%');\n", - " this.root.append(nav_element);\n", - "\n", - " // Define a callback function for later on.\n", - " function toolbar_event(event) {\n", - " return fig.toolbar_button_onclick(event['data']);\n", - " }\n", - " function toolbar_mouse_event(event) {\n", - " return fig.toolbar_button_onmouseover(event['data']);\n", - " }\n", - "\n", - " for(var toolbar_ind in mpl.toolbar_items) {\n", - " var name = mpl.toolbar_items[toolbar_ind][0];\n", - " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", - " var image = mpl.toolbar_items[toolbar_ind][2];\n", - " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", - "\n", - " if (!name) {\n", - " // put a spacer in here.\n", - " continue;\n", - " }\n", - " var button = $('