Skip to content

Instantly share code, notes, and snippets.

View oguna's full-sized avatar

oguna

  • Minatomirai, Kanagawa, Japan
View GitHub Profile
@oguna
oguna / SpeechReco.vue
Created August 26, 2021 23:29
音声認識
<template>
<h1>音声認識</h1>
<p>{{confidence.toFixed(2)}} - {{transcript}}</p>
<ol>
<li v-for="script,i in scripts" :key="i">
{{script}}
</li>
</ol>
</template>
@oguna
oguna / solar-power-calc.ipynb
Last active July 20, 2020 22:49
Untitled0.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oguna
oguna / index.html
Created August 1, 2019 22:26
PaperFromToHTML with Vue.js
a<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="sheet.css">
<title>御請求書</title>
</head>
@oguna
oguna / vim-migemo.vim
Last active May 19, 2018 04:45
Vim8のchannel機能を用いたMigemoプラグイン
scriptencoding utf-8
let g:migemo_path = $VIM . '/cmigemo.exe'
let g:migemo_dict_path = $VIM . '/dict/utf-8/migemo-dict'
if executable(g:migemo_path) == '0'
echo "Error: cmigemo is not installed"
endif
if !filereadable(g:migemo_dict_path)
echo "Error: a dictionary for migemo is not found"
@oguna
oguna / Program.cs
Created March 7, 2018 17:37
Sum operation on DirectCompute ( SharpDX )
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SharpDX;
using SharpDX.Direct3D11;
using SharpDX.Direct3D;
using Buffer = SharpDX.Direct3D11.Buffer;
@oguna
oguna / casl2-spec.adoc
Last active September 5, 2017 05:20
CASL2の仕様書をAsciiDoc形式で記したもの。

アセンブラ言語の仕様[1]

1. システム COMET II の仕様

1.1. ハードウェアの仕様

  1. 1語は16ビットで,そのビット構成は,次のとおりである。

@oguna
oguna / TargetFile.java
Created February 22, 2017 08:24
テキストファイルの内容を行番号の情報とともに格納するJavaクラス
import org.jetbrains.annotations.NotNull;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
public class TargetFile {
@NotNull
public final String name;
@NotNull
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
public class Md5Hash {
private final byte[] digest;
private final int hashCode;
private Md5Hash(byte[] digest) {
if (digest == null || digest.length != 16) {
@oguna
oguna / ManyTokenizer.java
Created February 22, 2016 10:03
PMDを用いたJavaソースコードのトークン化とASTツリー生成
import net.sourceforge.pmd.lang.ParserOptions;
import net.sourceforge.pmd.lang.ast.JavaCharStream;
import net.sourceforge.pmd.lang.java.Java18Parser;
import net.sourceforge.pmd.lang.java.ast.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
@oguna
oguna / Mid.java
Created February 22, 2016 03:28
バグ限局ツールtarantulaの例にある中央値を求めるプログラムのJava実装(バグあり)
public class Mid {
public static int mid(int x, int y, int z) {
int m;
m = z;
if (y < z) {
if (x < y) {
m = y;
} else if (x < z) {
m = y;
}