Created
October 23, 2015 12:48
-
-
Save tinproject/edbf90ed96a8262935c5 to your computer and use it in GitHub Desktop.
Intro to Pyhton @ H4ckademy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"slideshow": { | |
"slide_type": "slide" | |
} | |
}, | |
"source": [ | |
"# Introducción a Python\n", | |
"\n", | |
"\n", | |
"<img src=\"https://imgs.xkcd.com/comics/python.png\">\n", | |
"\n" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"**Güido van Rossum**\n", | |
"\n", | |
"Monty Python\n", | |
"\n", | |
"PSF / BDFL" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Language caracteristics\n", | |
"\n", | |
"General purpouse: emphasizes readability, express in fewer lines of code\n", | |
"\n", | |
"Multiparadigm (OO, structured, functional..)\n", | |
"Dinamyc typing, but strong typed. Dynamic name resolution.\n", | |
"Duck typing.\n", | |
"\n", | |
"Python 3, please!" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### PEP20 - The Zen of Python" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"The Zen of Python, by Tim Peters\n", | |
"\n", | |
"Beautiful is better than ugly.\n", | |
"Explicit is better than implicit.\n", | |
"Simple is better than complex.\n", | |
"Complex is better than complicated.\n", | |
"Flat is better than nested.\n", | |
"Sparse is better than dense.\n", | |
"Readability counts.\n", | |
"Special cases aren't special enough to break the rules.\n", | |
"Although practicality beats purity.\n", | |
"Errors should never pass silently.\n", | |
"Unless explicitly silenced.\n", | |
"In the face of ambiguity, refuse the temptation to guess.\n", | |
"There should be one-- and preferably only one --obvious way to do it.\n", | |
"Although that way may not be obvious at first unless you're Dutch.\n", | |
"Now is better than never.\n", | |
"Although never is often better than *right* now.\n", | |
"If the implementation is hard to explain, it's a bad idea.\n", | |
"If the implementation is easy to explain, it may be a good idea.\n", | |
"Namespaces are one honking great idea -- let's do more of those!\n" | |
] | |
} | |
], | |
"source": [ | |
"import this" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Coding style \n", | |
"\n", | |
"PEP8, Blocks, identation." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"- Types\n", | |
"- Operators\n", | |
"- Conditional/control structures\n", | |
"- Iterators, comprehensions\n", | |
"\n", | |
"- Function/classes/modules/packages\n", | |
"- Lambda, functional structures" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"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.4.3" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment