I hereby claim:
- I am lvthillo on github.
- I am lorenzvanthillo (https://keybase.io/lorenzvanthillo) on keybase.
- I have a public key ASCxoQXt1LCgXLl4AZou66Kl5EfUbtSlFcZD27JrJRa2kQo
To claim this, I am signing this object:
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: my-app | |
spec: | |
selector: | |
matchLabels: | |
run: my-app | |
replicas: 2 | |
template: |
def call(body) { | |
def rtMaven = '' | |
def buildInfo = '' | |
def server = '' | |
// evaluate the body block, and collect configuration into the object | |
def pipelineParams= [:] | |
body.resolveStrategy = Closure.DELEGATE_FIRST | |
body.delegate = pipelineParams | |
body() |
services: | |
mysql: | |
image: mysql:5.7 | |
container_name: mysql | |
volumes: | |
- mysql-volume:/var/lib/mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: db | |
MYSQL_USER: blog-user |
podTemplate(label: 'mypod', containers: [ | |
containerTemplate(name: 'git', image: 'alpine/git', ttyEnabled: true, command: 'cat'), | |
containerTemplate(name: 'maven', image: 'maven:3.3.9-jdk-8-alpine', command: 'cat', ttyEnabled: true), | |
containerTemplate(name: 'docker', image: 'docker', command: 'cat', ttyEnabled: true) | |
], | |
volumes: [ | |
hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock'), | |
] | |
) { | |
node('mypod') { |
#!/usr/bin/env groovy | |
def call(String buildResult) { | |
if ( buildResult == "SUCCESS" ) { | |
slackSend color: "good", message: "Job: ${env.JOB_NAME} with buildnumber ${env.BUILD_NUMBER} was successful" | |
} | |
else if( buildResult == "FAILURE" ) { | |
slackSend color: "danger", message: "Job: ${env.JOB_NAME} with buildnumber ${env.BUILD_NUMBER} was failed" | |
} | |
else if( buildResult == "UNSTABLE" ) { |
I hereby claim:
To claim this, I am signing this object:
# stock_data contains historical data of ETH/BTC with a period of 1 hhour | |
# the volume is calculated by using historical data | |
# run this as close to each 1h interval (e.g. 7.59h or 9.59m) | |
last_items = stock_data.tail(24) | |
print(last_items) | |
day_volume_self_calculated = last_items['volume'].sum() | |
print(day_volume_self_calculated) | |
# better way to do it | |
ticker = exchange.fetch_ticker(coin_pair) |
signal = stock_data['macds'] # Your signal line | |
macd = stock_data['macd'] # The MACD that need to cross the signal line | |
advice = ["No data"] # Since you need at least two hours in the for loop | |
for i in range(1, len(signal)): | |
# If the MACD crosses the signal line upward | |
if macd[i] > signal[i] and macd[i - 1] <= signal[i - 1]: | |
advice.append("BUY") | |
# The other way around | |
elif macd[i] < signal[i] and macd[i - 1] >= signal[i - 1]: |
import ccxt | |
import os | |
import re | |
import time | |
import pandas as pd | |
from stockstats import StockDataFrame as Sdf | |
def get_historical_data(coin_pair, timeframe): | |
"""Get Historical data (ohlcv) from a coin_pair |
import ccxt | |
import os | |
import re | |
# configure exchange | |
exchange = getattr(ccxt, 'binance')({ | |
'apiKey': os.environ['APIKEY'], | |
'secret': os.environ['SECRET'], | |
'timeout': 10000, | |
'enableRateLimit': True |