Save 37% off PRO during our Black Friday Sale! »

Pythonista's Batting Eye(選球眼) #PyConJP 2018

Pythonista's Batting Eye(選球眼) #PyConJP 2018

PyCon JP 2018 Talk Session https://pycon.jp/2018/

Baseball Science, Web Application, Barrel Zone, and more...

2c0947c6a28e7f771ebd9859ecf54e5c?s=128

Shinichi Nakagawa

September 17, 2018
Tweet

Transcript

  1. Pythonista’s Batting Eye Shinichi NAKAGAWAʢ໺ٿΤϯδχΞʣ a.k.a. @shinyorke NEXT BASE Corp.

    Chief Technology Officer PyCon JP 2018 Talk Session 2018/9/17 Pythonistaͷબٿ؟ʢͤΜ͖Ύ͏͕Μʣ
  2. ൃදͷલʹ…͓ئ͍ :bow: • ϓϩΞϚ໰Θͣɺ೔ຊͷ໺ٿʹؔ͢Δ࣭໰ɾ͝ҙݟʹ
 ͍ͭͯ͸͓౴͑Ͱ͖·ͤΜʢ͓࢓ࣄͳͷͰ͓࡯͍ͩ͘͠͞ʣ • ϝδϟʔϦʔάʹ͍ͭͯ͸ՄೳͳݶΓ౴͑·͢
 ˞͜ͷൃදͷ୊ࡐͰ͢ • Pythonɾٕज़ͷ࿩͸جຊతʹ͓౴͑͠·͢


    ˞ۀ຿ʢ໺ٿʣʹ఍৮͠ͳ͍ݶΓ • ίʔυ͸ެ։͠·ͤΜɺεϥΠυ͸ެ։͠·͢
 ࣸਅɾSNSγΣΞ͸ΨϯΨϯͪ͠Ό͍ͬͯͩ͘͞ʂ
  3. ʊਓਓਓਓਓਓਓਓਓਓʊ ʼɹಥવͷ໺ٿΫΠζɹʻ ʉY^Y^Y^Y^Y^Y^Y^Y^Yʉ

  4. ϝδϟʔϦʔά ࠓγʔζϯͷϗʔϜϥϯԦ ͱ͍͑͹ʂʁ ※2018/9/17(JST)ݱࡏ,྆Ϧʔά౷ҰԦऀ

  5. ʲ౴ʳΫϦεɾσʔϏε • Khris Davis,௨শʮKhrushʯ • Ξ੢஍۠ΞεϨνοΫεͷओ๒ • 3೥࿈ଓ40ຊྥଧҎ্(2016ʙ2018)
 ※ࠓγʔζϯ43ຊྥଧ(9/17 JSTݱࡏ)

    • ӈ౤ӈଧ,എ൪߸2 • ʮ࢛൪DHʯ,૸ྥͱकඋ͸μϝ • ਎௕180cm/86kgɺҙ֎ͱখ͍͞ ݩը૾ɿWikipedia
  6. ஌Βͳ͍ͬ͢ΑͶʢ࡯͠ʣ σʔλͰ͓ݟͤ͠·͢Ͷ #σϞ͠·͢

  7. σʔλͰݟͯΈΑ͏ᶃ ࠨ͔Βଧٿ݁Ռɺώοτνϟʔτɺଧٿछผ

  8. σʔλͰݟͯΈΑ͏ᶃ ࠨ͔Βଧٿ݁Ռɺώοτνϟʔτɺଧٿछผ

  9. σʔλͰݟͯΈΑ͏ᶄ ࠨ͔Βଧٿ଎౓ɺඈڑ཭ɺ଎౓×֯౓

  10. σʔλͰݟͯΈΑ͏ᶄ ࠨ͔Βଧٿ଎౓ɺඈڑ཭ɺ଎౓×֯౓

  11. ϗʔϜϥϯʢؚΉ௕ଧʣ ͕ग़΍͍͢κʔϯ͕ଘࡏ͢Δ ͱ͍͏͜ͱ͕Θ͔͖ͬͯͨ

  12. ʮੌ͍଎౓×͍͍֯౓ʯͰඈڑ཭͸৳ͼΔ ՊֶͱσʔλͷݕূʹΑΓɺ଎౓×֯౓ͷ૊Έ߹ΘͤͰඈͿ͜ͱ͕Θ͔ͬͯΔ ϝδϟʔͰ͸ʮόϨϧɾκʔϯʯͱݺ͹Ε͍ͯ·͢&kwsk͸ϕʔεϘʔϧΪʔΫεͰʂ ݩը૾ɿhttp://m.mlb.com/glossary/statcast/barrel

  13. ʮ଎͍ϑϥΠΛଧͯʯ #ҙ༁ ଧٿ଎౓Λ্͛ͯɺఔΑ͍֯౓Ͱඈ͹͢ͱ৳ͼΔ ※஫ɿ֯౓্͕͕Γ͗͢Δͱଧٿ͕৳ͼͳ͍

  14. όϨϧɾκʔϯʹ౰ͯ͸ΊΔͱ Jupyter + BokehͰόϨϧΛ࡞ਤʢ໢ֻ͚෦෼ʣ ώοτੑଧٿͷ଎౓͕ߴ͍ɺ௕ଧ͸֯౓͕͋Δ͜ͱ͕Θ͔ΔͩΖ͏͔ʁ

  15. ϗʔϜϥϯԦͷͻΈͭ • ଧٿ଎౓Λ৳͹͢ʢ160km/hҎ্ʣ • ͍͍ײ͡ͷ֯౓ʹඈ͹͢ • ૯ͯ͡ɺʮϑϥΠΛଧͭ౒ྗΛ͢Δʯ
 ˠʮϑϥΠϘʔϧֵ໋ʯ͍ͬͯ͏΍ͭͰ͢ • ϑϥΠΛଧͭͨΊͷϘʔϧͷݟۃΊͱٕज़͕େࣄ

  16. ϘʔϧΛݟۃΊΔʮબٿ؟ʯ ͱ͍͏ٕज़͕͘͢͝େࣄ ϑϥΠΛଧٕͭज़ͱηοτͰ ௕ଧ͸୔ࢁੜ·ΕΔ

  17. ͦͯ͠զʑΤϯδχΞ ͓ΑͼPythonistaʹ΋ ʮબٿ؟ʯ͕ଘࡏ͢Δ #ຊ೔ͷςʔϚ

  18. ͓ͬͱɺࣗݾ঺հΛ ๨Ε͓ͯΓ·ͨ͠

  19. ໺ٿΤϯδχΞͰ͢ • PyCon JPΛΩοΧέʹʮϗϯτʹ໺ٿͷਓʯ
 ʹͳͬͨʮ໺ٿͷΤϯδχΞɾݚڀऀʯͰ͢ • Shinichi NAKAGAWA(@shinyorke) • ʢגʣωΫετϕʔε

    ໺ٿΤϯδχΞ݉CTO • Python΋͘΋ࣗ͘शࣨʢ#rettypyʣΦʔΨφΠβʔ • ʲCareerʳITίϯαϧˠϦΫϧʔτˠRetty→΍͖͏ • ຊ৬͸αʔόʔαΠυΤϯδχΞɺࠓ͸ԿͰ΋԰ɺڕྉཧେ޷͖
  20. ʲCMʳωΫετϕʔε #ͱ͸ • Innovations For All Athletes
 (શͯͷΞεϦʔτʹٕज़ֵ৽Λ) • τϥοΫϚϯ(υοϓϥʔϨʔμʔ)


    ͔ΒಘΒΕͨ౤ٿσʔλΛղੳ͠,
 ෼ੳɾՄࢹԽΛߦ͏ϓϩμΫτʮBACSʢόοΫεʣʯΛٿஂɾબखʹఏڙ • ϓϩΞϚ໰Θͣɺ໺ٿνʔϜɾબखͷಈ࡞ղੳɾӡӦαϙʔτetc… • ͦͷଞϝσΟΞࣄۀͳͲͳͲɺৄ͘͠͸ https://nextbase.co.jp/ • ݱࡏΤϯδχΞืूதͰ͢ʂҰॹʹεϙʔπΛՊֶ͓ͯ͠΋͠Ζ͍ੈͷதΛ࡞Ζ͏ʂ ※BACS͸ʮBaseball Analytics and Coaching Systemʯͷུ
  21. ʲCMʳBaseball Geeks • ໺ٿͷʮະདྷʯΛൃ৴͢ΔϝσΟΞͰ,ωΫετϕʔεͰӡӦ͍ͯ͠·͢ • σʔλɾεϙʔπՊֶͰ໌Β͔ʹͳͬͨ͜ͱΛʮΘ͔Γ΍͘͢ʯ఻͑Δ • ΈΜͳಡΜͰͶ&ϒΫϚ΋ΑΖ͘͠ʂ https://www.baseballgeeks.jp/

  22. ʲCMʳPython΋͘΋ࣗ͘शࣨ #rettypy • ࢲ͕Ҏલࡏ੶͍ͯͨ͠RettyͷΤϯδχΞ஥ؒͱڞʹ։࠵͍ͯ͠Δ΋͘΋͘ձ • झࢫ&Ϟοτʔ • ֤ࣗ,͓୊Λ࣋ࢀͯ͠ʮࣗश(΋͘΋͘)ʯ͢Δ • ൃදɾࡶஊΛ௨ͯ͡৘ใަ׵΍ֶͼΛಘΔ

    • ΠΠΰϋϯ(ϥϯνɾ͓΍ͭ)Λ༇͠Ή • ॳ৺ऀ͔ΒΤόϯδΣϦετ·Ͱଟछଟ༷ͳࢀՃϝϯόʔ • ࣍ճ͸ࠓि຤ʢ9/22౔ʣͰ͢ɺདྷͯͶ https://retty.connpass.com/event/100173/
  23. PyCon JPͱ໺ٿʢ5೥໨ʣ • 2014ɿDjango(WebΞϓϦ),ηΠόʔϝτϦΫε • 2015ɿ෼ੳج൫ͱPyData,ΞμϜɾμϯ཰ • 2016ɿϏοάσʔλղੳ,Pitch f/x(pitchpx) •

    2017 ɿ෼ੳΞϯυՄࢹԽج൫ϦχϡʔΞϧ,ಘ఺Ձ஋ • 2018ɿ্هΛ͢΂ͯҰ৽͓ͯ͠ಧ͚ˡNewʂ
  24. ໺ٿ෼ੳج൫ʮMortonʯ • PyCon JP 2014ʙ2017Ͱഓ͖ͬͯͨϊ΢ϋ΢Λू݁͠ɺ
 σʔλऩूʙ෼ੳʙՄࢹԽΛϦχϡʔΞϧͨ͠৽࣌୅ͷ໺ٿج൫ • ॳ୅(2014)ͷʮNo Ballʢ໺ٿʣʯɺ2017ʮBradfordʯͷػೳʹ
 Ճ͑ɺτϥοΩϯάσʔλͷ෼ੳΛ৽ͨʹ௥Ճ

    • ໊લ͸τϥοΩϯάσʔλͰ࠶ධՁ͞Εͨϝδϟʔ۶ࢦͷ
 ઌൃӈ࿹ʮνϟʔϦʔɾϞʔτϯʢݱΞετϩζʣʯ͔Βഈआ
 ˠৄ͘͠͸ʮϏοάσʔλɾϕʔεϘʔϧʯ͍ͬͯ͏ຊʹ͋Γ·͢

  25. ຊ೔͓࿩͢ΔϞϊͷશମ૾

  26. ࢖ͬͨ΋ͷҰཡɹ˞୅දతͳ΋ͷ ϙΠϯτ *1ZUIPOʢ%PDLFSͷ1ZUIPOެࣜΠϝʔδΛར༻ʣ *8FCΞϓϦɿ/VYUKT %KBOHP *෼ੳɾՄࢹԽɿ+VQZUFS #PLFI *໺ٿՊֶܭࢉɿQBOEBT TBCS˞ࣗ࡞ *ϓϥοτϑΥʔϜɿ-VJHJ

    *Ϋϥ΢υɾΠϯϑϥɿ%PDLFS$&GPS.BD *ͳ͓ɺଞʹ΋৭ʑ࢖ͬͯ·͢ʢ42-"MDIFNZͳͲʣ
  27. ຊ೔ͷ͓͠ͳ͕͖ʢPythonʣ • Django REST Framework + Nuxt.jsͰSPA • LuigiΛ༻͍ͨ௒ָͪΜͳύΠϓϥΠϯ •

    PyDataͰͬ͘͞ΓϓϩτλΠϐϯά
  28. Django REST FrameworkͱNuxt.js PythonͰWebͱ͍͑͹Djangoͦͯ͠JSͩͱSPA͕དྷͯ·͢Ͷͱ. ઌ΄ͲͷΫϦεɾσʔϏεͷ݅Ͱ͓ݟͤͨ͠΍ͭͰ͢.

  29. ຊ೔͓࿩͢ΔϞϊͷશମ૾ ࠓ͜͜

  30. Python×σʔλ෼ੳͷ Πϝʔδ͕ڧ͍໺ٿPython ॳͷ࡞඼͸DjangoͰͨ͠

  31. PythonͰ͸͡ΊΔ໺ٿϓϩάϥϛϯά (2014) ౰࣌͸ϑΝϯλδʔϕʔεϘʔϧʢιγϟήʣ ʹউͭͨΊͷσʔλ෼ੳΛ໨ࢦ͍ͯͨ͠

  32. ࠶ͼDjangoʹ෣͍໭ͬͨϫέ • Web͓ΑͼPythonͷ4೥ؒͷਐԽʹ௥ਵʢޙड़ʣ • SPAʢSingle Page Applicationʣ࡞Γͱϝϯς͕࢓ࣄʹ
 ˠͪͳΈʹ,ฐࣾBACS͸Vue.js੡ͷSPA • ࠓޙͷϓϩμΫτ։ൃɾٕज़બఆʹ޲͚ͯͷΩϟονΞοϓ


    ˠҰԠCTOͳͷͰɺʮखΛಈ͔ͯ͠ʯੜ͖ͨ஌ࣝΛशಘ • ࠷ۙDjango͕ϒʔϜͬΆ͍ͷͰ࠶ͼ೾ʹ৐Δ #νϟϥ͍
  33. PyCon JP 2014͔ΒͷਐԽ • Pythonɿ3.4→3.7 • Djangoɿ1.7→2.1 • Bootstrapϕʔεͷී௨ͷWebΞϓϦˠSPA •

    άϥϑϥΠϒϥϦ΋ચ࿅͞Εͨ(Chart.jsͳͲ) • ໺ٿσʔλɺ৽ͨʹʮτϥοΩϯάσʔλʯ͕ՃΘΔʂ
 ˠMLBެೝͷʮBaseball Savantʯͱ͍͏σʔληοτ͕ՃΘΓɺ
 ɹଧٿ଎౓΍֯౓ɺϘʔϧճస਺ͳͲ΋෼ੳͷର৅ʹ
  34. Nuxt.js(Vue.js) • ղੳɾ෼ੳπʔϧͱͯ͠ٻΊΒΕΔϢʔβʔମݧʢUXʣΛ
 ׎͑ΔͳΒSPAͰ͠ΐ͏ʂͱ࠷ॳ͔Βબ୒ࢶ͸SPAҰ୒Ͱͨ͠ • ࢓ࣄͰVue.jsΛ΍ΓͭͭɺReactͳͲ΋͓ࢼ͠Ͱ৮ͬͯ
 ৭ʑߟ͑ͨʢࢼͨ͠ʣ݁ՌɺNuxt.jsʹͨͲΓண͍ͨ • Nuxt.js͸Vue.jsΛϕʔεʹͨ͠ϑϧελοΫͳSPA FW


    ϧʔϧʹैͬͯॻ͍ͯϏϧυͨ͠Βಈ͘΋ͷ͕खʹೖΔ • ؊৺ͷUI͓Αͼάϥϑ࿈ܞ͸.,Nuxt UIͰ΄΅΄΅࿫͑ͨ
 ˠ͓͔͛ͰPyConʢࠓ೔ʣʹؒʹ߹͏ɹ˞஫ɿͱ͸͍͑ਏ͔ͬͨ
  35. Nuxt UIʙCore UIͷNuxt.js൛ • BootstrapϕʔεͷAdminʢ؅ཧʣը໘ͷ༗໊ͳ
 ύοέʔδͱͯ͠ʮCore UIʯ͍ͬͯ͏ͷ͕͋Δ • Core UIࣗମ͸৭ΜͳFWʢAnguler,VueͳͲʣʹ


    ରԠ͍ͯ͠Δ,ͦͷதʹNuxt.js൛͕ • Nuxt UI͍ͬͯ͏ౕΛForkͯ͠ಠ࣮ࣗ૷͠·ͨ͠
 https://github.com/muhibbudins/nuxt-coreui
  36. Django REST Framework • UIपΓ͸Nuxt.jsʹ೚ͤ,Django͸JsonΛ΍ΓͱΓ͢Δ
 RESTful APIͱͯ͠ͷ໾ׂʹ஫ྗ
 →ϑϩϯτͱAPIͰ໾ׂ͕෼͔ΕΔ໌֬ͳਐԽ
 ʢઃܭํ਑ͱ͍͏ҙຯͰʣ •

    ͱ͍͏༁ͰDjango REST Frameworkͷग़൪ • ηΠόʔϝτϦΫεͷࢦඪ஋ܭࢉ͸SerializerͰ
 ៉ྷʹͰ͖ͨ :excellent:
  37. SerializerͰࢦඪ஋ܭࢉ(งғؾ) from rest_framework import serializers from sabr.stats import Stats from

    mlb.models import Batter class BattingSerializer(serializers.HyperlinkedModelSerializer): ba = serializers.SerializerMethodField('batting_average') slg = serializers.SerializerMethodField('slugging') obp = serializers.SerializerMethodField('onbase') @classmethod def calc_single(cls, obj): return Stats.single(obj.h, obj.hr, obj.number_2b, obj.number_3b) @classmethod def calc_tb(cls, obj): return Stats.tb(cls.calc_single(obj), obj.hr, obj.number_2b, obj.number_3b) @classmethod def calc_avg(cls, obj): return Stats.avg(obj.h, obj.ab) @classmethod def calc_obp(cls, obj): return Stats.obp(obj.h, obj.bb, obj.hbp, obj.ab, obj.sf) @classmethod def calc_slugging(cls, obj): return Stats.slg(cls.calc_tb(obj), obj.ab) def batting_average(self, obj): return self.calc_avg(obj) def slugging(self, obj): return self.calc_slugging(obj) def onbase(self, obj): return self.calc_obp(obj) class Meta: model = Batting fields = ( # ※͜͜ʹSerializerͷcolumn͕ฒͿ )
  38. REST FrameworkͰྑ͔ͬͨ • ߦϨϕϧͷࢦඪܭࢉΛSerializerͰ׬݁Ͱ͖Δ
 ˠSerializerMethodFieldͰhookͰ͖Δ, ςετ͠΍͍͢ʢςετ͸ॻ͍ͯͳ͍ʣ • SerializerMethodField্Ͱࢦඪܭࢉ
 ˠҎલࣗ࡞ͨ͠ʮsabrʯͱ͍͏ύοέʔδͰඞཁͳܭࢉ͕Ͱ͖ͨ
 ɹ͍͍ͪͪSQLͰܭࢉͨ͠Γؔ਺࡞ͬͨΓ͢Δख͕ؒল͚ͨ

    • DB΁ͷΫΤϦͱSerializerʢ໭Γ஋ʣͷ໾ׂɾ੹೚Λ෼͚Δ
 ˠViewͰΫΤϦൃߦ,SerializerͰ໭Γ஋੔ܗͱ៉ྷʹ෼͚͔͚ͯΔ
 ɹ݁Ռ,ݟ௨͕͠ྑ͍ʢϝϯς͠΍͍͢ʣίʔυʹ
 ɹͱ͸͍͑ਏ͔ͬͨ(´ɾωɾʆ)
  39. Pythonistaͷબٿ؟(2018) Nuxt.jsͱDjango REST FrameworkͰચ࿅͞Εͨ݁Ռ͍͍ײ͡ʹ ࡉ͔͍ٕज़࿦ɾઃܭϊ΢ϋ΢͸͜ͷޙࡶஊ or PyLadies Tokyo 4प೥LT(10/8)Ͱʂ

  40. LuigiΛ༻͍ͨ௒ָͪΜύΠϓϥΠϯ σʔλ͸ৗʹ৽͘͠ɺͦΕ΋ָʹӡ༻͠·͠ΐ͏ ࡞Δ΋ͷ΋গͳͯ͘͠Ͷͱ.

  41. ຊ೔͓࿩͢ΔϞϊͷશମ૾ ࠓ͜͜

  42. Luigi + pandasͰ೔࣍όον • Baseball Savant https://baseballsavant.mlb.com/
 ͷσʔλ͸೔ʑߋ৽͞ΕΔʢࢼ߹ཌ೔ʹ͸ެ։ʣ • ͬͯฉ͘ͱ,΍ͬͺ৽͍͠σʔλͰ෼ੳɾղੳΛ


    ͨ͘͠ͳΔΑͶʁʢྫɿࡢ೔ͷOhtani-sanͬͯʁʣ • ͬͯࣄͰ, Luigi + pandasͰ೔࣍Ͱσʔλऔಘͱ
 DBʢMySQLʣ΁ͷߋ৽Λߦ͏ύΠϓϥΠϯΛ࡞ͬͨ,ͪΐͬͱਏ͔͚ͬͨͲ • ࣮͸ڈ೥,RettyͰಉ͡Α͏ͳ࢓ࣄΛ͍ͯͯͦ͠ͷܦݧ͕ੜ͖ͨ
 ༧໿ಋઢΛ͑͞͞ΔPython੡όοΫΤϯυΛLuigi+pandas+ScrapyͰ࡞ͬͨϋφγ
 https://qiita.com/shinichi-nakagawa-r/items/f91ee099e5bce7cd5a4f
  43. LuigiύΠϓϥΠϯʢֆʣ σϑΥϧτͰUI͕͋ΔͷͰؾ࣋ͪతʹָ ࠶࣮ߦ΋Luigiͷ࢓૊ΈͰΠέ·͢ͱʢػցֶशք۾ʹਓؾͳͷΘ͔Δʣ ॲཧதˠ ←ॲཧޙ

  44. PyDataͰͬ͘͞ΓϓϩτλΠϐϯά ಘΒΕͨσʔλͰ͍͖ͳΓαʔϏε͸࡞Εͳ͍ ஍ಓͳ࣮ݧͱϓϩτλΠϐϯά͕͋ͬͯͦ͜

  45. ຊ೔͓࿩͢ΔϞϊͷશମ૾ ࠓ͜͜

  46. ͜͜Ͱݴ͏PyData #ͱ͸ • PythonΛ༻͍ͨσʔλॲཧʢऔಘ,੔ܗ,෼ੳʣ
 ͳͲɺσʔλʹؔ͢ΔӦΈ͢΂ͯ • ػցֶशͳͲͷલॲཧͱ͔͕Α͋͘Δ΍ͭ • ํ๏͸ԿͰ΋ΞϦ͕ͩJupyter, pandasΛ


    ࢖͏͜ͱ͕ଟ͍ʢҹ৅ʣ
  47. PyDataͰϓϩτλΠϐϯά • WebΞϓϦ(Django/Nuxt.js),όοΫΤϯυ(Luigi)͓Αͼσʔλߋ৽ɾલॲ ཧ͢΂ͯ, Jupyterͱpandas, BokehͰϓϩτλΠϐϯάͨ͠ • ࢼ͠ॻ͖ͨ͠Γσόοάͨ͠Γ͢Δͷʹ,ϒϥ΢βͰಈ͘؀ڥ͸
 ͱͯ΋΍Γ΍͍͢ʢؾܰʹ࡞ͬͯյͤΔʣ. •

    ιϑτ΢ΣΞͷʮՁ஋ʯ͸ৗʹTry and ErrorΛ܁Γฦ͠ͳ͕Βਫ਼៛Λ
 ্͛ΔϞϊ,͜͏͍ͬͨ࡞ۀ͸Jupyter࠷ڧ • ର৅σʔλΛʮࣂ͍ͳΒ͢ʯ·Ͱ΍Δͷ͕ϕετ.
 ͪΌΜͱ࡞Γ࢝Ί͔ͯΒਏΈΛຯΘ͏ΑΓίετֻ͕͔Βແͯ͘ྑ͍.
  48. ࠓճ׆༂ͨ͠Ϟϊ • Bokehʢάϥϑඳըʣ • ࢄ෍ਤ΍ԁάϥϑ • ׳Εͳ͍JSͰඳ͘લʹ
 ଘ෼ʹ࣮ݧ • pandasʢσʔλॲཧʣ

    • CSVΛॲཧͨ͠Γ • DB͔Β௚઀σʔλΛҾ͍ͨΓ • ܽଛ஋ॲཧͱ͔େ׆༂ • ͜ΕΒΛJupyterͰ͍͍ײ͡ʹॲཧ
  49. ͦͷଞͷͩ͜ΘΓϙΠϯτ • Sean LahmanʢηΠόʔσʔλʣDBߏங • PyCon JP 2014Ͱ࡞ͬͨϚΠάϨʔγϣϯπʔϧʢࣗ࡞ʣΛ࢖ͬͯܭࢉ • εΩʔϚ͕มΘͬͨ෼Λ৽نͰ։ൃʢେͯ͠ਏ͘ͳ͔ͬͨʣ

    • Docker • Ϋϥ΢υαʔϏεͰͷӡ༻͓Αͼ,ଞϝϯόʔ΁ͷಈ͘΋ͷڞ༗ • ϗϯτ͸K8SԽ͔͕ͨͬͨؒ͠ʹ߹Θͣorz #rettypy Ͱ΍Δͱࢥ͏ • ։ൃɾςετ͸Ұ؏ͯࣗ͠෼ͷPC্ɺPyCharmΛ׆༻ͯ͠΍Γ·ͨ͠
  50. ͱ͜ΖͰօ͞Μ ͖͔ͬ͞Βʮ͋Δදݱʯ͕ ଟ͍͜ͱʹ͓ؾ͖ͮͩΖ͏͔ʁ

  51. ਏ͔ͬͨ ਏ͔ͬͨ(´ɾωɾʆ) ਏΈΛຯΘ͏ ͳΔ΄Ͳʁ

  52. ໺ٿʹ͸ʮਏ͍ʯ͜ͱ͕25ʙ334ݸ͘Β͍͋ΔʢΠϝʔδʣ ※ಛఆͷݸਓΛࢥ͍͍ͭͨํ,ଟ෼Կ͔ͷצҧ͍Ͱ͢ʢ๮ʣ

  53. ʲۓٸݕূʳεϥΠμʔ͸ਏ͍ʁ • ๭ܝࣔ൘Ͱ༗໊ͳʮ֎εϥ͸ਏ͍ʯ͸ຊ౰͔ʁ • PyDataͱϝδϟʔͷ
 τϥοΩϯάσʔλͰ
 Θ͔Δ͔΋͠Εͳ͍ • ͬͯࣄͰωλͬΆ͘ݟͯΈ·͢
 ର৅͸ϝδϟʔϦʔΨʔ


    
 ˞࢓ࣄͰ͸͜Μͳద౰ͳࣄ͸͠·ͤΜ
 ɹͱ͍͏͔࢓ࣄωλ͸౰વώϛπͰ͢ʂʂʂ
  54. ਏ͍ʢਏ͘ͳ͍ʣϥϯΩϯά ໊લ ଧ ਏ͍ʢࡾৼʣ (JBODBSMP 4UBOUPO ӈ  +BWJFS#BF[ ӈ

     1BVM (PMETDINJEU ӈ  +PFZ(BMMP ࠨ  5SFWPS4UPSZ ӈ  ໊લ ଧ ਏ͘ͳ͍ ʢ҆ଧʣ +PTF"MUVWF ӈ  5SFWPS4UPSZ ӈ  .BSDFMM 0[VOB ӈ  1BVM (PMETDINJEU ӈ  ,FWJO1JMMBS ӈ 
  55. ਏ͞Λ؍࡯ͯ͠ΈΑ͏ ਏ͍…΋ͱ͍ɺεϥΠμʔͰΫϧοΫϧ͢Δ όολʔͷಛ௃ΛΈΜͳͰݟͯΈΑ͏

  56. ͋ͬʢ࡯͠ʣ 34ຊྥଧ,199ࡾৼͷώϛπ͸ εϥΠμʔʹΑΔࡾৼͩͬͨʢద౰ʣ

  57. ݁ͼ

  58. ໺ٿͱٕज़ͷ ʮબٿ؟ʢͤΜ͖Ύ͏͕Μʣʯ 
 ͱ͸ʁ

  59. ຖ೔සൟʹൃੜ͢Δ ʮબ୒ͱܾஅʯ …ͷ܁Γฦ͠ͷதͰ ʮબ୒ͱूதʯ ͕͔ͬ͠ΓͰ͖Δ͜ͱ

  60. બ୒ͱܾஅ • ΤϯδχΞʹ͸ʮબ୒ʯͱʮܾஅʯ͕ৗʹ͋Δ • DjangoͰ࡞Δ?Flask??ͦΕͱ΋Rails??? • SPAͬͯVue.js͕͍͍ͷʁͦΕͱ΋Angular? • ֮͑ΔͳΒPythonͳͷ͔JavaScript •

    ৗʹ͘ΔϘʔϧʹରͯ͠ʮৼΔʯ͔ʮৼΒͳ͍ʯ͔
 બ୒͕ഭΒΕΔ໺ٿબखͩͬͯʮબ୒ʯͱʮܾஅʯͷ܁Γฦ͠
 ˞ਏ͍εϥΠμʔ͸ࣺͯΔࣄ΋ඞཁ
  61. ਖ਼͘͠ʮબ୒ʯ͢ΔͨΊʹ͸ʁ • Կ͸ͱ΋͋Εʮٕज़ྗʯΛຏ͘͜ͱ • ΤϯδχΞϦϯάΛਖ਼͘͠஌Δɾ࿅श͢Δ • ͓ͦΒ͚ͩ͘Ͳ໺ٿ΋Ұॹ • ೔ʑͷ࿅शɾ஁࿉ΛଵΒͳ͍ •

    ݸਓษڧɾ࿅श • ֎ͷษڧձ΍Πϕϯτͷ׆༻,νʔϜͰͷ࿅श
  62. ʮܾஅʯΛڪΕͳ͍ • ʮΠγϡʔ͔Β͸͡ΊΔʯ • ࡞ΔϞϊɾ෼ੳ͢ΔίτΛʮݴޠԽʯ͢ΔɺԾઆɾςʔϚࠐͰ • ޙड़͢Δʮܾஅ͢Δʯϧʔϧʹͦͷ··ܨ͕Δ • ϞϊΰτΛʮܾஅ͢ΔʯϧʔϧΛࣗ෼ʹ࡞Δ •

    ʮ໎ͬͨΒ˓˓ʯͷʮ˓˓ʯΛܾΊΔ • ࢲͷ৔߹ɺΤϯδχΞϦϯάͩͱ
 ʮ໎ͬͨΒPythonʯͱ͍͏ϧʔϧΛܾΊ͍ͯΔ • ໺ٿͰݴ͏ͱ͜ΖͷʮϠϚΛுΔʯΈ͍ͨͳϞϊ • ʮܾஅϧʔϧʯͷ֎ʹ͋Δ΋ͷ͸ݟಀ͢ࣄΛڪΕͳ͍ʢεϥΠμʔΛݟૹΔ༻ʹʣ
  63. ूத͢Δ • ʮબ୒ʯʮܾஅʯΛਖ਼͘͠ճ͢ʹ͸ʮूதʯ΋େ੾ • ʮબ୒ʯʮܾஅʯͨ͠ࣄΛ΍Γ͖ΔҝͷϦιʔεΛʮूதʯ͢Δ • ৭ʑ͋Ε͜Εͱ΍Γ͗͢ͳ͍ • ྲྀߦΓ΋ͷʹඈͼͭ͘ •

    ຖ೔ɾຖिͷ༻ʹษڧձ΍Πϕϯτʹߦ͘ • ूத͢Δ͸ͣͷϦιʔεʢ࣌ؒɾ͓ۚʣ͕ൃࢄ͢ΔΑ͏ͳࣄ͸NG • ࣌ؒతʹʮूதʯͰ͖ΔΑ͏ͳʮश׳ʯ࡞ΓʢྫɿSNSઈͪʣ
  64. ࢲͷʮ໺ٿ×Pythonʯ͸ऴΘΓ • ʮ໺ٿΛ΍Δͧʂʯͱબ୒ɾܾஅɾूத͓ͨ͠ӄͰ
 ೦ئͷʮ໺ٿΤϯδχΞʯͱͯ͠ࠓ͜͜ʹ͍Δ • εϙʔπͷੈքΛΑΓྑ͘ɺ΋ͬͱ໺ٿΛָ͘͢͠ΔͨΊɺ
 ʮ໺ٿΤϯδχΞͱͯ͠ͷຊۀʹूதʯ • ʮ໺ٿͱΤϯδχΞϦϯάͷֶͼͱϊ΢ϋ΢ʯ
 ͸΋ͬͱ޿͍ੈքʹӋ͹͖ͨ·͢

    • ͜Εͦ͜·͞ʹʮͻΖ͕ΔPythonʯ
  65. ʮऐ͍͠ʯͱࢥ͏͜ͱͳ͔Ε • ࢲࣗ਎͸ʮ໺ٿҎ֎ͷςʔϚʯͰདྷ೥Ҏ߱ͷ
 PyCon JP΋εϐʔΧʔͱͯ͠௅ઓ͠·͢
 ˠ໺ٿͱ͸ҧ͏ԹΊ͍ͯͨςʔϚΛ΍Γ͍ͨ • ʮ໺ٿ×Pythonʯ͸த઒ͷઐചಛڐͰ͸ͳ͍
 Ή͠Ζ੮͕ۭ͍ͨͷνϟϯεͰ͢Αʁ
 ຊؾͰ໺ٿ޷͖ͳΒ͔͔͍ͬͯ͜΍ʂʂʂ

    • ͱ͸͍͑ࣗ෼͸ʮ΍͖͏ຽʯͳͷͰςϊώϥΫϧʔ͸͋Γ͑Δ()
  66. ࠓ·Ͱ͝੠ԉ ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ ϗϯτͷ໺ٿɾεϙʔπͰ ΤϯδχΞͱֵ໋ͯ͠ى͜͢ ͷͰࠓޙ΋ΑΖ͘͠ʂʂ

  67. ήʔϜηοτ ໺ٿͱPythonͷ5೥ؒʹײँʂ͋Γ͕ͱ͏͍͟͝·ͨ͠&୭͔࣍ʹଓ͍ͯͶʂ Shinichi Nakagawa(Twitter/Facebook/etc… @shinyorke)