Skip to content

Instantly share code, notes, and snippets.

View shunfunaki's full-sized avatar

Shunsuke Funaki shunfunaki

View GitHub Profile
@shunfunaki
shunfunaki / aws-price-one-liner.md
Created January 17, 2017 15:39
AWS Price Table One-Liner
$ curl http://a0.awsstatic.com/pricing/1/ec2/linux-od.min.js  | sed -n 's/.*callback(//p' | sed -e 's/);$//g' | sed 's/\([0-9a-zA-Z]*\):/\"\1\":/g' | jq .config.regions[]  | jq 'select(.region=="ap-northeast-1")'
@shunfunaki
shunfunaki / opencv-xcode.md
Last active October 26, 2015 09:54
MacのXcodeでopenCVのビルド

openCV

$ tar xvf opencv-2.4.11.tar.gz
$ cd opencv-2.4.11
$ mkdir build
$ cd build
$ cmake -G Xcode ..
$ open OpenCV.xcodeproj

課題

次のソースコードが動作するよう、すごろくゲームを開発せよ。

var game:Game = Game();
game.setBoard(Board(csvFileName: "board"));
game.addPlayer(Player(playerName: "Taro"));
game.addPlayer(Player(playerName: "Jiro"));
game.setDice(Dice());
@shunfunaki
shunfunaki / deepdream.py
Created July 12, 2015 09:03
deepdream python script
# imports and basic notebook setup
from cStringIO import StringIO
import numpy as np
import os
import scipy.ndimage as nd
import PIL.Image
from IPython.display import clear_output, Image
from google.protobuf import text_format
import caffe
@shunfunaki
shunfunaki / p-sugoroku.md
Last active August 29, 2015 14:18
クラス設計入門:すごろくゲーム(PHP)

課題

次のソースコードが動作するよう、すごろくゲームを開発せよ。

<?php
$game = Game::getInstance();
$game->setBoard(new Board('data/board.csv'));
$game->addPlayer(new Player('Taro'));
$game->addPlayer(new Player('Jiro'));
$game-&gt;setDice(new Dice());
@shunfunaki
shunfunaki / j-sugoroku.md
Last active August 29, 2015 14:18
クラス設計入門:すごろくゲーム(Java)

課題

次のソースコードが動作するよう、すごろくゲームを開発せよ。

public class Main {
    public static void main(String[] args) {

        Game game = new Game();
 game.setBoard(new Board("data/board.csv"));
@shunfunaki
shunfunaki / r-sugoroku.md
Last active August 29, 2015 14:18
クラス設計入門:すごろくゲーム(Ruby / Ruby on Rails)

課題

次のソースコードが動作するよう、すごろくゲームを開発せよ。

game = Game.new
game.setBoard(Board.new("public/board.csv"))
game.addPlayer(Player.new("Taro"))
game.addPlayer(Player.new("Jiro"))
game.setDice(Dice.new)
game.start()
@shunfunaki
shunfunaki / main.cpp
Created March 31, 2015 14:39
OpenCV Face detection
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <opencv/ml.h>
void doMosaic(IplImage* in, int x, int y,
int width, int height, int size);
int main (int argc, char **argv)
{
int i, c;
@shunfunaki
shunfunaki / 0_reuse_code.js
Last active August 29, 2015 14:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console