Skip to content

Instantly share code, notes, and snippets.

@yawara
yawara / open-jtalk.rb
Created February 9, 2015 11:05
Homebrew formula for OpenJTalk
class OpenJtalk < Formula
homepage "http://open-jtalk.sourceforge.net/"
url "https://downloads.sourceforge.net/project/open-jtalk/Open%20JTalk/open_jtalk-1.08/open_jtalk-1.08.tar.gz"
sha1 "34749abce5f8263ebbe9843b92407f4f0a742c66"
resource "hts_engine API" do
url "https://downloads.sourceforge.net/project/hts-engine/hts_engine%20API/hts_engine_API-1.09/hts_engine_API-1.09.tar.gz"
sha1 "1c264c2bd29c87f49ace2c5d2b2fcd6b5b44b12c"
end
resource "voice" do
@yawara
yawara / caesar.py
Created July 13, 2016 14:39
Caesar Crypto
import string
def caesar(plaintext, shift):
alphabet_lower = string.ascii_lowercase
alphabet_upper = string.ascii_uppercase
alphabet = alphabet_lower + alphabet_upper
shifted_alphabet = alphabet_lower[shift:] + alphabet_lower[:shift] + alphabet_upper[shift:] + alphabet_upper[:shift]
table = str.maketrans(alphabet, shifted_alphabet)
return plaintext.translate(table)
@yawara
yawara / btsync.conf
Created June 27, 2016 22:51
upstart init script for btsync
description "BitTorrent Sync"
author "Yawara ISHIDA"
start on filesystem or runlevel [2345]
stop on shutdown
script
CONFIG="/etc/btsync/btsync.conf"
BTSYNC="/usr/lib/btsync-core/btsync"
exec su ywr -c "$BTSYNC --nodaemon --config $CONFIG"
@yawara
yawara / file0.txt
Last active January 27, 2016 18:36
Mac; OS X MavericsにOpenJTalkを導入する ref: http://qiita.com/yawara/items/2cb20f7bbb07615229ec
brew install open-jtalk
@yawara
yawara / file0.txt
Created January 27, 2016 18:31
Debian 7 WheezyにCUDA 7.5をインストールする。 ref: http://qiita.com/yawara/items/a2eef8f9074f0a1e4261
> cat /etc/issue
Debian GNU/Linux 7 \n \l
> uname -a
Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.73-2+deb7u2 x86_64 GNU/Linux
@yawara
yawara / file0.txt
Created January 27, 2016 09:38
メモ:iPython3でreloadを有効にする。 ref: http://qiita.com/yawara/items/5c9f1190080644dd9816
In [1]: %load_ext autoreload
In [2]: %autoreload 2
In [3]: from foo import some_function
In [4]: some_function()
Out[4]: 42
In [5]: # foo.pyを開いてsome_functionが43を返すように変更すると
@yawara
yawara / file0.txt
Created January 27, 2016 09:24
MacOSXにOpenJTalkを導入する。 ref: http://qiita.com/yawara/items/fe165636847b18e51def
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@yawara
yawara / graph-tool.rb
Last active August 29, 2015 14:24 — forked from jiayun/graph-tool.rb
require 'formula'
class GraphTool < Formula
homepage 'http://graph-tool.skewed.de/'
url 'http://downloads.skewed.de/graph-tool/graph-tool-2.2.31.tar.bz2'
sha1 '5e0b1c215ecd76191a82c745df0fac17e33bfb09'
head 'https://github.com/count0/graph-tool.git'
depends_on 'pkg-config' => :build
depends_on 'boost' => 'c++11'
@yawara
yawara / hello.sh
Last active August 29, 2015 14:18
hello
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<html>
<body>
#!/bin/bash
echo "Hello, world"
touch "~/Desktop/$(date)"
</body>
</html>
@yawara
yawara / nohw.c
Last active August 29, 2015 14:18
No Hello World
#include <stdio.h>
int main(void)
{
FILE* fp_out = freopen("/dev/null", "w", stdout);
FILE* fp_err = freopen("/dev/null", "w", stderr);
printf("Hello, world!\n");
fclose(fp_out);
fclose(fp_err);
return 0;