This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_imports(file_list, verbose=False, init_file=None): | |
not_found = defaultdict(list) | |
modules = set() | |
pw_packages = defaultdict(list) | |
pw_modules = defaultdict(list) | |
init_modules = defaultdict(dict) | |
used_names = defaultdict(list) | |
for _fl in file_list: | |
fl = os.path.abspath(_fl) | |
pw_packages[os.path.dirname(fl)].append(os.path.basename(fl)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Makes a bazel workspace play nicely with standard go tools | |
# go build | |
# go test | |
# should work after this | |
# | |
# It does so by making symlinks from WORKSPACE/vendor to the bazel | |
# sandbox dirs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
name: purchases | |
spec: | |
replicas: 1 | |
selector: | |
app: purchases | |
template: | |
metadata: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (f *Function) Eval(attrs attribute.Bag, fMap map[string]Func) (interface{}, error) { | |
fn := fMap[f.Name] | |
if fn == nil { | |
return nil, fmt.Errorf("unknown function: %s", f.Name) | |
} | |
if ufn, ok := fn.(UnmanagedFunc); ok { | |
return ufn.CallUnmanaged(attrs, f.Args, fMap) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: '2.0' | |
# visit http://editor.swagger.io/ and import this document URL to view. | |
info: | |
version: "0.1.0" | |
title: Istio Mixer Config API | |
description: Mixer Configuration API allows users to configure all facets of a mixer deployment. | |
Mixer configuration is organized in `scope -> subject -> rule` hierarchy. | |
__scope__ and __subject__ are analogous to `manager > employee` relationship. A __manager__(`scope`) may configure any direct or indirect __reports__ (`subject`) including self. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mjog@devinstance:~/mixer_leak_dumps$ go tool pprof --base 1_hd_initial.txt mixs.0.2.9 hd_resting.txt | |
Entering interactive mode (type "help" for commands) | |
(pprof) top | |
266.20MB of 267.18MB total (99.63%) | |
Dropped 616 nodes (cum <= 1.34MB) | |
Showing top 10 nodes out of 16 (cum >= 2.01MB) | |
flat flat% sum% cum cum% | |
254.10MB 95.10% 95.10% 254.10MB 95.10% runtime.malg | |
11.09MB 4.15% 99.26% 11.09MB 4.15% runtime.allgadd | |
1.01MB 0.38% 99.63% 2.01MB 0.75% istio.io/api/mixer/v1.(*ReportRequest).Unmarshal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BFG_URL=http://repo1.maven.org/maven2/com/madgag/bfg/1.12.16/bfg-1.12.16.jar | |
DIR=$(mktemp -d) | |
echo $DIR | |
cd $DIR | |
curl $BFG_URL -o bfg.jar | |
git clone --mirror git@github.com:istio/istio.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "cloud.google.com/go", | |
"revision": "2d3a6656c17a60b0815b7e06ab0be04eacb6e613" | |
}, | |
{ | |
"name": "github.com/Azure/go-autorest", | |
"revision": "1afda22949fbf449a85ac9109c3ca96d08684220" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import ast | |
import sys | |
import os | |
from collections import defaultdict | |
import importlib | |
import inspect | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import requests | |
import json | |
import subprocess | |
import collections | |
import argparse | |
import yaml | |
import sys |