{"id":18898418,"url":"https://github.com/hychen/learn-python-in-hacker-way","last_synced_at":"2025-10-18T07:54:24.054Z","repository":{"id":3019885,"uuid":"4039420","full_name":"hychen/learn-python-in-hacker-way","owner":"hychen","description":null,"archived":false,"fork":false,"pushed_at":"2012-05-22T16:02:38.000Z","size":171,"stargazers_count":25,"open_issues_count":3,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-28T14:21:16.307Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"hpoydar/worldcup-2014","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hychen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-16T09:37:15.000Z","updated_at":"2025-01-24T01:37:33.000Z","dependencies_parsed_at":"2022-08-20T10:20:46.814Z","dependency_job_id":null,"html_url":"https://github.com/hychen/learn-python-in-hacker-way","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hychen%2Flearn-python-in-hacker-way","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hychen%2Flearn-python-in-hacker-way/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hychen%2Flearn-python-in-hacker-way/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hychen%2Flearn-python-in-hacker-way/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hychen","download_url":"https://codeload.github.com/hychen/learn-python-in-hacker-way/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248994027,"owners_count":21195300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T08:42:33.448Z","updated_at":"2025-10-18T07:54:19.007Z","avatar_url":"https://github.com/hychen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learn Python In Hacker Way (用駭客的方式學 Python)\n\n## 前言\n\n我是 Hychen。\n\n因為有人想學 Python ，所以我就來教了，這裡是教學上用到的教材。\n在這門課除了教你 Python ， 你還會學到一些軟體開發中會用到的工具，\n以及開放源碼/自由軟體社群的工作模式。\n\n本教材適合一人自學或是一人教多人使用。\n\n*聲明*\n\n1. 若有任何錯誤，歡迎自由 Patch/Fork。\n1. 網路上的連結總會失效，學生們需具備自行修復的能力。\n\n## 目標\n\n學 Python ，學到什麼程度就看個人努力了。\n\n## 文化與哲學\n\n這邊說得 Hacker 指得是\"泛指任何一類事務或領域中的專家或狂熱份子。\"\n開始前建議閱讀下面這兩篇\n\n- [如何成為駭客][1]\n- [提問的智慧][2]\n\n下面這個是推薦的[Coding Style][6]，有時間再讀\n\n- [PEP 8 - Coding Style][7]\n- [字正腔圓說Python](http://yukuan.blogspot.com/2006/11/be-pythonic-python.html)\n\n## 如何使用本教材\n\n你可以照著本教材上頭列的連結自學，也可以找個熟Python的人利用這份教材來指導你。\n後面我將用`學徒`來稱呼想學 Python 的人，`老師` 來稱呼指導學生的人。\n\n`學徒`將會需要使用Git來取得最新的內容, 還有繳交指定作業給老師做Code Review。\n如果`學徒`或`老師`不曾用過Git，請先閱讀 [ihower][3] 的[Git and Github 演講投影片][4]。\n\n在閱讀上面提及的投影片後，你需要了解怎麼使用下面的git commands:\n\n- git clone\n- git add\n- git commit\n- git pull\n- git push\n\n課程講義依難度分為\n\n- 新手(Novice):\n\t熟悉基本資料結構以及迴圈，以及撰寫 Function，內容在`courses/novice/README.md`\n- 學徒(Apprentice):\n\t能使用Function, Class 來維護較大型的程式, 一些常用的函式庫，以及撰寫測試程式，內容在`courses/apprentice/README.md` (尚未完成)\n- 老手(Adept):\n\t使用Decorator, Generator, Meta Class 來加速開發速度，熟悉特定領域的函式庫使用，例如做GUI的人會熟悉PyGTK, PyQT。\n\t內容在`courses/adept/README.md` (尚未完成)\n- 專家(Expert): 無法提供，因為我不是\n- 大師(Master): 無法提供，因為我不是\n\n在學習的過程中，你可以使用`pydoc`來查Python文件，例如我想知道str.replace怎麼用，我就打\n\n```\n$ pydoc str.replace\n```\n\n另一種查文件的方式是在Interpreter中打`help`，像這樣\n\n```\nPython 2.7.2+ (default, Oct  4 2011, 20:03:08)\n\t[GCC 4.6.1] on linux2\n\tType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\t\u003e\u003e\u003e help(str.replace)\n```\n\n## 開始\n\n1. `老師`在 github 上 fork 此專案。\n1. `學徒`在 github 上 fork `老師`的專案。\n1. `學徒`依據課程大綱讀完講義上指定的閱讀項目，並且寫完指定的習題\n1. `學徒`把指定的作業commit後，push 進自己的專案\n1. `老師`Review`學徒的code，引導`學徒`思考寫出更好的code, 老師可以用 github 的 gist 來貼source code.\n\n## 作業繳交方式\n\n每個課程下面都有一個`exercises`的目錄，下面會有各週的作業。 作業的檔名會是`.py`結尾，\n學徒寫完作業後，commit 進自己的專案，並且在`老師`的專案開一個Issue Ticket，通知老師Review 程式碼。\n\n[1]: http://www.angelfire.com/ok/leekawo/hacker.htm\n[2]: https://code.google.com/p/smartquestions/wiki/WhenYouAsk\n[3]: http://ihower.tw/blog/about\n[4]: http://ihower.tw/blog/archives/5391\n[5]: http://help.github.com/send-pull-requests/\n[6]: http://mmdays.com/2007/04/24/coding-style/\n[7]: http://www.python.org/dev/peps/pep-0008/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhychen%2Flearn-python-in-hacker-way","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhychen%2Flearn-python-in-hacker-way","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhychen%2Flearn-python-in-hacker-way/lists"}