Found it much easier to hijack their APIs using Chrome (as opposed to browser scraping).
Broke the process into two parts:
- Getting a list of all relevant claims
- Retrieving PDFs for said claims
| #!/bin/bash | |
| # args: browser | |
| # example: ./getOpenTabs.sh "Brave Browser" | |
| # credits: | |
| # https://gist.github.com/samyk/65c12468686707b388ec43710430a421 | |
| # TODO: | |
| # validate args | |
| # don't open app if not already open |
| package main | |
| import ( | |
| "fmt" | |
| "hash/crc32" | |
| "math" | |
| "testing" | |
| ) | |
| /* |
| #!/bin/bash | |
| # requires https://github.com/dbohdan/remarshal | |
| # generate diff summary for .lock file | |
| cat <(cat glide.lock| yaml2json -i - -o - | jq -r '.imports[] | .name + " " + .version') \ | |
| <(cat glide.lock| yaml2json -i - -o - | jq -r '.testImports[] | .name + " " + .version') \ | |
| | sort | uniq > glide.lock.summary |
For sure. So using some tests I had while testing mem <-> fst segment serialization, as a poor man's benchmark:
# pilosa
❯ time go test ./index/segment/tests -count=10
ok github.com/m3db/m3ninx/index/segment/tests 2.192s
/Users/prungta/code/go1.10.2/bin/go test ./index/segment/tests -count=10 3.81s user 0.47s system 131% cpu 3.266 total
# roaring binary
❯ time go test ./index/segment/tests -count=10
| package main | |
| import ( | |
| "bytes" | |
| "github.com/couchbaselabs/vellum" | |
| vregex "github.com/couchbaselabs/vellum/regexp" | |
| ) | |
| func main() { |
| // Package test contains utility methods for testing. | |
| package test | |
| import ( | |
| "fmt" | |
| "testing" | |
| "github.com/golang/mock/gomock" | |
| ) |
| #!/bin/bash | |
| if ! [ -x "$(command -v git)" ]; then | |
| echo 'Error: git is not installed.' >&2 | |
| exit 1 | |
| fi | |
| if ! [ -x "$(command -v dot)" ]; then | |
| echo 'Error: graphviz (dot) is not installed.' >&2 | |
| exit 1 | |
| fi |
| package importlint | |
| import ( | |
| "go/ast" | |
| "go/token" | |
| ) | |
| // NB(prateek): http://goast.yuroyoro.net/ is enormously helpful. | |
| // importDecl is the collection of importGroups contained in a single import block. |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import sys | |
| import argparse | |
| import operator | |
| from collections import defaultdict | |
| import re | |
| def parseFile(f): | |
| with open(f, 'r') as opened: |