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/local/bin/ruby | |
# Used to export Blocks from a Web3 compatible endpoint | |
# I use: | |
# geth --rpc --rpccorsdomain http://localhost:8080 --fast | |
# Need to add a unique index for tx | |
# db.transactions.createIndex({"hash":1},{unique:1}) | |
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
from gensim.models.doc2vec import LabeledSentence | |
import re | |
class DocIterator(object): | |
def __init__(self, doc_list, labels_list): | |
self.labels_list = labels_list | |
self.doc_list = doc_list | |
def __iter__(self): | |
for idx, doc in enumerate(self.doc_list): |
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
from gensim.models.doc2vec import LabeledSentence | |
from os import listdir | |
from os.path import isfile, join | |
import gensim | |
import DocIterator as DocIt | |
import MySQLdb | |
docLabels = [] | |
data = [] |
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 tweepy | |
from tweepy import Stream | |
from tweepy.streaming import StreamListener | |
import sys | |
from newspaper import Article | |
from time import mktime | |
auth = tweepy.OAuthHandler("XXXXXXXXXXXX") | |
auth.set_access_token("XXXXXXXXXXXX") |
NewerOlder