Skip to content

Commit f3133d7

Browse files
committed
u13
1 parent 538c476 commit f3133d7

8 files changed

+224
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {
7+
"collapsed": true
8+
},
9+
"outputs": [],
10+
"source": []
11+
}
12+
],
13+
"metadata": {
14+
"kernelspec": {
15+
"display_name": "Python 2",
16+
"language": "python",
17+
"name": "python2"
18+
},
19+
"language_info": {
20+
"codemirror_mode": {
21+
"name": "ipython",
22+
"version": 2
23+
},
24+
"file_extension": ".py",
25+
"mimetype": "text/x-python",
26+
"name": "python",
27+
"nbconvert_exporter": "python",
28+
"pygments_lexer": "ipython2",
29+
"version": "2.7.10"
30+
}
31+
},
32+
"nbformat": 4,
33+
"nbformat_minor": 0
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {
7+
"collapsed": true
8+
},
9+
"outputs": [],
10+
"source": []
11+
}
12+
],
13+
"metadata": {
14+
"kernelspec": {
15+
"display_name": "Python 2",
16+
"language": "python",
17+
"name": "python2"
18+
},
19+
"language_info": {
20+
"codemirror_mode": {
21+
"name": "ipython",
22+
"version": 2
23+
},
24+
"file_extension": ".py",
25+
"mimetype": "text/x-python",
26+
"name": "python",
27+
"nbconvert_exporter": "python",
28+
"pygments_lexer": "ipython2",
29+
"version": "2.7.10"
30+
}
31+
},
32+
"nbformat": 4,
33+
"nbformat_minor": 0
34+
}

.ipynb_checkpoints/Iterators and Generators-checkpoint.ipynb

+10-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,16 @@
1111
"cell_type": "markdown",
1212
"metadata": {},
1313
"source": [
14-
"In this section of the course we will be learning about"
14+
"In this section of the course we will be learning about the difference between iteration and generation in Python and how to construct our own Generators with the *yield* statement. Generators allow us to \n",
15+
"\n",
16+
"We've touch on this topic in the past when discussing the range() function in Python 2 and the similar xrange(), with the difference being the xrange() was a generator.\n",
17+
"\n",
18+
"Lets explore a little deep. We've learned how to create functions with **def** and the **return** statement. Generator functions allow us to write a function that can send back a value and then later resume to pick up where it left off. This type of function is a generator in Python, allowing us to generate a sequence of values over time.\n",
19+
"\n",
20+
"In most aspects, a generator function will appear very similar to a normal function. The main difference is when a generator function is compiled they become an object that support an iteration protocol. That means when they are called in your code the don't actually return a value and then exit, the generator functions will automatically suspend and resume their execution and state around the last point of value generation. The main advantage here is that instead of having to compute an entire series of values upfront and the generator functions can be suspended, this feature is known as *state suspension*.\n",
21+
"\n",
22+
"\n",
23+
"To start getting a better understanding of generators, lets go ahead and see how we can create some."
1524
]
1625
},
1726
{
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {
7+
"collapsed": true
8+
},
9+
"outputs": [],
10+
"source": []
11+
}
12+
],
13+
"metadata": {
14+
"kernelspec": {
15+
"display_name": "Python 2",
16+
"language": "python",
17+
"name": "python2"
18+
},
19+
"language_info": {
20+
"codemirror_mode": {
21+
"name": "ipython",
22+
"version": 2
23+
},
24+
"file_extension": ".py",
25+
"mimetype": "text/x-python",
26+
"name": "python",
27+
"nbconvert_exporter": "python",
28+
"pygments_lexer": "ipython2",
29+
"version": "2.7.10"
30+
}
31+
},
32+
"nbformat": 4,
33+
"nbformat_minor": 0
34+
}

Errors and Exceptions Handling.ipynb

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {
7+
"collapsed": true
8+
},
9+
"outputs": [],
10+
"source": []
11+
}
12+
],
13+
"metadata": {
14+
"kernelspec": {
15+
"display_name": "Python 2",
16+
"language": "python",
17+
"name": "python2"
18+
},
19+
"language_info": {
20+
"codemirror_mode": {
21+
"name": "ipython",
22+
"version": 2
23+
},
24+
"file_extension": ".py",
25+
"mimetype": "text/x-python",
26+
"name": "python",
27+
"nbconvert_exporter": "python",
28+
"pygments_lexer": "ipython2",
29+
"version": "2.7.10"
30+
}
31+
},
32+
"nbformat": 4,
33+
"nbformat_minor": 0
34+
}

Final Project.ipynb

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {
7+
"collapsed": true
8+
},
9+
"outputs": [],
10+
"source": []
11+
}
12+
],
13+
"metadata": {
14+
"kernelspec": {
15+
"display_name": "Python 2",
16+
"language": "python",
17+
"name": "python2"
18+
},
19+
"language_info": {
20+
"codemirror_mode": {
21+
"name": "ipython",
22+
"version": 2
23+
},
24+
"file_extension": ".py",
25+
"mimetype": "text/x-python",
26+
"name": "python",
27+
"nbconvert_exporter": "python",
28+
"pygments_lexer": "ipython2",
29+
"version": "2.7.10"
30+
}
31+
},
32+
"nbformat": 4,
33+
"nbformat_minor": 0
34+
}

Iterators and Generators.ipynb

+10-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,16 @@
1111
"cell_type": "markdown",
1212
"metadata": {},
1313
"source": [
14-
"In this section of the course we will be learning about"
14+
"In this section of the course we will be learning about the difference between iteration and generation in Python and how to construct our own Generators with the *yield* statement. Generators allow us to \n",
15+
"\n",
16+
"We've touch on this topic in the past when discussing the range() function in Python 2 and the similar xrange(), with the difference being the xrange() was a generator.\n",
17+
"\n",
18+
"Lets explore a little deep. We've learned how to create functions with **def** and the **return** statement. Generator functions allow us to write a function that can send back a value and then later resume to pick up where it left off. This type of function is a generator in Python, allowing us to generate a sequence of values over time.\n",
19+
"\n",
20+
"In most aspects, a generator function will appear very similar to a normal function. The main difference is when a generator function is compiled they become an object that support an iteration protocol. That means when they are called in your code the don't actually return a value and then exit, the generator functions will automatically suspend and resume their execution and state around the last point of value generation. The main advantage here is that instead of having to compute an entire series of values upfront and the generator functions can be suspended, this feature is known as *state suspension*.\n",
21+
"\n",
22+
"\n",
23+
"To start getting a better understanding of generators, lets go ahead and see how we can create some."
1524
]
1625
},
1726
{

Object Oriented Programming.ipynb

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {
7+
"collapsed": true
8+
},
9+
"outputs": [],
10+
"source": []
11+
}
12+
],
13+
"metadata": {
14+
"kernelspec": {
15+
"display_name": "Python 2",
16+
"language": "python",
17+
"name": "python2"
18+
},
19+
"language_info": {
20+
"codemirror_mode": {
21+
"name": "ipython",
22+
"version": 2
23+
},
24+
"file_extension": ".py",
25+
"mimetype": "text/x-python",
26+
"name": "python",
27+
"nbconvert_exporter": "python",
28+
"pygments_lexer": "ipython2",
29+
"version": "2.7.10"
30+
}
31+
},
32+
"nbformat": 4,
33+
"nbformat_minor": 0
34+
}

0 commit comments

Comments
 (0)