I hereby claim:
- I am zzh8829 on github.
- I am zihao (https://keybase.io/zihao) on keybase.
- I have a public key whose fingerprint is A5D4 F88A 78A0 074E 855C 58E7 12B0 1A6A AC10 DF01
To claim this, I am signing this object:
{ | |
"bebo_log": { | |
"title": "Bebo Log", | |
"regex": { | |
"basic": { | |
"pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{6}\\+00:00) (?<hostname>[a-z0-9\\-\\.]+) (?<procname>.+): (?<level>debug|info|warning|error|DEBUG|INFO|WARNING|ERROR) \\[(?<source_file>.+?)\\] (?<body>.*)$" | |
} | |
}, | |
"level": { | |
"debug": "debug|DEBUG", |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: default-http-backend | |
labels: | |
k8s-app: default-http-backend | |
namespace: kube-system | |
spec: | |
replicas: 1 | |
template: |
### | |
# master setup on fresh ubuntu machine | |
### | |
sudo su | |
# real memory is too expensive | |
sudo fallocate -l 2G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo echo "/swapfile none swap sw 0 0" >> /etc/fstab |
From 62b5e2f5fcf407783245ce7f03dc33f70d0f3200 Mon Sep 17 00:00:00 2001 | |
From: Zihao Zhang <zzh8829@gmail.com> | |
Date: Wed, 15 Mar 2017 15:26:30 -0700 | |
Subject: [PATCH] Lower Limits | |
--- | |
cmd/kubeadm/app/master/manifests.go | 2 +- | |
cmd/kubeadm/app/phases/addons/manifests.go | 6 ++---- | |
2 files changed, 3 insertions(+), 5 deletions(-) |
own=$(id -nu) | |
tmp=$(mktemp) | |
#for user in $(getent passwd | awk -F ":" '{print $1}' | sort -u) | |
for user in $(who | awk '{print $1}' | sort -u) | |
do | |
# print other user's CPU usage in parallel but skip own one because | |
# spawning many processes will increase our CPU usage significantly | |
if [ "$user" = "$own" ]; then continue; fi | |
(top -b -n 1 -u "$user" | awk -v user="$user" 'NR>7 { sum += $9; } END { print user, sum; }') >> $tmp & | |
done |
import numpy as np | |
import matplotlib.pyplot as plt | |
import csv | |
import re | |
def graph_profit(profit): | |
x = np.arange(len(profit)) | |
y = np.cumsum(profit) | |
p1 = np.poly1d(np.polyfit(x, y, 3)) | |
p2 = np.poly1d(np.polyfit(x, y, 4)) |
I hereby claim:
To claim this, I am signing this object:
import feedparser | |
import re | |
from bs4 import BeautifulSoup | |
import pprint | |
import os | |
import urllib.request | |
import imghdr | |
import sys | |
from time import localtime, strftime | |
from PIL import Image |
template<typename T> | |
class Delegate{}; | |
template<typename Return, typename ... Args> | |
class Delegate<Return(Args ...)> | |
{ | |
private: | |
class AnyClass; | |
using AnyMemberFunc = Return(AnyClass::*)(Args...); | |
using AnyStaticFunc = Return(*)(Args...); |
package net.minecraft.client; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.StringReader; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
import java.nio.charset.Charset; |