This file contains hidden or 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
*** jpcommon/jpcommon_label.c.old 2015-02-27 03:35:32.000000000 +0900 | |
--- jpcommon/jpcommon_label.c 2015-02-27 03:36:34.000000000 +0900 | |
*************** static int index_accent_phrase_in_breath | |
*** 296,301 **** | |
--- 296,302 ---- | |
if (index == a) | |
break; | |
} | |
+ if (i > 3) i = 3; | |
return i; |
This file contains hidden or 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
from collections import namedtuple | |
import np | |
class Bursts: | |
def __init__(level, start, end): | |
self.level = level | |
self.start = start | |
self.end = end | |
This file contains hidden or 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
function notify() { | |
echo -e "display notification \"$1\" with title \"Terminal\" subtitle \"`date +"%F %T"`\"" | osascript | |
} |
This file contains hidden or 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
mkdir ~/smt | |
cd ~/smt | |
# Install Moses | |
export BOOST_ROOT=/usr/local/Cellar/boost/1.57.0 | |
export BOOST_BUILD_PATH=/usr/local/share/boost-build | |
ln /usr/local/Cellar/boost/1.57.0/lib/libboost_thread-mt.a /usr/local/Cellar/boost/1.57.0/lib/libboost_thread.a | |
ln /usr/local/Cellar/boost/1.57.0/lib/libboost_thread-mt.dylib /usr/local/Cellar/boost/1.57.0/lib/libboost_thread.dylib | |
ln -s /usr/local/Cellar/boost/1.57.0/lib /usr/local/Cellar/boost/1.57.0/lib64 |
This file contains hidden or 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
session = requests.Session() | |
session.mount('http://', requests.adapters.HTTPAdapter(max_retries=3)) | |
session.mount('https://', requests.adapters.HTTPAdapter(max_retries=3)) | |
response = session.get(lp, headers={'User-agent': UA}, timeout=1) |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Blue Component</key> | |
<real>0.0</real> | |
<key>Green Component</key> | |
<real>0.0</real> |
This file contains hidden or 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
mail_address = '' | |
password = '' | |
from selenium import webdriver | |
UA = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0' | |
PHANTOMJS_ARG = {'phantomjs.page.settings.userAgent': UA} | |
driver = webdriver.PhantomJS(desired_capabilities=PHANTOMJS_ARG) | |
url = 'https://www.google.com/accounts/Login?hl=ja&continue=http://www.google.co.jp/' |
This file contains hidden or 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
sudo yum install byobu -y --enablerepo=epel-testing |
This file contains hidden or 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
wget http://downloads.typesafe.com/scala/2.11.7/scala-2.11.7.tgz | |
sudo mkdir /usr/local/scala | |
sudo tar xvf scala-*.tgz -C /usr/local/scala | |
echo "export SCALA_HOME=/usr/local/scala/scala-2.11.7" >> ./bashrc | |
echo "export PATH=$SCALA_HOME/bin:$PATH" >> ./bashrc | |
wget ftp://ftp.kddilabs.jp/infosystems/apache/spark/spark-1.4.0/spark-1.4.0-bin-hadoop2.6.tgz | |
tar xf spark-1.4.0-bin-hadoop2.6.tgz | |
sudo mv spark-1.4.0-bin-hadoop2.6 /usr/local/spark |
This file contains hidden or 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
private static final Pattern PAT_JAPANESE_CHARACTER = Pattern | |
.compile("[\\p{IsHiragana}\\p{IsKatakana}\\p{InCJKUnifiedIdeographs}]"); | |
private static boolean isJapanese(final String token) { | |
return PAT_JAPANESE_CHARACTER.matcher(token).find(); | |
} |