Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
便利に使おう変数アノテーション -typing.py との楽しいお付き合い-
Search
Takumi Sueda
September 08, 2017
4
8.7k
便利に使おう変数アノテーション -typing.py との楽しいお付き合い-
PyCon JP 2017 Conference Day 1
Takumi Sueda
September 08, 2017
Tweet
Share
More Decks by Takumi Sueda
See All by Takumi Sueda
組み込みLinuxの時系列
puhitaku
4
1.1k
電子辞書にステータスバーを実装する
puhitaku
0
200
知育おもちゃの遊び方 Lv. 999
puhitaku
5
2.8k
ルーターでプレゼンする
puhitaku
1
4.8k
AST as Black Magic
puhitaku
0
110
次世代の足下を舗装するコミュニティ
puhitaku
5
1.7k
電子辞書で学ぶ Linux のサスペンド
puhitaku
0
600
USB PD で迎える AC アダプター大統一時代
puhitaku
2
2.5k
電子辞書のアイデンティティを消す方法
puhitaku
3
3.9k
Featured
See All Featured
Building Adaptive Systems
keathley
38
2.3k
Rails Girls Zürich Keynote
gr2m
94
13k
BBQ
matthewcrist
85
9.3k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
We Have a Design System, Now What?
morganepeng
50
7.2k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Designing Experiences People Love
moore
138
23k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
The World Runs on Bad Software
bkeepers
PRO
65
11k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
The Invisible Side of Design
smashingmag
298
50k
Transcript
كٝٔח⢪ֲֶ㢌侧،ظذ٦ءّٝ UZQJOHQZהך嚂׃ְֶ➰ֹさְ .BOJQVMBUJOH7BSJBCMF"OOPUBUJPOTPO3VOUJNF 'PSBZFUBOPUIFSVTBHFPGUZQFIJOUT 5BLVNJ4VFEB 'VMMFS *OD%FWFMPQFS
)J 5BLV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