Skip to content

Instantly share code, notes, and snippets.

View naoyashiga's full-sized avatar

Naoya / nao-chan / naoya-tech naoyashiga

View GitHub Profile
@naoyashiga
naoyashiga / kiji.html
Last active August 19, 2016 02:31
kiji.html
<!DOCTYPE html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="ja"><![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8" lang="ja"><![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9" lang="ja"><![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" lang="ja"><!--<![endif]-->
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
@naoyashiga
naoyashiga / ir.py
Created May 22, 2016 23:21
image reg
import numpy
import matplotlib.pyplot as plt
import chainer
from chainer import cuda
import chainer.functions as F
import chainer.links as L
from chainer import optimizers
from chainer import cuda, Function, gradient_check, Variable, optimizers, serializers, utils
from chainer import Link, Chain, ChainList
@naoyashiga
naoyashiga / singlePerceptron.py
Last active May 2, 2016 10:19
単純パーセプトロンの実装
# -*- coding: utf-8 -*-
import numpy
import matplotlib.pyplot as plt
def predict(w, x):
output = numpy.dot(w, x)
if output >= 0:
@naoyashiga
naoyashiga / index.html
Created March 20, 2016 02:33
p5.js sound test
<html>
<head>
<style>
* {
margin: 0;
padding: 0;
}
</style>
<script src="http://cdnjs.cloudflare.com/ajax/libs/p5.js/0.4.22/p5.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.4.23/addons/p5.sound.min.js"></script>
@naoyashiga
naoyashiga / GenerateText.py
Created March 17, 2016 03:56
TextGeneratorをPython3系で動かす
# -*- coding: utf-8 -*-
u"""
マルコフ連鎖を用いて適当な文章を自動生成するファイル
"""
import os.path
import sqlite3
import random
@naoyashiga
naoyashiga / mnist_tensorboard.py
Last active March 6, 2016 02:36
MNISTをTensorboardに表示する
# -*- coding: utf-8 -*-
import input_data
import tensorflow as tf
# prameters
learning_rate = 0.01
training_epochs = 1000
def main():
@naoyashiga
naoyashiga / gulpfile.js
Created February 24, 2016 11:19
MyFirst p5.js env
var gulp = require('gulp'),

sass = require('gulp-ruby-sass')

notify = require("gulp-notify")

webserver = require('gulp-webserver');
gulp.task('server', function() {
gulp.src('./')
.pipe(webserver({
@naoyashiga
naoyashiga / BaseParticleWithVector.pde
Created February 23, 2016 14:13
Interactive coding勉強会 Easing
class BaseParticleWithVector implements BaseParticleWithVectorInterface {
PVector location;
PVector velocity;
float scalarVelocity;
float r;
BaseParticleWithVector() {
location = new PVector(random(width), random(height));
velocity = new PVector(0, 0);
@naoyashiga
naoyashiga / gulpfile.js
Last active December 22, 2015 12:42
Bootstrap + Gulp + Jade Setting
var gulp = require('gulp'),

sass = require('gulp-ruby-sass')

notify = require("gulp-notify")

bower = require('gulp-bower'),
jade = require('gulp-jade'),
webserver = require('gulp-webserver');
var config = {

 sassPath: './resources/sass',

 jadePath: './resources/jade',
@naoyashiga
naoyashiga / BaseParticleWithVector.pde
Created November 2, 2015 08:42
Grid Display Processing
class BaseParticleWithVector implements BaseParticleWithVectorInterface {
PVector location;
PVector velocity;
float scalarVelocity;
float r;
BaseParticleWithVector() {
location = new PVector(random(width), random(height));
velocity = new PVector(0, 0);