Introduction Dr. Jia Jia ▪ Instructor: ▪ Office: ▪ Office Hours: ▪ ▪ ▪ ▪ Teaching Assistant: Tel: Office: Office Hours: JIA, Jia, Ph.D. (justinjia@ust.hk) LSK 5045 Monday 5:00 pm ~ 6:20 pm; or By appointment Hilary CHEUNG (Mr.) (isom2020@ust.hk) 2358-7653 LSK 4065 By appointment. Activities Roles in the Course Percentage Lecture Apply key programming concepts through problem solving. Homework exercises will be provided, but will NOT be graded. NA Laboratory Introduce additional syntax and grammar, and provide more practices. Pre-Lecture/Lab Video and Weekly Quiz More Details on the next slide Assignment Practice syntax and grammar learned in lectures and 25% labs. Hone your programming skills. Final Exam Serve as the major milestone that concludes semester-long learning. 15% 60% ▪ Watch pre-class videos before each lecture and lab. ▪ 5 from lecture (week 1 ~ week 5) + 5 from lab (week 2 ~ week 6) ▪ After watching the videos, complete the corresponding quiz on Canvas. ▪ Lecture: due at 9:00 am every Monday except for the 1st week ▪ Each quiz counts for 2 points (merit-based) towards your final grade. ▪ A maximum of 20 points (capped at 15 for final grade) ▪ Buffer policy ▪ You can score the full points for this assessment component once you earn 15 points in total. “Everybody should learn to program a computer because it teaches you how to think". — Steve Jobs 7 ▪ Guido van Rossum released Python in 1991 and named it after the television show Monty Python's Flying Circus. ▪ Python’s characteristics: ▪ Python is a high-level general-purpose programming language with dynamic semantics. ▪ Python is object-oriented. In recent years, it has also acquired built-in support for functional programming. ▪ Python is open-source and cross-platform. ▪ A large community geared toward open-source, and an extensive ecosystem of open-source scientific libraries and environments. ▪ Python is incredibly easy to program in. ▪ Python “comes with batteries”. It has a comprehensive built-in library called the standard library, including modules that provide: ▪ Numeric and math-related functions and data types ▪ Routines for interfacing with the operating system ▪ Text processing operations ▪ Networking and Internet data handling tools ▪ Structured mark-up/tag processing tools ▪ and much more… >>> import os >>> os.getcwd() '/Users/xxxxx' >>> os.system('mkdir today') ▪ Python has a large collection of add-on modules, packages, and toolkits. ▪ The Python scientific stack for data science: ▪ Notable others include Natural Language Toolkit for natural language processing, Beautiful Soup and Selenium for Web scraping, Django for web application development, the Python Imaging Library for complex image processing, … ▪ Python is leading the way in deep learning. Popular deep-learning frameworks implemented in Python include TensorFlow, Keras, CNTK, etc Success stories: http://www.python.org/about/success PYPL PopularitY of Programming Language Source: http://pypl.github.io/PYPL.html ▪ Python recently underwent a major version change from 2 to 3. ▪ No immediate backward compatibility between the two versions. ▪ Python 2 has still been in use in both scientific (20% adoption) and commercial (30% adoption) areas in 2017. ▪ But Python 2 was officially retired and maintenance was ceased. ▪ We will be using Python 3!!! ▪ Minimal setup installs a code execution engine, also known as the Python interpreter, and the standard library. ▪ But, creating a working environment is time-consuming. ▪ Instead, we can download and install a Python distribution, which provides a fully working Python environment that is ready to use. ▪ Anaconda is the most complete Python distribution: ▪ It includes nearly 200 packages, which comprises NumPy, SciPy, pandas, Jupyter, Matplotlib, Scikit-learn, and NLTK. ▪ It's cross-platform. ▪ Its base version is free. ▪ Jupyter (formerly IPython Notebook): Web-based graphical interface to interactively run, visualize, and document Python snippets. ▪ Notebook documents (saved with the .ipynb extension) include inputs and outputs of the computations, explanatory text, mathematics, images, and rich media representations of objects. ▪ Colaboratory is a free Jupyter notebook environment that requires no setup and runs entirely in the cloud. ▪ “A Jupyter notebook stored in Google Drive”. ▪ https://colab.research.google.com Get your hands dirty by practicing with technical skills