Skip to content

Instantly share code, notes, and snippets.

View chairco's full-sized avatar
🏠
Working from home

Jason chairco

🏠
Working from home
View GitHub Profile
@chairco
chairco / django-quicklearn.md
Last active June 13, 2017 09:32
python django 快速學習
import requests
import pandas
import json
url = 'http://ecshweb.pchome.com.tw/search/v3.3/all/results?q=%E5%88%AE%E9%AC%8D%E5%88%80&page=2&sort=rnk/dc'
r = requests.get(url)
jd = json.loads(r.text)
df = pandas.DataFrame(jd['prods'])
print df.head()
@chairco
chairco / mindmap.md
Last active June 13, 2017 09:31
PyCon

2016.11

11 月開始進行講者第一階段 10 人邀請,然後 Outing 可能無法在 11 月舉辦,工作上一些事情前半個月太忙導致有些進度似乎沒有追上(反省中)。現在比較擔心是 Keynote 進度不如預期,難怪當時亮會提到修生養性這個說法 XD。是說我也沒有他那麼厲害和積極。

整理 11 月清單:

  1. Keynote 第二階段名單
  2. 志工招募
  3. 徵稿主題討論、unconference 流程討論。可參考 code for america
  4. 議程組月會
  5. Sprint 的參與

網址 Django channel
範例 線上聊天室

最後更新時間:

Channels Concepts

Django’s traditional view of the world revolves around requests and responses; a request comes in, Django is fired up to serve it, generates a response to send, and then Django goes away and waits for the next request.

Django's 傳統視圖看法圍繞著請求(request)與回應(responses);一個請求進來,Django 被觸發接著服務它,產生一個回應並送出,接著 Django 離開並且等待下一個請求。

@chairco
chairco / Concurrent-python.md
Last active June 12, 2018 04:54
Concurrent Parallel introduction, Python 的並行與平行兩三事。

Concurrent(並行)

Thread(線程)

Thread 主要是用來有效利用 CPU 資源的方法。但 Python 使用全局解釋鎖(GIL)的原因,程式碼並不能同時在多核上並行的執行,因此 Python 實際上並無法真的做並行的。

Python 在 Thread 提供兩組接口,一組是thread模塊,提供基礎的,低等級(Low Level)接口,使用Function作為線程的運行體。還有一組是threading模塊,提供更容易使用的基於對象的接口(類似於Java),可以繼承Thread對象來實現線程,還提供了其它一些線程相關的對象,例如Timer,Lock。 原文網址

使用 thread 模塊的例子 原文網址

@chairco
chairco / Python-MRO.md
Last active January 16, 2017 12:07
Python Tutorial: Understanding Python MRO - Class search path 中文翻譯 原文網址: https://makina-corpus.com/blog/metier/2014/python-tutorial-understanding-python-mro-class-search-path

Python Tutorial: Understanding Python MRO - Class search path

The Python Method Resolution Order defines the class search path used by Python to search for the right method to use in classes having multi-inheritance. It as envolved since Python 2.2 to 2.3. The algorithm change is also refered as old classes and new classes MRO algorithm. The new one is not so easy to bring out. This tutorial tries to explain by example each of them.

Python 方法解析順序(Method Resolution Order) 定義類別搜尋路徑提供 Python 在多重繼承類別查詢正確的使用方法。他在 Python 2.2 到 2.3 的版本做了一些進化。這個演算法同時被稱呼為經典的與新的經典 MRO 演算法。新的方法不是很容易說明。這個 Tutorial 嘗試透過範例去解釋兩者的不同之處。

History of new and old algorithms usages

@chairco
chairco / beautiful_idiomatic_python.md
Created December 5, 2016 02:04 — forked from JeffPaine/beautiful_idiomatic_python.md
Transforming Code into Beautiful, Idiomatic Python: notes from Raymond Hettinger's talk at pycon US 2013. The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:

Call for Proposal

CfP 包含四個子項目:

  1. Talk
  2. Unconference
  3. Tutorial
  4. Review

關於以上四個的細節與內容請在 Call for Proposal 這邊做編輯。

BoF(Night party)

TBD

Keynote

為期三天的議程中,邀請五位講者分別在不同場次進行主題演講 (Keynote),所有議場將會同步轉播。Keynote 講者都是在全球而言各領域非常頂尖的人士,不論是工程師或管理者,他們將帶來對自己的領域、專案的經驗分享,或者對於未來數年發展的方向與想像。

流程

候選人列表 -> 候選人排序 -> 開始進行邀請 -> 接受邀請後開始聯繫講者確認題目、製作講者中英文介紹 -> 行政事務(接送、住宿等)-> 順利完成演講 -> 是否有其他活動

工作項目