Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| i386 : iPhone Simulator | |
| x86_64 : iPhone Simulator | |
| arm64 : iPhone Simulator | |
| iPhone1,1 : iPhone | |
| iPhone1,2 : iPhone 3G | |
| iPhone2,1 : iPhone 3GS | |
| iPhone3,1 : iPhone 4 | |
| iPhone3,2 : iPhone 4 GSM Rev A | |
| iPhone3,3 : iPhone 4 CDMA | |
| iPhone4,1 : iPhone 4S |
| # -*- coding: utf-8 -*- | |
| class SimpleOption(object): | |
| NOTHING = False | |
| SOME = True | |
| def __init__(self, is_some, value=None): |
| #Mounting the share is a 2 stage process: | |
| # 1. Create a directory that will be the mount point | |
| # 2. Mount the share to that directory | |
| #Create the mount point: | |
| mkdir share_name | |
| #Mount the share: | |
| mount_smbfs //username:password@server.name/share_name share_name/ |
| import numpy as np | |
| def circumcenter(vert1, vert2, vert3): | |
| # H/T: wikipedia.org/wiki/Circumscribed_circle | |
| Ax, Ay = vert1 | |
| Bx, By = vert2 | |
| Cx, Cy = vert3 | |
| D = 2 * (Ax * (By - Cy) + Bx * (Cy - Ay) + Cx * (Ay - By)) |
| class KeyifyList(object): | |
| def __init__(self, inner, key): | |
| self.inner = inner | |
| self.key = key | |
| def __len__(self): | |
| return len(self.inner) | |
| def __getitem__(self, k): | |
| return self.key(self.inner[k]) |
| -- Feature engineering BigQuery SQL queries for the kaggle talkingdata competition by tkm2261 | |
| -- it may acheve 0.9823 on the public LB with simple GBDT. | |
| -- destination table: takling.test2 | |
| SELECT | |
| CASE WHEN t.click_id is null THEN -1 ELSE t.click_id END as click_id, | |
| o.* | |
| FROM | |
| `talking.test_supplement` as o | |
| LEFT OUTER JOIN |
| name | japanese-tech-writing |
|---|---|
| description | 日本語の技術文書・書籍原稿の文章規範。段落と論証の構成(パラグラフライティング)、論証の厳密さ(ツッコミどころの除去)、読み手の負荷の管理、視点と語り、演出の抑制、LLM っぽい空句の禁止、翻訳調の比喩と擬人化の禁止(「運ぶ」「効く」「開かれた問い」など)、冗長の排除を定める。日本語で技術書の章、草稿、記事、解説文を書くとき、または推敲・リライトするときに使用する。 |
| license | Unlicense(https://gist.github.com/k16shikano/67625f2a7d96e3bbdfae8d571a936063) |
日本語で技術的な原稿(書籍の章、記事、解説文)を書く・推敲するときは、以下の規範に従う。