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
#!/usr/bin/python | |
#coding=utf-8 | |
"""**************************************************************************** | |
Copyright (c) 2014 cocos2d-x.org | |
http://www.cocos2d-x.org | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
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 tensorflow as tf | |
import pandas as pd | |
import numpy as np | |
import inspect | |
from bayes_opt import BayesianOptimization | |
import shutil | |
import os | |
class MNIST_CNN: | |
def __init__(self, learning_rate, variable_default_stddev, bias_default, keep_prob=1.0): |
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
use std::fmt; | |
fn main() { | |
println!("Hello, world!"); | |
for i in 1..100 { | |
println!("{}", fizz_buzz(i)) | |
} | |
} | |
enum FBN<'a> { |
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
SKSpriteNode *ground = [SKSpriteNode spriteNodeWithColor:[SKColor yellowColor] | |
size:CGSizeMake(self.frame.size.width, self.frame.size.height*0.2)]; | |
ground.anchorPoint = CGPointMake(0, 0); | |
ground.position = CGPointMake(CGRectGetMinX(self.frame), 0); |
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
# prefixキーをC-tに変更してC-bを解除 | |
set -g prefix C-t | |
unbind C-b | |
# Vimのキーバインドでペインを移動する | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R |
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
http://codezine.jp/article/detail/7128 | |
# hbase起動まで | |
cd /usr/local | |
wget http://ftp.kddilabs.jp/infosystems/apache/hbase/stable/hbase-1.1.2-bin.tar.gz | |
tar -zxvf hbase-1.1.2-bin.tar.gz | |
cd hbase-1.1.2 | |
echo "export JAVA_HOME=/usr/lib/jvm/jre-openjdk" >> /root/.bashrc |
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
// EXERCISE 10.1 | |
// 整数の加算と乗算、および論理演算子に対するMonoidインスタンスを考え出せ | |
trait Monoid[A] { | |
def op(a1: A, a2: A): A | |
def zero: A | |
} | |
val intAddition: Monoid[Int] = new Monoid[Int] { | |
def op(a1: Int, a2: Int) = a1 + a2 |
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
/** | |
EXERCISE 4.1 | |
trait Option[+A]{ | |
def map[B](f: A => B): Option[B] | |
def flatMap[B](f: A => Option[B]): Option[B] | |
def getOrElse[B >: A](default: => B): B | |
def orElse[B >: A](ob: => Option[B]): Optino[B] | |
def filter(f: A => Boolean): Option[A] | |
} | |
を実装せよ |
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
/** | |
* EXERCISE 3.1 | |
* 以下のマッチ式はどのような結果になるか | |
*/ | |
sealed trait List[+A] | |
case object Nil extends List[Nothing] | |
case class Cons[+A](head: A, tail: List[A]) extends List[A] | |
object List{ |
NewerOlder