SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
"Perl is worse than Python because people wanted it worse."
-- Larry Wall (14 Oct 1998 15:46:10 -0700, Perl Users mailing list)

"Life is better without braces."
-- Bruce Eckel, author of Thinking in C++ , Thinking in Java

"Python is an excellent language[, and makes] sensible compromises."
-- Peter Norvig (Google), author of Artificial Intelligence

What is Python?
An Introduction
+Wesley Chun, Principal
CyberWeb Consulting
wescpy@gmail.com :: @wescpy
cyberwebconsulting.com

goo.gl/P7yzDi
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

Python
is
Fun!
(I've used it at lots of places!)

(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

I'm here to give
you an idea of
what it is!
(I've written a lot about it!)

(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

I've taught it at
lots of places!
(companies, schools, etc.)

(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

About You
SW/HW Engineer/Lead
Hopefully familiar
Sys Admin/IS/IT/Ops
with one other highWeb/Flash Developer
level language:
QA/Testing/Automation
Java
Scientist/Mathematician
C, C++, C#
Toolsmith, Hobbyist
PHP, JavaScript
Release Engineer/SCM
(Visual) Basic
Artist/Designer/UE/UI/UX
Perl, Tcl, Lisp
Student/Teacher
Ruby, etc.
Django, TurboGears/Pylons, Pyramid, Plone, Trac, Mailman, App Engine
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
Why are you here? You…
Have heard good word-of-mouth
Came via Django, App Engine, Plone, etc.
Discovered Google, Yahoo!, et al. use it
Already know but want formal training
Were forced by your boss
Safari Books Online: Top 5, Apr 2009
1.
2.
3.
4.
5.

iPhone
Java
Python
C#
PHP
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

source: TIOBE Programming Community Index for April 2009 (tiobe.com)
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
For New Programmers
Programming should be easy enough
to teach like reading & writing (CP4E)
Young kids: start with Scratch/Tynker
Can start with Python: age ~10 & older
Skills you need
Some math background
Algebra, physics (problem solving)
Buddy who already is a developer
Even better if they know Python
Tinkerer, curious, itch-scratcher
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

About this Talk
Goal:

Introduce as much Python as one can in 30 or 60 mins

Seminar Topics
Language Introduction
Python Object Types
Loops and Conditionals
Files, Functions, Modules
Object-Oriented Programming
Errors and Exception Handling
Miscellaneous
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
Background
Guido van Rossum: began late '89, released early '91
Inherits from ABC, Modula, C/C++, LISP, ALGOL, Perl, Java, etc.
Named after Monty Python, not the snake ☺
Cross-platform (Mac, PC, *ix; only need a C compiler)
Alternate implementations: Jython, IronPython, PyPy, Stackless, etc.
Philosophy, Concepts and Syntax
Robust
Enough "batteries included" to get job done
Simple
Clean, easy-to-read, easier than VB?!?
Modular
Plug-n-play, use only what you need
Extensible Can extend language to meet your needs
Intuitive
"Python fits your brain."
OOP
Object-oriented when you need it (not req'd)
"Pythonic" "There's only one way to do it…."
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

Why (not) Python?
Advantages

Disadvantages

Simple Syntax
Rapid Development
High-level data structures
Object-Oriented
Exception Handling
Functional Programming
Memory Management
Extensible (C/C++/Java)
Many libraries: NW, DB,
GUI, MT, XML, RE, OS/FS,
Math, Web; plus 3rd-party
Grassroots community

Generally slower than
compiled languages
Idiosyncratic idioms
Obscure syntax? Naaah!!
No marketing force…
mostly word-of-mouth
No world domination…
yet! (Happening slowly.)
www.tiobe.com/index.php/
content/paperinfo/tpci

(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
Built for Non-Programmers
Educational language syntax
Works well for school-aged children
Syntax, memory management, data
structures, object-oriented programming…
such issues get in way of learning concepts
C++ and Java deter interest and students
Python: retention, morale, understanding
Probably the "best" 1st language

Imagine what it means for seasoned
programming professionals?
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

Some Newbie Resources
Published Books
Hello World! Computer Programming for Kids & Other Beginners
(Sande, Sande: 2009)
Invent Your Own Computer Games with Python (Sweigart: 2010)
Python Programming for the Absolute Beginner (Dawson: 2010)
Learning with Python: How to Think Like a Computer Scientist
(Downey, Elkner, Meyers: 2002)
Learn Python the Hard Way (Shaw, 2010)

Online Books, Tutorials, Environments, etc.
How to Think Like a Computer Scientist (Downey, Elkner, Meyers)
Learning to Program (Gauld)
LiveWires Python course
A Byte of Python (Swaroop)
Instant Hacking: Learning to Program with Python (Hetland)
Snake Wrangling for Kids (Briggs)
Computer Programming is Fun! (Handy)
Karel the Robot clones: Guido van Robot, RUR-PLE
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
Interactive Interpreter
Running Python's interpreter from the default IDE: IDLE

Starting from the cmd-line; can also run scripts (.py extension)
$ python
# or C:> python
Python 2.6.2 (r262:71600, May 12 2009, 23:46:27)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> print 'Hello World!'
Hello World!
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

What You Just Saw
>>> ← this is the Python prompt
Enter any Python command after it
Use print to display output to users
Use print() in Python 3
To exit interactive interpreter
Ctrl-D from IDLE or *ix command-line
Ctrl-Z from a DOS/command shell
Integrated Development Environment: developer tools
Interactive interpreter: testing, debugging, hacking,
experimenting regardless of IDE use or otherwise
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
Getting Python on your Computer
Unix (Linux, Mac OS): already installed
PCs, source, and other downloads
python.org or corepython.com

Other IDEs
SPE (pictured)
pythonide.stani.be
PythonWin
sf.net/projects/pywin32
Eclipse + PyDev eclipse.org & pydev.sf.net
Komodo
WingIDE
PyCharm

activestate.com/komodo
wingware.com
jetbrains.com/pycharm
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

Common Beginner Gotchas
Code delimited by indentation not braces { }
if x > 10:
return "'x' is greater than 10"
else:
return "'x' is less than 10"
Similarly, no extraneous characters ( ; , $, …)
No switch-case, private class members, ++/--,
static type checking, anonymous blocks, etc.
True division: 1/2 == 0.5 (not 0)
Freaky-looking floats: 1.1 → 1.10000000001
Single element tuple needs comma: (None,)
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
Objects
Allocated on assignment: Dynamic/Duck Typing
Additional refs (aka aliases) similar to pointers
Call by Reference, Call by Value? Neither. Both.
Memory Management: Reference Counting
Standard Types
Other Types
None
Numbers (3-8)
Strings (2-3)
Files
Lists
Functions/Methods
Tuples
Modules
Dictionaries
Type/Classes
Sets (2)
miscellaneous
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

Variables and Expressions
>>> 4 + 6 * 5
34
>>> a = 4 + 6 ** 2
>>> a
40
>>> a = 'Python'
>>> b = 'is cool'
>>> a + b
'Pythonis cool'
>>> a = a + ' ' + b
>>> a
'Python is cool'
>>>

# math ops like other langs
# no declaration needed
# auto garbage collection
# ops can be overloaded
# reassignment no problem
# useful interactive tool

(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
Numbers
Integers (no size limit except for VM)
-680, 0o237, 0xDEADBEEF, 64-0x41, 0b110
Floating point real numbers (IEEE-754 C double)
-97.65, -3.14159, -6e2, 0.1
Complex numbers
Composed of real and imaginary parts (floats)
11.65-5.55J, 4J, -3e2+8.73J, 0.1-2.3e4J
Also long, bool, Decimal, Fraction, Rational, etc.
Other modules: math, cmath, random, operator
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

Standard Operators
+
<<
==
is

*
>>
&
>=
<=
is not

/ //
|
<
and

%
^
>
or

**
~
!=
not

• Grouping expressions in ( ) okay as usual
•** means exponentiation, % means modulus/remainder
•/ means true division in 3.x and classic division in 2.x
•Use // for standard integer floor division
• Assignment using single equals ( = )
•Augmented assignment +=, -=, *=, etc. (no ++ though)
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
Strings

' '

" "

''' '''

Strings are sequences of characters (single/double quotes)
Format operator ( % ) for printf()-like functionality
Triple quotes allow special characters like newlines
>>> s = 'Python'
>>> s * 2
'PythonPython'
>>> s = s * 2
>>> s
'PythonPython'
>>> s[4:6]
'on'
>>> s[-1]
'n'
>>> s[-4:-1]
'tho'
>>> s[:6]
'Python'

>>> '%s is number %d' % (s[:6], 1)
'Python is number 1'
>>> s = s[:6] + ' is cool'
>>> s
'Python is cool'
>>>
>>> hi = '''hi
there'''
>>> hi
'hinthere'
>>> print hi
hi
there
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

Lists [ ] and Tuples ( )
Lists are ordered sequences of arbitrary objects
Mutable (values can be updated)
Can have lists of lists, i.e., multidimensional indexing
Tuples similar but immutable (no value updates allowed)
"List comprehensions" allows for quick logical building of lists

Common list methods:
list.sort()
# "sort" list contents in-place
list.reverse() # reverse a list in-place
list.append() # append item to list
list.remove/pop() # remove item(s) from list
list.extend() # extend a list with another one
list.count()
# return number of item occurrences
list.index()
# lowest index where item is found
list.insert() #(c) insert items in list
1998-2013 CyberWeb Consulting.
All rights reserved.
List Operations
>>> m = ['Core', 'Programming', 9, 2006]
>>> m.append('Prentice Hall')
>>> m.insert(1, 'Pytho')
>>> m
['Core', 'Pytho', 'Programming', 9, 2006, 'Prentice Hall']
>>> m[1] = 'Python'
>>> m.pop(3)
9
>>> m
['Core', 'Python', 'Programming', 2006, 'Prentice Hall']
>>> m.sort()
>>> m
[2006, 'Core', 'Prentice Hall', 'Programming', 'Python']
>>>
[0,
>>>
>>>
>>>

[i*3 for i in range(20) if i % 2 == 0]
6, 12, 18, 24, 30, 36, 42, 48, 54]
f = open('myFile', 'r')
data = [line.strip() for line in f]
f.close()
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

Dictionaries { }
Dictionaries are Python's only mapping type
Mutable, resizable hash tables
Mappings of keys to values
Keys are scalar (usually strings or numbers)
Values are arbitrary Python objects
No key collisions allowed
Similar to Java HashMaps and Perl hashes/associative arrays
Common dictionary methods:
d.keys()
# iterable: keys of d
d.values()
# iterable: values of d
d.items()
# list of key-value pairs
d.get()
# return key's value (or default)
d.pop()
# remove item from d and return
d.update()
# merge contents from another dict
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
Dictionary Operations
>>> d = {'title': 'Core Python Programming', 'year': 2007}
>>> d
{'year': 2007, 'title': 'Core Python Programming'}
>>> 'year' in d
True
>>> 'pub' in d
False
>>> d.get('pub', 'N/A')
# KeyError if d['pub']
'N/A'
>>> d['pub'] = 'Prentice Hall'
>>> d.get('pub', 'N/A')
# no KeyError for d['pub'] now
'Prentice Hall'
>>> for eachKey in d:
print eachKey, ':', d[eachKey]
year : 2007
pub : Prentice Hall
title : Core Python Programming
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

if-elif-else Statements
Conditional statements are what you expect
# prompt, get, and check user input
data = raw_input("Enter 'y' or 'n': ").lower()
if data[0] == 'y':
print "You typed 'y'."
elif data[0] == 'n':
print "You typed 'n'."
else:
print 'invalid key!'

# 'y' key
# 'n' key
# other key

Ternary Operator (aka Conditional Expressions: C ? T : F)
smaller = x if x < y else y

# T if C else F

(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
Loops
Python has while and for loops – while loops are "normal"
for loops more like shell foreach
Iterate over a sequence rather than as a conditional
range() was created to "simulate" a traditional for
aList = [123, 'xyz', 45.67]
>>> for eachItem in aList:
...
print eachItem
123
xyz
45.67

>>> i = 0
>>> while i < 3:
...
print i
...
i += 1
0
1
2

>>> for i in range(0, 3): # [0, 1, 2]
...
print i
0
1
2
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

Files
Open a file and get back a file object
f = open(file_name, access_mode)
Most commonly-used file methods
f.close()
Close file
f.read()
Read bytes from file
f.readlines()
Read all lines into an iterable
f.write()
Write a string to file
Example of displaying a text file to the screen
fp = open('data.txt', 'r')
for eachLine in fp:
print eachLine,
fp.close()

# open file, get file object
# display one line at a time
# close file

(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
Functions
Function declarations created with def statement
Support for default and variable-length arguments
Support for variety of invocation styles
def foo(x):
# create foo()
print 'Hello %s!' % x
>>> foo('Guido')
Hello Guido!

# call foo()

Functional Programming elements:
List comprehensions and generator expressions
Currying and partial function application
Statically-nested: Inner functions and closures
Anonymous Functions (lambda)
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

Importing Modules & Attributes
Importing a module using import statement
import module_name
import string
num = string.atoi('123')
Importing module attributes using from-import statement
Names brought into local namespace
from module_name import module_element
from string import atoi
num = atoi('123')
Packages: allow for organizing modules using the file system
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
Standard Library Sampler (“B.I.”)
Module Name(s)

Description

sys

System data, processing, and functionality

os and os.path

Operating and file system interface

re, json, csv

Regex, JSON, and CSV text processing

time, datetime, calendar

Date and time constants and functions

socket, SocketServer

Socket interface & server classes (TCP, UDP)

sqlite3

API for SQLite databases

subprocess

External process management

email

Email/MIME construction and parsing package

Tkinter

Python/Tk GUI toolkit interface

threading, multiprocessing

High-level multithreading, multiprocessing

pickle, cPickle, shelve

Serialize Python objects

{c,}math, random, fractions,…

Various math/numeric processing

gzip, bz2, zipfile, tarfile

Data compression and archive files

{ftp,pop,url,http,smtp,*}lib

Various Internet client libraries

xml.sax, xml.dom, xml.etree

SAX parsing, DOM tree mgmt, ElementTree API

(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

Object-Oriented Programming
"Constructor"/Initializer is __init__(), "self" is "this"
Class instantiation via function interface (rather than "new")
Instance attrs, multiple inheritance; no overloading nor private
class MyClass(object):
...
def __init__(self, data=2):
...
self.info = data
...
def times(self, x):
...
return "%d * %d is %d" % (
...
self.info, x, self.info * x)
>>>
>>> inst = MyClass(21)
>>> inst.info
21
>>> print inst.times(3)
21 * 3 is 63
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
Exceptions and try-except
Exception handling via try-except statement
try:
# statements to monitor
except (ErrorType1, ErrorType2,…) as e:
# code to exec if exception occurs
try:
fp = open('data.txt', 'r')
except IOError as e:
print 'file open error:', e
return False
Throw exceptions with raise; there is also a finally
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

Programmer Tools
Debugger
pdb

Profilers
profile
hotshot
cProfile

Tracer/Tracker
trace

Logger
logging

Timer
timeit

Help/Documentation
pydoc

Testing
unittest
doctest
(external) nose
(external) py.test
Testing tools taxonomy
goo.gl/Fpz0Z
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
Python 2 vs. Python 3
The What and the Why
Fix early design flaws
Some new features, many small improvements
Plan: develop (remainder of) 2.x and 3.x together
Provide transition tools (2to3, 2.6+)

Key Updates (no major syntax changes)
print, exec changed to functions
True division: 1/2 == 0.5
Performance enhancements (more iterators)
Type consolidation (integers, classes, obj comps)
Strings: Unicode default; bytes/bytearray types

Python 3 article on InformIT
http://www.informit.com/articles/article.aspx?p=1328795
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

Additional Resources
Published Books
Quick Python Book (Ceder, 2010)
Core Python Programming (Chun, 2006/2009)
Python Fundamentals LiveLessons DVD (Chun, 2009)
Beginning Python (Hetland, 2008)
Dive into Python (Pilgrim, 2009)
Python Standard Library by Example (Hellmann, 2011)
Python Essential Reference (Beazley, 2009)
Python in a Nutshell (Martelli, 2006)
Python Cookbook (2005 [2.x] & 2013 [3.x])

Other Resources
Python Reading List(s)
goo.gl/i4u0R
Python Quick Reference Guide rgruet.free.fr#QuickRef
Worldwide Python Conferences www.pycon.org
Core Python site & blog
corepython.com & wescpy.blogspot.com
comp.lang.python newsgroup
groups.google.com
PyPI/Cheeseshop repository
python.org/pypi
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.
The Zen of Python (or import this by Tim Peters)
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one — and preferably only one — obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea — let's do more of those!
(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

Thank you!

Q&A
+Wesley Chun (plus.ly/wescpy)
@wescpy (twitter.com/wescpy)
wescpy@gmail.com
cyberwebconsulting.com
corepython.com
wescpy.blogspot.com

(c) 1998-2013 CyberWeb Consulting.
All rights reserved.

Contenu connexe

Tendances (20)

Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python training
Python trainingPython training
Python training
 
File handling & regular expressions in python programming
File handling & regular expressions in python programmingFile handling & regular expressions in python programming
File handling & regular expressions in python programming
 
11 Unit 1 Chapter 02 Python Fundamentals
11  Unit 1 Chapter 02 Python Fundamentals11  Unit 1 Chapter 02 Python Fundamentals
11 Unit 1 Chapter 02 Python Fundamentals
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3
 
Introduction To Programming with Python
Introduction To Programming with PythonIntroduction To Programming with Python
Introduction To Programming with Python
 
Python ppt
Python pptPython ppt
Python ppt
 
Python-01| Fundamentals
Python-01| FundamentalsPython-01| Fundamentals
Python-01| Fundamentals
 
Python by Rj
Python by RjPython by Rj
Python by Rj
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python ppt
Python pptPython ppt
Python ppt
 
Python made easy
Python made easy Python made easy
Python made easy
 
Python Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPT
 
Python Presentation
Python PresentationPython Presentation
Python Presentation
 
Python ppt
Python pptPython ppt
Python ppt
 
Python Tutorial
Python TutorialPython Tutorial
Python Tutorial
 
PYTHON NOTES
PYTHON NOTESPYTHON NOTES
PYTHON NOTES
 
Intro to Python Programming Language
Intro to Python Programming LanguageIntro to Python Programming Language
Intro to Python Programming Language
 
Python basics
Python basicsPython basics
Python basics
 

En vedette

G Suite & Google APIs coding workshop
G Suite & Google APIs coding workshopG Suite & Google APIs coding workshop
G Suite & Google APIs coding workshopwesley chun
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Pythonwesley chun
 
Coding Google... you can do it!
Coding Google... you can do it!Coding Google... you can do it!
Coding Google... you can do it!wesley chun
 
Exploring Google APIs with Python & JavaScript
Exploring Google APIs with Python & JavaScriptExploring Google APIs with Python & JavaScript
Exploring Google APIs with Python & JavaScriptwesley chun
 
What is Python? (Silicon Valley CodeCamp 2015)
What is Python? (Silicon Valley CodeCamp 2015)What is Python? (Silicon Valley CodeCamp 2015)
What is Python? (Silicon Valley CodeCamp 2015)wesley chun
 
What is the Google Cloud Platform?
What is the Google Cloud Platform?What is the Google Cloud Platform?
What is the Google Cloud Platform?wesley chun
 
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides, Apps Scri...
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides, Apps Scri...Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides, Apps Scri...
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides, Apps Scri...wesley chun
 
Google Cloud Platform & APIs Overview
Google Cloud Platform & APIs OverviewGoogle Cloud Platform & APIs Overview
Google Cloud Platform & APIs Overviewwesley chun
 
Power & flexibility of the Google Sheets API
Power & flexibility of the Google Sheets APIPower & flexibility of the Google Sheets API
Power & flexibility of the Google Sheets APIwesley chun
 

En vedette (9)

G Suite & Google APIs coding workshop
G Suite & Google APIs coding workshopG Suite & Google APIs coding workshop
G Suite & Google APIs coding workshop
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
Coding Google... you can do it!
Coding Google... you can do it!Coding Google... you can do it!
Coding Google... you can do it!
 
Exploring Google APIs with Python & JavaScript
Exploring Google APIs with Python & JavaScriptExploring Google APIs with Python & JavaScript
Exploring Google APIs with Python & JavaScript
 
What is Python? (Silicon Valley CodeCamp 2015)
What is Python? (Silicon Valley CodeCamp 2015)What is Python? (Silicon Valley CodeCamp 2015)
What is Python? (Silicon Valley CodeCamp 2015)
 
What is the Google Cloud Platform?
What is the Google Cloud Platform?What is the Google Cloud Platform?
What is the Google Cloud Platform?
 
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides, Apps Scri...
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides, Apps Scri...Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides, Apps Scri...
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides, Apps Scri...
 
Google Cloud Platform & APIs Overview
Google Cloud Platform & APIs OverviewGoogle Cloud Platform & APIs Overview
Google Cloud Platform & APIs Overview
 
Power & flexibility of the Google Sheets API
Power & flexibility of the Google Sheets APIPower & flexibility of the Google Sheets API
Power & flexibility of the Google Sheets API
 

Similaire à What is Python?

What is Python? (Silicon Valley CodeCamp 2014)
What is Python? (Silicon Valley CodeCamp 2014)What is Python? (Silicon Valley CodeCamp 2014)
What is Python? (Silicon Valley CodeCamp 2014)wesley chun
 
Python @ PiTech - March 2009
Python @ PiTech - March 2009Python @ PiTech - March 2009
Python @ PiTech - March 2009tudorprodan
 
Python and its Applications
Python and its ApplicationsPython and its Applications
Python and its ApplicationsAbhijeet Singh
 
Pythonanditsapplications 161121160425
Pythonanditsapplications 161121160425Pythonanditsapplications 161121160425
Pythonanditsapplications 161121160425Sapna Tyagi
 
Python on a chip
Python on a chipPython on a chip
Python on a chipstoggi
 
Exploring the Internet of Things Using Ruby
Exploring the Internet of Things Using RubyExploring the Internet of Things Using Ruby
Exploring the Internet of Things Using RubyMike Hagedorn
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughgabriellekuruvilla
 
Python intro
Python introPython intro
Python introrik0
 
Programming Under Linux In Python
Programming Under Linux In PythonProgramming Under Linux In Python
Programming Under Linux In PythonMarwan Osman
 
Python Course Basic
Python Course BasicPython Course Basic
Python Course BasicNaiyan Noor
 
Using SWIG to Control, Prototype, and Debug C Programs with Python
Using SWIG to Control, Prototype, and Debug C Programs with PythonUsing SWIG to Control, Prototype, and Debug C Programs with Python
Using SWIG to Control, Prototype, and Debug C Programs with PythonDavid Beazley (Dabeaz LLC)
 
Introduction to Programming in Go
Introduction to Programming in GoIntroduction to Programming in Go
Introduction to Programming in GoAmr Hassan
 
Python for Linux System Administration
Python for Linux System AdministrationPython for Linux System Administration
Python for Linux System Administrationvceder
 
Introduction to python.pptx
Introduction to python.pptxIntroduction to python.pptx
Introduction to python.pptxpcjoshi02
 
Euro python2011 High Performance Python
Euro python2011 High Performance PythonEuro python2011 High Performance Python
Euro python2011 High Performance PythonIan Ozsvald
 
Python for Science and Engineering: a presentation to A*STAR and the Singapor...
Python for Science and Engineering: a presentation to A*STAR and the Singapor...Python for Science and Engineering: a presentation to A*STAR and the Singapor...
Python for Science and Engineering: a presentation to A*STAR and the Singapor...pythoncharmers
 

Similaire à What is Python? (20)

What is Python? (Silicon Valley CodeCamp 2014)
What is Python? (Silicon Valley CodeCamp 2014)What is Python? (Silicon Valley CodeCamp 2014)
What is Python? (Silicon Valley CodeCamp 2014)
 
Python @ PiTech - March 2009
Python @ PiTech - March 2009Python @ PiTech - March 2009
Python @ PiTech - March 2009
 
Python and its Applications
Python and its ApplicationsPython and its Applications
Python and its Applications
 
Pythonanditsapplications 161121160425
Pythonanditsapplications 161121160425Pythonanditsapplications 161121160425
Pythonanditsapplications 161121160425
 
Learn python
Learn pythonLearn python
Learn python
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
A Python Tutorial
A Python TutorialA Python Tutorial
A Python Tutorial
 
Python on a chip
Python on a chipPython on a chip
Python on a chip
 
Exploring the Internet of Things Using Ruby
Exploring the Internet of Things Using RubyExploring the Internet of Things Using Ruby
Exploring the Internet of Things Using Ruby
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthrough
 
Python intro
Python introPython intro
Python intro
 
Programming Under Linux In Python
Programming Under Linux In PythonProgramming Under Linux In Python
Programming Under Linux In Python
 
Python Course Basic
Python Course BasicPython Course Basic
Python Course Basic
 
05 python.pdf
05 python.pdf05 python.pdf
05 python.pdf
 
Using SWIG to Control, Prototype, and Debug C Programs with Python
Using SWIG to Control, Prototype, and Debug C Programs with PythonUsing SWIG to Control, Prototype, and Debug C Programs with Python
Using SWIG to Control, Prototype, and Debug C Programs with Python
 
Introduction to Programming in Go
Introduction to Programming in GoIntroduction to Programming in Go
Introduction to Programming in Go
 
Python for Linux System Administration
Python for Linux System AdministrationPython for Linux System Administration
Python for Linux System Administration
 
Introduction to python.pptx
Introduction to python.pptxIntroduction to python.pptx
Introduction to python.pptx
 
Euro python2011 High Performance Python
Euro python2011 High Performance PythonEuro python2011 High Performance Python
Euro python2011 High Performance Python
 
Python for Science and Engineering: a presentation to A*STAR and the Singapor...
Python for Science and Engineering: a presentation to A*STAR and the Singapor...Python for Science and Engineering: a presentation to A*STAR and the Singapor...
Python for Science and Engineering: a presentation to A*STAR and the Singapor...
 

Plus de wesley chun

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Easy path to machine learning (2023-2024)
Easy path to machine learning (2023-2024)Easy path to machine learning (2023-2024)
Easy path to machine learning (2023-2024)wesley chun
 
Powerful Google developer tools for immediate impact! (2023-24 B)
Powerful Google developer tools for immediate impact! (2023-24 B)Powerful Google developer tools for immediate impact! (2023-24 B)
Powerful Google developer tools for immediate impact! (2023-24 B)wesley chun
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Pythonwesley chun
 
Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)wesley chun
 
Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)wesley chun
 
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...wesley chun
 
Exploring Google APIs 102: Cloud vs. non-GCP Google APIs
Exploring Google APIs 102: Cloud vs. non-GCP Google APIsExploring Google APIs 102: Cloud vs. non-GCP Google APIs
Exploring Google APIs 102: Cloud vs. non-GCP Google APIswesley chun
 
Serverless Computing with Python
Serverless Computing with PythonServerless Computing with Python
Serverless Computing with Pythonwesley chun
 
Easy path to machine learning (2022)
Easy path to machine learning (2022)Easy path to machine learning (2022)
Easy path to machine learning (2022)wesley chun
 
Google... more than just a cloud
Google... more than just a cloudGoogle... more than just a cloud
Google... more than just a cloudwesley chun
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIswesley chun
 
Serverless computing with Google Cloud
Serverless computing with Google CloudServerless computing with Google Cloud
Serverless computing with Google Cloudwesley chun
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloudwesley chun
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Runwesley chun
 
Image archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google CloudImage archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google Cloudwesley chun
 
Easy path to machine learning (Spring 2021)
Easy path to machine learning (Spring 2021)Easy path to machine learning (Spring 2021)
Easy path to machine learning (Spring 2021)wesley chun
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Pythonwesley chun
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloudwesley chun
 

Plus de wesley chun (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Easy path to machine learning (2023-2024)
Easy path to machine learning (2023-2024)Easy path to machine learning (2023-2024)
Easy path to machine learning (2023-2024)
 
Powerful Google developer tools for immediate impact! (2023-24 B)
Powerful Google developer tools for immediate impact! (2023-24 B)Powerful Google developer tools for immediate impact! (2023-24 B)
Powerful Google developer tools for immediate impact! (2023-24 B)
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)
 
Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)
 
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
 
Exploring Google APIs 102: Cloud vs. non-GCP Google APIs
Exploring Google APIs 102: Cloud vs. non-GCP Google APIsExploring Google APIs 102: Cloud vs. non-GCP Google APIs
Exploring Google APIs 102: Cloud vs. non-GCP Google APIs
 
Serverless Computing with Python
Serverless Computing with PythonServerless Computing with Python
Serverless Computing with Python
 
Easy path to machine learning (2022)
Easy path to machine learning (2022)Easy path to machine learning (2022)
Easy path to machine learning (2022)
 
Google... more than just a cloud
Google... more than just a cloudGoogle... more than just a cloud
Google... more than just a cloud
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIs
 
Serverless computing with Google Cloud
Serverless computing with Google CloudServerless computing with Google Cloud
Serverless computing with Google Cloud
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloud
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
 
Image archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google CloudImage archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google Cloud
 
Easy path to machine learning (Spring 2021)
Easy path to machine learning (Spring 2021)Easy path to machine learning (Spring 2021)
Easy path to machine learning (Spring 2021)
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloud
 

Dernier

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Dernier (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

What is Python?

  • 1. "Perl is worse than Python because people wanted it worse." -- Larry Wall (14 Oct 1998 15:46:10 -0700, Perl Users mailing list) "Life is better without braces." -- Bruce Eckel, author of Thinking in C++ , Thinking in Java "Python is an excellent language[, and makes] sensible compromises." -- Peter Norvig (Google), author of Artificial Intelligence What is Python? An Introduction +Wesley Chun, Principal CyberWeb Consulting wescpy@gmail.com :: @wescpy cyberwebconsulting.com goo.gl/P7yzDi (c) 1998-2013 CyberWeb Consulting. All rights reserved. Python is Fun! (I've used it at lots of places!) (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 2. (c) 1998-2013 CyberWeb Consulting. All rights reserved. I'm here to give you an idea of what it is! (I've written a lot about it!) (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 3. (c) 1998-2013 CyberWeb Consulting. All rights reserved. I've taught it at lots of places! (companies, schools, etc.) (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 4. (c) 1998-2013 CyberWeb Consulting. All rights reserved. About You SW/HW Engineer/Lead Hopefully familiar Sys Admin/IS/IT/Ops with one other highWeb/Flash Developer level language: QA/Testing/Automation Java Scientist/Mathematician C, C++, C# Toolsmith, Hobbyist PHP, JavaScript Release Engineer/SCM (Visual) Basic Artist/Designer/UE/UI/UX Perl, Tcl, Lisp Student/Teacher Ruby, etc. Django, TurboGears/Pylons, Pyramid, Plone, Trac, Mailman, App Engine (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 5. Why are you here? You… Have heard good word-of-mouth Came via Django, App Engine, Plone, etc. Discovered Google, Yahoo!, et al. use it Already know but want formal training Were forced by your boss Safari Books Online: Top 5, Apr 2009 1. 2. 3. 4. 5. iPhone Java Python C# PHP (c) 1998-2013 CyberWeb Consulting. All rights reserved. source: TIOBE Programming Community Index for April 2009 (tiobe.com) (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 6. For New Programmers Programming should be easy enough to teach like reading & writing (CP4E) Young kids: start with Scratch/Tynker Can start with Python: age ~10 & older Skills you need Some math background Algebra, physics (problem solving) Buddy who already is a developer Even better if they know Python Tinkerer, curious, itch-scratcher (c) 1998-2013 CyberWeb Consulting. All rights reserved. About this Talk Goal: Introduce as much Python as one can in 30 or 60 mins Seminar Topics Language Introduction Python Object Types Loops and Conditionals Files, Functions, Modules Object-Oriented Programming Errors and Exception Handling Miscellaneous (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 7. Background Guido van Rossum: began late '89, released early '91 Inherits from ABC, Modula, C/C++, LISP, ALGOL, Perl, Java, etc. Named after Monty Python, not the snake ☺ Cross-platform (Mac, PC, *ix; only need a C compiler) Alternate implementations: Jython, IronPython, PyPy, Stackless, etc. Philosophy, Concepts and Syntax Robust Enough "batteries included" to get job done Simple Clean, easy-to-read, easier than VB?!? Modular Plug-n-play, use only what you need Extensible Can extend language to meet your needs Intuitive "Python fits your brain." OOP Object-oriented when you need it (not req'd) "Pythonic" "There's only one way to do it…." (c) 1998-2013 CyberWeb Consulting. All rights reserved. Why (not) Python? Advantages Disadvantages Simple Syntax Rapid Development High-level data structures Object-Oriented Exception Handling Functional Programming Memory Management Extensible (C/C++/Java) Many libraries: NW, DB, GUI, MT, XML, RE, OS/FS, Math, Web; plus 3rd-party Grassroots community Generally slower than compiled languages Idiosyncratic idioms Obscure syntax? Naaah!! No marketing force… mostly word-of-mouth No world domination… yet! (Happening slowly.) www.tiobe.com/index.php/ content/paperinfo/tpci (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 8. Built for Non-Programmers Educational language syntax Works well for school-aged children Syntax, memory management, data structures, object-oriented programming… such issues get in way of learning concepts C++ and Java deter interest and students Python: retention, morale, understanding Probably the "best" 1st language Imagine what it means for seasoned programming professionals? (c) 1998-2013 CyberWeb Consulting. All rights reserved. Some Newbie Resources Published Books Hello World! Computer Programming for Kids & Other Beginners (Sande, Sande: 2009) Invent Your Own Computer Games with Python (Sweigart: 2010) Python Programming for the Absolute Beginner (Dawson: 2010) Learning with Python: How to Think Like a Computer Scientist (Downey, Elkner, Meyers: 2002) Learn Python the Hard Way (Shaw, 2010) Online Books, Tutorials, Environments, etc. How to Think Like a Computer Scientist (Downey, Elkner, Meyers) Learning to Program (Gauld) LiveWires Python course A Byte of Python (Swaroop) Instant Hacking: Learning to Program with Python (Hetland) Snake Wrangling for Kids (Briggs) Computer Programming is Fun! (Handy) Karel the Robot clones: Guido van Robot, RUR-PLE (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 9. Interactive Interpreter Running Python's interpreter from the default IDE: IDLE Starting from the cmd-line; can also run scripts (.py extension) $ python # or C:> python Python 2.6.2 (r262:71600, May 12 2009, 23:46:27) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> >>> print 'Hello World!' Hello World! (c) 1998-2013 CyberWeb Consulting. All rights reserved. What You Just Saw >>> ← this is the Python prompt Enter any Python command after it Use print to display output to users Use print() in Python 3 To exit interactive interpreter Ctrl-D from IDLE or *ix command-line Ctrl-Z from a DOS/command shell Integrated Development Environment: developer tools Interactive interpreter: testing, debugging, hacking, experimenting regardless of IDE use or otherwise (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 10. Getting Python on your Computer Unix (Linux, Mac OS): already installed PCs, source, and other downloads python.org or corepython.com Other IDEs SPE (pictured) pythonide.stani.be PythonWin sf.net/projects/pywin32 Eclipse + PyDev eclipse.org & pydev.sf.net Komodo WingIDE PyCharm activestate.com/komodo wingware.com jetbrains.com/pycharm (c) 1998-2013 CyberWeb Consulting. All rights reserved. Common Beginner Gotchas Code delimited by indentation not braces { } if x > 10: return "'x' is greater than 10" else: return "'x' is less than 10" Similarly, no extraneous characters ( ; , $, …) No switch-case, private class members, ++/--, static type checking, anonymous blocks, etc. True division: 1/2 == 0.5 (not 0) Freaky-looking floats: 1.1 → 1.10000000001 Single element tuple needs comma: (None,) (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 11. Objects Allocated on assignment: Dynamic/Duck Typing Additional refs (aka aliases) similar to pointers Call by Reference, Call by Value? Neither. Both. Memory Management: Reference Counting Standard Types Other Types None Numbers (3-8) Strings (2-3) Files Lists Functions/Methods Tuples Modules Dictionaries Type/Classes Sets (2) miscellaneous (c) 1998-2013 CyberWeb Consulting. All rights reserved. Variables and Expressions >>> 4 + 6 * 5 34 >>> a = 4 + 6 ** 2 >>> a 40 >>> a = 'Python' >>> b = 'is cool' >>> a + b 'Pythonis cool' >>> a = a + ' ' + b >>> a 'Python is cool' >>> # math ops like other langs # no declaration needed # auto garbage collection # ops can be overloaded # reassignment no problem # useful interactive tool (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 12. Numbers Integers (no size limit except for VM) -680, 0o237, 0xDEADBEEF, 64-0x41, 0b110 Floating point real numbers (IEEE-754 C double) -97.65, -3.14159, -6e2, 0.1 Complex numbers Composed of real and imaginary parts (floats) 11.65-5.55J, 4J, -3e2+8.73J, 0.1-2.3e4J Also long, bool, Decimal, Fraction, Rational, etc. Other modules: math, cmath, random, operator (c) 1998-2013 CyberWeb Consulting. All rights reserved. Standard Operators + << == is * >> & >= <= is not / // | < and % ^ > or ** ~ != not • Grouping expressions in ( ) okay as usual •** means exponentiation, % means modulus/remainder •/ means true division in 3.x and classic division in 2.x •Use // for standard integer floor division • Assignment using single equals ( = ) •Augmented assignment +=, -=, *=, etc. (no ++ though) (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 13. Strings ' ' " " ''' ''' Strings are sequences of characters (single/double quotes) Format operator ( % ) for printf()-like functionality Triple quotes allow special characters like newlines >>> s = 'Python' >>> s * 2 'PythonPython' >>> s = s * 2 >>> s 'PythonPython' >>> s[4:6] 'on' >>> s[-1] 'n' >>> s[-4:-1] 'tho' >>> s[:6] 'Python' >>> '%s is number %d' % (s[:6], 1) 'Python is number 1' >>> s = s[:6] + ' is cool' >>> s 'Python is cool' >>> >>> hi = '''hi there''' >>> hi 'hinthere' >>> print hi hi there (c) 1998-2013 CyberWeb Consulting. All rights reserved. Lists [ ] and Tuples ( ) Lists are ordered sequences of arbitrary objects Mutable (values can be updated) Can have lists of lists, i.e., multidimensional indexing Tuples similar but immutable (no value updates allowed) "List comprehensions" allows for quick logical building of lists Common list methods: list.sort() # "sort" list contents in-place list.reverse() # reverse a list in-place list.append() # append item to list list.remove/pop() # remove item(s) from list list.extend() # extend a list with another one list.count() # return number of item occurrences list.index() # lowest index where item is found list.insert() #(c) insert items in list 1998-2013 CyberWeb Consulting. All rights reserved.
  • 14. List Operations >>> m = ['Core', 'Programming', 9, 2006] >>> m.append('Prentice Hall') >>> m.insert(1, 'Pytho') >>> m ['Core', 'Pytho', 'Programming', 9, 2006, 'Prentice Hall'] >>> m[1] = 'Python' >>> m.pop(3) 9 >>> m ['Core', 'Python', 'Programming', 2006, 'Prentice Hall'] >>> m.sort() >>> m [2006, 'Core', 'Prentice Hall', 'Programming', 'Python'] >>> [0, >>> >>> >>> [i*3 for i in range(20) if i % 2 == 0] 6, 12, 18, 24, 30, 36, 42, 48, 54] f = open('myFile', 'r') data = [line.strip() for line in f] f.close() (c) 1998-2013 CyberWeb Consulting. All rights reserved. Dictionaries { } Dictionaries are Python's only mapping type Mutable, resizable hash tables Mappings of keys to values Keys are scalar (usually strings or numbers) Values are arbitrary Python objects No key collisions allowed Similar to Java HashMaps and Perl hashes/associative arrays Common dictionary methods: d.keys() # iterable: keys of d d.values() # iterable: values of d d.items() # list of key-value pairs d.get() # return key's value (or default) d.pop() # remove item from d and return d.update() # merge contents from another dict (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 15. Dictionary Operations >>> d = {'title': 'Core Python Programming', 'year': 2007} >>> d {'year': 2007, 'title': 'Core Python Programming'} >>> 'year' in d True >>> 'pub' in d False >>> d.get('pub', 'N/A') # KeyError if d['pub'] 'N/A' >>> d['pub'] = 'Prentice Hall' >>> d.get('pub', 'N/A') # no KeyError for d['pub'] now 'Prentice Hall' >>> for eachKey in d: print eachKey, ':', d[eachKey] year : 2007 pub : Prentice Hall title : Core Python Programming (c) 1998-2013 CyberWeb Consulting. All rights reserved. if-elif-else Statements Conditional statements are what you expect # prompt, get, and check user input data = raw_input("Enter 'y' or 'n': ").lower() if data[0] == 'y': print "You typed 'y'." elif data[0] == 'n': print "You typed 'n'." else: print 'invalid key!' # 'y' key # 'n' key # other key Ternary Operator (aka Conditional Expressions: C ? T : F) smaller = x if x < y else y # T if C else F (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 16. Loops Python has while and for loops – while loops are "normal" for loops more like shell foreach Iterate over a sequence rather than as a conditional range() was created to "simulate" a traditional for aList = [123, 'xyz', 45.67] >>> for eachItem in aList: ... print eachItem 123 xyz 45.67 >>> i = 0 >>> while i < 3: ... print i ... i += 1 0 1 2 >>> for i in range(0, 3): # [0, 1, 2] ... print i 0 1 2 (c) 1998-2013 CyberWeb Consulting. All rights reserved. Files Open a file and get back a file object f = open(file_name, access_mode) Most commonly-used file methods f.close() Close file f.read() Read bytes from file f.readlines() Read all lines into an iterable f.write() Write a string to file Example of displaying a text file to the screen fp = open('data.txt', 'r') for eachLine in fp: print eachLine, fp.close() # open file, get file object # display one line at a time # close file (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 17. Functions Function declarations created with def statement Support for default and variable-length arguments Support for variety of invocation styles def foo(x): # create foo() print 'Hello %s!' % x >>> foo('Guido') Hello Guido! # call foo() Functional Programming elements: List comprehensions and generator expressions Currying and partial function application Statically-nested: Inner functions and closures Anonymous Functions (lambda) (c) 1998-2013 CyberWeb Consulting. All rights reserved. Importing Modules & Attributes Importing a module using import statement import module_name import string num = string.atoi('123') Importing module attributes using from-import statement Names brought into local namespace from module_name import module_element from string import atoi num = atoi('123') Packages: allow for organizing modules using the file system (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 18. Standard Library Sampler (“B.I.”) Module Name(s) Description sys System data, processing, and functionality os and os.path Operating and file system interface re, json, csv Regex, JSON, and CSV text processing time, datetime, calendar Date and time constants and functions socket, SocketServer Socket interface & server classes (TCP, UDP) sqlite3 API for SQLite databases subprocess External process management email Email/MIME construction and parsing package Tkinter Python/Tk GUI toolkit interface threading, multiprocessing High-level multithreading, multiprocessing pickle, cPickle, shelve Serialize Python objects {c,}math, random, fractions,… Various math/numeric processing gzip, bz2, zipfile, tarfile Data compression and archive files {ftp,pop,url,http,smtp,*}lib Various Internet client libraries xml.sax, xml.dom, xml.etree SAX parsing, DOM tree mgmt, ElementTree API (c) 1998-2013 CyberWeb Consulting. All rights reserved. Object-Oriented Programming "Constructor"/Initializer is __init__(), "self" is "this" Class instantiation via function interface (rather than "new") Instance attrs, multiple inheritance; no overloading nor private class MyClass(object): ... def __init__(self, data=2): ... self.info = data ... def times(self, x): ... return "%d * %d is %d" % ( ... self.info, x, self.info * x) >>> >>> inst = MyClass(21) >>> inst.info 21 >>> print inst.times(3) 21 * 3 is 63 (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 19. Exceptions and try-except Exception handling via try-except statement try: # statements to monitor except (ErrorType1, ErrorType2,…) as e: # code to exec if exception occurs try: fp = open('data.txt', 'r') except IOError as e: print 'file open error:', e return False Throw exceptions with raise; there is also a finally (c) 1998-2013 CyberWeb Consulting. All rights reserved. Programmer Tools Debugger pdb Profilers profile hotshot cProfile Tracer/Tracker trace Logger logging Timer timeit Help/Documentation pydoc Testing unittest doctest (external) nose (external) py.test Testing tools taxonomy goo.gl/Fpz0Z (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 20. Python 2 vs. Python 3 The What and the Why Fix early design flaws Some new features, many small improvements Plan: develop (remainder of) 2.x and 3.x together Provide transition tools (2to3, 2.6+) Key Updates (no major syntax changes) print, exec changed to functions True division: 1/2 == 0.5 Performance enhancements (more iterators) Type consolidation (integers, classes, obj comps) Strings: Unicode default; bytes/bytearray types Python 3 article on InformIT http://www.informit.com/articles/article.aspx?p=1328795 (c) 1998-2013 CyberWeb Consulting. All rights reserved. Additional Resources Published Books Quick Python Book (Ceder, 2010) Core Python Programming (Chun, 2006/2009) Python Fundamentals LiveLessons DVD (Chun, 2009) Beginning Python (Hetland, 2008) Dive into Python (Pilgrim, 2009) Python Standard Library by Example (Hellmann, 2011) Python Essential Reference (Beazley, 2009) Python in a Nutshell (Martelli, 2006) Python Cookbook (2005 [2.x] & 2013 [3.x]) Other Resources Python Reading List(s) goo.gl/i4u0R Python Quick Reference Guide rgruet.free.fr#QuickRef Worldwide Python Conferences www.pycon.org Core Python site & blog corepython.com & wescpy.blogspot.com comp.lang.python newsgroup groups.google.com PyPI/Cheeseshop repository python.org/pypi (c) 1998-2013 CyberWeb Consulting. All rights reserved.
  • 21. The Zen of Python (or import this by Tim Peters) 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one — and preferably only one — obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than right now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea — let's do more of those! (c) 1998-2013 CyberWeb Consulting. All rights reserved. Thank you! Q&A +Wesley Chun (plus.ly/wescpy) @wescpy (twitter.com/wescpy) wescpy@gmail.com cyberwebconsulting.com corepython.com wescpy.blogspot.com (c) 1998-2013 CyberWeb Consulting. All rights reserved.