Skip to content

Instantly share code, notes, and snippets.

class Chat:
vocabs = [
"ああ、そうなんだー",
"へー",
"すごいねー"
]
negative = "いや、それは違うんじゃないかなーw"
farewell = ["またねー", "じゃあねー"]
def response(self):
@nosada
nosada / test.patch
Last active August 29, 2015 13:57
patch for cabocha-0.68/python/test.py
--- test.py.orig 2014-10-28 00:04:32.395997436 +0900
+++ test.py 2014-10-28 00:04:55.396407628 +0900
@@ -8,9 +8,9 @@
sentence = "太郎はこの本を二郎を見た女性に渡した。"
-print c.parseToString(sentence)
+print(c.parseToString(sentence))
tree = c.parse(sentence)
@nosada
nosada / setup.patch
Last active August 29, 2015 13:57
patch for cabocha-0.68/python/setup.py
--- setup.py.orig 2014-10-27 23:13:54.149118580 +0900
+++ setup.py 2014-10-27 23:32:14.945120395 +0900
@@ -7,7 +7,7 @@
return os.popen(str).readlines()[0][:-1]
def cmd2(str):
- return string.split (cmd1(str))
+ return cmd1(str).split()
setup(name = "mecab-python",
@nosada
nosada / mikutter.patch
Created May 11, 2014 09:36
patch for mikutter 3.0.0 (or later?) distributed on AUR to translate Japanese
--- PKGBUILD 2014-05-09 00:24:29.000000000 +0900
+++ PKGBUILD.changed 2014-05-11 17:04:06.264283536 +0900
@@ -20,6 +20,7 @@
mkdir -p "$pkgdir/usr/bin"
cat <<'EOF' > "$pkgdir/usr/bin/mikutter"
#!/bin/sh
+export LC_MESSAGES="ja_JP.UTF-8"
ruby /opt/mikutter/mikutter.rb $@
EOF
chmod a+x "$pkgdir/usr/bin/mikutter"
@nosada
nosada / RT2870STA.dat.patch
Last active August 29, 2015 14:02
patchs for mt7610u_wifi_sta_v3002_dpo_20130916
--- mt7610u_wifi_sta_v3002_dpo_20130916.orig/RT2870STA.dat 2014-06-01 18:20:38.509258472 +0900
+++ mt7610u_wifi_sta_v3002_dpo_20130916/RT2870STA.dat 2014-06-01 18:22:59.168086822 +0900
@@ -1,10 +1,10 @@
#The word of "Default" must not be removed
Default
-CountryRegion=5
+CountryRegion=1
CountryRegionABand=7
-CountryCode=
+CountryCode=JP
@nosada
nosada / gif.sh
Created July 7, 2014 15:05
be happy
#!/bin/sh
directory="./*"
for filepath in ${directory}
do
if [ ! -f ${filepath} ]; then
echo "${filepath}"
cd ${filepath}
convert *.png anime.gif
@nosada
nosada / yotify.sh
Last active August 29, 2015 14:04
comfortable operation with Yo
#!/usr/bin/sh
token="<YOUR_API_TOKEN>"
name="<DESIRED_USERNAME>"
notifymsg="Yo from <SOURCE_Yo_NAME> to <DESTINATION_Yo_NAME>"
icon="/path/to/icon"
# do desired task
$@
@nosada
nosada / fcitx-mozc-ut.PKGBUILD
Last active August 29, 2015 14:05
Modified PKGBUILD and patch for original (https://aur.archlinux.org/packages/fcitx-mozc-ut/) for using latest mozc-ut
# Maintainer: Naoya Inada <naoina@kuune.org>
# fcitx-mozc-ut is based on fcitx-mozc and mozc-ut.
##
## Build configuration
##
## ニコニコ大百科IME辞書 (NICONICOPEDIA IME dictionary, see below)
#_NICODIC="true"
#
## If you want to use an English-Japanese dictionary,
@nosada
nosada / mecab.setup.patch
Created October 27, 2014 15:07
patch for mecab-python-0.996/setup.py
--- setup.py.orig 2014-10-27 23:13:54.149118580 +0900
+++ setup.py 2014-10-27 23:32:14.945120395 +0900
@@ -7,7 +7,7 @@
return os.popen(str).readlines()[0][:-1]
def cmd2(str):
- return string.split (cmd1(str))
+ return cmd1(str).split()
setup(name = "mecab-python",
@nosada
nosada / config
Last active August 29, 2015 14:10
zcat /proc/config.gz
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.17.4-1 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"