Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ruby for the machine learning projects

Ruby for the machine learning projects

SAWADA Tadashi

July 29, 2018
Tweet

More Decks by SAWADA Tadashi

Other Decks in Technology

Transcript

  1. طࢹײ ▸ ͱ͋Δݹͷݴޠ࢖͍ᐌ͘
 ʮׅހ͸ݟ͑ͳ͘ͳΔʯ ▸ ·ͨ·ͨɺ͝৑ஊΛ (defn fetchWikipediaArticleAsynchronously [wikipediaArticleNames] "Fetch

    a list of Wikipedia articles asynchronously. return Observable<String> of HTML" (Observable/create (rx/action [observer] (let [f (future (doseq [articleName wikipediaArticleNames] (-> observer (.onNext (http/get (str "http://en.wikipedia.org/wi ; after sending response to onnext we complete the sequence (-> observer .onCompleted))] ; a subscription that cancels the future if unsubscribed (.add observer (Subscriptions/create (rx/action [] (future-cancel f))))))) ; To see output (comment (-> (fetchWikipediaArticleAsynchronously ["Tiger" "Elephant"]) (.subscribe (rx/action [v] (println "--- Article ---\n" (subs (:body v) 0 125)
  2. ͪΐͬͱࢼͯ͠Έ·͠ΐ͏ class Foo: def bar(self): if bar == baz: return

    123 end end end ͜ͷ͋ͨΓʹ end ͕ ݟ͑ΔΑ͏ͳؾ͕ ͖ͯͨ͠Ͱ͠ΐʁ
  3. ػցֶशͷલॲཧʢ֓ཁʣ ▸ ੜσʔλΛ͍ͬͺ͍ूΊΔ ▸ ը૾, RDB, ςΩετ etc ▸ σʔλͷܗࣜΛ੔͑Δ

    ▸ ը૾αΠζΛἧ͑Δ, ςΩετΛ੔ܗ͢Δ etc ▸ ਺஋͕ೖͬͨߦྻΛ࡞Δ ▸ ͜͜·ͰͰ͖Ε͹ɺ͋ͱ͸ΞϧΰϦζϜʹ৯ΘͤΔ
  4. ػցֶशͷࢼߦࡨޡ ▸ લॲཧ ▸ RDB ͔Βσʔλऔಘ (਺10ສ݅ͱ͔) ▸ Unicode ਖ਼نԽ,

    HTMLλάআڈ, ܗଶૉղੳ etc ▸ ֶशɾ൑ఆϓϩηε (TensorFlow ͱ͔) ▸ ύϥϝʔλΛௐ੔ͯ͠܁Γฦ͠
  5. ػցֶशͷࢼߦࡨޡ ▸ લॲཧ ▸ RDB ͔Βσʔλऔಘ (਺10ສ݅ͱ͔) ▸ Unicode ਖ਼نԽ,

    HTMLλάআڈ, ܗଶૉղੳ etc ▸ ֶशɾ൑ఆϓϩηε (TensorFlow ͱ͔) ▸ ύϥϝʔλΛௐ੔ͯ͠܁Γฦ͠ ͜͜Λ͍Ζ͍Ζࢼ ͍ͨ͠
  6. ػցֶशͷࢼߦࡨޡ ▸ લॲཧ ▸ RDB ͔Βσʔλऔಘ (਺10ສ݅ͱ͔) ▸ Unicode ਖ਼نԽ,

    HTMLλάআڈ, ܗଶૉղੳ etc ▸ ֶशɾ൑ఆϓϩηε (TensorFlow ͱ͔) ▸ ύϥϝʔλΛௐ੔ͯ͠܁Γฦ͠ ͜͜Λ͍Ζ͍Ζࢼ ͍ͨ͠ ͬͪ͜͸ॲཧࡁΈ ͷ΋ͷΛ࢖͍ճ͠ ͍ͨ
  7. ػցֶशͷࢼߦࡨޡ ▸ લॲཧ ▸ RDB ͔Βσʔλऔಘ (਺10ສ݅ͱ͔) ▸ Unicode ਖ਼نԽ,

    HTMLλάআڈ, ܗଶૉղੳ etc ▸ ֶशɾ൑ఆϓϩηε (TensorFlow ͱ͔) ▸ ύϥϝʔλΛௐ੔ͯ͠܁Γฦ͠ ͜͜Λ͍Ζ͍Ζࢼ ͍ͨ͠ ͬͪ͜͸ॲཧࡁΈ ͷ΋ͷΛ࢖͍ճ͠ ͍ͨ ϓϩηεΛ෼͚ͨํ͕ḿΔ
  8. ͱ͍͏Θ͚Ͱɺ ▸ લॲཧͱֶशɾ൑ఆͰ޻ఔΛ෼͚ͨํ͕౎߹͕͍͍ ▸ ޙऀ͸ Python ʹ೚ͤΔ ▸ લऀ͸ Python

    Ͱͳͯ͘΋͍͍ ▸ ࢖͍׳Εͨ Ruby Ͱ΍Ζ͏ ▸ ͭ·ΓɺػցֶशͷϓϩδΣΫτͰ΋ Ruby ͷग़൪͸͋Δ