Skip to content

Instantly share code, notes, and snippets.

@suzusuzu
suzusuzu / higher_order_svd.ipynb
Last active November 4, 2019 07:13
Higher Order SVD(HOSVD)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@suzusuzu
suzusuzu / pytorch_gradient_descent.ipynb
Last active October 7, 2019 16:36
pytorch_gradient_descent.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@suzusuzu
suzusuzu / gpytorch_iris.ipynb
Created October 7, 2019 10:49
gpytorch_iris.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@suzusuzu
suzusuzu / caratheodory.ipynb
Created October 5, 2019 23:07
caratheodory.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@suzusuzu
suzusuzu / kernel_estimation_entropy.ipynb
Created October 3, 2019 12:52
kernel_estimation_entropy.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@suzusuzu
suzusuzu / gpclust_demo.ipynb
Last active October 7, 2019 16:35
gpclust_demo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import chainer
import math
import argparse
def ngram_sentences(sentences, n=1):
parse = lambda words, n : list(zip(*(words[i:] for i in range(n))))
arr = []
for sentence in sentences:
arr.extend(parse(sentence, n))
@suzusuzu
suzusuzu / ungif.go
Last active December 18, 2016 01:23
ungif
package main
import (
"fmt"
"os"
)
func main() {
if len(os.Args) != 3 {
@suzusuzu
suzusuzu / gif.go
Last active December 18, 2016 00:11
gif
package main
import (
"bytes"
"encoding/binary"
"fmt"
"os"
)
func main() {