Skip to content

Instantly share code, notes, and snippets.

View philngo's full-sized avatar

Phil Ngo philngo

View GitHub Profile
@philngo
philngo / zipcode_prefixes.json
Last active October 13, 2024 04:59
ZIP code prefixes by state
{
"AK": [
"995",
"996",
"997",
"998",
"999"
],
"AL": [
"350",
@philngo
philngo / zipcode_to_cz2010.csv
Last active January 26, 2018 00:29
Mapping from CA zipcodes to CZ2010 station USAF IDs
zipcode cz2010_usaf_id
90001 722956
90002 722956
90003 722956
90004 722874
90005 722874
90006 722874
90007 722956
90008 722956
90010 722874
@philngo
philngo / ccss.csv
Last active September 7, 2024 22:16
Common Core State Standards CSV
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 8 columns, instead of 7 in line 7.
id,content_type,category_id,category_name,grade_id,grade_name,item,description
CCSS.ELA-LITERACY.L.K.1,ELA-LITERACY,L,Language,K,Kindergarten,1,Demonstrate command of the conventions of standard English grammar and usage when writing or speaking.
CCSS.ELA-LITERACY.L.K.1.a,ELA-LITERACY,L,Language,K,Kindergarten,1a,Print many upper- and lowercase letters.
CCSS.ELA-LITERACY.L.K.1.b,ELA-LITERACY,L,Language,K,Kindergarten,1b,Use frequently occurring nouns and verbs.
CCSS.ELA-LITERACY.L.K.1.c,ELA-LITERACY,L,Language,K,Kindergarten,1c,"Form regular plural nouns orally by adding /s/ or /es/ (e.g., dog, dogs; wish, wishes)."
CCSS.ELA-LITERACY.L.K.1.d,ELA-LITERACY,L,Language,K,Kindergarten,1d,"Understand and use question words (interrogatives) (e.g., who, what, where, when, why, how)."
CCSS.ELA-LITERACY.L.K.1.e,ELA-LITERACY,L,Language,K,Kindergarten,1e,"Use the most frequently occurring prepositions (e.g., to, from, in, out, on, off, for, of, by, with)."
CCSS.ELA-LITERACY.L.K.1.f,ELA-LITERACY,L,Language,K,Kindergarten,
{
"CCSS.ELA-LITERACY.CCRA.R.1": "Read closely to determine what the text says explicitly and to make logical inferences from it; cite specific textual evidence when writing or speaking to support conclusions drawn from the text.",
"CCSS.ELA-LITERACY.CCRA.R.2": "Determine central ideas or themes of a text and analyze their development; summarize the key supporting details and ideas.",
"CCSS.ELA-LITERACY.CCRA.R.3": "Analyze how and why individuals, events, or ideas develop and interact over the course of a text.",
"CCSS.ELA-LITERACY.CCRA.R.4": "Interpret words and phrases as they are used in a text, including determining technical, connotative, and figurative meanings, and analyze how specific word choices shape meaning or tone.",
"CCSS.ELA-LITERACY.CCRA.R.5": "Analyze the structure of texts, including how specific sentences, paragraphs, and larger portions of the text (e.g., a section, chapter, scene, or stanza) relate to each other and the whole.",
"CCSS.ELA-LITERACY.CCRA.R.6": "Assess
@philngo
philngo / climate_zones.csv
Last active July 27, 2024 22:01
IECC and Building America climate zones by United States county
State State FIPS County FIPS IECC Climate Zone IECC Moisture Regime BA Climate Zone County Name
AK 02 013 7 N/A Very Cold Aleutians East
AK 02 016 7 N/A Very Cold Aleutians West
AK 02 020 7 N/A Very Cold Anchorage
AK 02 050 8 N/A Subarctic Bethel
AK 02 060 7 N/A Very Cold Bristol Bay
AK 02 068 7 N/A Very Cold Denali
AK 02 070 8 N/A Subarctic Dillingham
AK 02 090 8 N/A Subarctic Fairbanks North Star
AK 02 100 7 N/A Very Cold Haines
@philngo
philngo / tmy3_to_zipcode.json
Created February 24, 2015 22:17
Go from USAF station ID to zipcode using zipcode centriod latitude and longitude coordinates
{
"726917": "97459",
"745700": "45433",
"727556": "55601",
"911975": "96740",
"722235": "36615",
"722230": "36695",
"726546": "57201",
"726547": "56334",
"724645": "81082",
@philngo
philngo / tmy3_lat_lng.json
Created February 24, 2015 18:08
Latitude and longitude coordinates for TMY3 stations
{
"726917": [
43.417,
-124.25
],
"745700": [
39.833,
-84.05
],
"727556": [
@philngo
philngo / zipcode_to_weather_station.json
Created February 24, 2015 18:05
Use ZIP codes to find nearest USAF weather station identifier
{
"11542": "725030",
"11547": "725030",
"11545": "744864",
"11548": "744864",
"11549": "744864",
"19390": "724089",
"82443": "726665",
"82442": "726665",
"82441": "726660",
@philngo
philngo / zipcode_to_lat_lng.json
Created February 24, 2015 17:59
Convert ZIP codes to latitude and longitude coordinates
This file has been truncated, but you can view the full file.
{
"11542": [
40.8646793293932,
-73.6275637882012
],
"11547": [
40.8307741129324,
-73.6442306417505
],
"11545": [
@philngo
philngo / smartthings_oauth.py
Created October 27, 2014 16:31
Smartthings python workflow
from requests_oauthlib import OAuth2Session
import argparse
import json
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("client_id")
parser.add_argument("client_secret")
args = parser.parse_args()