This file contains hidden or 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
| wget --recursive --no-clobber --page-requisites --html-extension --convert-links --domains DOMAIN --user-agent="Mozilla/5.0 (Windows NT 5.2; rv:2.0.1) Gecko/20100101 Firefox/4.0.1" --no-parent URL |
This file contains hidden or 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
| # Source: https://twitter.com/JohnGalt_is_www/status/1251951910350925825 | |
| import matplotlib.pyplot as plt, numpy as np | |
| from alpha_vantage.timeseries import TimeSeries as seriesAlpha | |
| ticker = "GGAL" | |
| serie = seriesAlpha(key="IUIHYQWABRBAMCH6",output_format = "pandas") | |
| data,metadata = serie.get_intraday(symbol=ticker,interval="1min",outputsize="full") | |
| data.columns = ["Open","High","Low","Close","Volume"] | |
| n = 16 # filas y columas de la matriz rango | |
| quantiles = [i/n for i in range(n)] |
This file contains hidden or 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
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This file contains hidden or 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
| from math import sqrt, exp | |
| import pydotplus as pydot | |
| import numpy as np | |
| class Call(object): | |
| def __init__(self, S0, K, rate, sigma, n_periods, tyears): | |
| self.S0 = S0 # Today's stock price | |
| self.K = K # Strike Price | |
| self.rate = rate | |
| self.sigma = sigma |
This file contains hidden or 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 logging | |
| import sys | |
| from logging.handlers import TimedRotatingFileHandler | |
| FORMATTER = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") | |
| LOG_FILE = "my_app.log" | |
| def get_console_handler(): | |
| console_handler = logging.StreamHandler(sys.stdout) | |
| console_handler.setFormatter(FORMATTER) |
This file contains hidden or 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
| FROM php:fpm-alpine | |
| RUN set -ex \ | |
| && apk --no-cache add \ | |
| postgresql-dev | |
| RUN docker-php-ext-install pdo pdo_pgsql |
This file contains hidden or 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
| FROM php:fpm-alpine | |
| RUN set -ex \ | |
| && apk --no-cache add \ | |
| postgresql-dev | |
| RUN docker-php-ext-install pdo pdo_pgsql |
This file contains hidden or 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 | |
| set -e | |
| # Validate input arguments | |
| if [ "$#" -lt 4 ]; then | |
| echo "Usage: $0 <layer-name> <region> <python-version> <dependencies>" | |
| echo "Example: $0 pikepdf-layer us-east-2 python3.10 pikepdf,nltk" | |
| exit 1 | |
| fi |