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
Pythonと数学と 多面体とペーパークラフトとベルヌーイと長門屋と田宮模型と私
Search
Kimikazu Kato
October 08, 2018
1
1.6k
Pythonと数学と 多面体とペーパークラフトとベルヌーイと長門屋と田宮模型と私
2018年10月8日PyLadies Tokyo 4周年記念パーティでのLTです。
Kimikazu Kato
October 08, 2018
Tweet
Share
More Decks by Kimikazu Kato
See All by Kimikazu Kato
PyTorchの最近の動向
hamukazu
0
670
Python 3.11: What changed in math?
hamukazu
0
440
機械学習も筋肉が大事?意外と知らない数学
hamukazu
0
950
レコメンデーションシステムのキホン
hamukazu
4
870
機械学習の中身を理解する
hamukazu
28
10k
機械学習に役立つ数学
hamukazu
11
6.2k
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
680
Speed Design
sergeychernyshev
24
570
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
Why Our Code Smells
bkeepers
PRO
334
57k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Art, The Web, and Tiny UX
lynnandtonic
296
20k
Six Lessons from altMBA
skipperchong
26
3.5k
How to Think Like a Performance Engineer
csswizardry
19
1.1k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Transcript
Pythonͱֶͱ ଟ໘ମͱϖʔύʔΫϥϑτ ͱϕϧψʔΠͱͱాٶܕͱࢲ Ճ౻ެҰ @hamukazu 201810݄8 PyLadiesTokyo4पه೦ύʔςΟ
ࣗݾհ Ճ౻ެҰʢ͖Έ͔ͣʣ Twitter: @hamukazu • ֶΤόϯδΣϦετ • ےτϨܯ • ϏʔϧΫζ
࠷ۙຊग़ͨ͠Αʂ ങͬͯͶ— http://bit.ly/mlessence
• ਖ਼ेೋ໘ମͷݟऔΓਤΛඳ͖ͳ͍͞ • ਖ਼ेೋ໘ମͷɺลɺ໘ͷΛͦΕͧΕ͑ͳ͍͞
ղ ུ
͔֬ΊΔํ๏ ࣮Λ࡞Δ
ଟ໘ମϖʔύʔΫϥϑτ • 2017ʹΓ࢝ΊͨʢϒϩάͰൃදʣ • ࡞ϓϩάϥϜΛΦʔϓϯιʔεͰެ։ • ࠷ॳਖ਼ଟ໘ମ • 2018PyConJP SprintsͰਖ਼ଟ໘ମʢ४ਖ਼ଟ໘ମʣ
https://github.com/hamukazu/craft_regpolyhed https://github.com/hamukazu/craft_truncated
ྫ ਖ਼ेೋ໘ମ ਖ਼ೋे໘ମ
ਖ਼ೋे໘ମ ྫ ʢ2ͭ߹Θͤͯ1ͭͷཱମʣ
Ͳ͏ͬͯ࡞Δ͔ • ݴޠͪΖΜPython • Reportlabͱ͍͏ϥΠϒϥϦ • ͋ͱֶతܭࢉʢϕΫτϧܭࢉͱճసߦྻʣ • ࣗಈඳը͢ΔΞϧΰϦζϜΛ࡞ͬͨͷͰͳ͘ɺҰͭҰͭ ઢΛҾ͘ϓϩάϥϜΛॻ͍ͨ
ReportLab PythonͰPDFϑΝΠϧΛฤूͰ͖ΔϥΠϒϥϦ اۀ͕͍ͬͯΔΦʔϓϯιʔε ReportLabϥΠϒϥϦ໊͔ͭاۀ໊
ֶతܭࢉ ✓ cos ✓ sin ✓ sin ✓ cos ✓
◆ ✓ x y ◆ = ✓ x cos ✓ y sin ✓ x sin ✓ + y cos ✓ ◆ (x,y)ΛݪΛத৺ʹθճసͤͨ͞ΛٻΊΔ ඞཁͳܭࢉ͜ΕͱɺϕΫτϧجຊܭࢉʢɾࠩɾεΧϥʔഒʣ͚ͩ
ਖ਼ޒ֯ܗͷඳ͖ํ 108° 72° A1 A2 A3 − → OA3 =
− → OA2 + − − − → A2A3 = − → OA2 + cos 72◦ − sin 72◦ sin 72◦ cos 72◦ − − − → A1A2 ͜ΕΛ܁ΓฦͤΑ͍
࣍ʹఔ
ඞཁͳͷ φ-022 ʢಛްޱʣ ϓϥε͞Έ ϑΟοτΧʔϒ ϓϨϛΞϜνλϯ ʢϕϧψʔΠۂઢʣ λϛϠ ΫϥϑτϘϯυ
ϕϧψʔΠۂઢ Ωλʔʂ
ఆٛʢϕϧψʔΠۂઢʣ ฏ໘ͷۃ࠲ඪදࣔɹɹɹʹରͯ͠ Ͱද͞ΕΔۂઢΛϕϧψʔΠۂઢͱݺͿ ఆཧ ݪ͔Βग़ΔઢͱϕϧψʔΠۂઢͷͳ֯͢ҰఆͰ͋Δ r = aebθ ূ໌ ಡऀͷԋशͱ͢Δ
(r, θ)
࡞Γํͷίπ • ંΓఆنΛͬͯંΔ • ͘Β͍ΈཱͯͯͨΒҰணࡎΛס͔ͯ͠ݻఆ͢Δ • ͷΓ͠Ζ͕ͳ͍໘͕͋ΔͷͰͦΕΛ࠷ޙʹด͡Δ
TODO • ϦϑΝΫλϦϯάͯ͠ύοέʔδԽ • pip install͍ͨ͠ΑͶʁ • ࡞ΓํͷίπͷυΩϡϝϯτӳ༁ͯ͠ެ։