Skip to content

Instantly share code, notes, and snippets.

View 0xpetersatoshi's full-sized avatar
🦁
ROAR

Peter 0xpetersatoshi

🦁
ROAR
View GitHub Profile
@0xpetersatoshi
0xpetersatoshi / moving_averages.sql
Created January 14, 2019 01:13
Custom SQL script used to compute moving averages.
with q as (
select
datetime,
avg(price) as avg_price,
avg(price/sqft) as avg_price_per_sqft,
count(distinct link) as unique_listings
from "craigslist"."pq_craigslist_rental_data_parquet"
-- filter out extreme values
where price <= (select avg(price) * 3 from "craigslist"."pq_craigslist_rental_data_parquet")
group by 1
import re
import os
import json
import requests
import boto3
import numpy as np
from bs4 import BeautifulSoup
from datetime import datetime
# Create date
import boto3
# Set up S3 resource
s3 = boto3.resource("s3")
# Gets list of neighborhoods from s3
def build_neighborhood_list():
"""Pulls file from s3 containing the names of neighborhoods to be scraped.
Returns:
@0xpetersatoshi
0xpetersatoshi / keybase.md
Created January 24, 2018 21:29
Keybase Verification

Keybase proof

I hereby claim:

  • I am pbegle on github.
  • I am pbegle (https://keybase.io/pbegle) on keybase.
  • I have a public key ASCRoXCYMAi9SrcigSFKLQ-KYE5HkPPz8KKBz8TUSUuWeQo

To claim this, I am signing this object: