This file contains 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
https://github.com/elasticsearch/elasticsearch-analysis-kuromoji/tree/es-1.3#tokenfilter--kuromoji_baseform | |
curl -XPUT 'http://localhost:9200/kuromoji_sample/' -d' | |
{ | |
"index":{ | |
"analysis":{ | |
"analyzer" : { | |
"my_analyzer" : { | |
"tokenizer" : "kuromoji_tokenizer", | |
"filter" : ["kuromoji_baseform"] |
This file contains 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
* request | |
curl -XPUT 'http://localhost:9200/kuromoji_sample/' -d' | |
{ | |
"settings":{ | |
"index":{ | |
"analysis":{ | |
"analyzer" : { | |
"my_analyzer" : { | |
"tokenizer" : "kuromoji_tokenizer", |
This file contains 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
$ ./bin/elasticsearch | |
[2014-10-30 20:35:16,997][INFO ][node ] [Samuel Guthrie] version[1.3.4], pid[24185], build[a70f3cc/2014-09-30T09:07:17Z] | |
[2014-10-30 20:35:16,997][INFO ][node ] [Samuel Guthrie] initializing ... | |
[2014-10-30 20:35:17,038][INFO ][plugins ] [Samuel Guthrie] loaded [analysis-kuromoji, marvel, river-csv], sites [marvel, head, HQ, inquisitor] | |
[2014-10-30 20:35:19,327][INFO ][node ] [Samuel Guthrie] initialized | |
[2014-10-30 20:35:19,328][INFO ][node ] [Samuel Guthrie] starting ... | |
[2014-10-30 20:35:19,410][INFO ][transport ] [Samuel Guthrie] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.255.54:9300]} | |
[2014-10-30 20:35:19,428][INFO ][discovery ] [Samuel Guthrie] elasticsearch/ab1PE8NrRtqh-hV0kqUZKg | |
[2014-10-30 20:35:22,478][INFO ][cluster.service ] [Samuel Guthrie] detected_master [Delilah][I0vHKk-QQsC5pDs7YxU--Q][hh1][inet[/192.168. |
This file contains 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
package main | |
import ( | |
"fmt" | |
) | |
type Data struct { | |
a int | |
b int | |
} |
This file contains 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
#!/bin/bash | |
convert base.jpg \ | |
image1.png -geometry 100x100+142+142 -composite \ | |
image2.png -geometry 150x150+242+242 -composite \ | |
image3.png -geometry 200x200+342+342 -composite \ | |
out.jpg |
This file contains 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
import numpy as np | |
import matplotlib.pyplot as plt | |
X = np.array([0.02, 0.12, 0.19, 0.27, 0.42, 0.51, 0.64, 0.84, 0.88, 0.99]) | |
t = np.array([0.05, 0.87, 0.94, 0.92, 0.54, -0.11, -0.78, -0.79, -0.89, -0.04]) | |
def phi(x): | |
return [ x ** i for i in range(0, 7)] | |
PHI = np.array([phi(x) for x in X]) |
This file contains 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
package main | |
import ( | |
"bufio" | |
"encoding/csv" | |
"fmt" | |
"golang.org/x/text/encoding/japanese" | |
"golang.org/x/text/transform" | |
"io" | |
"os" |
This file contains 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
--- cowsay.org 2017-02-01 17:40:08.000000000 +0900 | |
+++ cowsay 2017-02-01 18:03:47.000000000 +0900 | |
@@ -10,6 +10,7 @@ | |
use Text::Wrap qw(wrap fill $columns); | |
use File::Basename; | |
use Getopt::Std; | |
+use Encode; | |
use Cwd; | |
$version = "3.03"; |
This file contains 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
export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:$(python-config --prefix)/include" |
This file contains 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
def cmd2bulk(*cmd): | |
z = lambda x: ((lambda y=bytes(str(x), "utf-8"): len(y))(), x) | |
return "*%d\r\n%s" % (len(cmd), "".join(["$%d\r\n%s\r\n" % z(x) for x in cmd])) | |
if __name__ == '__main__': | |
import sys | |
import unittest | |
class TestRedisBulk(unittest.TestCase): |
OlderNewer