Guy Griffiths. General purpose interpreted programming language Widely used by scientists and programmers of all stripes Supported by many 3 rd -party.

Slides:



Advertisements
Similar presentations
SOFTWARE Chapter 5.
Advertisements

More about Ruby Maciej Mensfeld Presented by: Maciej Mensfeld More about Ruby dev.mensfeld.pl github.com/mensfeld.
MATLAB and Scilab Comparison
AT2 – Neuromodeling Tutorial Anatoly Buchin & Fleur Zeldenrust February 11 th, 2013
Python for Science Shane Grigsby. What is python? Why python? Interpreted, object oriented language Free and open source Focus is on readability Fast.
Introduction to MATLAB The language of Technical Computing.
Introduction to Matlab Workshop Matthew Johnson, Economics October 17, /13/20151.
Network Design and Optimization Python Introduction
XP 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial 10.
Script Languages in Science CCOM Student Seminar Series Kurt Schwehr 12-Nov-2008.
Script Languages in Science CCOM Student Seminar Series Kurt Schwehr 12-Nov-2008.
Python Jordan Miller and Lauren Winkleman CS 311 Fall 2011.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
Jonathan Huelman CSC 415 – Programming Languages
By. What advantages has it? The Reasons for Choosing Python  Python is free  It is object-oriented  It is interpreted  It is operating-system independent.
How to turn on the robot How to start Bluetooth How to connect to robot How to initialize the robot How to not break the robot Sec Getting Started.
(Edit via Slide Master) Name – Job Title From R to Python Robert Mastrodomenico Global Sports Statistics.
What is R By: Wase Siddiqui. Introduction R is a programming language which is used for statistical computing and graphics. “R is a language and environment.
Python Mini-Course University of Oklahoma Department of Psychology Day 1 – Lesson 1 Getting Started 4/5/09 Python Mini-Course: Day 1 - Lesson 1 1.
Python: An Introduction
Introduction to Python By Neil Cook Twitter: njcuk Slides/Notes:
HTML, MATLAB & Delphi Aleksey Charapko 11/3/13. HTML Markup Language  Created at CERN for scientific purposes  No executable code  Controls the “look”
Introduction to Programming Peggy Batchelor.
Scientific Computing Beyond Matlab Nov 19, 2012 Jason Su.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
Python From the book “Think Python”
Ch 1. A Python Q&A Session Spring Why do people use Python? Software quality Developer productivity Program portability Support libraries Component.
Software – Applications software and programming languages.
Hands-on Introduction to R. We live in oceans of data. Computers are essential to record and help analyse it. Competent scientists speak C/C++, Java,
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
Python – May 11 Briefing Course overview Introduction to the language Lab.
Introduction Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
Introduction Copyright © Software Carpentry This work is licensed under the Creative Commons Attribution License See
Python for: Data Science. Python  Python is an open source scripting language.  Developed by Guido Van Rossum in late 1980s  Named after Monty Python.
Mantid Manipulation and Analysis Toolkit for ISIS data.
 Programming - the process of creating computer programs.
Practical Kinetics Exercise 0: Getting Started Objectives: 1.Install Python and IPython Notebook 2.print “Hello World!”
Python & NetworkX Youn-Hee Han
Hands-on Introduction to R. We live in oceans of data. Computers are essential to record and help analyse it. Competent scientists speak C/C++, Java,
XP Tutorial 10New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties.
BlueJ X ICSE Syllabus. Board Pattern THEORY (100 marks) PRACTICAL (100 marks) PROJECT (50 marks) ASSIGNMENTS (50 marks)
1 Programming and problem solving in C, Maxima, and Excel.
Presented By P.SRIVIDYA 085D1A0552 Programming Language.
Python – It's great By J J M Kilner. Introduction to Python.
PYTHON PROGRAMMING LANGUAGE.
MET4750 Techniques for Earth System Modeling MET 5990 Techniques for Earth System Modeling and Research (
Python Scripting for Computational Science CPS 5401 Fall 2014 Shirley Moore, Instructor October 6,
Scientific Computing and Linux CHUGALUG Meeting Lachele Foley.
How to Get Started With Python
Python Data Analytics & Visualization
Python for data analysis Prakhar Amlathe Utah State University
Development Environment
CST 1101 Problem Solving Using Computers
R Brown-Bag Seminar 2.1 Topic: Introduction to R Presenter: Faith Musili ICRAF-Geoscience Lab.
MET4750 Techniques for Earth System Modeling
CSC391/691 Intro to OpenCV Dr. Rongzhong Li Fall 2016
PYTHON: AN INTRODUCTION
A451 Theory – 7 Programming 7A, B - Algorithms.
Week 1 Gates Introduction to Information Technology cosc 010 Week 1 Gates
Prepared by Kimberly Sayre and Jinbo Bi
Data Analysis using Python-I
TRANSLATORS AND IDEs Key Revision Points.
Introduction to Python programming
Brief Intro to Python for Statistics
Introduction to Python
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Introduction to Python
Presentation transcript:

Guy Griffiths

General purpose interpreted programming language Widely used by scientists and programmers of all stripes Supported by many 3 rd -party libraries (currently 21,054 on the main python package website) Free!

Numpy Numerical library for python Written in C, wrapped by python Fast Scipy Built on top of numpy (i.e. Also fast!) Common maths, science, engineering routines Matplotlib Hugely flexible plotting library Similar syntax to Matlab Produces publication-quality output

An integrated graphical environment like Matlab (although there are tools which put it in one – e.g. Spyder) Specifically designed for scientists/mathematicians (but the 3 rd -party libraries for plotting/numerical work are some of the best around) High performance (but it is very easy to wrap C/Fortran libraries in Python code)

Yahoo Maps/Groups Google NASA ESRI Linux distros Met Office Me

How about several cool things that Python can do?

It can do everything Fast mathematical operations Easy file manipulation Format conversion Plotting Scripting Command line OK, not everything Write papers for you

Run programWrite to fileOpen MatlabRead in filePlot/AnalyzeClose Matlab

Run program which does plotting and analysis (and writes analysis to file) Have a break

Interactive prompt is great for experimenting iPython is a fantastic interactive environment I mostly write code in iPython interactively, then copy it out into a script when Im done print is easy and intuitive to use Yes, you should use a proper debugger, but lets face it – print statements are quicker and easier. Well, print statements in python are even quicker and easier than that.

Readable code You have to indent all of your loops, conditionals, etc. This means that your code will always be indented in a helpful way Inline documentation

3 rd -party libraries Numpy, Scipy, Matplotlib are standard libraries for scientific computing cf-python is written with meteorologists in mind There are 3 rd -party libraries for many, many things If you want to do something that isnt particularly uncommon, there will be a library to do it for you

No. But python can wrap your existing C/Fortran/R code... You can get the benefits of a high-level language whilst keeping your fast C/Fortran routines This is what Numpy does (and why Numpy is fast)...and Matlab code translates pretty easily to python.

A good language to teach Questions you wont hear if you teach python: What does Segmentation fault mean? Why do I have to click build before I run this every time? Do you know where I can download a license for this so I can use it at home? Questions you may still hear: Whats a variable? Why do we have to do this?

Lets have a look at a few python libraries in action

Firstly, get version 2.7.x. Python 3 is probably more trouble than its worth right now. Windows – Python(x,y) [ This is a scientific/engineering oriented distribution of python. It includes everything you need to get started Linux – its already there! Unless youre running a very unusual distro (in which case you probably already know what youre doing). Mac – its already there on OS X, but its old. Get a more up-to-date one [

The official python tutorial: Software Carpentry: Dive into Python: Learn Python the Hard Way: A Byte of Python:

Python Essential Reference David M. Beazley (Addison Wesley) Programming in Python 3: A Complete Introduction to the Python Language Mark Summerfield (Addison Wesley) Learning Python Mark Lutz (OReilly Media)