Skip to content

Latest commit

 

History

History
207 lines (160 loc) · 6.04 KB

slides.md

File metadata and controls

207 lines (160 loc) · 6.04 KB

Python Training Workshop 2019

An introduction course to Python

Jan 31, 2019

Ryan Leung (yanyan.ryan.leung@gmail.com)

Please go to

https://tinyurl.com/ybz69nux (hands-on materials)
https://tinyurl.com/ycwj6kcs (Download all notebooks)

Python: a very fast-growing language

drawing


A new era of computing

  • Varieties of programming languages
  • Multi-core CPU and GPU support
  • Easily-accessible cloud computing
  • Cloud microservices

Python: a versatile language

drawing

  • high-level
  • object-oriented, and
  • Interpreted

programming language.


Python: a "High-level language"

  • "Low level language": C, Fortran, Basic
  • Level means the accessiblity to system resources.
  • High Level :
    • care less about memory management or proper declaration of variables
    • less abstract than low-level language
    • less time to write and compile
    • relatively slower running time than some low-level language (not always true).

Community of Python users

  • Web backend developers
  • Data science
  • Machine learning

drawing

Image courtesy of the Python Developers Survey 2017 Results website

Python 2 vs Python 3

Results are quoted from https://www.jetbrains.com/research/devecosystem-2018/python/

drawing


Python Usages

drawing


Installation

  • Refer to another guide
  • Recommendation:
    • Anaconda
    • Google colab

Install packages (with anaconda)

  • conda search xxxxxx
  • conda install xxxxxx

Install packages (with pip)

pip is a package management system in Python

To search/install packages:

  • Search package : pip search xxxxxx
  • Install package : pip install xxxxxx
  • Upgrade package : pip install --upgrade xxxxxx
  • Uninstall package : pip uninstall xxxxxx
  • Install wheel package : pip install xxxxxx.whl

Jupyter Notebook

You may want to run a Jupyter notebook when:

  • You want to try out a new experiment or analysis with an existing Jupyter notebook from someone.
  • You want to develop an algorithm that run on a large software.
  • You have only ten minutes to download a data, plot a graph and send the email to your supervisor in a neat format.

jupyter_logo


Open Jupyter in Linux/MacOS

Type

jupyter notebook

drawing


Open Jupyter in Windows

Open your Start menu, goes to Anaconda Folder, Click the Jupyter Notebook shortcut (Recommended). Or start the Anaconda Navigator and Launch windows_jupyter


Hand's on Session

The hand's on session requires a working python installations with Jupyter installed. The following links are read-only, they do not run calculations in your computer.


First Session:


Second Session:


Online Platforms

Here are some online Python platform that are quite good indeed.


repl.it repl.it


azure-notebook Azure Notebook


google-colab Google Colab


Online Judge


Good Reference Material

  • stackoverflow.com

drawing

drawing


Credits

This tutorial have referenced the following materials: