Skip to content

Instantly share code, notes, and snippets.

View k's full-sized avatar
💭
kryptonetes

k k

💭
kryptonetes
View GitHub Profile
transaction:
version: 0
cell_deps:
- out_point:
tx_hash: 0xace5ea83c478bb866edf122ff862085789158f5cbff155b7bb5f13058555b708
index: 0
dep_type: dep_group
header_deps: []
inputs:
- since: 0x0 (absolute block(0))
{
"transaction": {
"version": "0x0",
"cell_deps": [
{
"out_point": {
"tx_hash": "0xace5ea83c478bb866edf122ff862085789158f5cbff155b7bb5f13058555b708",
"index": "0x0"
},
"dep_type": "dep_group"

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 December 13, 2018 18:39
Envoy config for routing consistently to a StatefulSet
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 October 10, 2018 12:46
Istio VirtualService Example yaml file
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: proxy
spec:
gateways:
- web-gateway
hosts:
- '*'
http:
@k
k / gateway.yaml
Created October 10, 2018 12:44
Example of istio gateway
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: web-gateway
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- '*'
import numpy as np
from scipy import stats
class KNearestNeighbor(object):
""" a kNN classifier with L2 distance """
def __init__(self):
pass
#!/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
# Q3
def output(case_num, result):
print("Case #{}: {}".format(case_num, str(result)))
t = int(input())
MIN = 2
MAX = 999
# 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))