Setup
bin/kafka-topics.sh \
--zookeeper zookeeper.example.com:2181 \
--create \| import numpy as np | |
| import librosa | |
| import sounddevice as sd | |
| import pygame | |
| import time | |
| # ПАРАМЕТРЫ | |
| SAMPLE_RATE = 16000 | |
| DURATION = 3 | |
| THRESHOLD = 0.90 |
| import asyncio | |
| import datetime as dt | |
| import json | |
| import logging | |
| import re | |
| import requests | |
| import websockets | |
| URL = "https://api.tastytrade.com" |
| image: openjdk:11-jdk-slim | |
| definitions: | |
| caches: | |
| gradlewrapper: ~/.gradle/wrapper | |
| gke-kubectl-pipe: &pipe atlassian/google-gke-kubectl-run:1.3.1 | |
| gke-kubectl-pipe-variables: &pipe-variables | |
| KEY_FILE: $GKE_API_KEYFILE | |
| PROJECT: $GCP_PROJECT_ID | |
| COMPUTE_ZONE: $GKE_COMPUTE_ZONE |
| data "google_client_config" "default" {} | |
| provider "kubernetes" { | |
| host = "https://${module.gke.endpoint}" | |
| token = data.google_client_config.default.access_token | |
| cluster_ca_certificate = base64decode(module.gke.ca_certificate) | |
| } | |
| module "gke" { | |
| source = "terraform-google-modules/kubernetes-engine/google" |
| package pubsub | |
| import ( | |
| "context" | |
| "testing" | |
| "time" | |
| "cloud.google.com/go/pubsub" | |
| "cloud.google.com/go/pubsub/pstest" | |
| "google.golang.org/api/option" |
| #almost entirely based on the 02_text and 03_mpg examples provided by RStudio Shiny | |
| #all credit belongs to them | |
| if (!require(PerformanceAnalytics)) { | |
| stop("This app requires the PerformanceAnalytics package. To install it, run 'install.packages(\"PerformanceAnalytics\")'.\n") | |
| } | |
| if (!require(quantmod)) { | |
| stop("This app requires the quantmod package. To install it, run 'install.packages(\"quantmod\")'.\n") |
| deribit-rxjs:ohlc-s5 2018-12-23T13:18:29.336Z BTC-PERPETUAL { t: 1545571105000, o: null, h: null, l: null, c: null, v: null } +5s | |
| deribit-rxjs:ohlc-s15 2018-12-23T13:18:29.336Z BTC-PERPETUAL { t: 1545571095000, o: null, h: null, l: null, c: null, v: null } +15s | |
| deribit-rxjs:ohlc-s30 2018-12-23T13:18:29.336Z BTC-PERPETUAL { t: 1545571080000, o: null, h: null, l: null, c: null, v: null } +30s | |
| deribit-rxjs:ohlc-s1 2018-12-23T13:18:30.009Z BTC-PERPETUAL { t: 1545571110000, o: null, h: null, l: null, c: null, v: null } +673ms | |
| deribit-rxjs:ohlc-s1 2018-12-23T13:18:31.019Z BTC-PERPETUAL { t: 1545571111000, o: null, h: null, l: null, c: null, v: null } +1s | |
| deribit-rxjs:ohlc-s1 2018-12-23T13:18:32.030Z BTC-PERPETUAL { t: 1545571112000, o: null, h: null, l: null, c: null, v: null } +1s | |
| deribit-rxjs:ohlc-s1 2018-12-23T13:18:33.040Z BTC-PERPETUAL { t: 1545571113000, o: null, h: null, l: null, c: null, v: null } +1s | |
| deribit-rxjs:ohlc-s1 2018-12-23T13:18:34.047Z BTC-PERPETUAL { t: 1545571114000, o: null, h: |
| deribit:api:ws:test {"id":742,"success":false,"testnet":false,"error":10000,"message":"authorization_required"} |
| function MakeArray(size) { | |
| for (var i = 1; i <= size; i++) { | |
| this.length = size; | |
| this[i] = 0; | |
| } | |
| } | |
| /* |