This file contains hidden or 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 python:3.6 | |
| RUN mkdir /app | |
| ADD requirements.txt /app/ | |
| WORKDIR /app/ | |
| RUN pip install -r requirements.txt | |
| CMD [ \ | |
| "watchmedo", \ | |
| "auto-restart", \ |
This file contains hidden or 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
| # | |
| # https://docs.gdax.com/#websocket-feed | |
| # | |
| import websocket | |
| import sys | |
| from datetime import datetime, timedelta, timezone | |
| import sched, time | |
| import json |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 | |
| # Implementation of algorithm from http://stackoverflow.com/a/22640362/6029703 | |
| import numpy as np | |
| import pylab | |
| def thresholding_algo(y, lag, threshold, influence): | |
| signals = np.zeros(len(y)) | |
| filteredY = np.array(y) | |
| avgFilter = [0]*len(y) | |
| stdFilter = [0]*len(y) |
This file contains hidden or 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 io | |
| import requests | |
| import pandas as pd | |
| from bokeh.models import ColumnDataSource, HoverTool, ResizeTool, SaveTool | |
| from bokeh.models.widgets import TextInput, Button | |
| from bokeh.plotting import figure, curdoc | |
| from bokeh.layouts import row, widgetbox | |
| TICKER = "" |
This file contains hidden or 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
| POST _ingest/pipeline/_simulate | |
| { | |
| "pipeline" : { | |
| "description": "A pipeline to do named entity extraction", | |
| "processors": [ | |
| { | |
| "script": { | |
| "lang": "painless", | |
| "inline": "ctx.params = [:] ; /&/.splitAsStream(ctx.x).forEach(pair -> { def x = /=/.split(pair); ctx.params[x[0]] = x[1]; })" | |
| } |
This file contains hidden or 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 | |
| # encoding: utf-8 | |
| ''' | |
| Elasticsearch export using Python ES client's scroll feature | |
| @author: mbonaci | |
| @copyright: 2016 Sematext. All rights reserved. | |
| @license: Apache 2.0 | |
| @contact: [email protected] | |
| ''' |
This file contains hidden or 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 io | |
| import time | |
| import picamera | |
| import picamera.array | |
| import numpy as np | |
| from PIL import Image, ImageDraw |
NewerOlder