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 numpy as np | |
import tensorflow as tf | |
def tensorflow_FizzBuzz(): | |
NUM_DIGITS = 10 | |
def binary_encode(i, num_digits): | |
return np.array([i >> d & 1 for d in range(num_digits)]) | |
def fizz_buzz_encode(i): |
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
require './jumanpp.rb' | |
# http://qiita.com/rtoya/items/33e5ac410704b70800b2 のruby用ラッパーコードを使用 | |
# Open3.popen3('jumanpp') を Open3.popen3('jumanpp -M') に変更 | |
require 'pp' | |
file_name = './sample.txt' | |
imported_words = [] | |
File.open(file_name) do |file| | |
jumanpp = Jumanpp::Parser.new |
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
if __name__ == '__main__': | |
from sklearn import datasets | |
from sklearn.model_selection import train_test_split | |
from random_forest import RandomForest | |
iris = datasets.load_iris() | |
X = iris.data | |
y = iris.target | |
X_train, X_test, y_train, y_test = train_test_split( |
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 numpy as np | |
from node import _Node | |
from sklearn.base import ClassifierMixin | |
class DecisionTree(ClassifierMixin): | |
def __init__(self): | |
self._root = None | |
def create_tree(self, X, y): |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# coding: utf-8 | |
import numpy as np | |
from im2col import im2col | |
class Convolution: | |
def __init__(self, W, b, stride=1, pad=0): | |
self.W = W | |
self.b = b | |
self.stride = stride | |
self.pad = pad |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 urllib.request | |
import sys | |
import os | |
import json | |
def download(import_file, number_of_files): | |
f = open(import_file, 'r') | |
json_data = json.load(f) | |
images = json_data["images"] |
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 urllib.request | |
import sys | |
import os | |
import json | |
def merge_by_image_id(import_file): | |
merged_images = [] | |
f = open(import_file, 'r') | |
json_data = json.load(f) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer