Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
| # calculating RSI (gives the same values as TradingView) | |
| # https://stackoverflow.com/questions/20526414/relative-strength-index-in-python-pandas | |
| def RSI(series, period=14): | |
| delta = series.diff().dropna() | |
| ups = delta * 0 | |
| downs = ups.copy() | |
| ups[delta > 0] = delta[delta > 0] | |
| downs[delta < 0] = -delta[delta < 0] | |
| ups[ups.index[period-1]] = np.mean( ups[:period] ) #first value is sum of avg gains |
| .temp-0 { | |
| color: #9c2fae; | |
| } | |
| .temp-1-10 { | |
| color: #663fb4; | |
| } | |
| .temp-11-20 { | |
| color: #4055b2; |
| FROM php:7.2-fpm | |
| # Replace shell with bash so we can source files | |
| RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
| # make sure apt is up to date | |
| RUN apt-get update --fix-missing | |
| RUN apt-get install -y curl | |
| RUN apt-get install -y build-essential libssl-dev zlib1g-dev libpng-dev libjpeg-dev libfreetype6-dev |
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ | #!/bin/bash | |
| # for use with cron, eg: | |
| # 0 3 * * * postgres /var/db/db_backup.sh foo_db | |
| if [[ -z "$1" ]]; then | |
| echo "Usage: $0 <db_name> [pg_dump args]" | |
| exit 1 | |
| fi |
| #!/usr/bin/env bash | |
| # | |
| # RFC standard of the email address could be found in rfc5322, rfc6854, etc. | |
| # | |
| # however, it is hard to escape all the special characters in the bash | |
| # so, in this script, it will only check for the address syntax only | |
| # having some valid/invalid inputs to test its result | |
| # | |
| # please be noted that, it is not design to detect mailbox deliverability |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.