Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
ίʔώʔ3.34ഋͷֹ݄ྉۚͰ σʔλج൫Λ࡞ͬͯ͏ Google Cloudͷ͋Ε͜ΕͱࣆJAPANͷͦͷޙ. @shinyorke 2023/06/17 Python mini Hack-a-thon Conference
Slide 2
Slide 2 text
Who am I?(ࣗݾհ) • Shinichi Nakagawa@shinyorke • େख֎ࢿITίϯαϧاۀϚωʔδϟʔʢݱ৬ʣ • #Pyhack ॳࢀՃ: 2013/02/16ʢ#28ʣ, ଟৗ࿈ʢͱ͍͏ೝࣝʣ • ٿ͕Ұ൪ͷझຯͱݟ͔͚ͤͯͦ͏Ͱͳ͍ਓ. • ωλͱͯ͠ͷʮٿͷਓʯطʹଔۀ͍ͯ͠·͢. ͨ·ͨ·ݸਓ։ൃωλ͕ٿʹدͬͯΔ͚ͩͰ͢.
Slide 3
Slide 3 text
ࠓͷ͓ • #PyHack #148ʢ2023/02/04ʣͰൃද࿅शͨ͠σϒαϛ2023ొஃωλ …ͷμΠδΣετ൛ʢ10Ver.ʣΛ͓൸࿐͠·͢. • ొஃͨ͠ͷ͕2݄Ͱࠓ4݄ͳͷͰΞοϓσʔτগ͋͠Γ·͢. • σϒαϛຊฤͷಈըʢ40ʣެ։͞Ε͍ͯ·͢. https://codezine.jp/devonline/archive/session/131
Slide 4
Slide 4 text
σϒαϛͰͨ͜͠ͱʢཁʣ • ΫϥυͱσʔλΤϯδχΞϦϯάͰ࣮ݱ͢ΔԶͷDX • αʔόϨεͳΞʔΩςΫνϟͰ࣮ݱ͢Δʮ͍͍ײ͡ͳσʔλج൫ʯ • ʮਪ͠ͷٿબखʯͷʮਪ࣌͠ʯͲ͜ͳͷ͔ΛݟۃΊΔ⽁
Slide 5
Slide 5 text
͜͏͍͏ϞϊΛͬͯ… ※σϒαϛࢿྉΑΓൈਮ
Slide 6
Slide 6 text
ϥʔζɾψʔτόʔ ʢࣆJAPANʣ • ࣆJAPANॳͷΞϝϦΧग़બख • ଧ͍ͷͷग़ྥͱଧ ͦͯ͠ଧٿ͕͘, 3ϙδγϣϯ ͦͭͳ͘कΕΔ֎कඋ˕ • Ωϟϥཱ͍͍ͪͯͯ͠Ϡπͱ͍͏ᷚ, ࣆδϟύϯͷηϯλʔͱͯ͠ظʂ ※σϒαϛࢿྉΑΓൈਮ
Slide 7
Slide 7 text
ϥʔζɾψʔτόʔ ʢࣆJAPANʣ • ࣆJAPANॳͷΞϝϦΧग़બख • ଧ͍ͷͷग़ྥͱଧ ͦͯ͠ଧٿ͕͘, 3ϙδγϣϯ ͦͭͳ͘कΕΔ֎कඋ˕ • Ωϟϥཱ͍͍ͪͯͯ͠Ϡπͱ͍͏ᷚ, ࣆδϟύϯͷηϯλʔͱͯ͠ظʂ 8#$͕։ນ͢Δલʢʣ ͜ͷ࣌Ͱψʔτόʔͷ׆༂Λ༧ݴ͢Δ͜ͱʹޭʂ ˞*5ۀքΤϯδχΞք۾࠷ͷൃදʢଟʣ Ұ൪όολʔͱͯ͠ͷ׆༂༧֎͕ͩͬͨͦΕ͓͖ͯ͞স
Slide 8
Slide 8 text
ࠓͷ10LTͰશ෦৮ΕΔͷແཧ. Google CloudͱٿͷΛগʑ.
Slide 9
Slide 9 text
͓͠ͳ͕͖ • DashͱCloud RunͰσʔλɾμογϡϘʔυΛ࡞ͬͯಈ͔͢ • WBCઓ࢜ͨͪͷͦͷޙ⽁ • ͦͯ͠ؾʹͳΔ͓ஈ?
Slide 10
Slide 10 text
࡞ͬͨσʔλɾμογϡϘʔυʢͬ͘͟Γʣ •DashΛͬͯʮPythonॻ͚μογϡϘʔυ࡞ΕΔʯΑ͏ʹ͠·ͨ͠. •σʔλຊମBigQuery, σʔλͷΞΫηεRESTful APIʢGoʣܦ༝. •ೝূతͰAPI Gateway, Cacheͱͯ͠StorageΛར༻ʢ͜ΕϚετ͡Όͳ͍ʣ.
Slide 11
Slide 11 text
Dash is Կऀ🤔 • PlotlyΛLow-codeπʔϧͱͯ͠ ͑ΔΑ͏ʹ͍͍ͨ͠ײ͡ͷౕ. • ϓϩτλΠϓͰੳɾՄࢹԽʹ Jupyter LabͱPlotlyΛ͓ͬͯΓ, ͜ΕΛͦͷ··Ҡ২Ͱ͖ΔखஈͰ ࣮͔ͨͬͨ͠. • https://dash.plotly.com/
Slide 12
Slide 12 text
ࠓճ࡞ͬͨίʔυ ʢҰ෦ൈਮʣ • Python͚ͩͰॻ͚ΔͷΊͬͪΌศརͩͬͨ. • HTMLʹͨ͠ίϯϙʔωϯτΛPythonͰ ΰϦͬͱॻ͍ͯ࡞͢Δͱ͍͍ײ͡ʹಈ͘. • ΠϕϯτۦಈͰͷॻ͖͑Callbackͳ σίϨʔλʔͰ࣮. • ReactͬΆ͋ͬͯ͞ݸਓతʹେ͖͕ͩ, ςετ͕ॻ͖ʹ͍͘ҹ… ※গͳ͘ͱUI ίϯϙʔωϯτʹؔͯ͠
Slide 13
Slide 13 text
Cloud RunΛબͨ͠ʢPythonicͳʣཧ༝ • μογϡϘʔυΞϓϦͷґଘϥΠϒϥϦతʹApp EngineͰಈ͔͘ո͔ͬͨͨ͠Ί • PandasʹDashʢPlotlyʣͱσʔλܥͷϥΠϒϥϦ͕Γͩ͘͞ΜͷWebΞϓϦ • ͜ͷ࣌ͰͪΌΜͱͨ͠ContainerܥͰಈ͔͞ͳ͍ͱବͩͳͬͯஅˠͦͷ௨Γͩͬͨ • બ͢Δ·Ͱͷࢥߟͱͯ͠… 1.ґଘϥΠϒϥϦͳͲͷ߹Ͱ΄΅PythonʢҰ෦GoʣͰͷ։ൃ -> Firebase͕ީิ͔Βফ͑Δ 2.Cloud FunctionsͰಈ͔͢ʹඍົͳ༷ͱͳͬͨͨΊબࢶͱͯ͠ফڈ 3.App EngineʢStandardʣContainer͡Όͳ͍ -> Cloud Runʹܾఆ ※ContainerͰಈ͔ͤΔApp EngineʢFlexibleʣΛΘͳ͔ͬͨཧ༝…ͦΜͳબࢶΛೖΕͨ͘ͳ͔͔ͬͨΒͰ͢ʢٿʣ
Slide 14
Slide 14 text
WBC2023ࣆδϟύϯઓ࢜ͷͦͷޙ • ೋྲྀͷ͋ͷํ • ϕετφΠϯʹબΕͨMLB৽ਓԦʢީิʣ
Slide 15
Slide 15 text
େ୩ᠳฏʢϩαϯθϧεɾΤϯδΣϧε, TWPʢTwo Way Playerʣʣ ϗʔϜϥϯྔ࢈ͷൿີ͕໌Β͔ʹ
Slide 16
Slide 16 text
େ୩ᠳฏʢϩαϯθϧεɾΤϯδΣϧε, TWPʣ ӈʹࠨʹଧ͚͍ͪͯΔͷ͍͍ײ͡
Slide 17
Slide 17 text
େ୩ᠳฏʢϩαϯθϧεɾΤϯδΣϧε, TWPʣ खͱͯ͜͠Μͳײ͡
Slide 18
Slide 18 text
٢ాਖ਼ঘʢϘετϯɾϨουιοΫε, LFʣ ώοτྔ࢈ͷൿີ͕໌Β͔ʹ
Slide 19
Slide 19 text
ʁʁʁʮσʔλج൫ࣗͰ࣋ͭͱ͓ߴ͍ͷͰʁʯ
Slide 20
Slide 20 text
ʲʳ͏αʔϏεΛͯ͠ίετ੍ • ʮ͏ͱ্ཱ͖͚͕ͩͪΕ͍͍ʯલఏͰશαʔϏεΛίʔϧυελϯόΠʹ. • ͯ͢ͷΞϓϦɾػೳΛαʔόϨεͳΫϥυʢCloud RunͳͲʣΛར༻. • ʮಈ͍͍ͯͳ͍͓͕͔͔࣌ۚΔʯͷBigQueryͱετϨʔδͷΈʢ͘͝গ ֹʣ • σʔλอ͍ํΛ͠ίετΛ͑Δ • ແྉͷϧʔϧΛཧղ͠, ͦͷൣᙝͰۃྗ͏ʢ㲈ඞཁͳͷʹ͓ۚΛ͏ʣ • BigQueryCloud StorageແྉΛΊͬͪΌ׆༻
Slide 21
Slide 21 text
Ұϲ݄Ͱ$3ະຬ, ίʔώʔ3.34ഋఔͰӡ༻͍ͯ͠·͢🐯 ※σʔλج൫ϓϩδΣΫτͷ࣮ίετΑΓࢉग़ʢίʔώʔίϯϏχίʔώʔج४ʣ, υϝΠϯऔಘྉ֎෦ίετΛআ͘
Slide 22
Slide 22 text
͓͠ͳ͕͖ • DashΛGoogle CloudͰಈ͔͢ͳΒCloud Run • ΦΦλχαϯϚονϣ͞Μ৭ʑͱΤά͍ • ࣗͰσʔλج൫Λ࣋ͬͯର͔͔ͯۚ͠Βͳ͍ ※AWS, ଞͷΫϥυαʔϏεͰಉ͜͡ͱ͕Ͱ͖·͢Αʂ ʢGoogle Cloudʹ͍ͯ͠ΔͷࢲͷΈͰ͢ʣ
Slide 23
Slide 23 text
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠⽁ @shinyorke