Skip to content

Instantly share code, notes, and snippets.

@relax-more
relax-more / gist:5779915
Created June 14, 2013 06:40
[Hive] 実行結果をそのままファイルに出力する
$ hive -S -e ‘select * from tbl_a limit 100′ > hive_result.txt
@kachayev
kachayev / topological.py
Last active December 30, 2022 10:21
Topological sort with Python (using DFS and gray/black colors)
# Simple:
# a --> b
# --> c --> d
# --> d
graph1 = {
"a": ["b", "c", "d"],
"b": [],
"c": ["d"],
"d": []
}
@shoyan
shoyan / mock_simple_test_1.0.1.php
Last active December 19, 2015 23:28
SimpleTestのMockを使ったテストのサンプル。 1.0.1はマニュアルのやり方とは違う(function returnsが定義されていない)のでこういう風にやらないといけない。
<?php
/*
* SimpleTestのmockサンプル
* SimpleTest version 1.0.1
*/
@kohyama
kohyama / clojure-exercises.md
Last active October 19, 2017 08:54
Clojure Exercises / Clojure 演習

花火~ 最高な俺たちと糞コードの海

written by mizchi at 小物エンジニアの会.

最高の夏の花火について 花火

自己紹介

@kyonmm
kyonmm / TDDeXchange-exercise-for-tdder.md
Last active December 7, 2022 05:21
TDD演習課題 - TODOリストアプリ
@hakobe
hakobe / message_ring.erl
Last active December 20, 2015 15:18
プログラミングErlang 8.11 練習問題
% リングのベンチマークを書いてみよう。N個のプロセスからなるリングを作り、1つのメッセージがリングをM回るようにして、
% 合計でN*Mのメッセージが送信されるようにする。さまざまなNとMの値について所要時間を計ってみよう。
-module(message_ring).
-export([benchmark/2]).
benchmark(N,M) ->
RingNodes = for(1, N, fun() -> spawn( fun() -> ring_node() end) end),
[FirstRingNode|_] = RingNodes,
connect(RingNodes, FirstRingNode),
statistics(runtime),
@katzchang
katzchang / README.md
Last active September 28, 2022 13:42
Steve Freeman氏とのペアプロ雑感 #tddbc

Steve Freeman氏とのペアプロ雑感

http://tddbc.doorkeeper.jp TDD Boot Camp 2013-07 -- TDDBC で、偶然にもロンドンから来日していたSteve Freeman氏を招くことができた。ちなみに本当に偶然の来日で、その日の夕方にご家族と隅田川の花火を見る予定だったらしい。貴重な時間である。

20分ほど講演していただき、さらに参加者と一緒にペアプロ課題に挑戦してもらった。しかもペアプロでっていう貴重な体験をさせてもらったので、そのことについてまとめたい。

Steve Freeman氏は書籍 "Growing Object-Oriented Software, Guided by Tests" (邦訳「実戦テスト駆動開発」)の共著者の一人で、Javaのモックフレームワーク "JMock"の開発者の一人。当然、自動販売機の課題にもJMockを駆使してモデリングしていただくことになった。

Start from the outside

@voluntas
voluntas / shiguredo_tech.rst
Last active May 13, 2025 02:58
時雨堂を支える技術

時雨堂を支える技術

日時:2025-05-13
作:時雨堂
バージョン:2025.3
URL:https://shiguredo.jp/

言語

@acgetchell
acgetchell / brew-boost-output
Last active December 21, 2015 13:19
The results of various combinations of brew install boost with openmpi and clang support. So far, mpi works but clang does not.
┌─[getchell][Hapkido][±][master ✓][/usr/local/share]
└─▪ brew doctor
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libmacfuse_i32.2.dylib
/usr/local/lib/libmacfuse_i64.2.dylib
/usr/local/lib/libosxfuse_i32.2.dylib