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
x = Input(shape=(max_len,)) | |
emb = Embedding(max_features, | |
embedding_dims, | |
input_length=max_len))(x) | |
for filter_len in [2, 3, 4]: | |
branch = Sequential() | |
branch.add(Convolution1D(nb_filter=filters, | |
filter_length=filter_len, | |
border_mode='valid', |
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 json | |
import tweepy | |
class StdOutListener(tweepy.StreamListener): | |
def do_stuff(self, pdata): | |
print pdata['text'] | |
def on_data(self, data): | |
pdata = "" |