Skip to content

Instantly share code, notes, and snippets.

View nemupm's full-sized avatar

nemupm nemupm

View GitHub Profile
@nemupm
nemupm / txt_regular_formatter.py
Last active August 29, 2015 14:06
Make Wikipedia dictionary for MeCab - txt_regular_formatter
#!/usr/bin/python
# -*- coding:utf-8 -*-
from unicodedata import normalize
def convert_str_to_regular_format(string):
uni = normalize('NFKC', string.decode('utf-8')).lower()
return uni.encode('utf-8')
f = open("jawiki-latest-all-titles-in-ns0","r")
@nemupm
nemupm / make_csv_for_mecab.pl
Last active August 29, 2015 14:06
Make Wikipedia dictionary for MeCab - make_csv_for_mecab
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use encoding 'utf8';
use MeCab;
my $model = new MeCab::Model(join " ", @ARGV);
my $c = $model->createTagger();
@nemupm
nemupm / insert_terms.vb
Last active August 29, 2015 14:07
insert_shapes_into_pptx_loading_txtfile
Sub insert_terms()
'make object
Dim txt As Object
Set txt = CreateObject("ADODB.Stream")
'set object parameter
txt.Type = adTypeText
txt.Charset = "UTF-8"
txt.LineSeparator = 10 'LF
'make instance
txt.Open
@nemupm
nemupm / median_filter.py
Created October 20, 2014 11:47
Median Filter
# -*- coding:utf-8 -*-
from PIL import Image
from itertools import product
class Filter:
def __init__(self, input_image):
self.input_image = input_image
self.input_pix = self.input_image.load()
self.w, self.h = self.input_image.size
@nemupm
nemupm / mongodb.repo
Created November 19, 2014 03:23
Dockerfile_MEANstack
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1
javascript:(function()%7Bfunction%20t(t)%7Bconsole.log(t);t.date.match(e);var%20n=RegExp.$1;var%20r=RegExp.$2;if(r.length%3C=1)r=%220%22+r;var%20i=RegExp.$3;if(i.length%3C=1)i=%220%22+i;var%20s=%22%22+n+%22/%22+r+%22/%22+i;var%20o=%5Bs,t.name,t.author,t.url%5D;return%20o.join(%22%5Ct%22)+%22%5Cn%22%7Dfunction%20n(e)%7Bvar%20t=window.open(%22%22,%22name%22,%22height=250,width=700%22);t.document.write(%22%3Chtml%3E%3Chead%3E%3Ctitle%3EAmazon%20to%20TSV%3C/title%3E%22);t.document.write(%22%3C/head%3E%3Cbody%3E%22);t.document.write(%22%3Cpre%3E%22);t.document.write(e);t.document.write(%22%3C/pre%3E%22);t.document.write(%22%3C/body%3E%3C/html%3E%22);t.document.close();return%20t%7Dfunction%20u(e)%7Bif(typeof%20e!==%22number%22)%7Bvar%20e=0;$(%22%3Cdiv/%3E%22).css(%7Bposition:%22fixed%22,left:0,top:0,width:%22100%25%22,height:%22100%25%22,zIndex:1e3,backgroundColor:%22rgba(0,0,0,.7)%22,color:%22%23fff%22,fontSize:30,textAlign:%22center%22,paddingTop:%2215em%22%7D).attr(%22id%22,%22___overlay%22).text(%22Amazon%E3%8
@nemupm
nemupm / docomo-dialog-api.coffee
Created July 24, 2016 05:21 — forked from FromAtom/docomo-dialog-api.coffee
DOCOMOの雑談対話APIを使ってHubotと雑談する。
# Description:
# DOCOMOの雑談APIを利用した雑談
#
# Author:
# FromAtom
getTimeDiffAsMinutes = (old_msec) ->
now = new Date()
old = new Date(old_msec)
diff_msec = now.getTime() - old.getTime()
@nemupm
nemupm / docomo-slack-dialog.Dockerfile
Created August 15, 2016 15:12
Docomoの雑談対話APIを使ってHubotとSlack上で雑談するためのDockerfile
FROM node:latest
MAINTAINER nemupm
RUN npm install -g hubot coffee-script
RUN npm install -g yo generator-hubot
RUN useradd hubot
WORKDIR /home/hubot/myslackbot
RUN chmod -R 777 /home/hubot
@nemupm
nemupm / VR.md
Last active May 20, 2017 13:48
VRまとめ
(master)$ git diff
diff --git a/etc/hadoop/core-site.xml b/etc/hadoop/core-site.xml
index d2ddf89..bee4f4e 100644
--- a/etc/hadoop/core-site.xml
+++ b/etc/hadoop/core-site.xml
@@ -17,4 +17,8 @@
<!-- Put site-specific property overrides in this file. -->
<configuration>
+ <property>