This file contains 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 requests | |
from io import StringIO | |
import boto3 | |
import csv | |
import os | |
import datetime | |
def add_timestamp_to_filename(original_filename): | |
# Get the current date and time |
This file contains 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 boto3 | |
import csv | |
from io import StringIO | |
import requests | |
import PyPDF2 | |
import openai | |
from io import BytesIO | |
# Set up your AWS credentials | |
# Make sure you have the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables set |
This file contains 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 requests | |
from bs4 import BeautifulSoup | |
import csv | |
import boto3 | |
# Replace this URL with the URL of the website you want to scrape | |
url = 'https://app.leg.wa.gov/far/Senate/Calendar' | |
# Send an HTTP request to the URL and get the HTML content | |
response = requests.get(url) | |
html_content = response.text |
This file contains 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
[ | |
{ | |
"number_of_reviews": 77, | |
"number_of_stars": 4.4, | |
"top_industry_represented": [ | |
"Information Technology and Services: 22", | |
"Insurance: 5", | |
"Banking: 4", | |
"Computer Software: 3", | |
"Financial Services: 3", |
This file contains 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
CREATE DATABASE raw | |
CREATE storage integration s3_int type = external_stage storage_provider = 'S3' storage_aws_role_arn = 'arn:aws:iam::001234567890:role/myrole' enabled = true storage_allowed_locations = ('s3://bucket/folder/'); | |
--Create a stage | |
CREATE | |
OR REPLACE STAGE raw_predictit storage_integration = s3_int file_format = (type = json) url = 's3://bucket/folder/' | |
--Select from stage | |
SELECT metadata$filename |
This file contains 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
SELECT N.name | |
FROM neighborhoods N | |
LEFT JOIN users U | |
ON N.id = U.neighborhood_id | |
WHERE U.id is null |
This file contains 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 airflow | |
from airflow import DAG | |
from airflow.operators.bash_operator import BashOperator | |
from airflow.operators.dummy_operator import DummyOperator | |
from airflow.operators.python_operator import PythonOperator | |
from airflow.providers.postgres.operators.postgres import PostgresOperator | |
from datetime import datetime, timedelta | |
from bs4 import BeautifulSoup | |
from urllib.request import urlopen | |
import urllib.request |
This file contains 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
Run this on your postgres instance | |
CREATE EXTENSION aws_s3 CASCADE; | |
Run this on your EC2 instance | |
First- |
This file contains 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
faang | |
technology-driven start-up | |
instacart | |
pms | |
product managers | |
sql | |
sql | |
average amount | |
don ’ t | |
query.this ability |
This file contains 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 textblob import TextBlob | |
t=#PUT YOUR TEXT HERE | |
blob = TextBlob(t) | |
for i in blob.noun_phrases: | |
print(i) |
NewerOlder