Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
kryptonetes

Kenneth Bambridge k

💭
kryptonetes
  • Zoox
  • San Francisco
View GitHub Profile
View udt_tx.yaml
transaction:
version: 0
cell_deps:
- out_point:
tx_hash: 0xace5ea83c478bb866edf122ff862085789158f5cbff155b7bb5f13058555b708
index: 0
dep_type: dep_group
header_deps: []
inputs:
- since: 0x0 (absolute block(0))
View gist:29c35988b3397014434d299b8aabd9f5
{
"transaction": {
"version": "0x0",
"cell_deps": [
{
"out_point": {
"tx_hash": "0xace5ea83c478bb866edf122ff862085789158f5cbff155b7bb5f13058555b708",
"index": "0x0"
},
"dep_type": "dep_group"
View keybase.md

Keybase proof

I hereby claim:

  • I am k on github.
  • I am kbambridge (https://keybase.io/kbambridge) on keybase.
  • I have a public key ASDVxfdAvh2Uf22D1aqOu2doI4PqoGzsPCQXDdbnfq1_tAo

To claim this, I am signing this object:

@k
k / envoy_config.yaml
Last active Dec 13, 2018
Envoy config for routing consistently to a StatefulSet
View envoy_config.yaml
files:
envoy.yaml: |-
## refs:
## - https://www.envoyproxy.io/docs/envoy/latest/start/start#quick-start-to-run-simple-example
## - https://raw.githubusercontent.com/envoyproxy/envoy/master/configs/google_com_proxy.v2.yaml
admin:
access_log_path: /dev/stdout
address:
socket_address:
address: 0.0.0.0
@k
k / virtualservice_example.yaml
Created Oct 10, 2018
Istio VirtualService Example yaml file
View virtualservice_example.yaml
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: proxy
spec:
gateways:
- web-gateway
hosts:
- '*'
http:
@k
k / gateway.yaml
Created Oct 10, 2018
Example of istio gateway
View gateway.yaml
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: web-gateway
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- '*'
View k_nearest_neighbor.py
import numpy as np
from scipy import stats
class KNearestNeighbor(object):
""" a kNN classifier with L2 distance """
def __init__(self):
pass
View replace-l5d-proxy.sh
#!/bin/bash
# https://developer.github.com/v3/pulls/#create-a-pull-request
if [[ -f replace-l5d-proxy.vim ]]
then
echo "remove ./replace-l5d-proxy.vim"
exit 1
fi
View solution3.py
# Q3
def output(case_num, result):
print("Case #{}: {}".format(case_num, str(result)))
t = int(input())
MIN = 2
MAX = 999
View solution4.py
# Q4
from math import pi, cos, sin, acos, asin, sqrt
from random import random
from functools import partial
def output(case_num, result):
print("Case #{}".format(case_num))
for x, z, y in result:
print("{} {} {}".format(y, z, x))