Skip to content

Instantly share code, notes, and snippets.

View williambarretolopes's full-sized avatar
🏠
Working from home

William Chaves Barreto Lopes williambarretolopes

🏠
Working from home
View GitHub Profile
@mleuthold
mleuthold / prepare-pypspark-env.sh
Last active October 4, 2023 19:42
Use PySpark 3.0.0 with pyenv
pyenv install 3.8.1
pyenv virtualenv 3.8.1 spark3
pyenv shell spark3
pip install pyspark
MY_PYSPARK_LOCATION=$(pip show pyspark | grep -e "Location" | cut -d ' ' -f 2)
# /home/marleu/.pyenv/versions/3.8.1/envs/spark3/lib/python3.8/site-packages
MY_PYSPARK_NAME=$(pip show pyspark | grep -e "Name" | cut -d ' ' -f 2)
# pyspark
@sysboss
sysboss / query_athena.py
Created May 21, 2018 15:41
SQL Query Amazon Athena using Python
#!/usr/bin/env python3
#
# Query AWS Athena using SQL
# Copyright (c) Alexey Baikov <sysboss[at]mail.ru>
#
# This snippet is a basic example to query Athen and load the results
# to a variable.
#
# Requirements:
# > pip3 install boto3 botocore retrying