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

もぶぴーについて

5e1d0f7877241ad4447c6611d9a51fd7?s=47 cohalz
November 13, 2015

 もぶぴーについて

PMOBの話すやつ #1

5e1d0f7877241ad4447c6611d9a51fd7?s=128

cohalz

November 13, 2015
Tweet

Transcript

  1. ΋Ϳͽʔʹ͍ͭͯ

  2. ୭ ☞ Twitter: cohalz ☞ Github: cohalz ☞ Ingress: cohalz

    ☞ ӺϝϞ: cohalz ☞ άϧίε(ΞϓϦ൛): cohalzio ͋ͱͳΜ͔͋Γ·͚ͨͬ͠
  3. ΋Ϳͽʔͱ͸

  4. Ϛϧίϑ࿈࠯Ͱಈ͘Twitter bot

  5. None
  6. takuti/twitter-botͷFork

  7. ओͳಛ௃

  8. IgoͰ͸ͳ͘MeCabΛ༻͍ͯܗଶ ૉղੳ ☞ ࠓྲྀߦΓͷmecab-ipadic-NEologd͕࢖͑Δ ☞ ͍ͯ͏͔ͦ΋ͦ΋Igoಈ͔ͳ͔͔ͬͨΒࠩ͠ସ͑ͨ

  9. Ϛϧίϑ࿈࠯ ☞ จষΛ3~4ͭ૊ʹॱʹ෼͚ɼ͋Δจষͷ࢝·Γ͕લͷจষͷऴ ΘΓͱҰக͢Δ΋ͷΛͱͬͯܨ͛Δ ☞ ୯ʹDBʹ1,2,3,4൪໨ͷςʔϒϧΛ༻ҙͯ͠ݕࡧͯ͠ܨ͛ͯΔͩ ͚ ☞ ૠೖ͸ܗଶૉʹ෼͚ͯ1ͭͣͭॱ൪ͣΒͯ͠ૠೖ

  10. mysql> select * from fourorder limit 15; +-----------------+-----------------+--------+--------+ | first

    | second | third | fourth | +-----------------+-----------------+--------+--------+ | ϫϯμϑϧ | ( | U | ´ | | ( | U | ´ | Д | | U | ´ | Д | `) | | ´ | Д | `) | | | ΋Ϳͽʔ | ͱ͔͍͏ | ΍ͭ | ͳ | | ͱ͔͍͏ | ΍ͭ | ͳ | Μ | | ΍ͭ | ͳ | Μ | ͩ | | ͳ | Μ | ͩ | | | ެࣜ | Ϛείοτ | ͬͯ | ୭ | | Ϛείοτ | ͬͯ | ୭ | ͕ | | ͬͯ | ୭ | ͕ | ೝΊ | | ୭ | ͕ | ೝΊ | ͨ | | ͕ | ೝΊ | ͨ | Μ | | ೝΊ | ͨ | Μ | ͩ | | ͨ | Μ | ͩ | Α | +-----------------+-----------------+--------+--------+
  11. Ϧϓͷ಺༰ʹ൓Ԡ

  12. Ϧϓͷ಺༰ʹ൓Ԡ ☞ ϦϓϥΠͷจࣈྻ͔ΒMeCabΛ༻໊͍ͯࢺͱه߸ͷΈൈ͖ग़͢ ☞ ൈ͖ग़͞Εͨ΋ͷ͔ΒϥϯμϜʹҰͭબΜͰDB΁ ☞ DB͕ۭͷ݁Ռฦͨ͠ΒϥϯμϜʹϨίʔυΛҰͭબΜͰଓ͚Δ

  13. ϥϯμϜੑͱ଎౓

  14. order by rand()͸ΊͪΌ஗͍

  15. order by rand()͸ΊͪΌ஗͍ ☞ ͔֬ʹϥϯμϜʹ͸ͳΔ͚Ͳશ݅औಘ ☞ Ϛϧίϑ࿈࠯͸͔ͳΓͷճ਺ΫΤϦΛ౤͛Δ ☞ where rand()

    < 0.05 limit 40ͱٖͯ͠ࣅతʹ
  16. ࣗಈ࠶ىಈ ☞ cronͰ20෼ຖʹىಈ ☞ طʹىಈͯ͠σʔϞϯԽ͍ͯ͠ΔϓϩηεΛ࣍ͷىಈ࣌ʹࡴ͢

  17. ͖ͬ͞ެ։͠·ͨ͠ https://github.com/cohalz/MOBP

  18. None