Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 55 additions & 36 deletions 10-Python Decorators/01-Decorators.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {
"collapsed": true
},
Expand Down Expand Up @@ -126,11 +126,22 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {
"collapsed": true
},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"'Global Variable'"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"globals()['s']"
]
Expand All @@ -144,11 +155,19 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"metadata": {
"collapsed": true
},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{}\n"
]
}
],
"source": [
"check_for_locals()"
]
Expand All @@ -162,7 +181,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 8,
"metadata": {
"collapsed": true
},
Expand All @@ -174,7 +193,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 9,
"metadata": {},
"outputs": [
{
Expand All @@ -183,7 +202,7 @@
"'Hello Jose'"
]
},
"execution_count": 4,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -201,7 +220,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 10,
"metadata": {
"collapsed": true
},
Expand All @@ -212,16 +231,16 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<function __main__.hello>"
"<function __main__.hello(name='Jose')>"
]
},
"execution_count": 6,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -232,7 +251,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 12,
"metadata": {},
"outputs": [
{
Expand All @@ -241,7 +260,7 @@
"'Hello Jose'"
]
},
"execution_count": 7,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -259,7 +278,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 13,
"metadata": {
"collapsed": true
},
Expand All @@ -270,18 +289,18 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 14,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'hello' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-9-a75d7781aaeb>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mhello\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;31mNameError\u001b[0m: name 'hello' is not defined"
"\u001b[31m---------------------------------------------------------------------------\u001b[39m",
"\u001b[31mNameError\u001b[39m Traceback (most recent call last)",
"\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[14]\u001b[39m\u001b[32m, line 1\u001b[39m\n\u001b[32m----> \u001b[39m\u001b[32m1\u001b[39m \u001b[43mhello\u001b[49m()\n",
"\u001b[31mNameError\u001b[39m: name 'hello' is not defined"
]
}
],
Expand All @@ -291,7 +310,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 15,
"metadata": {},
"outputs": [
{
Expand All @@ -300,7 +319,7 @@
"'Hello Jose'"
]
},
"execution_count": 10,
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -326,7 +345,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 16,
"metadata": {
"collapsed": true
},
Expand All @@ -348,7 +367,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 17,
"metadata": {},
"outputs": [
{
Expand All @@ -368,18 +387,18 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 18,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'welcome' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-13-a401d7101853>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mwelcome\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;31mNameError\u001b[0m: name 'welcome' is not defined"
"\u001b[31m---------------------------------------------------------------------------\u001b[39m",
"\u001b[31mNameError\u001b[39m Traceback (most recent call last)",
"\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[18]\u001b[39m\u001b[32m, line 1\u001b[39m\n\u001b[32m----> \u001b[39m\u001b[32m1\u001b[39m \u001b[43mwelcome\u001b[49m()\n",
"\u001b[31mNameError\u001b[39m: name 'welcome' is not defined"
]
}
],
Expand All @@ -397,7 +416,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 19,
"metadata": {
"collapsed": true
},
Expand Down Expand Up @@ -426,7 +445,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 20,
"metadata": {
"collapsed": true
},
Expand All @@ -437,16 +456,16 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<function __main__.hello.<locals>.greet>"
"<function __main__.hello.<locals>.greet()>"
]
},
"execution_count": 16,
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -464,7 +483,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 22,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -683,7 +702,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.13.2"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"\n",
"Let's get you started with web scraping and Python. Before we begin, here are some important rules to follow and understand:\n",
"\n",
"1. Always be respectful and try to get premission to scrape, do not bombard a website with scraping requests, otherwise your IP address may be blocked!\n",
"1. Always be respectful and try to get permission to scrape, do not bombard a website with scraping requests, otherwise your IP address may be blocked!\n",
"2. Be aware that websites change often, meaning your code could go from working to totally broken from one day to the next.\n",
"3. Pretty much every web scraping project of interest is a unique and custom job, so try your best to generalize the skills learned here.\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion 13-Web-Scraping/00-Guide-to-Web-Scraping.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"\n",
"Let's get you started with web scraping and Python. Before we begin, here are some important rules to follow and understand:\n",
"\n",
"1. Always be respectful and try to get premission to scrape, do not bombard a website with scraping requests, otherwise your IP address may be blocked!\n",
"1. Always be respectful and try to get permission to scrape, do not bombard a website with scraping requests, otherwise your IP address may be blocked!\n",
"2. Be aware that websites change often, meaning your code could go from working to totally broken from one day to the next.\n",
"3. Pretty much every web scraping project of interest is a unique and custom job, so try your best to generalize the skills learned here.\n",
"\n",
Expand Down