Skip to content

Instantly share code, notes, and snippets.

View yonran's full-sized avatar

Yonathan Randolph yonran

View GitHub Profile
@yonran
yonran / operators.py
Last active December 7, 2018 07:25
Print all combinations of associative operators acting on values
from __future__ import (absolute_import, division,
print_function, unicode_literals)
from builtins import *
from functools import reduce
def all_trees_given_stack(stack, rest, operators):
if len(stack) == 1 and len(rest) == 0:
yield stack[0]
if len(stack) > 1:
rhs = stack[-1]
$ TF_LOG=DEBUG terraform import google_compute_instance_group_manager.test projects/MYPROJECT/zones/us-west1-b/MYINSTANCEGROUP
2019/01/24 18:18:54 [INFO] Terraform version: 0.11.7 41e50bd32a8825a84535e353c3674af8ce799161
2019/01/24 18:18:54 [INFO] Go runtime version: go1.10.1
2019/01/24 18:18:54 [INFO] CLI args: []string{"/Users/yonran/bin/terraform", "import", "google_compute_instance_group_manager.test", "projects/MYPROJECT/zones/us-west1-b/MYINSTANCEGROUP"}
2019/01/24 18:18:54 [DEBUG] Attempting to open CLI config file: /Users/yonran/.terraformrc
2019/01/24 18:18:54 Loading CLI configuration from /Users/yonran/.terraformrc
2019/01/24 18:18:54 [INFO] CLI command args: []string{"import", "google_compute_instance_group_manager.test", "projects/MYPROJECT/zones/us-west1-b/MYINSTANCEGROUP"}
2019/01/24 18:18:54 [INFO] command: backend initialized: *local.Local
2019/01/24 18:18:54 [DEBUG] checking for provider in "."
2019/01/24 18:18:54 [DEBUG] checking for provider in "/Users/yonran/bin"
$ TF_LOG=DEBUG terraform import google_compute_instance_group_manager.test MYINSTANCEGROUP
2019/01/24 18:28:12 [INFO] Terraform version: 0.11.7 41e50bd32a8825a84535e353c3674af8ce799161
2019/01/24 18:28:12 [INFO] Go runtime version: go1.10.1
2019/01/24 18:28:12 [INFO] CLI args: []string{"/Users/yonran/bin/terraform", "import", "google_compute_instance_group_manager.test", "MYINSTANCEGROUP"}
2019/01/24 18:28:12 [DEBUG] Attempting to open CLI config file: /Users/yonran/.terraformrc
2019/01/24 18:28:12 Loading CLI configuration from /Users/yonran/.terraformrc
2019/01/24 18:28:12 [INFO] CLI command args: []string{"import", "google_compute_instance_group_manager.test", "MYINSTANCEGROUP"}
2019/01/24 18:28:12 [TRACE] Preserving existing state lineage "cb36116a-229d-2e16-46c5-8e49276c3dec"
2019/01/24 18:28:12 [TRACE] Preserving existing state lineage "cb36116a-229d-2e16-46c5-8e49276c3dec"
2019/01/24 18:28:12 [INFO] command: backend initialized: *local.Local
[2019-03-25T11:26:19Z INFO peskinexpansionsimpact] Expansions
[2019-03-25T11:26:19Z INFO peskinexpansionsimpact] Scanning LandUse table of all parcels
[2019-03-25T11:26:23Z INFO peskinexpansionsimpact] Generating LandUse rtree of all parcels
[2019-03-25T11:26:24Z INFO peskinexpansionsimpact] Scanning PPTS records of applications
[2019-03-25T11:26:24Z INFO peskinexpansionsimpact] Prohibited: 09/26/2013 address: 15 ROSCOE ST 94110, far 1.40, neighbor far: 0.77 (56 neighbors), bldg growth 982sqft (67%)
[2019-03-25T11:26:24Z INFO peskinexpansionsimpact] Prohibited: 12/30/2013 address: 220 MIRAMAR AVE 94112, far 1.32, neighbor far: 0.66 (56 neighbors), bldg growth 1261sqft (51%)
[2019-03-25T11:26:24Z INFO peskinexpansionsimpact] Probably OK: 11/07/2013 address: 716 WISCONSIN ST 94107, far 1.39, neighbor far: 0.65 (60 neighbors), bldg growth 444sqft (14%)
[2019-03-25T11:26:24Z INFO peskinexpansionsimpact] Prohibited: 09/01/2017 address: 1430 16TH AVE 94122, far 1.21, neighbor far: 0.72 (53 neighbors), bldg
@yonran
yonran / 530 similar apartments
Created June 8, 2020 18:14
highlotcoverage result
This file has been truncated, but you can view the full file.
{
"features": [
{
"geometry": {
"geometries": [
{
"coordinates": [
[
[
[
@yonran
yonran / ab1893-compare-sfplanning-maxdensity.sql
Last active January 4, 2025 00:35
Studying San Francisco’s 2022 Housing Element Site Inventory
-- Compares the HCD-approved site inventory spreadsheet
-- with the current site inventory spreadsheet as of 2025-01-02.
-- See https://x.com/yonran/status/1875018049130246550
-- Prerequisites:
-- * Install DuckDB
-- * Download old AppendixB4.xlsx from
-- https://web.archive.org/web/20230606031119/https://sfplanning.org/project/housing-element-update-2022
-- direct link: https://web.archive.org/web/20230606031119/https://sfplanning.s3.amazonaws.com/archives/sfhousingelement.org/files/AppendixB4.xlsx
-- * Download new Appendix_B4.xslx from