Skip to content

Commit 3ef96e3

Browse files
committed
print fixes
1 parent 3db65c7 commit 3ef96e3

6 files changed

Lines changed: 40 additions & 2329 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Useful functions, tutorials, and other Python-related things
77
###Links to view the IPython Notebooks
88

99
- [Python benchmarks via `timeit`](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/benchmarks/timeit_tests.ipynb?create=1)
10-
- [Implementing the least squares fit method for linear regression and speeding it up via Cythonook](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/benchmarks/cython_least_squares.ipynb?create=1)
10+
- [Implementing the least squares fit method for linear regression and speeding it up via Cython](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/benchmarks/cython_least_squares.ipynb?create=1)
1111
- [Benchmarks of different palindrome functions](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/benchmarks/palindrome_timeit.ipynb?create=1)
1212
- [A collection of not so obvious Python stuff you should know!](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/not_so_obvious_python_stuff.ipynb?create=1)
1313
- [Python's scope resolution for variable names and the LEGB rule](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/scope_resolution_legb_rule.ipynb?create=1)

benchmarks/palindrome_timeit.ipynb

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"name": "",
4-
"signature": "sha256:6ea19109869c82ee989c8ea0599ec49401e74246a542ad0b7b05f6ef464bda19"
4+
"signature": "sha256:3d878b64b4503fd987496df562af53903ad85d4cce103ea0a2e6c456519c03c7"
55
},
66
"nbformat": 3,
77
"nbformat_minor": 0,
@@ -12,8 +12,20 @@
1212
"cell_type": "markdown",
1313
"metadata": {},
1414
"source": [
15-
"Sebastian Raschka 04/2014\n",
15+
"[Sebastian Raschka](http://sebastianraschka.com) \n",
16+
"last updated: 05/03/2014\n",
1617
"\n",
18+
"- [Link to this IPython Notebook on GitHub](https://github.com/rasbt/python_reference/blob/master/benchmarks/palindrome_timeit.ipynb) \n",
19+
"- [Link to the GitHub repository](https://github.com/rasbt/python_reference) \n",
20+
"\n",
21+
"<br>\n",
22+
"<br>"
23+
]
24+
},
25+
{
26+
"cell_type": "markdown",
27+
"metadata": {},
28+
"source": [
1729
"#Timing different Implementations of palindrome functions"
1830
]
1931
},
@@ -178,14 +190,6 @@
178190
}
179191
],
180192
"prompt_number": 11
181-
},
182-
{
183-
"cell_type": "code",
184-
"collapsed": false,
185-
"input": [],
186-
"language": "python",
187-
"metadata": {},
188-
"outputs": []
189193
}
190194
],
191195
"metadata": {}

benchmarks/timeit_tests.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"name": "",
4-
"signature": "sha256:75d807f509bd9f76b2e14a5a048cb44852a3318bcd0d95afc95d1c9b2904c078"
4+
"signature": "sha256:132d5623e27eb721587599809f9870d397887ec873bbbdc95b25a05e710d160e"
55
},
66
"nbformat": 3,
77
"nbformat_minor": 0,

not_so_obvious_python_stuff.ipynb

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"name": "",
4-
"signature": "sha256:0e1c6e74b301e23ea4146d660afb3f07765686c6c7fa4752f3a4495da7949787"
4+
"signature": "sha256:7a22f6c91e4aab51a325c721dd7674622d1acc5b4a3a038ff512c736d83bbe4a"
55
},
66
"nbformat": 3,
77
"nbformat_minor": 0,
@@ -12,11 +12,11 @@
1212
"cell_type": "markdown",
1313
"metadata": {},
1414
"source": [
15-
"Sebastian Raschka \n",
15+
"[Sebastian Raschka](http://sebastianraschka.com) \n",
1616
"last updated: 05/03/2014 ([Changelog](#changelog))\n",
1717
"\n",
18-
"[Link to this IPython Notebook on GitHub](https://github.com/rasbt/python_reference/blob/master/not_so_obvious_python_stuff.ipynb)\n",
19-
"\n",
18+
"- [Link to this IPython Notebook on GitHub](https://github.com/rasbt/python_reference/blob/master/not_so_obvious_python_stuff.ipynb) \n",
19+
"- [Link to the GitHub repository](https://github.com/rasbt/python_reference) \n",
2020
"\n"
2121
]
2222
},
@@ -307,14 +307,6 @@
307307
],
308308
"prompt_number": 6
309309
},
310-
{
311-
"cell_type": "code",
312-
"collapsed": false,
313-
"input": [],
314-
"language": "python",
315-
"metadata": {},
316-
"outputs": []
317-
},
318310
{
319311
"cell_type": "markdown",
320312
"metadata": {},
@@ -684,13 +676,13 @@
684676
"cell_type": "markdown",
685677
"metadata": {},
686678
"source": [
687-
"** Logical `or`: ** \n",
679+
"**Logical `or`:** \n",
688680
"\n",
689681
"`a or b == a if a else b` \n",
690682
"- If both values in `or` expressions are `True`, Python will select the first value (e.g., select `\"a\"` in `\"a\" or \"b\"`), and the second one in `and` expressions. \n",
691683
"This is also called **short-circuiting** - we already know that the logical `or` must be `True` if the first value is `True` and therefore can omit the evaluation of the second value.\n",
692684
"\n",
693-
"** Logical `and`: ** \n",
685+
"**Logical `and`:** \n",
694686
"\n",
695687
"`a and b == b if a else a` \n",
696688
"- If both values in `and` expressions are `True`, Python will select the second value, since for a logical `and`, both values must be true.\n"
@@ -3448,8 +3440,14 @@
34483440
"metadata": {},
34493441
"source": [
34503442
"I would claim that the conditional \"else\" is every programmer's daily bread and butter. However, there is a second flavor of \"else\"-clauses in Python, which I will call \"completion else\" (for reason that will become clear later). \n",
3451-
"But first, let us take a look at our \"traditional\" conditional else that we all are familiar with. \n",
3452-
"### Conditional else:"
3443+
"But first, let us take a look at our \"traditional\" conditional else that we all are familiar with. \n"
3444+
]
3445+
},
3446+
{
3447+
"cell_type": "markdown",
3448+
"metadata": {},
3449+
"source": [
3450+
"###Conditional else:"
34533451
]
34543452
},
34553453
{

0 commit comments

Comments
 (0)