Skip to content

Instantly share code, notes, and snippets.

@nosada
nosada / crfpp.patch
Created Sep 22, 2013
patch for crfpp
View crfpp.patch
--- PKGBUILD.old 2013-07-13 21:34:18.054183257 +0900
+++ PKGBUILD 2013-07-13 21:29:29.661837910 +0900
@@ -6,19 +6,19 @@
pkgrel=1
pkgdesc="A Conditional Random Field implementation"
url="http://crfpp.sourceforge.net"
-arch=(x86_64 i686)
-license=(LGPL BSD)
-source=(http://crfpp.googlecode.com/files/CRF%2B%2B-${pkgver}.tar.gz)
+arch=('x86_64' 'i686')
@nosada
nosada / machinetab.patch
Created Sep 22, 2013
patch for qtemu-1.0.5/machinetab.cpp
View machinetab.patch
--- machinetab.cpp.old 2007-11-13 04:31:00.000000000 +0900
+++ machinetab.cpp 2013-09-22 15:33:23.563347043 +0900
@@ -137,13 +137,13 @@
memoryFrameLayout->addWidget(memoryDescriptionLabel);
memorySlider = new QSlider(Qt::Horizontal, this);
- memorySlider->setRange(4, 1024);
+ memorySlider->setRange(4, 4096);
memorySlider->setSingleStep(4);
memorySlider->setTickPosition(QSlider::TicksBelow);
@nosada
nosada / qtemu.patch
Last active Dec 23, 2015
patch for qtemu's PKGBUILD (patching src/machinetab.cpp and generating .desktop by gendesk)
View qtemu.patch
--- PKGBUILD 2013-09-23 07:06:52.000000000 +0900
+++ PKGBUILD.changed 2013-09-22 15:53:36.000000000 +0900
@@ -12,12 +12,17 @@
makedepends=('cmake')
depends=('qemu' 'qt4')
source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2
- http://qtemu.svn.sourceforge.net/viewvc/qtemu/trunk/qtemu/misc/qtemu.desktop)
+ machinetab.patch)
md5sums=('3b93e209dc62e52a1d94c8eb24d0b149'
- 'b323b75384fdb327728d2603979f7202')
@nosada
nosada / mozc-ut.patch
Last active Dec 25, 2015
for explanation on my blog
View mozc-ut.patch
--- PKGBUILD 2013-10-01 20:08:12.000000000 +0900
+++ PKGBUILD.changed 2013-10-13 20:50:55.703547957 +0900
@@ -5,9 +5,9 @@
##
## You can choose the input method framework to use either ibus and/or uim.
## If you will not be using ibus, comment out below.
-_ibus_mozc="yes"
+#_ibus_mozc="yes"
## If you will be using uim, uncomment below.
-#_uim_mozc="yes"
View CodingBat-Logic-2-make_bricks.py
def make_bricks(small, big, goal):
if goal - 5*big > small: # small + 5*big < goal (impossible)
return False
else: # small + 5*big >= goal (partial possible)
if goal%5 > small:
return False
else:
return True
@nosada
nosada / PigLatin.py
Last active Jan 1, 2016
Pig Latin Translator (Only Plain -> PigLatin)
View PigLatin.py
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Translate plain-text English(or ACII string) into Pig Latin
"""
class PigLatin:
@nosada
nosada / base.lst.patch
Last active Jan 3, 2016
for /usr/share/X11/xkb/rules/base.lst and /usr/share/X11/xkb/rules/evdev.lst
View base.lst.patch
--- /usr/share/X11/xkb/rules/base.lst 2014-01-18 02:26:21.569898995 +0900
+++ /usr/share/X11/xkb/rules/base.lst.changed 2014-01-18 14:00:36.631972594 +0900
@@ -300,6 +300,7 @@
hbs us: Serbo-Croatian (US)
workman us: English (Workman)
workman-intl us: English (Workman, international with dead keys)
+ cdv us: English (customized Dvorak)
ps af: Pashto
uz af: Uzbek (Afghanistan)
olpc-ps af: Pashto (Afghanistan, OLPC)
@nosada
nosada / base.xml.patch
Last active Jan 3, 2016
for /usr/share/X11/xkb/rules/base.xml and /usr/share/X11/xkb/rules/evdev.xml
View base.xml.patch
--- /usr/share/X11/xkb/rules/base.xml 2014-01-18 02:53:40.442502225 +0900
+++ /usr/share/X11/xkb/rules/base.xml.changed 2014-01-18 16:50:29.831446541 +0900
@@ -1440,6 +1440,14 @@
<description>English (Workman, international with dead keys)</description>
</configItem>
</variant>
+ <!-- user appended start -->
+ <variant>
+ <configItem>
+ <name>cdv</name>
@nosada
nosada / symbols.patch
Last active Jan 3, 2016
for /usr/share/X11/xkb/symbols/us
View symbols.patch
--- /usr/share/X11/xkb/symbols/us 2013-10-07 16:41:31.000000000 +0900
+++ /usr/share/X11/xkb/symbols/us.changed 2014-01-18 16:20:00.446395000 +0900
@@ -1523,3 +1523,27 @@
xkb_symbols "sun_type6" {
include "sun_vndr/us(sun_type6)"
};
+
+
+// Customized dvorak
+// (Changed : G, H, B, I, D, X keys for thinkpad keyboard)
View SimpleChatBot.py
class Chat:
vocabs = [
"ああ、そうなんだー",
"へー",
"すごいねー"
]
negative = "いや、それは違うんじゃないかなーw"
farewell = ["またねー", "じゃあねー"]
def response(self):
You can’t perform that action at this time.