Skip to content

Instantly share code, notes, and snippets.

Shunsuke Aihara shunsukeaihara

Block or report user

Report or block shunsukeaihara

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@shunsukeaihara
shunsukeaihara / .eslintignore
Last active Jun 1, 2019
vscode +eslint + prettier + react-native + typescriptの設定群. vscodeにはeslintとprettierだけを入れる. このあたり標準決めて欲しい
View .eslintignore
node_modules/
@shunsukeaihara
shunsukeaihara / to_elasticsearch.js
Last active Dec 12, 2018
lambda script for kinesis firehose with cloudwatch logs
View to_elasticsearch.js
'use strict';
const zlib = require('zlib');
const AWS = require('aws-sdk');
function transformLogEvent(payload, logEvent) {
var source = buildSource(logEvent.message, logEvent.extractedFields);
source['@id'] = logEvent.id;
source['@timestamp'] = new Date(1 * logEvent.timestamp).toISOString();
source['@message'] = logEvent.message;
@shunsukeaihara
shunsukeaihara / upsampling.ipynb
Last active Sep 15, 2018
upsampling with biquad low-pass filter
View upsampling.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shunsukeaihara
shunsukeaihara / estimate_alpha.pyx
Last active Aug 29, 2015
cython translation of the estimating alpha parameter for mel-cepstrum in go (https://bitbucket.org/happyalu/mcep_alpha_calc)
View estimate_alpha.pyx
# -*- coding: utf-8 -*-
# distutils: language = c++
import numpy as np
cimport numpy as np
cimport cython
from libc.stdlib cimport malloc, free
from libc.math cimport log, M_PI, sin, cos, atan
from libc.float cimport DBL_MAX
@shunsukeaihara
shunsukeaihara / gist:eec6bb9e6f721dbd9c61
Last active Aug 29, 2015
Global contrast based salient region detectionをベースにいろいろいじったり
View gist:eec6bb9e6f721dbd9c61
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# (WIP)画像から主題っぽい領域を判定"
]
},
{
@shunsukeaihara
shunsukeaihara / salient region detection.ipynb
Last active Aug 29, 2015
salient region detection from superpixles
View salient region detection.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shunsukeaihara
shunsukeaihara / main.go
Last active Dec 20, 2018
long poll chat server in go and redis
View main.go
// chatserver project main.go
package main
import (
"encoding/json"
"flag"
"fmt"
"github.com/golang/glog"
"github.com/zenazn/goji"
"github.com/zenazn/goji/web"
@shunsukeaihara
shunsukeaihara / blog.ipynb
Last active Aug 29, 2015
IPython Notebookをアドホック分析環境として使う
View blog.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shunsukeaihara
shunsukeaihara / changefinder.py
Last active Oct 17, 2019
Change finder algorithm
View changefinder.py
# -*- coding: utf-8 -*-
import numpy as np
import math
def LevinsonDurbin(r, lpcOrder):
"""
from http://aidiary.hatenablog.com/entry/20120415/1334458954
"""
a = np.zeros(lpcOrder + 1,dtype=np.float64)
@shunsukeaihara
shunsukeaihara / crawl.py
Last active Apr 22, 2016
rongorongoのThomas Barthel's Transliteration Systemのデータをクローリングしてファイルに保存したり、文字の正規化や分解を行うスクリプト。詳細は以下 http://argmax.jp/index.php?ron
View crawl.py
# -*- coding: utf-8 -*-
from BeautifulSoup import BeautifulSoup
import urllib2
import re
URL = "http://kohaumotu.org/rongorongo_org/translit/%s.html"
for i in range(97,123):
url = URL % chr(i)
html = urllib2.urlopen(url).read()
You can’t perform that action at this time.