Overview#

This is a course designed specifically for students in the Department of Photonics, National Yang Ming Chiao Tung University (NYCU). We will not tell you anything about computer organization architecture here (because I believe you can ask ChatGPT yourself). Instead, we hope to tell you how to write high-level programming languages ​​such as Python. We will not teach C/C++ because high-level programming languages ​​are more convenient to use. However, we believe that the logic of programming does not change significantly due to the use of different programming languages. Therefore, we believe that learning how to program by starting with a high-level language is a more efficient way to help students understand how the computer world works. If you wish to start your career in fields such as data analysis, image processing, or deep learning in the future, I believe this course material will be of great help to you.

Before you start reading the lectures#

This is an introductory course for the student with a little or no programming experience, especially for the freshman of college. However, students in any education phase are always welcome to use any content of this repository.

Attention! If you are reading and using any content of this repository, you are acknowledging the following:

  1. Follow the MPL-2.0 license.

  2. Admit Taiwan :taiwan: is an independent country, not part of China.

What do we want to give you in this course?#

  1. To provide an understanding of the role that programming can play in solving engineering issues.

  2. To have the ability to solve either the mathematical problems or numerical analyses via writing some small programs with confidence.

  3. To be able to read, understand, and have ability to utilize any open source code.

Introduction#

This course material is divided into three parts:

Part I: Fundamentals of Computer Science and Python Programming#

Here you can learn basic Python syntax, and practice how to write programs through some simple problems (such as mathematics, element search, etc.), how to split your program into modules for easy management, how to send parameters to the main program from the terminal, etc. Through these materials, you will not only learn how to write Python, but also learn some knowledge about algorithms and data structures.

Part II: Introduction to Data Processing and Visualization with Python#

沒有經過處理的 Data 都是垃圾,Data 必須先經過處理才會變成 Information。

In today’s era of information explosion, accessing vast amounts of data is easier than ever before. However, as emphasized earlier, raw data must be properly processed and interpreted before it can be transformed into meaningful and actionable information. To address this, in this part, we will introduce essential Python packages such as numpy, pandas, and matplotlib, which will help you read, write, process, and analyze data, as well as visualize your findings effectively.

A key concept we want you to start considering is data visualization. In an age where data analysis is a fundamental skill for nearly everyone, the ability to stand out lies not just in the analysis itself, but in how you communicate your insights. Why should others listen to your interpretation of the data? How can you capture and hold their attention?

We believe that one of the critical skills is the ability to present analyzed data through clear, accessible, and visually compelling charts. matplotlib is a powerful and versatile Python package that supports a wide range of plotting functions, offering you the flexibility to create informative and visually appealing graphics.

To make the learning experience more relatable and engaging, we will use real-world examples from Major League Baseball (MLB) to help you practice data processing and visualization techniques.

Part III: Data Science with Python#

In an increasingly data-driven world, the ability to extract insights from data has become a vital skill across nearly every domain—from business and healthcare to technology and research. Data Science with Python is designed to equip students with the foundational tools and concepts necessary to understand, model, and analyze real-world data through the lens of probability, statistics, and computational thinking.

This course begins by exploring the mathematical and computational foundations of randomness, including random walks, stochastic processes, and core principles of probability theory. Building on this, students will engage with limit theorems and the Monte Carlo method, gaining an appreciation for how randomness can be harnessed to solve complex problems.

We then transition into the realm of statistical inference, where students learn to draw conclusions from data using estimation techniques and confidence intervals. Finally, the course culminates in an introduction to randomized trials and hypothesis testing, providing the conceptual and practical tools to evaluate claims and make data-driven decisions with statistical rigor.

Throughout the course, Python will serve as the primary programming language, allowing students to implement simulations, visualize data, and apply statistical methods in a hands-on and interactive way. By the end of the course, students will not only understand the theoretical underpinnings of modern data science but also gain practical experience in applying these ideas to real-world scenarios.

Finally, we strongly encourage everyone to take on the homework assignment. This assignment focuses on an engineering problem related to natural gas pipelines. You will practice applying the Monte Carlo Method to simulate corrosion processes and estimate the probability of gas leakage over the pipeline’s operational lifespan. Through this exercise, you will deepen your understanding of the course material and gain practical experience in using probabilistic modeling to solve real-world problems.

Integrated Development Environment (IDE) Setup for Python Programming#

Please refer to this: EnvSetup.pdf