This file contains hidden or 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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
annotations: | |
deployment.kubernetes.io/revision: "1" | |
generation: 1 | |
labels: | |
addonmanager.kubernetes.io/mode: EnsureExists | |
k8s-app: heapster | |
kubernetes.io/cluster-service: "true" |
This file contains hidden or 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
env | |
dpdk: dpdk-stable-17.02.1 | |
ovs: 6b1d46253362c0bad844cedf93e22e7bf94d55dc/2.7.0? | |
kernel: 4.11.5-200.fc25.x86_64 | |
1, download and install dpd | |
$ wget http://dpdk.org/browse/dpdk-stable/snapshot/dpdk-stable-17.02.1.zip | |
$ unzip dpdk-stable-17.02.1.zip | |
$ cd dpdk-stable-17.02.1 | |
$ export DPDK_DIR=`pwd` |
This file contains hidden or 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
# deploy kubernetes with frakti | |
$ curl -sSL https://github.com/kubernetes/frakti/raw/master/cluster/allinone.sh | bash | |
# change default memory to 256MB, add --memory=256 at the end | |
$ grep ExecStart /lib/systemd/system/frakti.service | |
ExecStart=/usr/bin/frakti --v=3 --log-dir=/var/log/frakti --logtostderr=false --cgroup-driver=cgroupfs --listen=/var/run/frakti.sock --streaming-server-addr=%H --hyper-endpoint=127.0.0.1:22318 --memory=256 | |
$ systemctl daemon-reload | |
$ systemctl restart frakti | |
# create rook operator |
This file contains hidden or 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
// Copyright 2016 Google Inc. All rights reserved. | |
// Use of this source code is governed by the Apache 2.0 | |
// license that can be found in the LICENSE file. | |
// Command caption reads an audio file and outputs the transcript for it. | |
package main | |
import ( | |
"fmt" | |
"io" |
This file contains hidden or 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: ServiceAccount | |
metadata: | |
name: calico | |
namespace: kube-system | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: ClusterRoleBinding | |
metadata: |
This file contains hidden or 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
kind: ClusterRole | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
name: weave-net | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- pods | |
- namespaces |
This file contains hidden or 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: ServiceAccount | |
metadata: | |
name: flannel | |
namespace: kube-system | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: ClusterRoleBinding | |
metadata: |
This file contains hidden or 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
# curl --unix-socket /var/run/hyper.sock -X POST "http://localhost/execvm?pod=nginx-9296454126&command=\[\"/sbin/busybox\",\"ls\",\"/sbin\"\]" | |
busybox | |
depmod | |
iptables | |
iptables-restore | |
iptables-save | |
ipvsadm | |
modprobe | |
mount.nfs4 |
This file contains hidden or 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 | |
export MUSL_VERSION=1.1.16 | |
export SOCAT_VERSION=1.7.3.2 | |
export NCURSES_VERSION=6.0 | |
export READLINE_VERSION=7.0 | |
export OPENSSL_VERSION=1.0.2k | |
function build_musl() { | |
cd /build |
This file contains hidden or 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
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |