Skip to content

Commit f5d6b5c

Browse files
committed
2 parents 6b77dae + cd68b7f commit f5d6b5c

File tree

75 files changed

+3573
-245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+3573
-245
lines changed

.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
slides_sources/build
22

3+
.DS_Store
34
#ignore compiled files, sublime workspace and project files
45
*.pyc
6+
*junk*
7+
8+
#ignore sublime workspace files
59
*.sublime*
6-
*.*~
10+
11+
# ignore .gitignore, so we can each have our own.
12+
.gitignore
13+
14+
# editor back-up files
15+
*.*~

Examples/Session06/html_render/test_html_output1.html

Lines changed: 0 additions & 4 deletions
This file was deleted.

Examples/Session06/html_render/test_html_output2.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

Examples/Session06/html_render/test_html_output3.html

Lines changed: 0 additions & 14 deletions
This file was deleted.

Examples/Session06/html_render/test_html_output4.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

Examples/Session06/html_render/test_html_output5.html

Lines changed: 0 additions & 12 deletions
This file was deleted.

Examples/Session06/html_render/test_html_output6.html

Lines changed: 0 additions & 15 deletions
This file was deleted.

Examples/Session06/html_render/test_html_output7.html

Lines changed: 0 additions & 26 deletions
This file was deleted.

Examples/Session06/html_render/test_html_output8.html

Lines changed: 0 additions & 27 deletions
This file was deleted.

Examples/Session09/decorators.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ def new_function(*args, **kwargs):
99

1010

1111
def add(a, b):
12-
print "Function 'add' called with args: %r" % locals()
12+
# print "Function 'add' called with args: %r" % locals()
1313
result = a + b
14-
print "\tResult --> %r" % result
14+
# print "\tResult --> %r" % result
1515
return result
1616

1717

@@ -32,7 +32,7 @@ def simple_add(a, b):
3232
return a + b
3333

3434

35-
class Memoize:
35+
class Memoize(object):
3636
"""
3737
memoize decorator from avinash.vora
3838
http://avinashv.net/2008/04/python-decorators-syntactic-sugar/
@@ -49,9 +49,13 @@ def __call__(self, *args): # runs when memoize instance is called
4949
return self.memoized[args]
5050

5151

52-
@Memoize
52+
#@Memoize
5353
def sum2x(n):
5454
return sum(2 * i for i in xrange(n))
55+
sum2x = Memoize(sum2x)
56+
57+
58+
5559

5660
import time
5761

@@ -69,3 +73,5 @@ def timed(*args, **kwargs):
6973
@Memoize
7074
def sum2x(n):
7175
return sum(2 * i for i in xrange(n))
76+
77+

0 commit comments

Comments
 (0)