IAM Policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1517398919242",| dsadasdㅁㄴㅇ |
| version: '3.8' | |
| services: | |
| mysql: | |
| image: mysql:8.0 | |
| environment: | |
| MYSQL_DATABASE: test | |
| MYSQL_USER: test | |
| MYSQL_PASSWORD: test | |
| MYSQL_ROOT_PASSWORD: test |
| -- how to model threaded comments (e.g. reddit comments) in SQL with a simple 'ancestors' column | |
| -- The comment tree: | |
| -- [1] | |
| -- / \ | |
| -- [2] [4] | |
| -- / \ \ | |
| -- [3] [7] [6] | |
| -- / | |
| -- [5] |
| import tensorflow as tf | |
| x_train = [1,2,3] | |
| y_train = [1,2,3] | |
| # H(x) = Wx+b | |
| W = tf.Variable(tf.random_normal([1]), name="weight") | |
| b = tf.Variable(tf.random_normal([1]), name="bias") |
| import websocket | |
| import requests | |
| import json | |
| # 중요한 값은 상수사용합니다. | |
| SYMBOL_LIST_ENDPOINT = "https://www.bitmex.com/api/v1/instrument/active" | |
| ENDPOINT = 'wss://www.bitmex.com/realtime' | |
| def sendRequest(url): | |
| res = requests.get(url) |
| import requests | |
| import json | |
| def sendRequest(url): | |
| res = requests.get(url) | |
| contents = res.content.decode('utf-8') | |
| # python2에서는 contents = res.content만 적어도 됩니다. | |
| # python2에서는 res.content가 string으로 오지만 | |
| # python3에서는 byte로 오기 때문에 디코딩이 필요합니다. | |
| import requests | |
| import json | |
| def sendRequest(url): | |
| res = requests.get(url) | |
| contents = res.content.decode('utf-8') | |
| # python2에서는 contents = res.content만 적어도 됩니다. | |
| # python2에서는 res.content가 string으로 오지만 | |
| # python3에서는 byte로 오기 때문에 디코딩이 필요합니다. | |
| import websocket | |
| def on_message(ws, message): | |
| print(message) | |
| def on_error(ws, error): | |
| print(error) | |
| def on_close(ws): | |
| print("### closed ###") |
| # PRECISION = "s" | |
| # MEASUREMENT = "candlesticks" | |
| # EXCHANGE = "bitmex" | |
| # | |
| # SUBSCRIPTION_DICT = {"op":"subscribe", "args":'tradeBin1m:{}'} | |
| # PAIR_URL = "https://www.bitmex.com/api/v1/instrument/active" | |
| # WEBSOCK_URL = "wss://www.bitmex.com/realtime?subscribe=tradeBin1m:XBTUSD" | |
| # TYPE = "SPOT" | |
| import websocket |