SlideShare a Scribd company logo
1 of 23
What is Python? 
An overview of Python for science 
Nicholas Pringle
What is Python? 
Python1 is a 
â—Ź general purpose2, 
â—Ź high-level3, 
â—Ź free and open-source4, 
â—Ź readable and intuitive 
programming language which provides strong guidelines. 
It has been called the glue5, but is now becoming the swiss 
army knife, of scientific programming.
Why should we use it? 
It integrates well with other languages like R6, 
MATLAB7, C8 or FORTRAN9. 
¹³² 
It has a large community of users. 
It has mature and well documented scientific 
packages...
The scientific packages 
The most important packages are Numpy, 
SciPy and Matplotlib. 
Together these libraries allow one to use 
Python in a manner similar to MATLAB. 
They can be used with an IDE like Spyder...
Spyder 
Explore the 
variables 
here... 
2 
I can write my code here… 
(syntax errors are shown) 
1 
And investigate my data in an 
interactive terminal here… 
This includes plotting inline 
3
Numpy 
Support for large multidimensional arrays and 
matrices10 
Together with Scipy and Matplotlib attempt to 
provide MATLAB functionality. 
Or at least thats how it started...
Scipy 
Builds on Numpy and provides: 
â—Ź Signal processing 
â—Ź Linear algebra routines 
â—Ź Statistics 
â—Ź Optimization 
â—Ź Interpolation 
â—Ź and more...
Matplotlib... 
Has many plotting options and 
additional libraries like Basemap. 
[Gallery link]
What makes it so great? 
The size of the community means that it is easy to find a solution to your 
problem. Additionaly there are many great online courses. e.g. Coursera 
It is easy to learn and easy to read. 
Your code is generally cross-platform and not sensitive to package versions. 
My code is too - so we can share! Which is useful for things like downloading 
and cleaning data within an organisation. An automated workflow can be 
established.
The Python community 
Python users fall into 3 broad categories: 
â—Ź individual users 
o write their own scripts (statistical analysis of their data, creation of figures) 
â—Ź institutional users 
o are working on projects as a team 
o collaboration is very important 
o Need to provide products 
â—Ź scientific python developers 
o contribute to the scientific packages 
(from Van der plas, 2013)
The community is diverse 
â—Ź Astronomy [AstroPy] 
â—Ź Remote Sensing [Link, Link, Link] 
â—Ź Oceanography [Link] 
â—Ź Web development [Django] 
â—Ź Game Development 
â—Ź Finance (Data Analysis) 
â—Ź High Performance computing [ANL]
The community is fun 
You can make minesweeper animations… [Link] 
Or make XKCD style plots… [Link] 
Learn when to have your case favourably 
reviewed by a judge… [Link] 
Build a prediction engine for betting on horse 
races (and lose money) [Link] 
“Writing your own solution is a good indication that you 
don’t know what you’re doing...” - Nathan Taggart
What else does Python offer 
â—Ź IPython Notebook11 - executable code 
â—Ź Pandas12 - the new R 
â—Ź Scikit Learn13 - Machine Learning 
â—Ź Numba, Blaze - lightning fast, big data 
â—Ź Bokeh - plotting 
â—Ź Wakari - Python in the cloud
How to collaborate (lofty goals) 
● Use virtual environments which don’t rely on 
your system packages14 
â—Ź Use version control to keep track of 
development and to share15 
â—Ź Use PEP816 as a standard for readability 
â—Ź Try and fit your code to a MVC17 pattern 
â—Ź Write good test coverage18, 19
Python Scientific Distributions 
Python is easiest to use in a linux or unix environment. 
However, there are some very good all-in-one packages 
available. And they are free. 
â—Ź Enthought Canopy [Link] 
â—Ź Anaconda (I recommend) [Link] 
â—Ź or $ pip install in a virtualenv 
Python2 or Python3? 
You can use both but try for Python3.4 
Try one of them 
out today!
More slides… should there be time.
A simple example 
import numpy as np # imports the numpy package into the namespace 
from matplotlib import pyplot as plt # imports plotting from matplotlib 
def straight_line(m, x, c): 
y = m*x + c 
return y 
gradient = 2 
x_coords = np.arange(-10, 11) # create 1D array from -10 to 10 
y_int = -2 
line = straight_line(gradient, x_coords, y_int) 
plt.plot(x_coords, line) 
plt.grid()
What is python? 
Python is a general purpose, high-level programming 
language. 
General purpose: a wide variety of application domains 
High-level: it does the hard work for you
What else is Python? 
Python is a free and open source, so this guarantees end 
users (individuals, organizations, companies) the freedoms 
to use, study, share (copy), and modify the software. 
Python emphasizes code readability, so it is easy to 
understand ones own code and that of others. 
Additionally there are are quite strong guidelines which 
means everybody is on the same page.
Python is moving forward 
There are exciting packages being added at an alarming 
rate. 
Current packages are improving all the time. 
Continuum Analytics received $3 million in funding. 
There are great python conferences - EuroPy/EuroSciPy
Model, View, Controller 
MVC is a software architectural pattern for implementing user interfaces. Using this pattern can 
provide a solid foundation for collaboration. 
Model 
â—Ź HDF5, NETCDF4, PyTables 
View 
â—Ź PyQT, Matplotlib 
Controller 
â—Ź Numpy; Scipy, Pandas, etc...
Other resources 
Version control (Github) [Link] 
Using version control on anything you work on can save 
you a lot of trouble, it also makes working with other much 
simpler. [example] 
Stackexchange [Link] 
The stackexchange network is a group of Q&A forums 
where you can get help on a variety of topics.
More Links... 
Some key people in the python community: 
â—Ź Travis Oliphant [Link] 
â—Ź Jake Vanderplas [Link] 
â—Ź Wes McKinney [Link] 
â—Ź Randal Olson [Link]

More Related Content

What's hot

Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming LanguageLaxman Puri
 
Python presentation by Monu Sharma
Python presentation by Monu SharmaPython presentation by Monu Sharma
Python presentation by Monu SharmaMayank Sharma
 
Python and its Applications
Python and its ApplicationsPython and its Applications
Python and its ApplicationsAbhijeet Singh
 
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYAChapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYAMaulik Borsaniya
 
Presentation on python
Presentation on pythonPresentation on python
Presentation on pythonVenkat Projects
 
Python | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python TutorialPython | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python TutorialQA TrainingHub
 
Chapter 0 Python Overview (Python Programming Lecture)
Chapter 0 Python Overview (Python Programming Lecture)Chapter 0 Python Overview (Python Programming Lecture)
Chapter 0 Python Overview (Python Programming Lecture)IoT Code Lab
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programmingSrinivas Narasegouda
 
Python Crash Course
Python Crash CoursePython Crash Course
Python Crash CourseHaim Michael
 
Python basics
Python basicsPython basics
Python basicsJyoti shukla
 
Python-00 | Introduction and installing
Python-00 | Introduction and installingPython-00 | Introduction and installing
Python-00 | Introduction and installingMohd Sajjad
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonSyed Zaid Irshad
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners Sujith Kumar
 
Python course syllabus
Python course syllabusPython course syllabus
Python course syllabusSugantha T
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonYi-Fan Chu
 

What's hot (20)

Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming Language
 
Python programming
Python programmingPython programming
Python programming
 
Python presentation by Monu Sharma
Python presentation by Monu SharmaPython presentation by Monu Sharma
Python presentation by Monu Sharma
 
Python and its Applications
Python and its ApplicationsPython and its Applications
Python and its Applications
 
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYAChapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
 
Presentation on python
Presentation on pythonPresentation on python
Presentation on python
 
Python | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python TutorialPython | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python Tutorial
 
Python Presentation
Python PresentationPython Presentation
Python Presentation
 
Chapter 0 Python Overview (Python Programming Lecture)
Chapter 0 Python Overview (Python Programming Lecture)Chapter 0 Python Overview (Python Programming Lecture)
Chapter 0 Python Overview (Python Programming Lecture)
 
Python - the basics
Python - the basicsPython - the basics
Python - the basics
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
Python Crash Course
Python Crash CoursePython Crash Course
Python Crash Course
 
Python basics
Python basicsPython basics
Python basics
 
Python-00 | Introduction and installing
Python-00 | Introduction and installingPython-00 | Introduction and installing
Python-00 | Introduction and installing
 
Python by Rj
Python by RjPython by Rj
Python by Rj
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
 
Python training
Python trainingPython training
Python training
 
Python course syllabus
Python course syllabusPython course syllabus
Python course syllabus
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 

Viewers also liked

Python PPT
Python PPTPython PPT
Python PPTEdureka!
 
Learn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesLearn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesMatt Harrison
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to PythonNowell Strite
 
Why Python?
Why Python?Why Python?
Why Python?Adam Pah
 
Intro to java programming
Intro to java programmingIntro to java programming
Intro to java programmingEugene Stephens
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Railsmithunsasidharan
 
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinalProf. Wim Van Criekinge
 
Rapid Prototyping with Python
Rapid Prototyping with PythonRapid Prototyping with Python
Rapid Prototyping with PythonRenyi Khor
 
Esri South Africa Python for Everyone
Esri South Africa Python for EveryoneEsri South Africa Python for Everyone
Esri South Africa Python for EveryoneEsri South Africa
 
Behold the Power of Python
Behold the Power of PythonBehold the Power of Python
Behold the Power of PythonSarah Dutkiewicz
 
R Programming Overview
R Programming Overview R Programming Overview
R Programming Overview dlamb3244
 
Overview HTML, HTML5 and Validations
Overview HTML, HTML5 and Validations Overview HTML, HTML5 and Validations
Overview HTML, HTML5 and Validations Yaowaluck Promdee
 
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGMarakana Inc.
 
Relational Database Access with Python
Relational Database Access with PythonRelational Database Access with Python
Relational Database Access with PythonMark Rees
 
A brief overview of java frameworks
A brief overview of java frameworksA brief overview of java frameworks
A brief overview of java frameworksMD Sayem Ahmed
 
Overview of c++
Overview of c++Overview of c++
Overview of c++geeeeeet
 
Ruby Rails Overview
Ruby Rails OverviewRuby Rails Overview
Ruby Rails OverviewNetguru
 

Viewers also liked (20)

Python PPT
Python PPTPython PPT
Python PPT
 
Learn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesLearn 90% of Python in 90 Minutes
Learn 90% of Python in 90 Minutes
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Why Python?
Why Python?Why Python?
Why Python?
 
Intro to java programming
Intro to java programmingIntro to java programming
Intro to java programming
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
 
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
 
Rapid Prototyping with Python
Rapid Prototyping with PythonRapid Prototyping with Python
Rapid Prototyping with Python
 
Esri South Africa Python for Everyone
Esri South Africa Python for EveryoneEsri South Africa Python for Everyone
Esri South Africa Python for Everyone
 
Behold the Power of Python
Behold the Power of PythonBehold the Power of Python
Behold the Power of Python
 
R Programming Overview
R Programming Overview R Programming Overview
R Programming Overview
 
Overview HTML, HTML5 and Validations
Overview HTML, HTML5 and Validations Overview HTML, HTML5 and Validations
Overview HTML, HTML5 and Validations
 
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUG
 
Relational Database Access with Python
Relational Database Access with PythonRelational Database Access with Python
Relational Database Access with Python
 
A brief overview of java frameworks
A brief overview of java frameworksA brief overview of java frameworks
A brief overview of java frameworks
 
C++ Overview PPT
C++ Overview PPTC++ Overview PPT
C++ Overview PPT
 
Overview of c++
Overview of c++Overview of c++
Overview of c++
 
Ruby Rails Overview
Ruby Rails OverviewRuby Rails Overview
Ruby Rails Overview
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Lets learn Python !
Lets learn Python !Lets learn Python !
Lets learn Python !
 

Similar to An Overview of Python for Science

A Whirlwind Tour Of Python
A Whirlwind Tour Of PythonA Whirlwind Tour Of Python
A Whirlwind Tour Of PythonAsia Smith
 
Introduction to Python Programming Language For Artificial Intelligence
Introduction to Python Programming Language For Artificial IntelligenceIntroduction to Python Programming Language For Artificial Intelligence
Introduction to Python Programming Language For Artificial Intelligencesaraahmed870035
 
Introduction of python programming
Introduction of python programmingIntroduction of python programming
Introduction of python programmingNitin Kumar Kashyap
 
Python_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxPython_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxlemonchoos
 
Python for Data Science: A Comprehensive Guide
Python for Data Science: A Comprehensive GuidePython for Data Science: A Comprehensive Guide
Python for Data Science: A Comprehensive Guidepriyanka rajput
 
Python
Python Python
Python Edureka!
 
Use open source software to develop ideas at work
Use open source software to develop ideas at workUse open source software to develop ideas at work
Use open source software to develop ideas at workSammy Fung
 
Anaconda Python KNIME & Orange Installation
Anaconda Python KNIME & Orange InstallationAnaconda Python KNIME & Orange Installation
Anaconda Python KNIME & Orange InstallationGirinath Pillai
 
An overview of data and web-application development with Python
An overview of data and web-application development with PythonAn overview of data and web-application development with Python
An overview of data and web-application development with PythonSivaranjan Goswami
 
Cmpe202 01 Research
Cmpe202 01 ResearchCmpe202 01 Research
Cmpe202 01 Researchvladimirkorshak
 
Getting Started with Python
Getting Started with PythonGetting Started with Python
Getting Started with PythonSankhya_Analytics
 
Pentester++
Pentester++Pentester++
Pentester++CTruncer
 
Adarsh_Masekar(2GP19CS003).pptx
Adarsh_Masekar(2GP19CS003).pptxAdarsh_Masekar(2GP19CS003).pptx
Adarsh_Masekar(2GP19CS003).pptxhkabir55
 
Basic of python for data analysis
Basic of python for data analysisBasic of python for data analysis
Basic of python for data analysisPramod Toraskar
 
Python_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdfPython_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdfVisionAcademyProfSac
 
Seminar report on python 3 course
Seminar report on python 3 courseSeminar report on python 3 course
Seminar report on python 3 courseHimanshuPanwar38
 
Python_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdfPython_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdfbhagyashri686896
 

Similar to An Overview of Python for Science (20)

A Whirlwind Tour Of Python
A Whirlwind Tour Of PythonA Whirlwind Tour Of Python
A Whirlwind Tour Of Python
 
Introduction to Python Programming Language For Artificial Intelligence
Introduction to Python Programming Language For Artificial IntelligenceIntroduction to Python Programming Language For Artificial Intelligence
Introduction to Python Programming Language For Artificial Intelligence
 
Introduction of python programming
Introduction of python programmingIntroduction of python programming
Introduction of python programming
 
Python_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxPython_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptx
 
Python for Data Science: A Comprehensive Guide
Python for Data Science: A Comprehensive GuidePython for Data Science: A Comprehensive Guide
Python for Data Science: A Comprehensive Guide
 
Python
Python Python
Python
 
Use open source software to develop ideas at work
Use open source software to develop ideas at workUse open source software to develop ideas at work
Use open source software to develop ideas at work
 
Python libraries
Python librariesPython libraries
Python libraries
 
Why learn python in 2017?
Why learn python in 2017?Why learn python in 2017?
Why learn python in 2017?
 
Anaconda Python KNIME & Orange Installation
Anaconda Python KNIME & Orange InstallationAnaconda Python KNIME & Orange Installation
Anaconda Python KNIME & Orange Installation
 
An overview of data and web-application development with Python
An overview of data and web-application development with PythonAn overview of data and web-application development with Python
An overview of data and web-application development with Python
 
Cmpe202 01 Research
Cmpe202 01 ResearchCmpe202 01 Research
Cmpe202 01 Research
 
Getting Started with Python
Getting Started with PythonGetting Started with Python
Getting Started with Python
 
Pentester++
Pentester++Pentester++
Pentester++
 
Adarsh_Masekar(2GP19CS003).pptx
Adarsh_Masekar(2GP19CS003).pptxAdarsh_Masekar(2GP19CS003).pptx
Adarsh_Masekar(2GP19CS003).pptx
 
Basic of python for data analysis
Basic of python for data analysisBasic of python for data analysis
Basic of python for data analysis
 
Python_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdfPython_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdf
 
Session 2
Session 2Session 2
Session 2
 
Seminar report on python 3 course
Seminar report on python 3 courseSeminar report on python 3 course
Seminar report on python 3 course
 
Python_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdfPython_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdf
 

Recently uploaded

Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 GenuineCall Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuinethapagita
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024innovationoecd
 
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...D. B. S. College Kanpur
 
User Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather StationUser Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather StationColumbia Weather Systems
 
FREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by naFREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by naJASISJULIANOELYNV
 
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxmalonesandreagweneth
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trssuser06f238
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxpriyankatabhane
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfSELF-EXPLANATORY
 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPirithiRaju
 
User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)Columbia Weather Systems
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024AyushiRastogi48
 
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRlizamodels9
 
Four Spheres of the Earth Presentation.ppt
Four Spheres of the Earth Presentation.pptFour Spheres of the Earth Presentation.ppt
Four Spheres of the Earth Presentation.pptJoemSTuliba
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Functional group interconversions(oxidation reduction)
Functional group interconversions(oxidation reduction)Functional group interconversions(oxidation reduction)
Functional group interconversions(oxidation reduction)itwameryclare
 
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxGenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxBerniceCayabyab1
 
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxSTOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxMurugaveni B
 
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)Columbia Weather Systems
 
Pests of Blackgram, greengram, cowpea_Dr.UPR.pdf
Pests of Blackgram, greengram, cowpea_Dr.UPR.pdfPests of Blackgram, greengram, cowpea_Dr.UPR.pdf
Pests of Blackgram, greengram, cowpea_Dr.UPR.pdfPirithiRaju
 

Recently uploaded (20)

Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 GenuineCall Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024
 
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
 
User Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather StationUser Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather Station
 
FREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by naFREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by na
 
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 tr
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
 
User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024
 
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
 
Four Spheres of the Earth Presentation.ppt
Four Spheres of the Earth Presentation.pptFour Spheres of the Earth Presentation.ppt
Four Spheres of the Earth Presentation.ppt
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
 
Functional group interconversions(oxidation reduction)
Functional group interconversions(oxidation reduction)Functional group interconversions(oxidation reduction)
Functional group interconversions(oxidation reduction)
 
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxGenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
 
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxSTOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
 
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
 
Pests of Blackgram, greengram, cowpea_Dr.UPR.pdf
Pests of Blackgram, greengram, cowpea_Dr.UPR.pdfPests of Blackgram, greengram, cowpea_Dr.UPR.pdf
Pests of Blackgram, greengram, cowpea_Dr.UPR.pdf
 

An Overview of Python for Science

  • 1. What is Python? An overview of Python for science Nicholas Pringle
  • 2. What is Python? Python1 is a â—Ź general purpose2, â—Ź high-level3, â—Ź free and open-source4, â—Ź readable and intuitive programming language which provides strong guidelines. It has been called the glue5, but is now becoming the swiss army knife, of scientific programming.
  • 3. Why should we use it? It integrates well with other languages like R6, MATLAB7, C8 or FORTRAN9. ¹³² It has a large community of users. It has mature and well documented scientific packages...
  • 4. The scientific packages The most important packages are Numpy, SciPy and Matplotlib. Together these libraries allow one to use Python in a manner similar to MATLAB. They can be used with an IDE like Spyder...
  • 5. Spyder Explore the variables here... 2 I can write my code here… (syntax errors are shown) 1 And investigate my data in an interactive terminal here… This includes plotting inline 3
  • 6. Numpy Support for large multidimensional arrays and matrices10 Together with Scipy and Matplotlib attempt to provide MATLAB functionality. Or at least thats how it started...
  • 7. Scipy Builds on Numpy and provides: â—Ź Signal processing â—Ź Linear algebra routines â—Ź Statistics â—Ź Optimization â—Ź Interpolation â—Ź and more...
  • 8. Matplotlib... Has many plotting options and additional libraries like Basemap. [Gallery link]
  • 9. What makes it so great? The size of the community means that it is easy to find a solution to your problem. Additionaly there are many great online courses. e.g. Coursera It is easy to learn and easy to read. Your code is generally cross-platform and not sensitive to package versions. My code is too - so we can share! Which is useful for things like downloading and cleaning data within an organisation. An automated workflow can be established.
  • 10. The Python community Python users fall into 3 broad categories: â—Ź individual users o write their own scripts (statistical analysis of their data, creation of figures) â—Ź institutional users o are working on projects as a team o collaboration is very important o Need to provide products â—Ź scientific python developers o contribute to the scientific packages (from Van der plas, 2013)
  • 11. The community is diverse â—Ź Astronomy [AstroPy] â—Ź Remote Sensing [Link, Link, Link] â—Ź Oceanography [Link] â—Ź Web development [Django] â—Ź Game Development â—Ź Finance (Data Analysis) â—Ź High Performance computing [ANL]
  • 12. The community is fun You can make minesweeper animations… [Link] Or make XKCD style plots… [Link] Learn when to have your case favourably reviewed by a judge… [Link] Build a prediction engine for betting on horse races (and lose money) [Link] “Writing your own solution is a good indication that you don’t know what you’re doing...” - Nathan Taggart
  • 13. What else does Python offer â—Ź IPython Notebook11 - executable code â—Ź Pandas12 - the new R â—Ź Scikit Learn13 - Machine Learning â—Ź Numba, Blaze - lightning fast, big data â—Ź Bokeh - plotting â—Ź Wakari - Python in the cloud
  • 14. How to collaborate (lofty goals) â—Ź Use virtual environments which don’t rely on your system packages14 â—Ź Use version control to keep track of development and to share15 â—Ź Use PEP816 as a standard for readability â—Ź Try and fit your code to a MVC17 pattern â—Ź Write good test coverage18, 19
  • 15. Python Scientific Distributions Python is easiest to use in a linux or unix environment. However, there are some very good all-in-one packages available. And they are free. â—Ź Enthought Canopy [Link] â—Ź Anaconda (I recommend) [Link] â—Ź or $ pip install in a virtualenv Python2 or Python3? You can use both but try for Python3.4 Try one of them out today!
  • 16. More slides… should there be time.
  • 17. A simple example import numpy as np # imports the numpy package into the namespace from matplotlib import pyplot as plt # imports plotting from matplotlib def straight_line(m, x, c): y = m*x + c return y gradient = 2 x_coords = np.arange(-10, 11) # create 1D array from -10 to 10 y_int = -2 line = straight_line(gradient, x_coords, y_int) plt.plot(x_coords, line) plt.grid()
  • 18. What is python? Python is a general purpose, high-level programming language. General purpose: a wide variety of application domains High-level: it does the hard work for you
  • 19. What else is Python? Python is a free and open source, so this guarantees end users (individuals, organizations, companies) the freedoms to use, study, share (copy), and modify the software. Python emphasizes code readability, so it is easy to understand ones own code and that of others. Additionally there are are quite strong guidelines which means everybody is on the same page.
  • 20. Python is moving forward There are exciting packages being added at an alarming rate. Current packages are improving all the time. Continuum Analytics received $3 million in funding. There are great python conferences - EuroPy/EuroSciPy
  • 21. Model, View, Controller MVC is a software architectural pattern for implementing user interfaces. Using this pattern can provide a solid foundation for collaboration. Model â—Ź HDF5, NETCDF4, PyTables View â—Ź PyQT, Matplotlib Controller â—Ź Numpy; Scipy, Pandas, etc...
  • 22. Other resources Version control (Github) [Link] Using version control on anything you work on can save you a lot of trouble, it also makes working with other much simpler. [example] Stackexchange [Link] The stackexchange network is a group of Q&A forums where you can get help on a variety of topics.
  • 23. More Links... Some key people in the python community: â—Ź Travis Oliphant [Link] â—Ź Jake Vanderplas [Link] â—Ź Wes McKinney [Link] â—Ź Randal Olson [Link]