Skip to content

Instantly share code, notes, and snippets.

View anna-geller's full-sized avatar

Anna Geller anna-geller

View GitHub Profile
import boto3
s3 = boto3.client("s3")
response = s3.put_bucket_accelerate_configuration(
Bucket="annageller", AccelerateConfiguration={"Status": "Enabled"},
)
import boto3
from botocore.config import Config
ta_config = Config(s3={"use_accelerate_endpoint": True})
s3 = boto3.client("s3", config=ta_config)
from datetime import date
import os
from pandas_datareader.data import DataReader
ticker_symbol = "GOOGL"
os.environ["ALPHAVANTAGE_API_KEY"] = "YOUR_API_KEY"
df = DataReader(
name=ticker_symbol,
import awswrangler as wr
from datetime import date
import logging
import pandas as pd
from pandas_datareader.data import DataReader
logging.basicConfig(
format="%(asctime)s - [%(levelname)s] - %(name)s: %(message)s", level="INFO"
)
import awswrangler as wr
from datetime import date
import logging
import pandas as pd
from pandas_datareader.data import DataReader
class StockDataReader:
def __init__(
self,
import awswrangler as wr
from datetime import date
import logging
import pandas as pd
from pandas_datareader.data import DataReader
class StockDataReader:
def __init__(
self,
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"athena:*",
"glue:*",
"s3:*Object*",
"s3:GetBucketLocation",
{
"family": "ecsDemo",
"requiresCompatibilities": ["FARGATE"],
"networkMode": "awsvpc",
"cpu": "256",
"memory": "512",
"taskRoleArn": "arn:aws:iam::123456:role/ecs-athena-glue-s3-role",
"executionRoleArn": "arn:aws:iam::123456:role/ecs-task-execution-role",
"containerDefinitions": [
{
{
"family": "ecsDemo",
"requiresCompatibilities": ["FARGATE"],
"networkMode": "awsvpc",
"cpu": "256",
"memory": "512",
"taskRoleArn": "arn:aws:iam::123456:role/ecs-athena-glue-s3-role",
"executionRoleArn": "arn:aws:iam::123456:role/ecs-task-execution-role",
"containerDefinitions": [
{
import awswrangler as wr
from datetime import date
import logging
import pandas as pd
from pandas_datareader.data import DataReader
class StockDataReader:
def __init__(
self,