Skip to content

Instantly share code, notes, and snippets.

@grachro
grachro / build.gradle
Last active March 27, 2016 22:26
EclipseのGradleプロジェクト作成方法比較 ref: http://qiita.com/grachro/items/d1ebad3857a794895426
/*
* This build file was auto generated by running the Gradle 'init' task
* by 'grachro' at '16/03/21 21:13' with Gradle 2.9
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* user guide available at https://docs.gradle.org/2.9/userguide/tutorial_java_projects.html
*/
// Apply the java plugin to add support for Java
@grachro
grachro / file0.txt
Created March 16, 2016 21:56
Pandasのapplyとpivotとswaplevelを使った表の整形方法 ref: http://qiita.com/grachro/items/8da18678eaae0caefcb8
import pandas as pd
tokyo = pd.DataFrame(data={'year':['2013','2014','2015'],
'cnt':[10,15,20],
'price':[100,100,90],},
columns=['year','cnt','price'])
osaka = pd.DataFrame(data={'year':['2013','2014','2015'],
'cnt':[5,6,7],
'price':[100,100,100],},
@grachro
grachro / file0.txt
Last active March 15, 2016 10:58
Java-Python文字列操作対比 ref: http://qiita.com/grachro/items/890d0163a533e542d59b
import org.apache.commons.lang3.StringUtils;
StringUtils.join(new String[]{"a","b","c"},",")
@grachro
grachro / file0.txt
Last active March 2, 2016 00:24
Python3で形態素解析エンジンMeCabを使えるようにする(2016年3月版) ref: http://qiita.com/grachro/items/4fbc9bf8174c5abb7bdd
git clone https://github.com/taku910/mecab.git
cd mecab/mecab
./configure --enable-utf8-only
make
make check
sudo make install
@grachro
grachro / Hello.kt
Last active March 1, 2016 00:10
KotlinがwasabiとSparkFrameworkから"Hello, world!" ref: http://qiita.com/grachro/items/e9650676d1df0dd8772e
import org.wasabi.app.AppServer
fun main(args:Array<String>) {
var server = AppServer()
server.get("/", {
response.send("Hello, world!\nand Kotlin 1.0 Released!")
})
server.start()
}