Skip to content

Instantly share code, notes, and snippets.

View tjwaterman99's full-sized avatar

Tom Waterman tjwaterman99

  • Miro
  • San Francisco, CA
View GitHub Profile
#!/bin/bash
root=$(pwd)
echo "Checking client..."
cd client
git pull
git status
echo "Done"
echo ""
# Flags users with a pageview during 2019. Faster than joining!
select
user.id,
exists(
select 1
from pageviews
where pageviews.user_id=users.id
and pageviews.created_at between '2019-01-01' and '2020-01-01'
limit 1
) as "active_2019"
A B C
0 1 goodbye False
1 2 cruel True
2 3 world False
@tjwaterman99
tjwaterman99 / timeseries-data.csv
Last active January 14, 2020 19:44
timeseries-data.csv
dau date
672 2019-01-01
705 2019-01-02
538 2019-01-03
745 2019-01-04
514 2019-01-05
721 2019-01-06
618 2019-01-07
720 2019-01-08
732 2019-01-09
@tjwaterman99
tjwaterman99 / table2.md
Last active January 14, 2020 19:19
table2.md
dau date
672 2019-01-01 00:00:00
705 2019-01-02 00:00:00
538 2019-01-03 00:00:00
745 2019-01-04 00:00:00
514 2019-01-05 00:00:00
@tjwaterman99
tjwaterman99 / table.csv
Created January 24, 2020 01:38
Example table
Gender Age Height
Female 2 33.7
Female 3 37.0
Female 4 39.5
Female 5 42.5
Female 6 45.5
Female 7 47.7
Female 8 50.5
Female 9 52.5
Female 10 54.5
Article Views Reads Earnings
Google just published 25 million free datasets 511K 176K $842
Top features of Pandas 1.0 33K 17.6K $323
3 Python list comprehension tricks you might not know yet 14.7K 5.9K $211
Web scraping is now legal 62K 23K $178
Is No-SQL killing SQL? 47K 13.5K $157
How to pass the Facebook Data Science interview 25K 11.7K $143
Why Python is better than R for Data Science careers 21K 6.7K $37
Fast plotting with Pandas 6.1K 2.7K $24
@tjwaterman99
tjwaterman99 / setup.sh
Last active September 21, 2020 03:29
Set up script for a dev environment
#!/bin/bash
# Install with curl https://gist.githubusercontent.com/tjwaterman99/7eae237c05f2a76ed841a5bba00897d5/raw | bash
# TODO:
# paramaters for $USER, AWS keys, github access token
# docker
# docker-compose
# Heroku
# https://zaiste.net/posts/shell-commands-rust/
@tjwaterman99
tjwaterman99 / ci.yml
Created March 20, 2021 06:22
Example CI/CD process for dbt on Snowflake
# For workflow syntax reference, please see the documentation available on Github
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: CI
on:
push:
schedule:
- cron: '50 11 * * *' # Run the `main` branch daily at 11:50am UTC
workflow_dispatch: # Allow the workflow to be triggered manually