View import_nyse_companies.py
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 pymongo | |
from pymongo import MongoClient | |
import urllib2 | |
import csv | |
# Are we using development or Production ? | |
# uri = "mongodb://USERNAME:PASSWORD@INSTANCE.documents.azure.com:10255/?ssl=true&replicaSet=globaldb" |
View import_candles.py
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 pymongo | |
from pymongo import MongoClient | |
import csv | |
import urllib2 | |
import sys | |
import os.path | |
from datetime import datetime, timedelta | |
QUANDL_API_KEY = "YOUR_API_KEY" |
View get_tweets.py
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") |
View doc2vec.py
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 = [] |
View DocIterator.py
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): |
View import_transactions.rb
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}) | |
View import_transactions_bulk.rb
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: | |
# parity --geth --jsonrpc-server-threads=4 --mode=offline -d /data/io.parity.ethereum/ --cache-size 65536 | |
require 'web3/eth' | |
require 'mongoid' | |
force_sync = ARGV[0] |
View Dockerfile-Rendertron
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 node | |
RUN apt-get update && \ | |
apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \ | |
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \ | |
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \ | |
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \ | |
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget | |
RUN git clone https://github.com/GoogleChrome/rendertron.git | |
WORKDIR rendertron |
View rendertron.yml
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: rendertron | |
labels: | |
app: rendertron | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: |
View rendertron_svc.yml
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
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: rendertron | |
spec: | |
selector: | |
app: rendertron | |
ports: | |
- name: rendertron | |
protocol: TCP |
OlderNewer