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
| input_dim = X.shape[-1] | |
| hidden_dim = 4 | |
| output_dim = y.shape[-1] | |
| print('Input dimension: {}\nHidden dimension: {}\nOuput dimension: {}'.format(input_dim, hidden_dim, output_dim)) |
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
| X = np.array([ [0, 0, 1], [0, 1, 1], [1, 0, 1], [1, 1, 1] ]) | |
| y = np.array([ [0], [1], [1], [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
| # The only dependency required. | |
| import numpy as np |
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
| """ | |
| @author Victor I. Afolabi | |
| A.I. Engineer & Software developer | |
| javafolabi@gmail.com | |
| Created on 28 October, 2017 @ 9:55 PM. | |
| Copyright © 2017. Victor. All rights reserved. | |
| """ |
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
| """ | |
| @author Victor I. Afolabi | |
| A.I. Engineer & Software developer | |
| javafolabi@gmail.com | |
| Created on 02 November, 2017 @ 11:24 PM. | |
| Copyright © 2017. Victor. All rights reserved. | |
| """ | |
| import datetime as dt |
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
| """ | |
| @author Victor I. Afolabi | |
| A.I. Engineer & Software developer | |
| javafolabi@gmail.com | |
| Created on 05 October, 2017 @ 03:35 PM. | |
| Copyright © 2017. Victor. All rights reserved. | |
| """ |
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
| """ | |
| @author Victor I. Afolabi | |
| A.I. Engineer & Software developer | |
| javafolabi@gmail.com | |
| Created on 25 August, 2017 @ 8:15 PM. | |
| Copyright © 2017. victor. All rights reserved. | |
| """ | |
| import numpy as np |
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
| from nltk.corpus import wordnet | |
| class Dictionary: | |
| def __init__(self, word): | |
| Dictionary.word = word | |
| @staticmethod | |
| def definition(): | |
| syns = Dictionary.synsets() |
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/env python3 | |
| # NOTE: this example requires PyAudio because it uses the Microphone class | |
| import speech_recognition as sr | |
| # obtain audio from the microphone | |
| r = sr.Recognizer() | |
| with sr.Microphone() as source: | |
| print("Say something!") |
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
| from sklearn.datasets import load_iris | |
| from sklearn import tree | |
| import numpy as np | |
| iris = load_iris() | |
| features = iris.data | |
| labels = iris.target |