forked from gdiannarbor/intro-python
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclass3.html
608 lines (524 loc) · 26.4 KB
/
class3.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Introduction to Python | Girl Develop It Class 3</title>
<meta name="description" content="This is the official Girl Develop It Core Intro to Python course. The course is meant to be taught in four two-hour sessions. Each of the slides and practice files are customizable according to the needs of a given class or audience.">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="css/reveal.min.css">
<link rel="stylesheet" href="css/theme/gdiaa.css" id="theme">
<link rel="stylesheet" href="lib/css/light.css">
<link rel="stylesheet" href="css/print/pdf.css" media="print">
<script src="lib/js/head.min.js"></script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<!-- Opening slide -->
<section>
<img src="images/gdi_logo_badge.png" class="img--bare" height="450px" />
<div class="box--small">
<h3><span class="green">Intro to Python Class 3</span></h3>
</div>
</section>
<!-- Block 1 25 minutes -->
<section>
<h3>Review</h3>
<ul class="list--xtall copy--small box">
<li>Functions - calls, definitions, returns, arguments</li>
<li>Conditions - if, elif, else</li>
<li>Loops - while, for</li>
</ul>
</section>
<section>
<h3>What we will cover today</h3>
<ul class="list--xtall copy--small box">
<li class="fragment">More Functions</li>
<li class="fragment">Method calls</li>
<li class="fragment">Lists and dictionaries</li>
<li class="fragment">Python builtin functions</li>
</ul>
</section>
<!-- FUNCTIONS -->
<section>
<h3>More with Functions</h3>
<p class="copy--small box--small">Functions can also call other functions.</p>
<p class="copy--small box--small fragment">You can use this to break up tasks<br/>into small pieces that rely on others to do their work.</p>
<div class="fragment">
<pre><code contenteditable class=" python">from math import sqrt
def absolute_difference(value_a, value_b):
return abs(value_a - value_b)
def get_hypotenuse(a, b):
return sqrt(a ** 2 + b ** 2)
def get_area_rectangle(width, height):
return width * height
def print_area_and_hypotenuse(x1, y1, x2, y2):
width = absolute_difference(x1, x2)
height = absolute_difference(y1, y2)
area = get_area_rectangle(width, height)
hypotenuse = get_hypotenuse(width, height)
print('Area of the rectangle is:')
print(area)
print('The diagonal of the rectangle is:')
print(hypotenuse)
</code></pre>
</div>
</section>
<section>
<h3>Function Composition</h3>
<p class="copy--small box--small"><strong>Function composition</strong> is when the <span class="blue">output</span><br/>of one function <span class="green">acts as the input</span> of another</p>
<div class="fragment">
<pre><code contenteditable class=" python">from math import sqrt
def find_distance(p1, p2):
return abs(p1 - p2)
def get_hypotenuse(a, b):
return sqrt(a ** 2 + b ** 2)
def print_hypotenuse(x1, y1, x2, y2):
print('The diagonal of the rectangle is:')
print(get_hypotenuse(find_distance(x1, x2), find_distance(y1, y2)))
print_hypotenuse(1,2,3,4)
# f(g(x))
# is the same as:
# y = g(x)
# f(y)
</code></pre></div>
</section>
<section>
<h3>Remember</h3>
<p class="copy--small box"><strong>Functions</strong> are called by their name - <code>my_function()</code></p>
<p class="copy--small box">They can be passed data in the form of parameters - <code>my_function(my_parameter)</code></p>
<p class="copy--small box">They usually return some sort of value. This all happens explicitly.</p>
</section>
<section>
<h3>Method Calls</h3>
<p class="copy--small box"><strong>Methods</strong> are also called by name but are associated with an object.<br/><small>Really, they are identical to functions except that the data passed into it is passed implicitly.</small></p>
<p class="copy--xsmall box fragment">For example, the integers and strings we've been using have methods attached to them.</p>
<p class="copy--xsmall box fragment">We can use the <code>dir()</code> function to see the methods of an object<br/>and <code>help()</code> to see what they do.</p>
<div class="fragment"><pre><code contenteditable class=" small python">a = 4
print(dir(a))
name = 'caleb'
sentence = 'the quick brown fox did the thing with the thing'
print(dir(name))
print(name.capitalize())
print(sentence.count('the'))
help(name.upper)
</code></pre></div>
</section>
<!-- Let's develop it: 5 minutes -->
<section>
<h3>Let's Develop It</h3>
<p class="copy--small box--small">Open a Python shell and define a string varaible</p>
<p class="copy--small box--small">Use <code>dir(string_variable)</code> and the <code>help()</code> function<br/>to explore the various methods
<p class="copy--small box--small"><strong>Hint:</strong> Like functions, some methods take arguments and others don't</p>
<p class="copy--small box--small"><strong>Hint:</strong> Use <code>help()</code> on a method.<br/><small>It will tell you the arguments to use and the expected behavior</small></p>
<p class="copy--small box--small"><strong>Hint:</strong> Don't be afraid of errors.<br/><small>They seem to be in a foreign language but they are there to help you.<br/><i>Read them carefully.</i></small></p>
</section>
<!-- LISTS : 30 minutes -->
<section>
<h3>Lists</h3>
<p class="copy--small box--small">A list is an ordered collection of elements</p>
<div class="fragment"><p class="copy--small box--small">In Python, a list is defined using <code>[ ]</code> with elements separated by commas, as in the following example</p>
<pre><code contenteditable class="small python">
words = ['list', 'of', 'strings']
</code></pre>
</div>
<div class="fragment">
<p class="copy--small box--small">A list can, but doesn't have to be of all one type.<br/><small>A list of one type is <strong>homogenous</strong> as opposed to a list of multiple types, which is <strong>heterogeneous</strong>.</small></p>
<pre><code contenteditable class="small python">
# heterogenous list
words = [0, 'list', 'of', 3, 'strings', 'and', 'numbers']
</code></pre></div>
</section>
<section>
<h3>List Methods</h3>
<p class="copy--small box--small">Lists have several methods, the most useful of which is <code>append</code></p>
<div class="copy--small box--small">
<p class="copy--small box--small ">A list can be created as an empty list and have values added to it with <code>append</code></p>
<pre><code contenteditable class="small python">
to_dos = []
to_dos.append('buy soy milk')
to_dos.append('install git')
print(to_dos)
</code></pre></div>
<p class="copy--small box--small fragment">Therefore, lists are <strong>mutable</strong></p>
<p class="copy--small box--small fragment">This means that a list can change values<br/>during the duration of a program</p>
</section>
<section>
<h3>Iteration</h3>
<p class="copy--small box--small">Lists and many other collections are <strong>iterable</strong>.</p>
<div class="fragment"><p class="copy--small box--small">Once defined, we can iterate on them,<br/>performing an action with each element</p>
<pre><code contenteditable class="small python">
shipping_cost = 2.5
prices = [3, 4, 5.25]
costs = []
for price in prices:
costs.append(price + shipping_cost)
for cost in costs:
print(cost)
</code></pre></div>
</section>
<section>
<h3>Indexing</h3>
<p class="copy--small box--small">An element can also be obtained from a list through <strong>indexing</strong></p>
<p class="copy--small box--small fragment">This allows us to obtain an element without iterating through the entire collection if we just want one value.</p>
<div class="fragment"><p class="copy--small box--small">To index on a collection, follow it immediately with <code>[index]</code>. (index here is a number, variable or expression)</p>
<pre><code contenteditable class="small python">
numbers = [10, 20, 30]
print(numbers[0])
</code></pre></div>
</section>
<section>
<h3>Indexing continued</h3>
<p class="box--small copy--small">Lists and other collections in Python are <strong>zero indexed</strong>.<br/><small>This means that the number 0 refers to first element in the list.</small></p>
<pre><code contenteditable class="small python">
to_dos = [
'install git', 'read email', 'make lunch',
]
print(to_dos[0])
print(to_dos[1])
print(to_dos[len(to_dos) - 1])
</code></pre>
<p class="box--small copy--xsmall fragment">An IndexError results if an index exceeds the length of the list minus 1</p>
</section>
<section>
<h3>Dictionaries</h3>
<p class="box--small copy--small">A <strong>dictionary</strong> (sometimes called a "hashmap") is a collection of key/value pairs, defined with <code>{}</code></p>
<pre><code contenteditable class="small python">
menu_categories = {
'food': 'stuff you eat',
'beverage': 'stuff you drink',
}
</code></pre>
<p class="copy--small box--small fragment">Think of words in a dictionary.<br/><small>The words are keys and the definitions are values.</small></p>
<p class="copy--small box--small fragment">This dictionary would be indexed with strings such as 'food' and 'beverage' instead of integers like in a list</p>
</section>
<section>
<h3>Indexing on Dictionaries</h3>
<p class="box--small copy--small">Dictionaries aren't literally just for definitions. They represent a group of mappings. A mapping might be: menu items -> costs.</p>
<p class="box--small copy--small fragment">We can also index on dictionaries.</p>
<div class="fragment">
<p class="box--small copy--small">The most common indexes are strings,<br/>but they can be whatever type the keys are.</p>
<pre><code contenteditable class="small python">
menu = {
'tofu': 4,
}
tofu_cost = menu['tofu']
</code></pre></div>
<p class="box--small copy--small fragment">Indexing on a key that doesn't exist results in a KeyError</p>
<p class="box--small copy--small fragment">If you aren't certain a key is present, you can use the <code>get</code> method</p>
</section>
<section>
<h3>Dictionary Methods</h3>
<p class="box--small copy--small">Some of the most essential methods are <code>keys</code>, <code>values</code> and <code>items</code></p>
<pre><code contenteditable class="small python">
menu = {
'tofu': 4,
'pizza': 8,
'baguette': 3,
}
print(menu.keys())
print(menu.values())
print(menu.items())
print(menu.get('pizza'))
print(menu.get('water'))
print(menu.get('juice', 5))
</code></pre>
<p class=" box--small copy--small"><code>get</code> will return None if the key isn't present<br/>or a default value if provided.</p>
</section>
<section>
<h3>The in operator</h3>
<p class="box--small copy--small">The <code>in</code> operator is used to determine if<br/>an element is in a given collection</p>
<div class="fragment"><p class="box--small copy--small ">For dictionaries, the keys are searched for the element.</p>
<pre><code contenteditable class="small python">
color = [255, 255, 0]
if 0 in color:
print('0 is in the color')
menu = {'tofu': 4}
print('tofu' in menu)
names = ['Mary', 'Martha', 'George']
george_present = 'George' in names
</code></pre></div>
</section>
<!-- Let's develop it: 15 minutes -->
<section>
<h3>Let's Develop It</h3>
<p class="box copy--small">Write a program that opens a text file and does some processing.</p>
<ul class="list--xtall copy--xsmall">
<li>The program should take a word as input and determine if the word appears in the file</li>
<li>The program should use at least one function to do its work and you should be able to import this function in a Python shell and call it with a word and filename</li>
<li>Use the functions from <a href="http://www.gdiannarbor.com/events/intro-python/examples/helpers.py">helpers.py</a> to help with reading in the lines and/or words of the file</li>
<li>Download a book in plain text from <a href="http://www.gutenberg.org/wiki/Main_Page">Project Gutenburg</a> and put it into the same directory as your python file.</li>
</ul>
<p class="box copy--small">The next slide has some code and other<br/>resources that should help you get started</p>
</section>
<section>
<h3>Let's Develop It- Example Code</h3>
<pre><code contenteditable class="small python">
from helpers import generate_cleaned_lines
def is_word_in_file(word, filename):
for line in generate_cleaned_lines(filename):
# line will be a string of each line of the file in order
# Your code goes here.
# Your code should do something with the word and line variables and assign the value to a variable for returning
input_word = input("Enter a word to search for:")
answer = is_word_in_file(input_word, 'pride.txt')
# Display the answer in some meaningful way
</code></pre>
<p class="copy--xsmall box--small">I have used <a href="http://www.gdiannarbor.com/events/intro-python/examples/pride.txt">Pride and Prejudice</a> from Project Gutenburg with my example code.</p>
<p class="copy--xsmall">You can click this link and copy/paste the text into a new text file<br/>called 'pride.txt' and save it in the same folder as your code</p>
</section>
<!-- Block 3 20 minutes -->
<section>
<h3>TUPLES</h3>
<p class="copy--small">Tuples are like lists, but they are immutable. They are particularly good at storing collections of a fixed and predictable size. Use () to define tuples</p>
<p class="copy--small">An x, y coordinate pair, or the RGB values of a color are good candidates for tuples.</p>
<pre><code contenteditable class="small python">
point = (0, 1)
x = point_a[0]
y = point_a[1]
# or, even better
point = (0, 1)
x, y = point_a
# x is 0, y is 1
</code></pre>
</section>
<section>
<h3>SETS</h3>
<p class="copy--small">Sets are unordered collections whose elements are unique. Therefore, adding a value to a set that already has it, does nothing.</p>
<p class="copy--small">Sets can be created with comma separated elements enclosed in {} in Python 2.7 or greater. Very often, one will make a list and use the set() function</p>
<p class="copy--small">Sets have an add method, which like append for lists, adds an element to a set.</p>
<pre><code class="python">
>>> set_a = set([0, 3, 7])
>>> set_b = set([0, 4, 7])
>>> set_a.add(4)
>>> print(set_a)
set([0, 3, 4, 7])
>>> print(set_a.intersection(set_b))
set([0, 4, 7])
</code> </pre>
<p class="copy--small">Sets have nice methods for reasoning about their relationship to other sets. (Think Venn Diagram)</p>
</section>
<section>
<h3>Lists of ... Lists</h3>
<p class="copy--small box--small">Lists can contain not only numbers or strings, but also other lists.</p>
<p class="copy--small box--small fragment">Such a structure is said to be <strong>nested</strong></p>
<div class="fragment"><p class="copy--small box--small">The following is a list of lists:</p>
<pre><code contenteditable class="small python">
game_board = [
['O', 'X', ' '],
[' ', 'X', ' '],
[' ', ' ', ' '],
]
</code></pre></div>
<p class="copy--small box--small fragment">This can be indexed successively with <code>game_board[0][1]</code></p>
</section>
<section>
<h3>Nested Lists continued</h3>
<p class="copy--small box--small">A list can be appended to a list as well</p>
<pre><code contenteditable class="small python">
mary_to_dos = ['eat', 'work', 'pick up laundry', 'care for baby', 'sleep']
fran_to_dos = ['eat', 'work', 'call plumber', 'sleep']
baby_to_dos = ['eat', 'sleep']
all_to_dos = []
all_to_dos.append(mary_to_dos)
all_to_dos.append(fran_to_dos)
all_to_dos.append(baby_to_dos)
print(all_to_dos)
for to_dos in all_to_dos:
for to_do in to_dos:
print(to_do)
</code></pre>
<p class="copy--small box--small fragment">What if we want to <strong>flatten</strong> the to do's?</p>
<p class="copy--small box--small fragment">What if we want the to do's to be unique?</p>
</section>
<section>
<h3>Lists of Dictionaries</h3>
<p class="copy--small box--small">One of the most common and useful nested data structures,<br/>is a list of dictionaries</p>
<pre><code contenteditable class="python">
card_a = {
'suit': 'spades',
'number': 4,
}
card_b = {
'suit': 'hearts',
'number': 8,
}
hand = [card_a, card_b]
print('The hand contains:')
for card in hand:
print('A', card['number'], 'of', card['suit'])
</code></pre>
</section>
<section>
<h3>Dictionary of Lists</h3>
<p class="copy--small box--small">A dictionary can also contain values that are themselves<br/>other collections, such as lists.</p>
<div class="fragment"><p class="copy--xsmall box--small">Let's revisit the group of to do lists and find a better representation:</p>
<pre><code contenteditable class="small python">
mary_to_dos = ['eat', 'work', 'pick up laundry', 'care for baby', 'sleep']
fran_to_dos = ['eat', 'work', 'call plumber', 'sleep']
baby_to_dos = ['eat', 'sleep']
all_to_dos = {
'mary': mary_to_dos,
'fran': fran_to_dos,
'baby': baby_to_dos,
}
for name, to_dos in all_to_dos.items():
print(name, 'needs to: ', to_dos)
# Changing this later can be accomplished with
all_to_dos['baby'].append('cry')
</code></pre></div>
<p class="copy--xsmall box--small fragment">Now the to do lists can be indexed or modified by name</p>
</section>
<section>
<h3>Means of Combination</h3>
<p class="copy--small box--small">Lists, dictionaries, and other collections are all<br/>a means of combination.</p>
<p class="copy--small box--small fragment">They can be freely combined to create the<br/>data structure needed for a particular problem</p>
<div class="fragment"><p class="copy--xsmall box--small">Eg. A list of dictionaries with lists</p>
<pre><code contenteditable class="python">
all_tweets = [
{
'author': 'mary',
'handle': '@hadalittlelamb',
'date': '2013-01-22',
'tweets': [
'at Loco Pops enjoying a Raspberry Sage popsicle',
'Learning Python is so much fun',
],
},
]
</code></pre></div>
</section>
<section>
<h3>Builtins for collections</h3>
<p class="copy--small box--small">Python provides several functions that<br/>help us work with these collections.</p>
<table class="copy--xsmall">
<tr>
<td style="width: 200px;"><code>len()</code></td>
<td>Given a collection, return its length</td>
</tr>
<tr>
<td><code>range()</code></td>
<td>Create a list of integers in the range provided.</td>
</tr>
<tr>
<td><code>sorted()</code></td>
<td>Given a collection, returns a sorted copy of that collection</td>
</tr>
<tr>
<td><code>enumerate()</code></td>
<td>Returns a list of (index, element) from the list</td>
</tr>
<tr>
<td><code>zip()</code></td>
<td style="line-height: 1.25">Given one or more iterables, returns a list of tuples with an element from each iterable</td>
</tr>
</table>
</section>
<section>
<h3>Examples of using Builtins</h3>
<pre><code contenteditable class="python">
# Using len() - Determines length
print(len([1, 2]))
# range() - Quickly creates a list of integers
print(range(5))
print(range(5, 10))
print(range(0, 10, 2))
print(range(9, -1, -1))
# sorted() - Sort a given list
grades = [93, 100, 60]
grades = sorted(grades)
print(grades)
</code></pre>
</section>
<section>
<h3>Builtins Examples continued</h3>
<pre><code contenteditable class="python">
# enumerate() - Obtain the index of the element in the loop
print('To Do:')
to_dos = ['work', 'sleep', 'work']
for index, item in enumerate(to_dos):
print('{0}. {1}'.format(index + 1, item))
print(list(enumerate(to_dos)))
# zip()
widths = [10, 15, 20]
heights = [5, 8, 12]
for width, height in zip(widths, heights):
print('Area is {0}'.format(width * height))
</code></pre>
</section>
<!-- Let's develop it: 25 minutes -->
<section>
<h3>Let's Develop It</h3>
<p class="copy--small box">Write a program that expands on your previous one.<br/>If it is unfinished, feel free to finish the original exercise first.<br/>To expand on it, choose one of the following:</p>
<ul class="list--xtall copy--xsmall">
<li>Determine how many times the user provided word appears in the file and/or what lines it appears on</li>
<li>Change the program so that it counts the number of times each word occurs. E.g. A dictionary of all words in the file, whose values are a count of their occurrences</li>
<li>Use <a href="http://www.gdiannarbor.com/events/intro-python/examples/boilerplate.py">boilerplate.py</a> to help you improve the reusability of the program. (The comments in that file should explain the how and why)</li>
</ul>
<p class="copy--small box">Resources for this and the previous exercise<br/>are provided on the next slide for convenience</p>
</section>
<section>
<h3>Resources</h3>
<ul class="list--tall copy--xsmall box">
<li>Helper functions are in <a href="http://www.gdiannarbor.com/events/intro-python/examples/helpers.py">helpers.py</a></li>
<li>Download a book in plain text from <a href="http://www.gutenberg.org/wiki/Main_Page">Project Gutenburg</a> and put it into the same directory as your python file.</li>
<li>You can use this link for <a href="http://www.gdiannarbor.com/events/intro-python/examples/pride.txt">Pride and Prejudice</a>. Click this link and copy/paste the text into a new text file called 'pride.txt' and save it in the same folder as your code</li>
</ul>
<pre><code contenteditable class="python">
from helpers import generate_cleaned_lines
def is_word_in_file(word, filename):
for line in generate_cleaned_lines(filename):
# line will be a string of each line of the file in order
# Your code goes here. Do something with the word and line variables
return result
input_word = input("Enter a word to search for:")
answer = is_word_in_file(input_word, 'pride.txt')
# Display the answer in some meaningful way
</code></pre>
</section>
<section>
<h3>Questions?</h3>
</section>
<section>
<h3>Homework</h3>
<p>Expand on the searching for word in text problem.</p>
<p>Can you display the context (3 words before and after) of each occurance of that word?</p>
</section>
</div>
<footer>
<div class="copyright">
<a rel="license" href="http://creativecommons.org/licenses/by-nc/3.0/deed.en_US"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc/3.0/80x15.png" /></a>
</div>
</footer>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/reveal.min.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
rollingLinks: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/none
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/showdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
]
});
</script>
</body>
</html>