Skip to content

Instantly share code, notes, and snippets.

@p-baleine
p-baleine / index.sh
Created May 15, 2018 02:20
jumanで分かち書き
cat textfile | juman | awk -f wakati.awk
@p-baleine
p-baleine / MemN2N.ipynb
Last active October 25, 2017 10:42
MemN2N
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@p-baleine
p-baleine / tf.contrib.seq2seq.ipynb
Last active September 8, 2017 22:53
seq2seq new API
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@p-baleine
p-baleine / index.css
Created January 15, 2017 09:44
jenkins chino theme
html {
background: url(http://line-stamps.me/wp-content/uploads/2015/08/main39.png)
}
@p-baleine
p-baleine / arxiv.1606.00499_memo.ipynb
Last active September 15, 2016 09:01
Generalizing and Hybridizing Count-based and Neural Language Modelsのメモ
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@p-baleine
p-baleine / dynamic_rnn.ipynb
Created August 6, 2016 04:17
Dynamic Recurrent Neural Network using tf.nn.dynamic_rnn
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@p-baleine
p-baleine / LSTM PTB(small).ipynb
Last active May 16, 2023 12:28
Tensorflow's PTB LSTM model for keras
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@p-baleine
p-baleine / 0_reuse_code.js
Created May 5, 2016 01:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@p-baleine
p-baleine / linear-algebra.clj
Last active September 26, 2015 14:30
Minimal line algebra functions in Clojure
(require '[clojure.core.match :refer [match]])
;; (add [[7 3] [-1 2]] [[4 2] [3 -1]]) ;; => [[11 5] [[2 1]]]
(defn add [lhs rhs]
(match [lhs rhs]
[(l :guard number?) (r :guard number?)] (+ lhs rhs)
[(l :guard vector?) (r :guard vector?)] (vec (map add lhs rhs))))
;; (transpose [[5 2] [6 3] [-2 0]]) ;; => [[5 6 -2] [2 3 0]]
@p-baleine
p-baleine / eratosthenes.clj
Last active September 16, 2015 08:46
Sieve of Eratosthenes in Clojur
(defn eratosthenes
"finding all prime numbers up to `x`"
[x]
(letfn [(continue? [x list]
(< (first list) (Math/sqrt x)))
(go [x list primes]
(if (continue? x list)
(let [head (first list)
new-list (filter #(not (= (mod %1 head) 0)) (rest list))]
(recur x new-list (cons head primes)))