Skip to content

Instantly share code, notes, and snippets.

View vorandrew's full-sized avatar

Andrew Vorobyov vorandrew

View GitHub Profile
@vorandrew
vorandrew / dxfeed.py
Last active January 14, 2024 22:07
tastytrade.com and DXFeed - stock quotes and OHLCs
import asyncio
import datetime as dt
import json
import logging
import re
import requests
import websockets
URL = "https://api.tastytrade.com"
@vorandrew
vorandrew / bitbucket-pipelines.yml
Created October 29, 2023 11:11 — forked from ahmetgeymen/bitbucket-pipelines.yml
Bitbucket Pipelines: Build Docker Image + GCR Image Push + GKE Deploy
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
@vorandrew
vorandrew / gke.tf
Created October 26, 2023 09:14
Terraform gke
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"
@vorandrew
vorandrew / benchmark-commands.md
Created November 29, 2020 21:13 — forked from ueokande/benchmark-commands.md
Kafka Benchmark Commands

Benchmark commands

Producer

Setup

bin/kafka-topics.sh \
  --zookeeper zookeeper.example.com:2181 \
  --create \
@vorandrew
vorandrew / server.r
Last active January 5, 2019 14:00 — forked from timelyportfolio/server.r
Example to Test Parameters on Moving Average System
#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")
@vorandrew
vorandrew / log.txt
Last active December 23, 2018 13:28
Deribit RxJs
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;
}
}
/*
@vorandrew
vorandrew / example.js
Created February 25, 2018 21:08
Group by flow
let data = _.flow(
_.groupBy('country_id'),
_.map(
_.flow( // city group by level
_.groupBy('city_id'),
_.map(
_.flow( // person group by level
_.groupBy('person_id'),
_.map(vals => {
return {