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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: apache | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: apache | |
# Description: Start apache | |
### END INIT INFO |
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
#!/bin/bash | |
yum repolist all; | |
yum-config-manager --enable codeready-builder-for-rhel-8-rhui-rpms; | |
yum update -y; | |
dd if=/dev/zero of=/swapfile bs=128M count=32; | |
chmod 600 /swapfile; | |
mkswap /swapfile; | |
swapon /swapfile; |
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
#!/bin/bash | |
yum repolist all; | |
yum-config-manager --enable codeready-builder-for-rhel-8-rhui-rpms; | |
yum update -y; | |
dd if=/dev/zero of=/swapfile bs=128M count=32; | |
chmod 600 /swapfile; | |
mkswap /swapfile; | |
swapon /swapfile; |
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 re | |
import requests | |
from datetime import datetime | |
def cbpGetHistoricRates(market='BTC-GBP', granularity=86400, iso8601start='', iso8601end=''): | |
if not isinstance(market, str): | |
raise Exception('Market string input expected') | |
if not isinstance(granularity, int): |
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: dictionary { 'dd/mm/yyy': price, 'dd/mm/yyyy': price, ... } | |
# num: range in the average calculation, normally 9 to 26 | |
def exponentialMovingAverage(data, num): | |
if not isinstance(data, dict): | |
raise Exception('Dictionary input expected') | |
if not isinstance(num, int): | |
raise Exception('Integer input expected') |
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: dictionary { 'dd/mm/yyy': price, 'dd/mm/yyyy': price, ... } | |
def movingAverageConvergenceDivergence(data): | |
if not isinstance(data, dict): | |
raise Exception('Dictionary input expected') | |
if (26 > len(data)): | |
raise Exception('Insufficient data for calculation') |
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
# https://whittle.medium.com/trading-using-python-moving-average-convergence-divergence-macd-4dbfee1c1a37 | |
import re | |
import requests | |
from datetime import datetime | |
def cbpGetHistoricRates(market='BTC-GBP', granularity=86400, iso8601start='', iso8601end=''): | |
if not isinstance(market, str): | |
raise Exception('Market string input expected') |
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: dictionary { 'dd/mm/yyy': price, 'dd/mm/yyyy': price, ... } | |
def relativeStrengthIndex(data, num): | |
if not isinstance(data, dict): | |
raise Exception('Dictionary input expected') | |
if not isinstance(num, int): | |
raise Exception('Integer input expected') |
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
# https://whittle.medium.com/trading-using-python-relative-strength-index-rsi-f0c63c1c0db | |
import re | |
import requests | |
from datetime import datetime | |
def cbpGetHistoricRates(market='BTC-GBP', granularity=86400, iso8601start='', iso8601end=''): | |
if not isinstance(market, str): | |
raise Exception('Market string input expected') |
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
# https://levelup.gitconnected.com/trading-using-python-exponential-moving-average-ema-f38ed3211a44?source=your_stories_page------------------------------------- | |
import re | |
import requests | |
from datetime import datetime | |
def cbpGetHistoricRates(market='BTC-GBP', granularity=86400, iso8601start='', iso8601end=''): | |
if not isinstance(market, str): | |
raise Exception('Market string input expected') |
OlderNewer