Skip to content

Instantly share code, notes, and snippets.

View PabTorre's full-sized avatar

Pablo Torre PabTorre

View GitHub Profile
@PabTorre
PabTorre / modern_sql_style_guide.md
Created November 9, 2020 15:03 — forked from mattmc3/modern_sql_style_guide.md
Modern SQL Style Guide
layout author title revision version description
default
mattmc3
Modern SQL Style Guide
2019-01-17
1.0.1
A guide to writing clean, clear, and consistent SQL.

Modern SQL Style Guide

@PabTorre
PabTorre / rolling_window.py
Created October 24, 2019 03:08 — forked from sa2812/rolling_window.py
Strides with rolling window
def rolling_window(self, ts, window, stride):
shape = ts.shape[:-1] + (int((ts.shape[-1] - window)/stride + 1), window)
strides = (stride*ts.strides[-1],) + (ts.strides[-1],)
return np.lib.stride_tricks.as_strided(ts,
shape=shape,
strides=strides)
@PabTorre
PabTorre / install_python_36_amazon_linux2.sh
Last active July 13, 2021 11:58 — forked from niranjv/install_python_36_amazon_linux.sh
Install Python 3.6 in Amazon Linux 2
# A virtualenv running Python3.6 on Amazon Linux/EC2 (approximately) simulates the Python 3.6 Docker container used by Lambda
# and can be used for developing/testing Python 3.6 Lambda functions
# This script installs Python 3.6 on an EC2 instance running Amazon Linux and creates a virtualenv running this version of Python
# This is required because Amazon Linux does not come with Python 3.6 pre-installed
# and several packages available in Amazon Linux are not available in the Lambda Python 3.6 runtime
# The script has been tested successfully on a EC2 instance
# running 4.9.75-1.56.amzn2.x86_64
# and was developed with the help of AWS Support