Instruction (80%)
2. 開始跟著課程寫程式
2.1 開啟jupyter notebook
下載課程內容: Download materials from https://github.com/P4CSS/PSS107 unzip and remember the location of it on your computer
開啟jupyter notebook: 開啟cmd.exe (wins) 或terminal.app (osx),並輸入
jupyter notebook
以啟動他。也可以打開Anaconda Navigator,然後選擇Jupyter notebook執行它。啟動後命令視窗(cmd.exe或terminal.app)會出現一段有token的網址,請記得有這回事,當不小心關掉所有視窗後,只要用這段網址貼在網址列就可以重新打開jupyter notebook。



2.2 快速鍵jupyter notebook
Shift + Enter
run the current cell, select belowCtrl + Enter
run selected cellsAlt + Enter
run the current cell, insert belowCtrl + S
save and checkpointEnter
take you into edit modeD, D (press the key twice)
delete selected cellsEsc
take you into command modeY
change the cell type to CodeM
change the cell type to MarkdownA
insert cell aboveB
insert cell below
2.3 jupyter lab
建議jupyter notebook的使用者可直接改用jupyter lab,用法和jupyter notebook一樣,又可以讓存取檔案、操作資料變的更方便。打開Anaconda-Navigator就可以找到JupyterLab

或者直接在Command Line輸入jupyter lab就可以啟動。

啟動後的結果如下圖,編輯起來跟jupyter notebook一樣。

3. 課程學習指引
由於我建立這個gitbook的目的是授課,我提供以下學習材料,是我課堂中必要或者延伸教材。
主要學習教材:Youtube
Youtube的內容主要是沿著這個gitbook pyTutorial來講解,大部分的code都會和gitbook一樣,但gitbook可能會有一些章節內容有更新,Youtube則可能抽出一些額外單元獨立出來講(例如Sorting)。建議是跟著gitbook重頭打起,或者將github上pyTutorial這個repo複製到自己的電腦中。
Section 1: Basic operations
Section 2: Counding
Section 3: List and dictionary
Section 4 and 5: Condition and Flow
[py_if_for] 01 Concept and AQI case introduction: if與for的語法說明和使用以及AQI的案例說明
[py_if_for] 02 Accessing AQI data: 探索AQI資料(JSON)的內容結構
[py_if_for] 03 Categorizing and rescaling: 依照不同數值區間給予標籤,以空污為例
[pf_if_for] 04 Detect prominent: Finding maximum: 用for-loop找到一個list中的最大值
[py_if_for] 05 Sorting manually by for, if, swap, list and dict: 自己打造一個排序演算法:使用兩層的for-loop、if、調換Swap技巧、以及list和dict結構
輔助教材
設計教材的時候我習慣以案例為出發點來帶技術,所以我可能不會花很多時間去解釋例如資料型態、for或者if是什麼這樣的問題。因此我認為Datacamp是本課程最佳的輔助學習教材,他能夠透過互動的方式讓你了解基本的語法與操作。但是Datacamp的使用每個月是需要錢的,如果是課堂上的學生我們通常會幫忙申請教育版。以下這個網站把Datacamp的內容給複製到網頁外,可以速覽一下Datacamp上介紹Python基本語法的內容:https://www.learnpython.org/
4. 自學資源
線上互動學習平台
https://www.learnpython.org/ - Cover the interactive python tutorial of datacamp
免費電子書
參考資源
Python document https://docs.python.org/3.8/tutorial/index.html
好用的github repo
Applied Text Analysis with Python: https://github.com/foxbook/atap
Last updated