Skip to content

Instantly share code, notes, and snippets.

@arosh
arosh / chap05-log.ipynb
Created October 31, 2016 13:57
RStanBook chap05
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arosh
arosh / exercise04.ipynb
Created October 30, 2016 10:41
RStanBook Exercise04
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arosh
arosh / D.cpp
Created October 29, 2016 05:08
ICPC 2016 Tsukuba
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i = 0; i < (int)(n); ++i)
#define DEBUG(x) cerr << #x << " = " << x << endl
#define int long long
int MOD = 2305266692540551LL;
int BASE = 4001;
signed main() {
ios::sync_with_stdio(false);
string S, T; cin >> S >> T;
@arosh
arosh / index.html
Created September 10, 2016 03:04
Bootstrap independent column scroll
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<style>
.container-indep {
@arosh
arosh / index.html
Created July 18, 2016 08:57
Backbone.js TypeScript
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="assets/bootstrap-honoka.min.css">
<style>
.container {
@arosh
arosh / main.py
Created May 28, 2016 16:37
hyperopt movie
import scipy
import scipy.stats
import matplotlib.pyplot as plt
import hyperopt
import os.path
import shutil
from hyperopt import hp
def func(x):
pis = [1, 1, 1, 1, 1, 1]
@arosh
arosh / README.md
Created January 24, 2016 09:49
include
$ cpp a.cpp
# 1 "a.cpp"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 324 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "a.cpp" 2
[a.cpp] 👇 ここから include b.h
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arosh
arosh / README.txt
Last active November 4, 2015 13:12
Document-Term Matrix
LabelBinarizer : ラベル → OneHot表現
LabelEncoder : ラベル → 0, 1, ..., N-1
OneHotEncoder : 0, 1, ..., N-1 → OneHot表現
https://github.com/recruit-tech/summpy/blob/master/summpy/lexrank.py#L34
CountVectorizer : テキスト → document term matrix
TfidfTransformer : document term matrix → IDF重み,l2正規化
TfidfVectorizer : テキスト → IDF重み,l2正規化
@arosh
arosh / main.go
Last active March 26, 2016 13:42
Golang IO
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
"bytes"
)