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
""" | |
Find what's hot in your field based on the accepted papers in your favorite conference. | |
Reads a file with paper titles, possibly obtained from the conference web site. | |
Hint: I use Chrome's developer tools to format the conference web page to simplify | |
the list and paste it into a txt file. It often takes a few minutes for me. | |
- Semih Yagcioglu | |
""" | |
from sklearn.feature_extraction.text import CountVectorizer |
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 keras.models import Sequential | |
from keras.layers.core import Dense | |
X = np.array([[0,0],[0,1],[1,0],[1,1]]) # training data, the states of the XOR gate | |
y = np.array([[0],[1],[1],[0]]) # true labels of the data in the same order | |
model = Sequential() | |
model.add(Dense(16, input_dim=2, activation='relu')) | |
model.add(Dense(1, activation='sigmoid')) |
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 tensorflow as tf | |
tf.__version__ | |
# Creates a graph. | |
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a') | |
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b') | |
c = tf.matmul(a, b) | |
# Creates a session with log_device_placement set to True. |
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
# !/usr/bin/env python | |
import sys | |
import numpy as np | |
import numpy.random as npr | |
from numpy.distutils.system_info import get_info | |
import time | |
if __name__ == '__main__': |