Skip to content

Instantly share code, notes, and snippets.

View jjmengze's full-sized avatar
😺
Working from home

李孟澤 jjmengze

😺
Working from home
View GitHub Profile
至兩千年後的你
package main
//func main() {
// provider, err := azuredns.NewProvider(azuredns.Config{
// Environment: "AzurePublicCloud",
// ClientID: string(creds.Data["azure_client_id"]),
// ClientSecret: string(creds.Data["azure_client_secret"]),
// TenantID: string(creds.Data["azure_tenant_id"]),
// SubscriptionID: string(creds.Data["azure_subscription_id"]),
// }, operatorConfig.OperatorReleaseVersion)
clusters:
- cluster:
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURRRENDQWlpZ0F3SUJBZ0lJV2lCUEkvS1lvMXN3RFFZSktvWklodmNOQVFFTEJRQXdQakVTTUJBR0ExVUUKQ3hNSmIzQmxibk5vYVdaME1TZ3dKZ1lEVlFRREV4OXJkV0psTFdGd2FYTmxjblpsY2kxc2IyTmhiR2h2YzNRdApjMmxuYm1WeU1CNFhEVEl3TURReE1EQXpNREV6TkZvWERUTXdNRFF3T0RBek1ERXpORm93UGpFU01CQUdBMVVFCkN4TUpiM0JsYm5Ob2FXWjBNU2d3SmdZRFZRUURFeDlyZFdKbExXRndhWE5sY25abGNpMXNiMk5oYkdodmMzUXQKYzJsbmJtVnlNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXZMMVRqaXNnWG4ydwpXU1JPZ1J5eXF5MHBBaFdRanhCd3JLWXdyZjNEYXk0cU96ZDI0SHVybHUyclJpekZ1Z2hQYy9qRkRqcWV6M0JwCjVlejB3VWVCT3BraVVyVmZ0dURjWUNiSzNTRFVLeHJ5MzM1L3hEMW5Ocy84bDR2YjZWRng5UStBOE9NMXNPQy8KSEd0NVRzYlIreDhnM3BSdzdkMDZwNE5ueHVIbm1ReGNPYUFVRnphL3ZsQWpUWEJ0cW1meW02SnhqM1k0NUk4UwpqSC8vSWxYc01OZVgrWjFzNldWN1dBVno4YldWNi9tTUViQXkrc2VZa0I4MWhCenQwQ0F2bE9UODZiaFBxemU4CjlpZmRQNXF1dUZ1MktFeFZzamRyNnZleHVER3dDR3lrU0tBcElQZ3FlNWh5VXNJekxscktpRmFFM2MvblFac2UKenVVanpGN2xOd0lEQVFBQm8wSXdRREFPQmdOVkhROEJBZjhFQkFNQ0FxUXdEd1lEVlI
type EventHandler interface {
// Create is called in response to an create event - e.g. Pod Creation.
Create(event.CreateEvent, workqueue.RateLimitingInterface)
// Update is called in response to an update event - e.g. Pod Updated.
Update(event.UpdateEvent, workqueue.RateLimitingInterface)
// Delete is called in response to a delete event - e.g. Pod Deleted.
Delete(event.DeleteEvent, workqueue.RateLimitingInterface)
@jjmengze
jjmengze / pb_viewer.py
Created March 1, 2018 14:20 — forked from jubjamie/pb_viewer.py
Load .pb into Tensorboard
import tensorflow as tf
from tensorflow.python.platform import gfile
with tf.Session() as sess:
model_filename ='PATH_TO_PB.pb'
with gfile.FastGFile(model_filename, 'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
g_in = tf.import_graph_def(graph_def)
LOGDIR='/logs/tests/1/'
train_writer = tf.summary.FileWriter(LOGDIR)
set -e
HOST_NAME=$(hostname)
sudo sed -i 's/us.archive.ubuntu.com/tw.archive.ubuntu.com/g' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y git sshpass python-netaddr libssl-dev
sudo apt-get install -y build-essential libssl-dev libffi-dev python-dev python3-dev
sudo apt-get install -y software-properties-common
sudo sed -i '$ a\192.168.1.110 node1' /etc/hosts
sudo sed -i '$ a\192.168.1.111 node2' /etc/hosts
sudo sed -i '$ a\192.168.1.120 master1' /etc/hosts
Vagrant.configure("2") do |config|
config.vm.provider "virtualbox"
config.vm.box = "bento/ubuntu-16.04"
config.vm.define :node1 do |master_config|
master_config.vm.hostname="node1"
master_config.vm.network "private_network", ip: "10.0.0.20",auto_config: true
master_config.vm.provider "virtualbox" do |vb|
vb.name="node1"
vb.gui = false
vb.memory = "2048"
解决方法:
  安装:yum install gcc libffi-devel python-devel openssl-devel
public static void clear(View v) {
ViewCompat.setAlpha(v, 1);
ViewCompat.setScaleY(v, 1);
ViewCompat.setScaleX(v, 1);
ViewCompat.setTranslationY(v, 0);
ViewCompat.setTranslationX(v, 0);
ViewCompat.setRotation(v, 0);
ViewCompat.setRotationY(v, 0);
ViewCompat.setRotationX(v, 0);
// @TODO https://code.google.com/p/android/issues/detail?id=80863
import android.app.Activity;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.util.DisplayMetrics;
import android.view.View;
/**
* Created by ameng on 9/8/16.
*/