-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpresentation.html
684 lines (556 loc) · 16.7 KB
/
presentation.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
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
<!--
CampusHash HTML Deck
-->
<!DOCTYPE html>
<html>
<head>
<title>CampusHash Events</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<!--<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">-->
<!--<meta name="viewport" content="width=device-width, initial-scale=1.0">-->
<!--This one seems to work all the time, but really small on ipad-->
<!--<meta name="viewport" content="initial-scale=0.4">-->
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" media="all" href="theme/css/default.css">
<link rel="stylesheet" media="all" href="theme/css/app.css">
<link rel="stylesheet" media="only screen and (max-device-width: 480px)" href="theme/css/phone.css">
<base target="_blank"> <!-- This amazingness opens all links in a new tab. -->
<script data-main="js/slides" src="js/require-1.0.8.min.js"></script>
</head>
<body style="opacity: 0">
<slides class="layout-widescreen">
<!-- <slide class="logoslide nobackground">
<article class="flexbox vcenter">
<span><img src="images/campushash_logo.png"></span>
</article>
</slide>
-->
<slide class="title-slide segue nobackground">
<aside class="gdbar"><img src="images/campushash_icon_128.png"></aside>
<!-- The content of this hgroup is replaced programmatically through the slide_config.json. -->
<hgroup class="auto-fadein">
<h1 data-config-title><!-- populated from slide_config.json --></h1>
<h2 data-config-subtitle><!-- populated from slide_config.json --></h2>
<p data-config-presenter><!-- populated from slide_config.json --></p>
</hgroup>
</slide>
<slide >
<hgroup>
<h2>Meet, Python!</h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><p><img src="images/python.svg"></p>
<p><strong>World's easiest and arguably most powerful programming language.</strong></p></article>
</slide>
<slide >
<hgroup>
<h2>Who uses Python?</h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><p><img src="images/whouses.png" style="width: 90%; height: 90%"></p>
<p>and many, many more. . .</p></article>
</slide>
<slide class="fill" >
<hgroup>
<h2>Quick feature check</h2>
<h3></h3>
</hgroup>
<article ><ul>
<li>
<p>Very-high-level, <strong>interpreted</strong>, <strong>loosely</strong> and <strong>dynamically</strong> typed, object-oriented</p>
</li>
<li>
<p>Clean, readable syntax</p>
</li>
<li>
<p>Comfortable level of abstraction, automatic memory management</p>
</li>
<li>
<p>Does <strong>not</strong> force object orientation</p>
</li>
<li>
<p>Extensive collection of standard modules, great community support</p>
</li>
<li>
<p>Can be, and is, used for a large number of application types</p>
</li>
<li>
<p>Easily extensible, plays nice with applications written in other programming languages</p>
</li>
<li>
<p>Easy to learn, get started, and build things, has <strong>common sense</strong></p>
</li>
</ul></article>
</slide>
<slide class="nobackground" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><p><img src="images/python.png" style="width: 100%; height: 100%">
<footer class="source">source: xkcd.com</footer></p>
<p>This is a title with the event branding.</p></article>
</slide>
<slide class="fill" >
<hgroup>
<h2>Common Sense?</h2>
<h3></h3>
</hgroup>
<article ><pre class="prettyprint" data-lang="c++">
#include <iostream>
using namespace std;
int main()
{
cout << "Hello, world!" << std::endl;
return 0;
}
</pre>
<pre class="prettyprint" data-lang="java">
public class HelloWorld {
public static void main(String [] args) {
System.out.println("Hello, world!");
}
}
</pre>
<div class="centered">How about, <strong>NO</strong>.</div></article>
</slide>
<slide class="fill" >
<hgroup>
<h2>Common Sense!</h2>
<h3></h3>
</hgroup>
<article ><pre class="prettyprint" data-lang="python">
print "Hello, World!"
</pre>
<p><img src="images/troll-troll-face.svg" width=25% height=25% style="float: right"></p>
<ul>
<li>Clean, comprehensible syntax.</li>
<li>No braces. Uses tab spaces as delimiters.</li>
</ul>
<p>Impressed already?</p></article>
</slide>
<slide class="nobackground" >
<hgroup>
<h2>Ready to hack?</h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><h3 style="font-size: 200%">Set up Python on your computer.<br>Fire up the interpreter.</h3>
<p><span class="blue2">
$ python
</span>
<br>or<br>
<span class="blue2">
Start > Python27 > IDLE
</span></p></article>
</slide>
<slide class="fill" >
<hgroup>
<h2>Look, we have a calculator!</h2>
<h3></h3>
</hgroup>
<article ><p>Your Python shell can be used to do some real quick calculations. Don't reach out for your calculator ever again.</p>
<pre class="prettyprint" data-lang="python">
>>> 3 + 2
5
>>> 98 - 56
42
>>> (60 - 57) * 11
33
>>> (124 - 88) / 9
4
</pre>
<p>Looks cool, huh?</p></article>
</slide>
<slide class="nobackground" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><h1 style="font-size: 400%" class="blue">Arithmetic</h1></article>
</slide>
<slide class="fill" >
<hgroup>
<h2>Operators, numbers and variables</h2>
<h3></h3>
</hgroup>
<article ><pre class="prettyprint" data-lang="python">
>>> 57 / 8 # integer division by default
7
>>> 57.0 / 8 # coercion to float division
7.125
>>> PI = 3.14 # PI is a variable
>>> r = 2.5
>>> area = 2 * PI * r**2 # ** is used for exponentiation
>>> area
39.25
>>> x = 1
>>> y = z = 5 # multiple variable assignment
>>> X + y * z
Traceback (most recent call last): # Drats! We have an error!
File "<input>", line 1, in <module>
NameError: name 'X' is not defined # variables are case-sensitive!
>>> x + y * z
26
</pre></article>
</slide>
<slide class="fill" >
<hgroup>
<h2>Imaginary numbers too!</h2>
<h3></h3>
</hgroup>
<article ><p>Complex numbers : <span class="blue">real + imag <span class="red">j</span></span></p>
<pre class="prettyprint" data-lang="python">
>>> z = 4 + 2j
>>> z
(4+2j) # complex number tuple
>>> z.real # property
4.0
>>> z.imag
2.0
>>> z.conjugate() # method
(4-2j)
>>> abs(z) # abs() is a built-in method in Python
5
</pre></article>
</slide>
<slide class="fill" >
<hgroup>
<h2>Some nifty functions</h2>
<h3></h3>
</hgroup>
<article ><pre class="prettyprint" data-lang="python">
>>> x, y = 42, 6.9 # multiple inline assignments
>>> float(x) # converts to floating point
42.0
>>> int(y) # converts to an integer
6
>>> round(y) # rounds off to the nearest integral number, returns a float
7.0
>>> long(x) # converts to long int
42L
>>> max(x, y)
42
>>> min(x, y, 0, -3)
-3
</pre></article>
</slide>
<slide class="nobackground" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><h1 style="font-size: 400%" class="green">Strings</h1></article>
</slide>
<slide class="fill" >
<hgroup>
<h2>Let's print something!</h2>
<h3></h3>
</hgroup>
<article ><pre class="prettyprint" data-lang="python">
>>> 'CampusHash'
'CampusHash'
>>> "Hello, world!"
'Hello, world!'
>>> "And then everyone shouted, 'We love CampusHash!'" # nested quotes
"And then everyone shouted, 'We love CampusHash!'"
>>> 'I said, "Well, that\'s great."' # escaping with \
>>> person, emotion, thing = "Minions", "love", "banana"
>>> person+emotion+thing
'Minionslovebanana'
>>> person + ' ' + emotion + ' ' + thing + '.'
'Minions love banana.'
>>> thing * 5
'bananabananabananabananabanana'
</pre></article>
</slide>
<slide class="fill" >
<hgroup>
<h2>Let's 'print' something!</h2>
<h3></h3>
</hgroup>
<article ><pre class="prettyprint" data-lang="python">
>>> print 'Gru'
Gru
>>> movie = 'Despicable Me'
>>> movie
'Despicable Me'
>>> print movie
Despicable Me # no quotes!
</pre>
<ul>
<li>print is not a function. It is an operator.</li>
<li>Anything that you operate print on, will be printed to the standard output.</li>
</ul></article>
</slide>
<slide class="nobackground" >
<hgroup>
<h2>Anatomy of a String</h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><p><img src="images/string-slicing.png" style="height: 95%; width: 95%">
<footer>Tip : Google for 'Monty Python's Flying Circus'.</footer></p></article>
</slide>
<slide class="fill" >
<hgroup>
<h2>Not just your regular String</h2>
<h3></h3>
</hgroup>
<article ><ul>
<li>There is no <span class="red">char</span> in Python. Only <span class="green">str</span>.</li>
<li>Strings are immutable, i. e., they cannot be changed.</li>
<li>Strings support splicing.</li>
<li>Lots of in-built methods and properties to operate on strings.</li>
</ul>
<pre class="prettyprint" data-lang="python">
>>> name = "Minion"
>>> name[3]
'i'
>>> name[3] = 'x'
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: 'str' object does not support item assignment
>>> name[::-1] # This one's magic!
'noiniM'</article>
</slide>
<slide class="nobackground" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><h1 style="font-size: 400%" class="blue">Data Structures: <span class="red">Lists</span></h1></article>
</slide>
<slide class="fill" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><p><img src="images/lists.png" style="height: 50%; width: 50%"></p>
<h1 style="font-size: 200%">List is a compund datatype.</h1>
<p>It is analogous to an array.</p></article>
</slide>
<slide class="fill" >
<hgroup>
<h2>Lists - Feature Check</h2>
<h3></h3>
</hgroup>
<article ><ul>
<li>Lists are collections of items (strings, integers, or even other lists).</li>
<li>Each item in the list has an assigned index value.</li>
<li>Lists are enclosed in [ ].</li>
<li>Each item in a list is separated by a comma.</li>
<li>Unlike strings, lists are mutable, which means they can be changed.</li>
</ul>
<pre class="prettyprint" data-lang="python">
>>> fruits = ['apple', 'banana', 'orange']
>>> fruits[0]
'apple'
>>> mix = ["1", "hello", 2, "world"]
>>> mix[-1]
'world'
</pre></article>
</slide>
<slide class="nobackground" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><h1 style="font-size: 300%" class="blue">Data Structures: <span class="red">Dictionaries</span></h1></article>
</slide>
<slide class="fill" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><p><img src="images/dictionary.gif" style="height: 100%; width: 100%"></p>
<h1 style="font-size: 200%">Dictionaries are hash tables.</h1></article>
</slide>
<slide class="fill" >
<hgroup>
<h2>Dictionaries - Feature Check</h2>
<h3></h3>
</hgroup>
<article ><ul>
<li>
<p>Dictionaries are collections of items that have a "key" and a "value".</p>
</li>
<li>
<p>Python dictionaries are also known as associative arrays or hash tables.</p>
</li>
<li>
<p>They are just like lists, except instead of having an assigned index number,
you make up the index.</p>
</li>
<li>
<p>Dictionaries are unordered, so the order that the keys are added doesn’t
necessarily reflect what order they may be reported back.</p>
</li>
<li>
<p>Use {} curly brackets to construct the dictionary.</p>
</li>
<li>
<p>Look up the value associated with a key using [].</p>
</li>
<li>
<p>Provide a key and a value.</p>
</li>
<li>
<p>A colon is placed between key and value (key:value). </p>
</li>
<li>
<p>Each key must be unique and each key can be in the dictionary only once.</p>
</li>
</ul></article>
</slide>
<slide class="nobackground" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><h1 style="font-size: 300%" class="green2">Tuples and Sets</h1></article>
</slide>
<slide class="nobackground" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><h1 style="font-size: 300%" class="yellow2">Functions</h1></article>
</slide>
<slide class="fill" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><p><img src="images/phonecall.jpg" style="height: 100%; width: 100%"></p>
<h1 style="font-size: 140%">A function is something you can call which performs an action and returns a value.</h1></article>
</slide>
<slide class="fill" >
<hgroup>
<h2>Function rules</h2>
<h3></h3>
</hgroup>
<article ><ul>
<li>
<p>A function in Python must be defined before it’s used.</p>
</li>
<li>
<p>Create a function by using the keyword “def” followed by the functions name and
the parentheses (). </p>
</li>
<li>
<p>The function has to be named plus specify what parameter it has (if any).</p>
</li>
<li>
<p>The keyword "def" is required and must be in lowercase.</p>
</li>
<li>
<p>The name can be anything you like. </p>
</li>
<li>
<p>The end of the line has to end with a colon (:)</p>
</li>
<li>
<p>The function often ends by returning a value using return.</p>
</li>
<li>
<p>The code inside the function must be indented.</p>
</li>
</ul></article>
</slide>
<slide class="nobackground" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><h1 style="font-size: 300%" class="gray3">Loops</h1></article>
</slide>
<slide class="fill" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><p><img src="images/pypy.png" style="height: 100%; width: 100%"></p>
<h1 style="font-size: 140%">Loops allow us to do similar things many times.</h1></article>
</slide>
<slide class="nobackground" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><h1 style="font-size: 250%" class="blue2">Conditions and Comparisons</h1></article>
</slide>
<slide class="nobackground" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><h1 style="font-size: 300%" class="red2">In-built Functions</h1></article>
</slide>
<slide class="nobackground" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><h1 style="font-size: 300%" class="black">Classes</h1></article>
</slide>
<slide class="fill" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><p><img src="images/class.png" style="height: 100%; width: 100%"></p>
<h1 style="font-size: 140%">Classes are definitions for objects.</h1></article>
</slide>
<slide class="nobackground" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><h1 style="font-size: 300%" class="red">Object-orientation</h1></article>
</slide>
<slide class="fill" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><p><img src="images/diamond.png" style="height: 75%; width: 75%"></p>
<h1 style="font-size: 140%">Everything is an object in Python.</h1></article>
</slide>
<slide class="nobackground" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><h1 style="font-size: 300%" class="black">Modules and Packages</h1></article>
</slide>
<slide class="fill" >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article class="flexbox vcenter centered"><p><img src="images/questions.jpg" style="height: 100%; width: 100%"></p>
<h1 style="font-size: 400%">I <span class="red">♥</span> questions!</h1></article>
</slide>
<slide class="thank-you-slide segue nobackground">
<aside class="gdbar right"><img src="images/campushash_icon_128.png"></aside>
<article class="flexbox vleft auto-fadein">
<h2>That's all, folks!</h2>
<p>You have been a great audience!</p>
</article>
<p class="auto-fadein">
Shoot your questions at <strong style="color: #192959;">forum.campushash.com</strong>.
</p>
</slide>
<!-- <slide class="logoslide dark nobackground">
<article class="flexbox vcenter">
<span><img src="images/campushash_logo_white.png"></span>
</article>
</slide> -->
<slide class="backdrop"></slide>
</slides>
<!--[if IE]>
<script src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script>
<script>CFInstall.check({mode: 'overlay'});</script>
<![endif]-->
</body>
</html>