This file contains hidden or 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 -*- | |
import numpy as np | |
import cv2, os, time | |
# 複数の画像を読み込む関数 | |
def imgsread(path): | |
# ディレクトリ中のファイル名のリストを取得 | |
filelists = os.listdir(path) |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
import sys | |
import numpy as np | |
class Net(): | |
def __init__(self, input_size=2): | |
if input_size < 1: | |
print 'Error: input_size (argument of Net.__init__) should be > 0.' | |
sys.exit(1) |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
import cv2 | |
import numpy as np | |
import chainer | |
import chainer.links as L | |
from chainer import Chain, Variable | |
from chainer import datasets | |
class SOM(Chain): |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# caffe2のDB作成に必要 | |
import numpy as np | |
from StringIO import StringIO | |
from caffe2.python import core, utils, workspace | |
from caffe2.proto import caffe2_pb2 | |
# 今回はchainerのデータセットを拝借する | |
from chainer import datasets |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# 読み込むモジュール | |
import numpy as np | |
from caffe2.python import core, cnn, workspace | |
from matplotlib import pyplot | |
# 初期化 | |
core.GlobalInit(['caffe2', '--caffe2_log_level=0']) |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
import numpy as np | |
import matplotlib.pyplot as plt | |
class TravelPoints(): | |
def __init__(self, num_points): | |
self.points = np.ones((num_points, 2), dtype=np.float32) | |
return | |
This file contains hidden or 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
# -*- coding:utf-8 -*- | |
''' | |
Requirements | |
* chainer | |
* matplotlib | |
* MeCab | |
* OpenJTalk | |
* requests_oauthlib | |
* Twitter API |
This file contains hidden or 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
`timescale 1ns / 1ps | |
////////////////////////////////////////////////////////////////////////////////// | |
// Company: | |
// Engineer: | |
// | |
// Create Date: 2018/11/16 14:00:00 | |
// Design Name: | |
// Module Name: axi_read_write | |
// Project Name: | |
// Target Devices: |
This file contains hidden or 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
/* | |
axi_read_write.vを制御するプログラム | |
*/ | |
#include "xparameters.h" | |
#include "xil_printf.h" | |
#include "xgpio.h" | |
#include "xil_cache.h" | |
XGpio iwSTT; |
This file contains hidden or 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
# -*- coding:utf-8 -*- | |
import numpy as np | |
class GA(object): | |
def __init__(self, num, dim): | |
self.gen = np.random.randn(num, dim) | |
def run(self, x): | |
self.y = self.gen.dot(x.T) |
OlderNewer