Skip to content

Instantly share code, notes, and snippets.

We can't make this file beautiful and searchable because it's too large.
name,titles,roles,locations,email
Whistleblower Hotline,[email protected],Faculty & Staff,,[email protected]
Kayla Aaron,Teacher,Faculty & Staff,Ginter Park Elementary,[email protected]
Tania Abayomi,,Faculty & Staff,Linwood Holton Elementary,[email protected]
Hannah Abbey,Mental Health Contractor,Faculty & Staff,Huguenot High School,[email protected]
Kiera Abdelkader,Coach,Faculty & Staff,"Boushall Middle School, River City Middle School",[email protected]
Mohammed Fahmy Abdelrazele,HS English Teacher,Faculty & Staff,Rich Academy formerly CCP,[email protected]
Juvenal Abrego meneses,Principal Iii,Faculty & Staff,Cardinal Elementary School,[email protected]
Elena Acevedo,Teacher,Faculty & Staff,George W. Carver Elementary,[email protected]
Mary Ackerly,Teacher 200 Days - Henry Marsh,Faculty & Staff,,[email protected]
@jmcarp
jmcarp / gisweb.py
Last active May 23, 2020 23:09
gisweb-screenshots
import json
import fiona
import requests
def get_map(base_url, parcel_id, out_path, bbox_scale_factor=1.25):
parcel_id_clean = parcel_id.replace("-", "")
state = {
@jmcarp
jmcarp / prepare.sh
Last active May 24, 2020 20:10
every-lot-cville
#!/bin/bash
set -euo pipefail
rm -f parcels.db
curl -O https://widget.charlottesville.org/gis/zip_download/parcel_area.zip
unzip parcel_area.zip
layer=$(ogrinfo parcel_area_*.shp | grep '1: ' | awk '{print $2}')
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv
import datetime
import collections
import pytest

Optimizing badge performance

Before proposing possible solutions, here are a few questions I would ask if this were more than an exercise:

  • The badge endpoint uses the pyramid app, the sql backend (authorization, block list), and the elastic backend (search). Which commponent(s) take up the most time or are most challenging to scale?
    • For the purpose of the exercise, I'll assume the slowest/most expensive comopnent is elastic.
  • What are the current and anticipated costs of the badge endpoint under the status quo? Would the cost of additional complexity (e.g. learning a new database, web framework, or programming paradigm) outweigh the savings from buying more servers?
    • I'll assume that cloud infrastructure is cheap and developer time expensive, and lean toward keeping things simple rather than maximizing performance.
  • What's the hypothesized value-add of the badge feature, and how can we test that hypothesis?
    • Does the badge make users more likely to view or create annotations?
  • Does A/B tes
@jmcarp
jmcarp / esbench.py
Created March 10, 2017 20:48
kube-es-bench
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import time
import datetime
import joblib
from faker import Factory
from elasticsearch import Elasticsearch
@jmcarp
jmcarp / merge.rb
Created March 8, 2017 00:18
template-pipeline
#!/usr/bin/env ruby
require 'erb'
require 'yaml'
inputs = ARGV
template = ERB.new(File.read('pipeline.yml.erb'))
b = binding

Keybase proof

I hereby claim:

  • I am jmcarp on github.
  • I am jmcarp (https://keybase.io/jmcarp) on keybase.
  • I have a public key ASCz8cjL4vwn64A9anzn1NH02Dwztm_xCz0kwp3_dj_G3go

To claim this, I am signing this object:

@jmcarp
jmcarp / notify-sandbox-users.py
Last active February 3, 2017 02:35
notify-sandbox-users.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import requests
from requests_oauthlib import OAuth2Session
def get_info(api_url):
resp = requests.get('{}/v2/info'.format(api_url))
@jmcarp
jmcarp / controller-manager
Last active December 14, 2016 19:53
k8s-ebs-debug
------------ STARTING controller-manager_ctl at Wed Dec 14 18:38:00 UTC 2016 --------------
I1214 18:38:00.697691 5417 leaderelection.go:247] lock is held by 306e0ee4-b6a8-454b-b199-6c8547deb849 and has not yet expired
I1214 18:38:04.160237 5417 leaderelection.go:188] sucessfully acquired lease kube-system/kube-controller-manager
I1214 18:38:04.160557 5417 event.go:217] Event(api.ObjectReference{Kind:"Endpoints", Namespace:"kube-system", Name:"kube-controller-manager", UID:"72c92afa-c22c-11e6-ac5f-028961b0177d", APIVersion:"v1", ResourceVersion:"5820764", FieldPath:""}): type: 'Normal' reason: 'LeaderElection' 7ec92627-d913-44ad-b3f7-3ea5c1fb9b65 became leader
I1214 18:38:04.169568 5417 aws.go:746] Building AWS cloudprovider
I1214 18:38:04.169636 5417 aws.go:700] Zone not specified in configuration file; querying AWS metadata service
I1214 18:38:04.171050 5417 replication_controller.go:219] Starting RC Manager
I1214 18:38:04.284034 5417 replication_controller.go:653] Waiting for pods cont