Skip to content

Instantly share code, notes, and snippets.

View shiumachi's full-sized avatar

Sho Shimauchi shiumachi

View GitHub Profile
@voluntas
voluntas / shiguredo_bot_system_gumistudy.rst
Last active April 30, 2017 02:08
時雨堂 BOT サーバー (gumiStudy #20)
@voluntas
voluntas / ansible_trot.rst
Last active February 24, 2016 03:44
Ansible トラノマキ
@shibukawa
shibukawa / go_memo.rst
Last active January 4, 2016 09:48
ʕ ◔ϖ◔ʔ Go~

ʕ ◔ϖ◔ʔ Go~

Number with explicit type

// ʕ ◔ϖ◔ʔ Go~
// Pros: It can use in global
@ymotongpoo
ymotongpoo / main.go
Last active December 27, 2015 09:28
echo slack-bot
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"strings"
)
@tokoroten
tokoroten / amidakuji.py
Created June 13, 2013 15:07
アミダクジは公平な仕組みなのかの検証。 縦線が10本のアミダクジでは、横線を150本程度ひかないと公平なアミダクジにはなりませんでした。 それ以下の場合、当たりがある場所の真上を選択すると当たり確率が高いです。
#coding:utf-8
import random
def amida_shuffle(line_num, exchange_num):
lines = range(line_num)
for i in xrange(exchange_num):
p = random.randrange(line_num - 1)
lines[p], lines[p+1] = lines[p+1], lines[p]
return lines
import re
from saying.exceptions import ApplicationException
from itertools import chain
class DSLSyntaxError(ApplicationException):
pass
def format(handler, text, message):
var = {
u'sender': lambda: resolve_handle(message.Sender.Handle),

こんな感じ

cd $HIVE_HOME

# パッチをあててビルド
wget https://issues.apache.org/jira/secure/attachment/12577210/HIVE-4299.patch
patch -p0 < HIVE-4299.patch
ant clean package

# テストの内容作成(.qファイルを使ったpositiveテスト)

GenericUDFHiveLogo リリース!

この記事は,2013年のエイプリルフール用に作成した記事です.

背景

2013年1月21日,Hadoop Conference Japan 2013 Winter にて, Hive Logo Lovers は恐らく世界初のHive T シャツを片手に,衝撃的なデビューを果たしました.今や,その愛くるしい T シャツは Cloudera や TreasureData のトップエンジニアにも愛用されていると言います.

あれから約2ヶ月半.Hive Logo Lovers は,Hive Logo の露出時間を1秒でも長くしようと活動してきました.

@toddlipcon
toddlipcon / er
Created September 21, 2011 07:21
This file has been truncated, but you can view the full file.
it was a bright cold day in April , and the clocks were striking thirteen . Winston Smith , his chin nuzzled into his breast in an effort to escape the vile wind , slipped quickly through the glass doors of Victory Mansions , though not quickly enough to prevent a swirl of gritty dust from entering along with him . intr - o zi senina si friguroasa de aprilie , pe cind ceasurile bateau ora treisprezece , Winston Smith , cu barbia infundata in piept pentru a scapa de vintul care - l lua pe sus , se strecura iute prin usile de sticla ale Blocului Victoria , desi nu destul de repede pentru a impiedica un virtej de praf si nisip sa patrunda o data cu el .
the hallway smelt of boiled cabbage and old rag mats . holul blocului mirosea a varza calita si a presuri vechi .
at one end of it a coloured poster , too large for indoor display , had been tacked to the wall . It depicted simply an enormous face , more than a metre wide : the face of a man of about forty - five , with a heavy black moustache and ruggedly ha
from twisted.web import client
from twisted.internet import reactor, defer
from lxml import etree
from StringIO import StringIO
import re
import os
save_dir = "~/.video/tube8/"
base_url = "http://www.tube8.com"
download_re = re.compile("so.addVariable\('videoUrl',\s*'([\w\d.:/_]*)'\);", re.M)