顯示具有 Python 標籤的文章。 顯示所有文章
顯示具有 Python 標籤的文章。 顯示所有文章

學習 Python 的視頻課程 By 彭彭

在學習網路爬蟲知識的過程,既然在無意中可以挖到寶!!
你說奇怪不奇怪??

Python 入門教學課程
https://www.youtube.com/playlist?list=PL-g0fdC5RMboYEyt6QS2iLb_1m7QcgfHk

相關視頻的明細:

01 - 簡介、安裝、與快速開始 https://youtu.be/wqRlKVRUV_k
02 - 變數與資料型態 https://youtu.be/FMruNSjHOzQ
03 - 數字、字串的基本運算 https://youtu.be/bLRa4TZ99aY
04 - 有序列表的基本運算 - List、Tuple https://youtu.be/JLU5oc4_VtA
05 - 集合、字典的基本運算 - Set、Dictionary https://youtu.be/L3-KuGYhw78
06 - 流程控制:if 判斷式 https://youtu.be/A93BsHB-lWo
07 - 流程控制:迴圈基礎,while 迴圈、for 迴圈 https://youtu.be/szaAeLt_49U
08 - 流程控制:迴圈進階控制,break、continue、else 命令 https://youtu.be/yBXlwOmLqZ4
09 - 函式基礎:定義並呼叫函式 https://youtu.be/7qKFvUVpQXg
10 - 函式參數詳解:參數預設值、名稱對應、任意長度參數 https://youtu.be/OOJmhezLd4o
11 - Module 模組的載入與使用 https://youtu.be/Et0DjY2cGiE
12 - Package 封包的設計與使用 https://youtu.be/GGp-7VHgsKk
13 - 文字檔案的讀取和儲存 https://youtu.be/C4OkV6DrVRs
14 - 亂數與統計模組 https://youtu.be/-xwCu6PN1jU
15 - 網路連線程式、公開資料串接 https://youtu.be/sUzR3QVBKIo
16 - 類別的定義與使用 - Class Attributes https://youtu.be/uPKgQ3FoVtY
17 - 實體物件的建立與使用 - 上篇 - 實體屬性 Instance Attributes https://youtu.be/Lr5N2r1rmtM
18 - 實體物件的建立與使用 - 下篇 - 實體方法 - Instance Methods https://youtu.be/MZtTClJ74NU
19 - 網路爬蟲 Web Crawler 基本篇 https://youtu.be/9Z9xKWfNo7k
20 - Flask 網站開發 - 基礎環境建置 https://youtu.be/dYulda6wEWA
21 - Flask 網站開發 - Heroku 雲端主機教學 https://youtu.be/wWRYBUzEG6E

First Posted:2019/07/22

在 Eclipse 中,安裝 Python 插件功能

首先,啟動 Eclipse 程式,從功能表
Help > Install New Software

image

選定 Word with: 右方的按鍵 Add,在新視窗中,補上下列訊息:
Name : PyDev
Location : http://pydev.org/updates
image

按下 OK 鍵後,原本的 Install 視窗會有 Pending 字樣產生,等待一段時間後,視窗中央部份會展開如下圖所示,
請勾選 PyDev for Eclipes 項目

image

按下 Next ,

image 

image

接受程式使用條款

image

系統做安裝的動作

image

image

重新啟動 Eclipse

哈哈,完成安裝作業了 !!

Google Storage 工具 GSUtil 使用入門

在申請到 Google Storage 的環境後,最先是直接使用瀏覽器來存放檔案。
不過,也看到網站說明,表示可以使用 GSUtil 工具。

對於 第一次 使用 GSUtil 工具者來說,除需要再下載 Phthon 程式;
還要將它們分別放置在各自的目錄位置,再依據 install GSUtil on Windows
進行 環境變數 設定及初始化指令的執行。

1. 環境變數 設定:

HOME C:\GSUtil
Path 補加 C:\GSUtil;C:\Python27
PYTHONPATH C:\GSUtil\boto

2. 初始化指令的執行
    python gsutil ls
** 要在 C:\GSUtil 目錄,下此指令
** 或是 python c:\GSUtil\gsutil ls
** 第一次執行,要輸入 google access key、google secret access key
(可以在 Google Storage for Developers (Labs) Developer Resources / Manage Keys 申請)

 

指令正確執行的畫面,如下
-------------------------------------------------------------------
C:\Documents and Settings\perton>cd \gsutil

C:\GSUtil>python gsutil ls
You have no boto config file. This script will create one at
C:\GSUtil\.boto
containing your credentials, based on your responses to the following questions.

What is your google access key ID? GOOG2XNKSJFIB5GOUXUH
What is your google secret access key? 3+DDysWmC97kUQuOwpZDVcGBtTywkXXekFfR/coc

Configuration file "C:\GSUtil\.boto" created. If you need to use
a proxy to access the Internet please see the instructions in that file.
Please try running gsutil again now.
-------------------------------------------------------------------

若是環境變數沒有設定正確,會有下列錯誤:
-------------------------------------------------------------------
Failure: [Errno 22] invalid mode ('w') or filename: c:\\GSUtil\\; c:\\Python27\\.boto
-------------------------------------------------------------------

若是執行指令位置,未移至 C:\GSUtil 目錄下;或是未特別指定 GSUtil 的存放路徑,會有下列錯誤:
-------------------------------------------------------------------
C:\Documents and Settings\perton>python gsutil ls
python: can't open file 'gsutil': [Errno 2] No such file or directory
------------------------------------------------------------------- 
 

指令正確執行後,因為已經建立 Configuration file "C:\GSUtil\.boto" ;若是再次執行該指令,會有下列訊息:
-------------------------------------------------------------------
C:\>python c:\GSUtil\gsutil ls
gs://family_photos/
gs://glory2god/
gs://khchurch/
gs://perton/
-------------------------------------------------------------------

PS: family_photos, glory2god, khchurch, perton 是筆者早先在 Google Storage 建立 Bucket 所定的名稱。