This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
require 'natto' | |
require 'pp' | |
require 'matrix' | |
@natto = Natto::MeCab.new | |
def simcos(v1, v2) | |
v1.inner_product(v2).to_f / (v1.norm * v2.norm) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var math = require('mathjs'); | |
var block_id = 1; | |
var scale = 40; | |
var density = 2; | |
function g (x, y) { | |
c = math.complex(x, y); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var besiege = require('besiege.js'); | |
const Block = require('./block.js'); | |
const parseString = require('xml2js').parseString; | |
var lines=[]; | |
var reader = require('readline').createInterface({ | |
input: process.stdin | |
}); | |
var machine = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
# 画像を読み込んでセグメント(接続順に並んだ輪郭点)を出力するスクリプト | |
import numpy as np | |
import cv2 | |
def get_hand_image_bg(imgfile): | |
img = cv2.imread(imgfile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
# get_segment.pyで生成したセグメントを読み込み, 輪郭点の数と結合重みを振って認識率を確かめる実験を行うスクリプト | |
import numpy as np | |
import cv2 | |
from matplotlib import pyplot as plt | |
from collections import Counter | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Self Camera</title> | |
<meta charset="utf-8"> | |
<script src="https://code.createjs.com/easeljs-0.7.1.min.js"></script> | |
<script src="https://code.jquery.com/jquery-1.11.0.min.js"></script> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include "./Eigen/Core" | |
using namespace std; | |
using namespace Eigen; | |
class NN { | |
private: | |
float reactified_linear(float u){ | |
return u * (u > 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#chiba").hover(function () { | |
if(!(lock_chiba)){ | |
lock_chiba = true; | |
$('#west').find('#info').transition({ opacity: 1 }); | |
$('#west').find("#info .info-name").shuffleLetters(); | |
$('#west').find("#info .rainfall").shuffleLetters(); | |
$('#west').find("#info .temperature").shuffleLetters(); | |
$('#west').find("#info .windspeed").shuffleLetters(); | |
setTimeout(function(){ | |
$('#west').find('#line').transition({ opacity: 1 }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inputs = [] | |
while line = gets | |
inputs.push line.chomp! | |
end | |
puts '\documentclass[onecolumn, a4paper, dvipdfmx]{jsarticle} | |
\usepackage{listings} | |
\usepackage{color} | |
%\usepackage{pdfcolparallel} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xml.etree.ElementTree as ET | |
import requests | |
urls ="""https://www.youtube.com/api/timedtext?caps=asr&expire=1528456705&sparams=asr_langs%2Ccaps%2Cv%2Cexpire&v=03H1qSot9_s&hl=ja_JP&signature=7DEDE0C063DB0BA0AD5980CE7BF43A827D02467A.AA2D771D078788DDACF627D9D8F00D8E643ADF05&key=yttt1&asr_langs=es%2Cko%2Cru%2Cde%2Cit%2Cja%2Cnl%2Cen%2Cpt%2Cfr&lang=ja&fmt=srv3 | |
https://www.youtube.com/api/timedtext?v=VN_rVULV9UM&expire=1528457192&hl=ja_JP&caps=asr&sparams=asr_langs%2Ccaps%2Cv%2Cexpire&asr_langs=it%2Cko%2Cde%2Cfr%2Cja%2Cen%2Cru%2Ces%2Cpt%2Cnl&signature=D5C83F6597621548DDC89147F975009B4D8D1ED9.C95E25932F65A2BEFEB4C471E13962C594272463&key=yttt1&lang=ja&fmt=srv3 | |
https://www.youtube.com/api/timedtext?key=yttt1&signature=C03440573CE92B7BBFDE76CD37FCDCC1BE9DCC3D.707042A3F4F7FE02B4D0E43426DFFEA4F6145E46&asr_langs=fr%2Cru%2Ces%2Cnl%2Cpt%2Cde%2Cko%2Cit%2Cen%2Cja&hl=ja_JP&sparams=asr_langs%2Ccaps%2Cv%2Cexpire&expire=1528457548&v=-URg3ZoyBJw&caps=asr&lang=ja&fmt=srv3 | |
https://www.youtube.com/api/timedtext?asr_langs=pt%2Cr |