Skip to content

Instantly share code, notes, and snippets.

@naoh16
naoh16 / excel_latex_copy.pl
Created March 5, 2012 08:24
Convert Excel table to LaTeX table format
#!/usr/bin/perl
#
# excel_latex_copy.pl
#
# Convert Excel table to LaTeX table format
# using Win32::Clipboard (Windows only)
#
# Copyright (C) 2012- Sunao HARA, NAIST/JAPAN. All rights reserved.
# Last Modified: 2012/03/05 17:22:08.
#
@naoh16
naoh16 / emsnr.c
Created February 3, 2012 16:57
Calculate SNR (Signal-to-Noise Ratio) based on an assumption of two-mixture Gaussian distribution
/**
* emsnr
* SNRを計算する
*
* Usage: echo datafilename | emsnr -r residual -l maxloop
* Output: filename SNR SNR_fix SNR_ptile weight low_power high_power low_variance high_variance loglikelyhood
*
* 2012-02-18 Add licence
* 2008-10-12 引数をすべてオプションに変更(-h, -s, -x, -r, -l)
* Pre-Emphasis オプション€(-e)
@naoh16
naoh16 / open_jtalk.sh
Created January 25, 2012 08:23
Wrapper script for Open JTalk (see also "openjtalk.conf")
#!/bin/bash
#
# Open JTalk 実行のためのスクリプト
#
# Copyright (C) 2012 Sunao HARA, Shikano Lab., NAIST/JAPAN
# Last Modified: 2012/01/25 13:38:20.
#
VOICEID=$1
SRC_TXT=$2
@naoh16
naoh16 / open_jtalk.conf
Created January 25, 2012 08:20
Configuration file for the HTS/OpenJTalk acoustic model (ATR-503 m001, Japanese)
#
# Configuration file for open_jtalk.sh
#
# Copyright (c) Sunao HARA, Shikano Lab., NAIST/JAPAN
# Last Modified: 2012/01/25 14:03:44.
#
##
## WAVE synthesis Parameters (Recommended)
##
@naoh16
naoh16 / gist:1450277
Created December 9, 2011 05:11
basename
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void basename(const char* inFilename, char* outFilename, int outBuflen)
{
char* p;
strncpy(outFilename, inFilename, outBuflen);
// 拡張子の削除.
@naoh16
naoh16 / tic_toc.c
Created November 30, 2011 01:41
Matlab like "tic & toc" in C
#include <time.h>
static clock_t tictoc_start = 0;
void tic(void) {
s = clock();
}
void toc(void) {
clock_t e = clock();