SlideShare uma empresa Scribd logo
1 de 81
FBW
29-09-2015
Wim Van Criekinge
Bioinformatics.be
Overview
What is Python ?
Why Python 4 Bioinformatics ?
How to Python
IDE: Eclipse & PyDev / Athena
Code Sharing: Git(hub)
Examples
Hello World
PIthon
Overview
What is Python ?
Why Python 4 Bioinformatics ?
How to Python
IDE: Eclipse & PyDev / Athena
Code Sharing: Git(hub)
Examples
Hello World
PIthon
What is Python ?
• Python is an interpreted, object-oriented, high-level
programming language with dynamic semantics.
• Its high-level built in data structures, combined with dynamic
typing and dynamic binding, make it very attractive for Rapid
Application Development, as well as for use as a scripting or
glue language to connect existing components together.
• Python supports modules and packages, which encourages
program modularity and code reuse. The Python interpreter
and the extensive standard library are available in source or
binary form without charge for all major platforms, and can be
freely distributed.
• When he began implementing Python, Guido van Rossum
was also reading the published scripts from “Monty Python's
Flying Circus”, a BBC comedy series from the 1970s. Van
Rossum thought he needed a name that was short, unique,
and slightly mysterious, so he decided to call the language
Python.
Programming Language
• Formal notation for specifying computations
– Syntax (usually specified by a context-free
grammar)
– Semantics for each syntactic construct
– Practical implementation on a real or virtual
machine
• Compilation vs. interpretation
• Efficiency vs. portability
• Assembly Languages
– Invented by machine designers
the early 1950s
– Reusable macros and subroutines
FORTRAN
• Procedural, imperative language
– Still used in scientific computation
• Developed at IBM in the 1950s by
John Backus (1924-2007)
– Backus’s 1977 Turing award lecture made the
case for functional programming
– On FORTRAN: “We did not know what we
wanted and how to do it. It just sort of grew. The
first struggle was over what the language would
look like. Then how to parse expressions – it was
a big problem…”
• BNF: Backus-Naur form for defining context-free
grammars
LISP
• Invented by John McCarthy (b. 1927, Turing award:
1971)
• Formal notation for lambda-calculus
• Pioneered many PL concepts
– Automated memory management (garbage collection)
– Dynamic typing
– No distinction between code and data
• Still in use: ACL2, Scheme, …
“Anyone could learn Lisp in one day,
except that if they already knew FORTRAN, it would take
three days”
- Marvin Minsky
PASCAL
• Designed by Niklaus Wirth
– 1984 Turing Award
• Revised type system of Algol
– Good data structure concepts
• Records, variants, subranges
– More restrictive than Algol 60/68
• Procedure parameters cannot have procedure
parameters
• Popular teaching language
• Simple one-pass compiler
C
• Bell Labs 1972 (Dennis Ritchie)
• Development closely related to UNIX
– 1983 Turing Award to Thompson and Ritchie
• Compiles to native code
• 1973-1980: new features; compiler ported
– unsigned, long, union, enums
• 1978: K&R C book published
• 1989: ANSI C standardization
– Function prototypes as in C++
• 1999: ISO 9899:1999 also known as “C99”
– Inline functions, C++-like decls, bools, variable arrays
• Concurrent C, Objective C, C*, C++, C#
• “Portable assembly language”
– Early C++, Modula-3, Eiffel source-translated to C
JAVA
• Sun 1991-1995 (James Gosling)
– Originally called Oak, intended for set top boxes
• Mixture of C and Modula-3
– Unlike C++
• No templates (generics), no multiple inheritance, no
operator overloading
– Like Modula-3 (developed at DEC SRC)
• Explicit interfaces, single inheritance, exception
handling, built-in threading model, references &
automatic garbage collection (no explicit pointers!)
• “Generics” added later
Other Important Languages
• Algol-like
– Modula, Oberon, Ada
• Functional
– ISWIM, FP, SASL, Miranda, Haskell, LCF,
ML, Caml, Ocaml, Scheme, Common LISP
• Object-oriented
– Smalltalk, Objective-C, Eiffel, Modula-3,
Self, C#, CLOS
• Logic programming
– Prolog, Gödel, LDL, ACL2, Isabelle, HOL
… and more
• Data processing and databases
– Cobol, SQL, 4GLs, XQuery
• Systems programming
– PL/I, PL/M, BLISS
• Specialized applications
– APL, Forth, Icon, Logo, SNOBOL4,
GPSS, Visual Basic
• Concurrent, parallel, distributed
– Concurrent Pascal, Concurrent C, C*,
SR, Occam, Erlang, Obliq
… and more
• Programming tool “mini-languages”
– awk, make, lex, yacc, autoconf …
• Command shells, scripting and “web”
languages
– sh, csh, tcsh, ksh, zsh, bash …
– Perl, JavaScript, PHP, Python, Rexx, Ruby, Tcl,
AppleScript, VBScript …
• Web application frameworks and technologies
– ASP.NET, AJAX, Flash, Silverlight …
• Note: HTML/XML are markup languages, not
programming languages, but they often embed
executable scripts like Active Server Pages (ASPs) &
Java Server Pages (JSPs)
What is scripting ?
• Wikipedia has an informative and detailed explanation, “A
scripting language, script language or extension language
is a programming language that allows control of one or more
software applications. "Scripts" are distinct from the core
code of the application, as they are usually written in a
different language and are often created or at least modified
by the end-user.[1] Scripts are often interpreted from source
code or bytecode, whereas the applications they control are
traditionally compiled to native machine code. Scripting
languages are nearly always embedded in the applications
they control.[2]
• The name "script" is derived from the written script of the
performing arts, in which dialogue is set down to be spoken
by human actors. Early script languages were often called
batch languages or job control languages. Such early
scripting languages were created to shorten the traditional
edit-compile-link-run process”.
What’s Driving Their Evolution?
• Constant search for better ways to build software
tools for solving computational problems
– Many PLs are general purpose tools
– Others are targeted at specific kinds of problems
• For example, massively parallel computations or
graphics
• Useful ideas evolve into language designs
– Algol  Simula  Smalltalk  C with Classes 
C++
• Often design is driven by expediency
– Scripting languages: Perl, Tcl, Python, PHP, etc.
• “PHP is a minor evil perpetrated by incompetent
amateurs, whereas Perl is a great and insidious evil,
perpetrated by skilled but perverted professionals.” -
Jon Ribbens
What Do They Have in Common?
• Lexical structure and analysis
– Tokens: keywords, operators, symbols, variables
– Regular expressions and finite automata
• Syntactic structure and analysis
– Parsing, context-free grammars
• Pragmatic issues
– Scoping, block structure, local variables
– Procedures, parameter passing, iteration,
recursion
– Type checking, data structures
• Semantics
– What do programs mean and are they correct
Visual history of programming languages
http://cdn.oreillystatic.com/news/graphics/prog_lang_poster.pdf
The most valuable programming skills to have on a resume
Overview
What is Python ?
Why Python 4 Bioinformatics ?
How to Python
IDE: Eclipse & PyDev / Athena
Code Sharing: Git(hub)
Examples
Hello World
PIthon
Python
• Programming languages are overrated
– If you are going into bioinformatics you probably
learn/need multiple
– If you know one you know 90% of a second
• Choice does matter but it matters far less than people think it
does
• Why Python?
– Lets you start useful programs asap
– Build-in libraries – incl BioPython
– Free, most platforms, widely (scientifically) used
• Versus Perl?
– Incredibly similar
– Consistent syntax, indentation
http://www.python.org
Should I use Python 2 or Python 3 for my development activity?
• Short version: Python 2.x is legacy, Python 3.x is the present and future of the language
• Python 3.0 was released in 2008. The final 2.x version 2.7 release came out in mid-
2010, with a statement of extended support for this end-of-life release. The 2.x branch
will see no new major releases after that. 3.x is under active development and has
already seen over five years of stable releases, including version 3.3 in 2012 and 3.4 in
2014. This means that all recent standard library improvements, for example, are only
available by default in Python 3.x.
• Guido van Rossum (the original creator of the Python language) decided to clean up
Python 2.x properly, with less regard for backwards compatibility than is the case for
new releases in the 2.x range. The most drastic improvement is the better Unicode
support (with all text strings being Unicode by default) as well as saner bytes/Unicode
separation.
• Besides, several aspects of the core language (such as print and exec being statements,
integers using floor division) have been adjusted to be easier for newcomers to learn and
to be more consistent with the rest of the language, and old cruft has been removed (for
example, all classes are now new-style, "range()" returns a memory efficient iterable,
not a list as in 2.x).
• The What's New in Python 3.0 document provides a good overview of the major
language changes and likely sources of incompatibility with existing Python 2.x code.
Nick Coghlan (one of the CPython core developers) has also created a relatively
extensive FAQ regarding the transition.
• However, the broader Python ecosystem has amassed a significant amount of quality
software over the years. The downside of breaking backwards compatibility in 3.x is that
some of that software (especially in-house software in companies) still doesn't work on
3.x yet.
How to install ?
• On windows you’ll need administrator
right 
• Portable python distribution ?
Takes 500Mb and >2 hours 
Version 2.7 and 3.4 on http://athena.ugent.be
Interactive “Shell”
• Great for learning the language
• Great for experimenting with the library
• Great for testing your own modules
• Two variations: IDLE (GUI),
python (command line)
• Type statements or expressions at prompt:
>>> print "Hello, world"
Hello, world
>>> x = 12**2
>>> x/2
72
>>> # this is a comment
Overview
What is Python ?
Why Python 4 Bioinformatics ?
How to Python
IDE: Eclipse & PyDev / Athena
Code Sharing: Git(hub)
Examples
Hello World
PIthon
IDE: Integrated Development Environment
• You type scripts using can use
notepad(++)
• Better: PyCharm
– available for free on most OS but you
need to be administrator to install 
• We will use Eclipse in combination
with PyDev
What is Eclipse?
• Eclipse started as a proprietary IBM product
(IBM Visual age for Smalltalk/Java)
– Embracing the open source model IBM opened the
product up
• Open Source
– It is a general purpose open platform that facilitates
and encourages the development of third party plug-
ins
• Best known as an Integrated Development
Environment (IDE)
– Provides tools for coding, building, running and
debugging applications
• Originally designed for Java, now supports
many other languages
– Good support for C, C++
– Python, PHP, Ruby, etc…
Prerequisites for Running Eclipse
• Eclipse is written in Java and will
thus need an installed JRE or JDK
in which to execute
– JDK recommended
Selecting a Workspace
• In Eclipse, all of your code will live under a
workspace
• A workspace is nothing more than a location
where we will store our source code and
where Eclipse will write out our preferences
• Eclipse allows you to have multiple
workspaces – each tailored in its own way
• Choose a location where you want to store
your files, then click OK
Eclipse IDE Components
Menubars
Full drop down menus plus quick
access to common functions
Editor Pane
This is where we edit
our source code
Perspective Switcher
We can switch between
various perspectives
here
Outline Pane
This contains a hierarchical
view of a source file
Package Explorer Pane
This is where our
projects/files are listed
Miscellaneous Pane
Various components can appear in this
pane – typically this contains a console
and a list of compiler problems
Task List Pane
This contains a list of
“tasks” to complete
PYTHON
PyDev: Python plug-in for Eclipse
• Syntax highlighting
• Debugger
• Code completion
• An extensive preference menu
that can be used to edit the
plug-in’s attributes and options.
Installation
 The plug-in can be installed through
Software Updates:
Setting Up
In Eclipse, go to:
Window, Preferences, PyDev,
Interpreter-Python,
and click New.
Select the python.exe
file in the Python
directory, click OK and
OK in the Preferences
window again. Wait for
the creating procedure
to finish.
Create Python Project and File
Click on File, New, choose File,
click on Python project folder,
write the file name ending in a
.py, and click Finish.
Go to File, New, Project, select
Pydev,Python Project, click Next,
write name, choose Python version,
and click Finish.
Running Python
To run Python code click on Run, Run As, and
select Python Run.
Lets try for “Hello World!” from athena.ugent.be
Where is the workspace ?
Make PyDev Project
Which Python interpreter is used … check Preferences or run version.py
Create new file …
… Hello_world.py
Run Hello_world.py
Overview
What is Python ?
Why Python 4 Bioinformatics ?
How to Python
IDE: Eclipse & PyDev / Athena
Code Sharing: Git(hub)
Examples
Hello World
PIthon
git is an open source,
distributed version control
system designed for speed
and efficiency
Git: A distributed version control system
• Version control (or revision control, or source
control) is all about managing multiple versions of
documents, programs, web sites, etc.
– Almost all “real” projects use some kind of version
control
– Essential for team projects, but also very useful for
individual projects
• Some well-known version control systems are
CVS, Subversion, Mercurial, and Git
– CVS and Subversion use a “central” repository; users
“check out” files, work on them, and “check them in”
– Mercurial and Git treat all repositories as equal
• Distributed systems like Mercurial and Git are
newer and are gradually replacing centralized
systems like CVS and Subversion
Why version control?
• For working by yourself:
– Gives you a “time machine” for going back to
earlier versions
– Gives you great support for different versions
(standalone, web app, etc.) of the same basic
project
• For working with others:
– Greatly simplifies concurrent work, merging
changes
• For getting an internship or job:
– Any company with a clue uses some kind of
version control
– Companies without a clue are bad places to work
Why Git?
• Git has many advantages over earlier
systems such as CVS and Subversion
– More efficient, better workflow, etc.
– See the literature for an extensive list of reasons
– Of course, there are always those who disagree
• It works from with Eclipse, also when
started from athena 
No Network needed for
(almost) everything is local
• Performing a diff
• Viewing file history
• Committing changes
• Merging branches
• Obtaining any other
revision of a file
• Switching branches
GitHub: Hosted GIT
• Largest open source git hosting site
• Public and private options
• User-centric rather than project-centric
• http://github.ugent.be (use your Ugent
login and password)
– Accept invitation from Bioinformatics-I-
2015
URI:
– https://github.ugent.be/Bioinformatics-I-
2015/Python.git
GitHub: Hosted GIT
GitHub: Hosted GIT
GitHub: Hosted GIT
Typical workflow
Person A
 Setup project &
repo
 push code onto
github
 edit/commit
 edit/commit
 pull/push
Person B
•clone code from
github
•edit/commit/push
•edit…
•edit… commit
•pull/push
This is just the flow, specific commands on following slides.
It’s also possible to create your project first on github, then clone (i.e., no git init)
GitHub: Hosted GIT
GitHub: Hosted GIT
GitHub: Hosted GIT
GitHub: Hosted GIT
GitHub: Hosted GIT
URI (Uniform Resource Identifier):
https://github.ugent.be/Bioinformatics-I-2015/Python.git
GitHub: Hosted GIT
GitHub: Hosted GIT
GitHub: Hosted GIT
GitHub: Hosted GIT
GitHub: Hosted GIT
Overview
What is Python ?
Why Python 4 Bioinformatics ?
How to Python
IDE: Eclipse & PyDev / Athena
Code Sharing: Git(hub)
Examples
Hello_World.py
PI-thon.py
Hello_world.py
Overview
What is Python ?
Why Python 4 Bioinformatics ?
How to Python
IDE: Eclipse & PyDev / Athena
Code Sharing: Git(hub)
Examples
Hello_World.py
PI-thon.py
Variables
• No need to declare
• Need to assign (initialize)
• use of uninitialized variable raises exception
• Not typed
if friendly: greeting = "hello world"
else: greeting = 12**2
print greeting
• Everything is a "variable":
• Even functions, classes, modules
Numbers
• The usual suspects
• 12, 3.14, 0xFF, 0377, (-1+2)*3/4**5, abs(x), 0<x<=5
• C-style shifting & masking
• 1<<16, x&0xff, x|1, ~x, x^y
• Integer division truncates :-(
• 1/2 -> 0 # 1./2. -> 0.5, float(1)/2 -> 0.5
• Will be fixed in the future
• Long (arbitrary precision), complex
• 2L**100 -> 1267650600228229401496703205376L
– In Python 2.2 and beyond, 2**100 does the same thing
• 1j**2 -> (-1+0j)
Control Structures
if condition:
statements
[elif condition:
statements] ...
else:
statements
while condition:
statements
for var in sequence:
statements
break
continue
Example Function
def gcd(a, b):
"greatest common divisor"
while a != 0:
a, b = b%a, a # parallel assignment
return b
>>> gcd.__doc__
'greatest common divisor'
>>> gcd(12, 20)
4
How to generate random numbers
The standard random module implements a random number
generator.
import random
print (random.random())
This prints a random floating point number in the range [0, 1) (that is,
between 0 and 1, including 0.0 but always smaller than 1.0).
There are also many other specialized generators in this module,
such as:
randrange(a, b) chooses an integer in the range [a, b).
uniform(a, b) chooses a floating point number in the range [a, b).
normalvariate(mean, sdev) samples the normal (Gaussian)
distribution.
Some higher-level functions operate on sequences directly, such as:
choice(S) chooses a random element from a given sequence (the
sequence must have a known length).
shuffle(L) shuffles a list in-place, i.e. permutes it randomly
There’s also a Random class you can instantiate to create
independent multiple random number generators.
First program: PI-thon.py
• How good are the random numbers ?
• If they are good, you should be able to
“measure” PI
Measure Pi with two random numbers …. many of them …
1
x
y
Python Videos
http://python.org/
- documentation, tutorials, beginners guide, core
distribution, ...
Books include:
 Learning Python by Mark Lutz
 Python Essential Reference by David Beazley
 Python Cookbook, ed. by Martelli, Ravenscroft and
Ascher

Mais conteúdo relacionado

Mais procurados

PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEWPYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEWEditorIJAERD
 
A hands-on introduction to the ELF Object file format
A hands-on introduction to the ELF Object file formatA hands-on introduction to the ELF Object file format
A hands-on introduction to the ELF Object file formatrety61
 
2016 bioinformatics i_python_part_1_wim_vancriekinge
2016 bioinformatics i_python_part_1_wim_vancriekinge2016 bioinformatics i_python_part_1_wim_vancriekinge
2016 bioinformatics i_python_part_1_wim_vancriekingeProf. Wim Van Criekinge
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming LanguageLaxman Puri
 
Avro - More Than Just a Serialization Framework - CHUG - 20120416
Avro - More Than Just a Serialization Framework - CHUG - 20120416Avro - More Than Just a Serialization Framework - CHUG - 20120416
Avro - More Than Just a Serialization Framework - CHUG - 20120416Chicago Hadoop Users Group
 
FISL XIV - The ELF File Format and the Linux Loader
FISL XIV - The ELF File Format and the Linux LoaderFISL XIV - The ELF File Format and the Linux Loader
FISL XIV - The ELF File Format and the Linux LoaderJohn Tortugo
 
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
 
Overview of python 2019
Overview of python 2019Overview of python 2019
Overview of python 2019Samir Mohanty
 
Program Structure in GNU/Linux (ELF Format)
Program Structure in GNU/Linux (ELF Format)Program Structure in GNU/Linux (ELF Format)
Program Structure in GNU/Linux (ELF Format)Varun Mahajan
 
Web Programming UNIT VIII notes
Web Programming UNIT VIII notesWeb Programming UNIT VIII notes
Web Programming UNIT VIII notesBhavsingh Maloth
 
R Programming: Introduction To R Packages
R Programming: Introduction To R PackagesR Programming: Introduction To R Packages
R Programming: Introduction To R PackagesRsquared Academy
 
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...Edureka!
 

Mais procurados (19)

Python - the basics
Python - the basicsPython - the basics
Python - the basics
 
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEWPYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
 
A hands-on introduction to the ELF Object file format
A hands-on introduction to the ELF Object file formatA hands-on introduction to the ELF Object file format
A hands-on introduction to the ELF Object file format
 
Python Tutorial Part 2
Python Tutorial Part 2Python Tutorial Part 2
Python Tutorial Part 2
 
2016 bioinformatics i_python_part_1_wim_vancriekinge
2016 bioinformatics i_python_part_1_wim_vancriekinge2016 bioinformatics i_python_part_1_wim_vancriekinge
2016 bioinformatics i_python_part_1_wim_vancriekinge
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming Language
 
Python final ppt
Python final pptPython final ppt
Python final ppt
 
Avro - More Than Just a Serialization Framework - CHUG - 20120416
Avro - More Than Just a Serialization Framework - CHUG - 20120416Avro - More Than Just a Serialization Framework - CHUG - 20120416
Avro - More Than Just a Serialization Framework - CHUG - 20120416
 
FISL XIV - The ELF File Format and the Linux Loader
FISL XIV - The ELF File Format and the Linux LoaderFISL XIV - The ELF File Format and the Linux Loader
FISL XIV - The ELF File Format and the Linux Loader
 
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...
 
Overview of python 2019
Overview of python 2019Overview of python 2019
Overview of python 2019
 
Compilation
CompilationCompilation
Compilation
 
Program Structure in GNU/Linux (ELF Format)
Program Structure in GNU/Linux (ELF Format)Program Structure in GNU/Linux (ELF Format)
Program Structure in GNU/Linux (ELF Format)
 
Crosslingual search-engine
Crosslingual search-engineCrosslingual search-engine
Crosslingual search-engine
 
Web Programming UNIT VIII notes
Web Programming UNIT VIII notesWeb Programming UNIT VIII notes
Web Programming UNIT VIII notes
 
R Programming: Introduction To R Packages
R Programming: Introduction To R PackagesR Programming: Introduction To R Packages
R Programming: Introduction To R Packages
 
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
 
Bioinformatica p1-perl-introduction
Bioinformatica p1-perl-introductionBioinformatica p1-perl-introduction
Bioinformatica p1-perl-introduction
 
Python ppt
Python pptPython ppt
Python ppt
 

Destaque

Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Railsmithunsasidharan
 
Intro to java programming
Intro to java programmingIntro to java programming
Intro to java programmingEugene Stephens
 
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.
 
What is Python? An overview of Python for science.
What is Python? An overview of Python for science.What is Python? An overview of Python for science.
What is Python? An overview of Python for science.Nicholas Pringle
 
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
 

Destaque (12)

Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
 
Intro to java programming
Intro to java programmingIntro to java programming
Intro to java programming
 
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
 
What is Python? An overview of Python for science.
What is Python? An overview of Python for science.What is Python? An overview of Python for science.
What is Python? An overview of Python for science.
 
A brief overview of java frameworks
A brief overview of java frameworksA brief overview of java frameworks
A brief overview of java frameworks
 
Overview of c++
Overview of c++Overview of c++
Overview of c++
 
C++ Overview PPT
C++ Overview PPTC++ Overview PPT
C++ Overview PPT
 
Ruby Rails Overview
Ruby Rails OverviewRuby Rails Overview
Ruby Rails Overview
 
Python overview
Python   overviewPython   overview
Python overview
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 

Semelhante a 2015 bioinformatics python_introduction_wim_vancriekinge_vfinal

Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonNikhil Kapoor
 
Python programming
Python programmingPython programming
Python programmingMegha V
 
Python Programming Unit1_Aditya College of Engg & Tech
Python Programming Unit1_Aditya College of Engg & TechPython Programming Unit1_Aditya College of Engg & Tech
Python Programming Unit1_Aditya College of Engg & TechRamanamurthy Banda
 
Python.pptx
Python.pptxPython.pptx
Python.pptxabclara
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1Kanchilug
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python ProgrammingAkhil Kaushik
 
PYTHON IN DETAIL INFORMATION EDUCATIONAL
PYTHON IN DETAIL INFORMATION EDUCATIONALPYTHON IN DETAIL INFORMATION EDUCATIONAL
PYTHON IN DETAIL INFORMATION EDUCATIONALauramarketings
 
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdfDr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdfRahulSingh190790
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonMohammed Rafi
 
Are High Level Programming Languages for Multicore and Safety Critical Conver...
Are High Level Programming Languages for Multicore and Safety Critical Conver...Are High Level Programming Languages for Multicore and Safety Critical Conver...
Are High Level Programming Languages for Multicore and Safety Critical Conver...InfinIT - Innovationsnetværket for it
 
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
 
An Introduction To Python - Python, Print()
An Introduction To Python - Python, Print()An Introduction To Python - Python, Print()
An Introduction To Python - Python, Print()Blue Elephant Consulting
 

Semelhante a 2015 bioinformatics python_introduction_wim_vancriekinge_vfinal (20)

P1 2018 python
P1 2018 pythonP1 2018 python
P1 2018 python
 
P1 2017 python
P1 2017 pythonP1 2017 python
P1 2017 python
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Plc part 1
Plc part 1Plc part 1
Plc part 1
 
Python programming
Python programmingPython programming
Python programming
 
What is python
What is pythonWhat is python
What is python
 
Python Programming Unit1_Aditya College of Engg & Tech
Python Programming Unit1_Aditya College of Engg & TechPython Programming Unit1_Aditya College of Engg & Tech
Python Programming Unit1_Aditya College of Engg & Tech
 
Python.pptx
Python.pptxPython.pptx
Python.pptx
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python Programming
 
MODULE 1.pptx
MODULE 1.pptxMODULE 1.pptx
MODULE 1.pptx
 
PYTHON IN DETAIL INFORMATION EDUCATIONAL
PYTHON IN DETAIL INFORMATION EDUCATIONALPYTHON IN DETAIL INFORMATION EDUCATIONAL
PYTHON IN DETAIL INFORMATION EDUCATIONAL
 
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdfDr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python PPT 50.pptx
Python PPT 50.pptxPython PPT 50.pptx
Python PPT 50.pptx
 
Evolution of Programming Languages.pdf
Evolution of Programming Languages.pdfEvolution of Programming Languages.pdf
Evolution of Programming Languages.pdf
 
Evolution of Programming Languages.pdf
Evolution of Programming Languages.pdfEvolution of Programming Languages.pdf
Evolution of Programming Languages.pdf
 
Are High Level Programming Languages for Multicore and Safety Critical Conver...
Are High Level Programming Languages for Multicore and Safety Critical Conver...Are High Level Programming Languages for Multicore and Safety Critical Conver...
Are High Level Programming Languages for Multicore and Safety Critical Conver...
 
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
 
An Introduction To Python - Python, Print()
An Introduction To Python - Python, Print()An Introduction To Python - Python, Print()
An Introduction To Python - Python, Print()
 

Mais de Prof. Wim Van Criekinge

2019 03 05_biological_databases_part5_v_upload
2019 03 05_biological_databases_part5_v_upload2019 03 05_biological_databases_part5_v_upload
2019 03 05_biological_databases_part5_v_uploadProf. Wim Van Criekinge
 
2019 03 05_biological_databases_part4_v_upload
2019 03 05_biological_databases_part4_v_upload2019 03 05_biological_databases_part4_v_upload
2019 03 05_biological_databases_part4_v_uploadProf. Wim Van Criekinge
 
2019 03 05_biological_databases_part3_v_upload
2019 03 05_biological_databases_part3_v_upload2019 03 05_biological_databases_part3_v_upload
2019 03 05_biological_databases_part3_v_uploadProf. Wim Van Criekinge
 
2019 02 21_biological_databases_part2_v_upload
2019 02 21_biological_databases_part2_v_upload2019 02 21_biological_databases_part2_v_upload
2019 02 21_biological_databases_part2_v_uploadProf. Wim Van Criekinge
 
2019 02 12_biological_databases_part1_v_upload
2019 02 12_biological_databases_part1_v_upload2019 02 12_biological_databases_part1_v_upload
2019 02 12_biological_databases_part1_v_uploadProf. Wim Van Criekinge
 
Bio ontologies and semantic technologies[2]
Bio ontologies and semantic technologies[2]Bio ontologies and semantic technologies[2]
Bio ontologies and semantic technologies[2]Prof. Wim Van Criekinge
 
2018 03 27_biological_databases_part4_v_upload
2018 03 27_biological_databases_part4_v_upload2018 03 27_biological_databases_part4_v_upload
2018 03 27_biological_databases_part4_v_uploadProf. Wim Van Criekinge
 
2018 02 20_biological_databases_part2_v_upload
2018 02 20_biological_databases_part2_v_upload2018 02 20_biological_databases_part2_v_upload
2018 02 20_biological_databases_part2_v_uploadProf. Wim Van Criekinge
 
2018 02 20_biological_databases_part1_v_upload
2018 02 20_biological_databases_part1_v_upload2018 02 20_biological_databases_part1_v_upload
2018 02 20_biological_databases_part1_v_uploadProf. Wim Van Criekinge
 

Mais de Prof. Wim Van Criekinge (20)

2020 02 11_biological_databases_part1
2020 02 11_biological_databases_part12020 02 11_biological_databases_part1
2020 02 11_biological_databases_part1
 
2019 03 05_biological_databases_part5_v_upload
2019 03 05_biological_databases_part5_v_upload2019 03 05_biological_databases_part5_v_upload
2019 03 05_biological_databases_part5_v_upload
 
2019 03 05_biological_databases_part4_v_upload
2019 03 05_biological_databases_part4_v_upload2019 03 05_biological_databases_part4_v_upload
2019 03 05_biological_databases_part4_v_upload
 
2019 03 05_biological_databases_part3_v_upload
2019 03 05_biological_databases_part3_v_upload2019 03 05_biological_databases_part3_v_upload
2019 03 05_biological_databases_part3_v_upload
 
2019 02 21_biological_databases_part2_v_upload
2019 02 21_biological_databases_part2_v_upload2019 02 21_biological_databases_part2_v_upload
2019 02 21_biological_databases_part2_v_upload
 
2019 02 12_biological_databases_part1_v_upload
2019 02 12_biological_databases_part1_v_upload2019 02 12_biological_databases_part1_v_upload
2019 02 12_biological_databases_part1_v_upload
 
P7 2018 biopython3
P7 2018 biopython3P7 2018 biopython3
P7 2018 biopython3
 
P6 2018 biopython2b
P6 2018 biopython2bP6 2018 biopython2b
P6 2018 biopython2b
 
P4 2018 io_functions
P4 2018 io_functionsP4 2018 io_functions
P4 2018 io_functions
 
P3 2018 python_regexes
P3 2018 python_regexesP3 2018 python_regexes
P3 2018 python_regexes
 
T1 2018 bioinformatics
T1 2018 bioinformaticsT1 2018 bioinformatics
T1 2018 bioinformatics
 
Bio ontologies and semantic technologies[2]
Bio ontologies and semantic technologies[2]Bio ontologies and semantic technologies[2]
Bio ontologies and semantic technologies[2]
 
2018 05 08_biological_databases_no_sql
2018 05 08_biological_databases_no_sql2018 05 08_biological_databases_no_sql
2018 05 08_biological_databases_no_sql
 
2018 03 27_biological_databases_part4_v_upload
2018 03 27_biological_databases_part4_v_upload2018 03 27_biological_databases_part4_v_upload
2018 03 27_biological_databases_part4_v_upload
 
2018 03 20_biological_databases_part3
2018 03 20_biological_databases_part32018 03 20_biological_databases_part3
2018 03 20_biological_databases_part3
 
2018 02 20_biological_databases_part2_v_upload
2018 02 20_biological_databases_part2_v_upload2018 02 20_biological_databases_part2_v_upload
2018 02 20_biological_databases_part2_v_upload
 
2018 02 20_biological_databases_part1_v_upload
2018 02 20_biological_databases_part1_v_upload2018 02 20_biological_databases_part1_v_upload
2018 02 20_biological_databases_part1_v_upload
 
P7 2017 biopython3
P7 2017 biopython3P7 2017 biopython3
P7 2017 biopython3
 
P6 2017 biopython2
P6 2017 biopython2P6 2017 biopython2
P6 2017 biopython2
 
Van criekinge 2017_11_13_rodebiotech
Van criekinge 2017_11_13_rodebiotechVan criekinge 2017_11_13_rodebiotech
Van criekinge 2017_11_13_rodebiotech
 

Último

Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 

Último (20)

Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 

2015 bioinformatics python_introduction_wim_vancriekinge_vfinal

  • 1.
  • 4. Overview What is Python ? Why Python 4 Bioinformatics ? How to Python IDE: Eclipse & PyDev / Athena Code Sharing: Git(hub) Examples Hello World PIthon
  • 5. Overview What is Python ? Why Python 4 Bioinformatics ? How to Python IDE: Eclipse & PyDev / Athena Code Sharing: Git(hub) Examples Hello World PIthon
  • 6. What is Python ? • Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. • Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. • Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed. • When he began implementing Python, Guido van Rossum was also reading the published scripts from “Monty Python's Flying Circus”, a BBC comedy series from the 1970s. Van Rossum thought he needed a name that was short, unique, and slightly mysterious, so he decided to call the language Python.
  • 7. Programming Language • Formal notation for specifying computations – Syntax (usually specified by a context-free grammar) – Semantics for each syntactic construct – Practical implementation on a real or virtual machine • Compilation vs. interpretation • Efficiency vs. portability • Assembly Languages – Invented by machine designers the early 1950s – Reusable macros and subroutines
  • 8. FORTRAN • Procedural, imperative language – Still used in scientific computation • Developed at IBM in the 1950s by John Backus (1924-2007) – Backus’s 1977 Turing award lecture made the case for functional programming – On FORTRAN: “We did not know what we wanted and how to do it. It just sort of grew. The first struggle was over what the language would look like. Then how to parse expressions – it was a big problem…” • BNF: Backus-Naur form for defining context-free grammars
  • 9. LISP • Invented by John McCarthy (b. 1927, Turing award: 1971) • Formal notation for lambda-calculus • Pioneered many PL concepts – Automated memory management (garbage collection) – Dynamic typing – No distinction between code and data • Still in use: ACL2, Scheme, … “Anyone could learn Lisp in one day, except that if they already knew FORTRAN, it would take three days” - Marvin Minsky
  • 10. PASCAL • Designed by Niklaus Wirth – 1984 Turing Award • Revised type system of Algol – Good data structure concepts • Records, variants, subranges – More restrictive than Algol 60/68 • Procedure parameters cannot have procedure parameters • Popular teaching language • Simple one-pass compiler
  • 11. C • Bell Labs 1972 (Dennis Ritchie) • Development closely related to UNIX – 1983 Turing Award to Thompson and Ritchie • Compiles to native code • 1973-1980: new features; compiler ported – unsigned, long, union, enums • 1978: K&R C book published • 1989: ANSI C standardization – Function prototypes as in C++ • 1999: ISO 9899:1999 also known as “C99” – Inline functions, C++-like decls, bools, variable arrays • Concurrent C, Objective C, C*, C++, C# • “Portable assembly language” – Early C++, Modula-3, Eiffel source-translated to C
  • 12. JAVA • Sun 1991-1995 (James Gosling) – Originally called Oak, intended for set top boxes • Mixture of C and Modula-3 – Unlike C++ • No templates (generics), no multiple inheritance, no operator overloading – Like Modula-3 (developed at DEC SRC) • Explicit interfaces, single inheritance, exception handling, built-in threading model, references & automatic garbage collection (no explicit pointers!) • “Generics” added later
  • 13. Other Important Languages • Algol-like – Modula, Oberon, Ada • Functional – ISWIM, FP, SASL, Miranda, Haskell, LCF, ML, Caml, Ocaml, Scheme, Common LISP • Object-oriented – Smalltalk, Objective-C, Eiffel, Modula-3, Self, C#, CLOS • Logic programming – Prolog, Gödel, LDL, ACL2, Isabelle, HOL
  • 14. … and more • Data processing and databases – Cobol, SQL, 4GLs, XQuery • Systems programming – PL/I, PL/M, BLISS • Specialized applications – APL, Forth, Icon, Logo, SNOBOL4, GPSS, Visual Basic • Concurrent, parallel, distributed – Concurrent Pascal, Concurrent C, C*, SR, Occam, Erlang, Obliq
  • 15. … and more • Programming tool “mini-languages” – awk, make, lex, yacc, autoconf … • Command shells, scripting and “web” languages – sh, csh, tcsh, ksh, zsh, bash … – Perl, JavaScript, PHP, Python, Rexx, Ruby, Tcl, AppleScript, VBScript … • Web application frameworks and technologies – ASP.NET, AJAX, Flash, Silverlight … • Note: HTML/XML are markup languages, not programming languages, but they often embed executable scripts like Active Server Pages (ASPs) & Java Server Pages (JSPs)
  • 16. What is scripting ? • Wikipedia has an informative and detailed explanation, “A scripting language, script language or extension language is a programming language that allows control of one or more software applications. "Scripts" are distinct from the core code of the application, as they are usually written in a different language and are often created or at least modified by the end-user.[1] Scripts are often interpreted from source code or bytecode, whereas the applications they control are traditionally compiled to native machine code. Scripting languages are nearly always embedded in the applications they control.[2] • The name "script" is derived from the written script of the performing arts, in which dialogue is set down to be spoken by human actors. Early script languages were often called batch languages or job control languages. Such early scripting languages were created to shorten the traditional edit-compile-link-run process”.
  • 17. What’s Driving Their Evolution? • Constant search for better ways to build software tools for solving computational problems – Many PLs are general purpose tools – Others are targeted at specific kinds of problems • For example, massively parallel computations or graphics • Useful ideas evolve into language designs – Algol  Simula  Smalltalk  C with Classes  C++ • Often design is driven by expediency – Scripting languages: Perl, Tcl, Python, PHP, etc. • “PHP is a minor evil perpetrated by incompetent amateurs, whereas Perl is a great and insidious evil, perpetrated by skilled but perverted professionals.” - Jon Ribbens
  • 18. What Do They Have in Common? • Lexical structure and analysis – Tokens: keywords, operators, symbols, variables – Regular expressions and finite automata • Syntactic structure and analysis – Parsing, context-free grammars • Pragmatic issues – Scoping, block structure, local variables – Procedures, parameter passing, iteration, recursion – Type checking, data structures • Semantics – What do programs mean and are they correct
  • 19. Visual history of programming languages http://cdn.oreillystatic.com/news/graphics/prog_lang_poster.pdf
  • 20.
  • 21. The most valuable programming skills to have on a resume
  • 22. Overview What is Python ? Why Python 4 Bioinformatics ? How to Python IDE: Eclipse & PyDev / Athena Code Sharing: Git(hub) Examples Hello World PIthon
  • 23. Python • Programming languages are overrated – If you are going into bioinformatics you probably learn/need multiple – If you know one you know 90% of a second • Choice does matter but it matters far less than people think it does • Why Python? – Lets you start useful programs asap – Build-in libraries – incl BioPython – Free, most platforms, widely (scientifically) used • Versus Perl? – Incredibly similar – Consistent syntax, indentation
  • 25. Should I use Python 2 or Python 3 for my development activity? • Short version: Python 2.x is legacy, Python 3.x is the present and future of the language • Python 3.0 was released in 2008. The final 2.x version 2.7 release came out in mid- 2010, with a statement of extended support for this end-of-life release. The 2.x branch will see no new major releases after that. 3.x is under active development and has already seen over five years of stable releases, including version 3.3 in 2012 and 3.4 in 2014. This means that all recent standard library improvements, for example, are only available by default in Python 3.x. • Guido van Rossum (the original creator of the Python language) decided to clean up Python 2.x properly, with less regard for backwards compatibility than is the case for new releases in the 2.x range. The most drastic improvement is the better Unicode support (with all text strings being Unicode by default) as well as saner bytes/Unicode separation. • Besides, several aspects of the core language (such as print and exec being statements, integers using floor division) have been adjusted to be easier for newcomers to learn and to be more consistent with the rest of the language, and old cruft has been removed (for example, all classes are now new-style, "range()" returns a memory efficient iterable, not a list as in 2.x). • The What's New in Python 3.0 document provides a good overview of the major language changes and likely sources of incompatibility with existing Python 2.x code. Nick Coghlan (one of the CPython core developers) has also created a relatively extensive FAQ regarding the transition. • However, the broader Python ecosystem has amassed a significant amount of quality software over the years. The downside of breaking backwards compatibility in 3.x is that some of that software (especially in-house software in companies) still doesn't work on 3.x yet.
  • 26. How to install ? • On windows you’ll need administrator right  • Portable python distribution ? Takes 500Mb and >2 hours 
  • 27. Version 2.7 and 3.4 on http://athena.ugent.be
  • 28.
  • 29. Interactive “Shell” • Great for learning the language • Great for experimenting with the library • Great for testing your own modules • Two variations: IDLE (GUI), python (command line) • Type statements or expressions at prompt: >>> print "Hello, world" Hello, world >>> x = 12**2 >>> x/2 72 >>> # this is a comment
  • 30. Overview What is Python ? Why Python 4 Bioinformatics ? How to Python IDE: Eclipse & PyDev / Athena Code Sharing: Git(hub) Examples Hello World PIthon
  • 31. IDE: Integrated Development Environment • You type scripts using can use notepad(++) • Better: PyCharm – available for free on most OS but you need to be administrator to install  • We will use Eclipse in combination with PyDev
  • 32. What is Eclipse? • Eclipse started as a proprietary IBM product (IBM Visual age for Smalltalk/Java) – Embracing the open source model IBM opened the product up • Open Source – It is a general purpose open platform that facilitates and encourages the development of third party plug- ins • Best known as an Integrated Development Environment (IDE) – Provides tools for coding, building, running and debugging applications • Originally designed for Java, now supports many other languages – Good support for C, C++ – Python, PHP, Ruby, etc…
  • 33. Prerequisites for Running Eclipse • Eclipse is written in Java and will thus need an installed JRE or JDK in which to execute – JDK recommended
  • 34. Selecting a Workspace • In Eclipse, all of your code will live under a workspace • A workspace is nothing more than a location where we will store our source code and where Eclipse will write out our preferences • Eclipse allows you to have multiple workspaces – each tailored in its own way • Choose a location where you want to store your files, then click OK
  • 35. Eclipse IDE Components Menubars Full drop down menus plus quick access to common functions Editor Pane This is where we edit our source code Perspective Switcher We can switch between various perspectives here Outline Pane This contains a hierarchical view of a source file Package Explorer Pane This is where our projects/files are listed Miscellaneous Pane Various components can appear in this pane – typically this contains a console and a list of compiler problems Task List Pane This contains a list of “tasks” to complete PYTHON
  • 36. PyDev: Python plug-in for Eclipse • Syntax highlighting • Debugger • Code completion • An extensive preference menu that can be used to edit the plug-in’s attributes and options.
  • 37. Installation  The plug-in can be installed through Software Updates:
  • 38. Setting Up In Eclipse, go to: Window, Preferences, PyDev, Interpreter-Python, and click New. Select the python.exe file in the Python directory, click OK and OK in the Preferences window again. Wait for the creating procedure to finish.
  • 39. Create Python Project and File Click on File, New, choose File, click on Python project folder, write the file name ending in a .py, and click Finish. Go to File, New, Project, select Pydev,Python Project, click Next, write name, choose Python version, and click Finish.
  • 40. Running Python To run Python code click on Run, Run As, and select Python Run.
  • 41. Lets try for “Hello World!” from athena.ugent.be
  • 42. Where is the workspace ?
  • 44.
  • 45. Which Python interpreter is used … check Preferences or run version.py
  • 49. Overview What is Python ? Why Python 4 Bioinformatics ? How to Python IDE: Eclipse & PyDev / Athena Code Sharing: Git(hub) Examples Hello World PIthon
  • 50. git is an open source, distributed version control system designed for speed and efficiency
  • 51. Git: A distributed version control system • Version control (or revision control, or source control) is all about managing multiple versions of documents, programs, web sites, etc. – Almost all “real” projects use some kind of version control – Essential for team projects, but also very useful for individual projects • Some well-known version control systems are CVS, Subversion, Mercurial, and Git – CVS and Subversion use a “central” repository; users “check out” files, work on them, and “check them in” – Mercurial and Git treat all repositories as equal • Distributed systems like Mercurial and Git are newer and are gradually replacing centralized systems like CVS and Subversion
  • 52. Why version control? • For working by yourself: – Gives you a “time machine” for going back to earlier versions – Gives you great support for different versions (standalone, web app, etc.) of the same basic project • For working with others: – Greatly simplifies concurrent work, merging changes • For getting an internship or job: – Any company with a clue uses some kind of version control – Companies without a clue are bad places to work
  • 53. Why Git? • Git has many advantages over earlier systems such as CVS and Subversion – More efficient, better workflow, etc. – See the literature for an extensive list of reasons – Of course, there are always those who disagree • It works from with Eclipse, also when started from athena 
  • 54. No Network needed for (almost) everything is local • Performing a diff • Viewing file history • Committing changes • Merging branches • Obtaining any other revision of a file • Switching branches
  • 55.
  • 56. GitHub: Hosted GIT • Largest open source git hosting site • Public and private options • User-centric rather than project-centric • http://github.ugent.be (use your Ugent login and password) – Accept invitation from Bioinformatics-I- 2015 URI: – https://github.ugent.be/Bioinformatics-I- 2015/Python.git
  • 60. Typical workflow Person A  Setup project & repo  push code onto github  edit/commit  edit/commit  pull/push Person B •clone code from github •edit/commit/push •edit… •edit… commit •pull/push This is just the flow, specific commands on following slides. It’s also possible to create your project first on github, then clone (i.e., no git init)
  • 65. GitHub: Hosted GIT URI (Uniform Resource Identifier): https://github.ugent.be/Bioinformatics-I-2015/Python.git
  • 71. Overview What is Python ? Why Python 4 Bioinformatics ? How to Python IDE: Eclipse & PyDev / Athena Code Sharing: Git(hub) Examples Hello_World.py PI-thon.py
  • 73. Overview What is Python ? Why Python 4 Bioinformatics ? How to Python IDE: Eclipse & PyDev / Athena Code Sharing: Git(hub) Examples Hello_World.py PI-thon.py
  • 74. Variables • No need to declare • Need to assign (initialize) • use of uninitialized variable raises exception • Not typed if friendly: greeting = "hello world" else: greeting = 12**2 print greeting • Everything is a "variable": • Even functions, classes, modules
  • 75. Numbers • The usual suspects • 12, 3.14, 0xFF, 0377, (-1+2)*3/4**5, abs(x), 0<x<=5 • C-style shifting & masking • 1<<16, x&0xff, x|1, ~x, x^y • Integer division truncates :-( • 1/2 -> 0 # 1./2. -> 0.5, float(1)/2 -> 0.5 • Will be fixed in the future • Long (arbitrary precision), complex • 2L**100 -> 1267650600228229401496703205376L – In Python 2.2 and beyond, 2**100 does the same thing • 1j**2 -> (-1+0j)
  • 76. Control Structures if condition: statements [elif condition: statements] ... else: statements while condition: statements for var in sequence: statements break continue
  • 77. Example Function def gcd(a, b): "greatest common divisor" while a != 0: a, b = b%a, a # parallel assignment return b >>> gcd.__doc__ 'greatest common divisor' >>> gcd(12, 20) 4
  • 78. How to generate random numbers The standard random module implements a random number generator. import random print (random.random()) This prints a random floating point number in the range [0, 1) (that is, between 0 and 1, including 0.0 but always smaller than 1.0). There are also many other specialized generators in this module, such as: randrange(a, b) chooses an integer in the range [a, b). uniform(a, b) chooses a floating point number in the range [a, b). normalvariate(mean, sdev) samples the normal (Gaussian) distribution. Some higher-level functions operate on sequences directly, such as: choice(S) chooses a random element from a given sequence (the sequence must have a known length). shuffle(L) shuffles a list in-place, i.e. permutes it randomly There’s also a Random class you can instantiate to create independent multiple random number generators.
  • 79. First program: PI-thon.py • How good are the random numbers ? • If they are good, you should be able to “measure” PI
  • 80. Measure Pi with two random numbers …. many of them … 1 x y
  • 81. Python Videos http://python.org/ - documentation, tutorials, beginners guide, core distribution, ... Books include:  Learning Python by Mark Lutz  Python Essential Reference by David Beazley  Python Cookbook, ed. by Martelli, Ravenscroft and Ascher