Skip to content

Instantly share code, notes, and snippets.

View yonran's full-sized avatar

Yonathan Randolph yonran

View GitHub Profile
@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": [
[
[
[
[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 / crash.log
Last active January 25, 2019 02:36
terraform import instanceGroupManager error (see https://github.com/terraform-providers/terraform-provider-google/issues/2933)
$ 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
@yonran
yonran / console
Last active January 25, 2019 02:26
terraform import instanceGroupManager error (see https://github.com/terraform-providers/terraform-provider-google/issues/2933)
$ 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"
@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]
@yonran
yonran / update-configmap-functions.sh
Created November 1, 2017 22:57
Functions to replace kubernetes configmap and secret from directory
#!/usr/bin/env bash
# Convert a directory to a ConfigMap json file as when doing kubectl create configmap --from-file …
#
# Example usage:
# 1. kubectl create cm test-cm --from-file path/to/cmdir
#
# 2. Before running kubectl replace, you should diff the directories:
# dirToCm test-cm path/to/cmdir | cmToDir /tmp/test-cm-new
# kubectl get cm test-cm -o json | cmToDir /tmp/test-cm-orig
//! cl.exe /EHsc /Tp treeview-and-tabcontrol.cpp User32.lib ComCtl32.lib Ole32.lib
// Based on Raymond Chen's scratch program
// http://blogs.msdn.com/b/oldnewthing/archive/2005/04/22/410773.aspx
#define STRICT
#define UNICODE
#define _UNICODE
#include <windows.h>
#include <windowsx.h>
#include <ole2.h>
#include <commctrl.h>
//! cl.exe /Tp listviwe_setselectionmark.cpp User32.lib ComCtl32.lib Ole32.lib
#define STRICT
#define UNICODE
#define _UNICODE
#include <windows.h>
#include <windowsx.h>
#include <ole2.h>
#include <commctrl.h>
#include <shlwapi.h>
#include <shlobj.h>
@yonran
yonran / scardstatus_bug.c
Created November 11, 2014 17:43
OSX 10.10 Yosemite SCardStatus bug test
// clang -framework PCSC scardstatus_bug.c -o scardstatus_bug
// Tests SCardStatus bug in OSX 10.10 Yosemite.
// Connects to a smart card and calls SCardStatus.
#include <stdio.h>
#include <strings.h>
#include <stdlib.h>
#include <PCSC/wintypes.h>
#include <PCSC/winscard.h>
#define TEXT(x) x
@yonran
yonran / pulse.txt
Created March 17, 2014 16:51
lsusb -v for Livescribe Pulse
Bus 004 Device 043: ID 1cfb:1010
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 16