Skip to content

Instantly share code, notes, and snippets.

View semihyagcioglu's full-sized avatar

Semih Yagcioglu semihyagcioglu

View GitHub Profile
@semihyagcioglu
semihyagcioglu / what-is-hot-in-your-field.py
Last active September 12, 2017 20:12
What's Hot In Your Field
"""
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
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'))
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.
# !/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__':