Skip to content

Instantly share code, notes, and snippets.

Ando takuya-andou

Block or report user

Report or block takuya-andou

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View philosophy
1.
//ソースをクローン
git clone https://github.com/sherjilozair/char-rnn-tensorflow
//作業フォルダへ移動
cd char-rnn-tensorflow
2.
//ディレクトリを作成
mkdir philosophy
//作成したディレクトリにinput.txtを配置
View philosophy_1
//ソースをクローン
git clone https://github.com/sherjilozair/char-rnn-tensorflow
//作業フォルダへ移動
cd char-rnn-tensorflow
View philosophy_2
//ディレクトリを作成
mkdir philosophy
//作成したディレクトリにinput.txtを配置
char-rnn-tensorflow/data/philosophy/input.xtx
View philosophy_3
//train.pyを書き換え
//書き換え前
parser.add_argument('--data_dir', type=str, default='data/tinyshakespeare',
help='data directory containing input.txt')
//書き換え後
parser.add_argument('--data_dir', type=str, default='data/philosophy',
help='data directory containing input.txt')
View haiku_input.txt
あきつ湧き宙にとどまる地獄谷
いつきに夏ふと人間が宙にあり
かいつぶり硝子の沓を宙に見す
かはらけの宙とんでゆく二月かな
からくりの唐子宙飛ぶ飛騨の春
かるがるとおんぶばつたの宙をとぶ
かるた取り紫式部宙に舞ふ
くろぐろと富士は宙吊り冬霞
こたへなき雪山宙に労働歌
こと切れしごとく枯蔓宙吊りに
@takuya-andou
takuya-andou / file0.txt
Created Jul 5, 2016
angular2でページ読み込み後に処理を実行する方法 ref: http://qiita.com/takuya-andou/items/24f4d5dbd86e102fe231
View file0.txt
import {Component, AfterViewInit} from 'angular2/core';
@Component({
selector: 'home',
templateUrl: './components/home/home.html'
})
export class HomeCmp implements AfterViewInit {
ngAfterViewInit() {
@takuya-andou
takuya-andou / file0.txt
Created Jul 6, 2016
Labellioで作った分類器を自前のubuntuで動かそうとした時に出たエラーと解決策 ref: http://qiita.com/takuya-andou/items/20bfacaf21dfec965201
View file0.txt
Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
Traceback (most recent call last):
File "app.py", line 8, in <module>
from labellio import Classifier, Config, ImageLoader, Label
File "/usr/local/lib/python2.7/dist-packages/labellio/__init__.py", line 2, in <module>
from labellio.classifier import Classifier
File "/usr/local/lib/python2.7/dist-packages/labellio/classifier.py", line 6, in <module>
from labellio.net import Net
File "/usr/local/lib/python2.7/dist-packages/labellio/net.py", line 4, in <module>
import caffe
View googlenet.py
from scipy.misc import imread, imresize
from keras.layers import Input, Dense, Convolution2D, MaxPooling2D, AveragePooling2D, ZeroPadding2D, Dropout, Flatten, merge, Reshape, Activation
from keras.models import Model
from keras.regularizers import l2
from keras.optimizers import SGD
from googlenet_custom_layers import PoolHelper,LRN
def create_googlenet(weights_path=None):
View classifier_from_little_data_script_3.py
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
@takuya-andou
takuya-andou / cronfile.js
Created Dec 10, 2015
myThings + milkcocoaで高齢者見守りデバイスを作ってみた ref: http://qiita.com/takuya-andou/items/d7a8659d55da7c0070ba
View cronfile.js
var MilkCocoa = require('milkcocoa');
var milkcocoa = new MilkCocoa('********.mlkcca.com');
var history = milkcocoa.dataStore('door').history();
var execSync = require('child_process').execSync;
var myD = new Date();
var myYear = myD.getFullYear();
var myMonth = myD.getMonth();
You can’t perform that action at this time.