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
# Plot logtime in realtime using bokeh and tail -f | |
# Tested with python 3.5 and bokeh 0.12.4 | |
# OSX/Linux only | |
# usage: | |
# 1. run 'bokeh serve' | |
# 2. run 'python3.5 main.py logfile.csv' | |
# assumes a logfile.csv with format: | |
# min_ask,1489758134.150000,1077.00,1076.78,0.45 | |
# max_bid,1489758139.660000,1076.56,1076.76,0.41 | |
# min_ask,1489758142.076000,1076.95,1076.76,0.40 |
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
class Configuration(graphene.ObjectType): | |
#ID! definition to be ommitted, generated by node interface | |
enabled = graphene.Boolean() | |
value = graphene.Int() | |
class Meta: | |
interfaces = (relay.Node, ) | |
def query_Configuration(user_id): | |
configuration = get_user_configuration(user_id) | |
result = { |
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
{ | |
"data": { | |
"User": { | |
"id": "GWESDssuYSsDFASDF234SDF0aW92aSD=", | |
"Configuration": { | |
"id": "QXVkaWVuY2VDb25maWd1cmF0aW9uOjQ=", | |
"enabled": false, | |
"value": 100 | |
} | |
} |
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
class Query(graphene.ObjectType): | |
node = relay.Node.Field() | |
user = graphene.Field(User, | |
id=graphene.String(required=True)) | |
def resolve_user( | |
args, | |
info, | |
id, **kwargs): |
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
class Query(graphene.ObjectType): | |
node = relay.Node.Field() | |
user = graphene.Field(User, | |
id=graphene.String(required=True)) | |
def resolve_user( | |
args, | |
info, | |
id, **kwargs): |
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 graphene_sqlalchemy import SQLAlchemyObjectType | |
from models import User as UserModels | |
class User(SQLAlchemyObjectType): | |
class Meta: | |
model = UserModel |
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 graphene | |
class Configuration(graphene.ObjectType): | |
#ID! definition to be ommitted, generated by node interface | |
enabled = graphene.Boolean() | |
value = graphene.Int() | |
class Meta: | |
interfaces = (graphene.relay.Node, ) |
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
def resolve_user_configuration(*args, **kwargs): | |
configuration = get_user_configuration(user_id) | |
result = { | |
'enabled' : configuration.enabled, | |
'value' : configuration.value, | |
'id': configuration.id | |
} | |
return result | |
class User(SQLAlchemyObjectType): |
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
<!-- Begin Mailchimp Signup Form --> | |
<div id="mc_embed_signup"> | |
<form action="https://app.us19.list-manage.com/subscribe/post?u=d92c9422ebf632afebbfa4d5c&id=1eaf057efe" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> | |
<div id="mc_embed_signup_scroll"> | |
<div class="mc-field-group"> | |
<label for="mce-EMAIL">Email Address </label> | |
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"> | |
</div> | |
<div id="mce-responses" class="clear"> |
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
<form | |
class="form-inline" | |
action="VALUE FROM MAILCHIP CODE" | |
method="post" | |
id="mc-embedded-subscribe-form" | |
name="mc-embedded-subscribe-form" | |
target="_blank" | |
> | |
<div class="container"> | |
<div class="row sm-100 justify-content-md-center"> |
OlderNewer