Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View startselect's full-sized avatar

Masaki Takahashi startselect

View GitHub Profile
import numpy as np
class Neuron:
def __init__(self, w, b, f):
self.w = np.concatenate((w, b), axis =1)
self.f = f
def output(self, x):
x = np.concatenate((x, [[1,],]))
return self.f(self.w.dot(x))
@startselect
startselect / mps_pacman_03
Created October 11, 2015 01:25
Pacman no.3
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>JS_PacMan 3</title>
</head>
<style type="text/css">
#pacman {
background-color: #fff;
}
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>JS_PacMan</title>
</head>
<style type="text/css">
#pacman {
background-color: #fff;
}
@startselect
startselect / pacman01setagaya
Last active September 13, 2015 01:20
Pacman
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>PacMan</title>
</head>
<style type="text/css">
</style>
<body>
<canvas id="pacman" width="300" height="150">