Skip to content

Instantly share code, notes, and snippets.

View XUJiahua's full-sized avatar

许嘉华 XUJiahua

  • Shanghai, China
View GitHub Profile

Parse the kubernetes manifest in yaml or json, don't care a manifest type.

Examples:

package main

import (
	"bytes"
	"context"
@davideicardi
davideicardi / cloudera-docker.md
Last active April 4, 2024 19:00
Running Cloudera with Docker for development/test
@mauri870
mauri870 / tf-serving-client.go
Last active April 2, 2022 08:43
Tensorflow Serving Go client for the inception model
// Tensorflow Serving Go client for the inception model
// go get github.com/golang/protobuf/ptypes/wrappers google.golang.org/grpc
//
// Compile the proto files:
//
// git clone https://github.com/tensorflow/serving.git
// git clone https://github.com/tensorflow/tensorflow.git
//
// mkdir -p vendor
@viecode09
viecode09 / Hadoop_install_osx.md
Created March 18, 2017 17:22
This is how to install hadoop on Mac OS

STEP 1: First Install HomeBrew, download it from http://brew.sh

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

STEP 2: Install Hadoop

$ brew search hadoop
$ brew install hadoop
@staaldraad
staaldraad / webdavserv.go
Last active June 16, 2024 20:02
A small webdav server in go
package main
import (
"flag"
"fmt"
"log"
"net/http"
"os"
"golang.org/x/net/webdav"
@cherti
cherti / alert.sh
Created December 9, 2016 13:47
send a dummy alert to prometheus-alertmanager
#!/bin/bash
name=$RANDOM
url='http://localhost:9093/api/v1/alerts'
echo "firing up alert $name"
# change url o
curl -XPOST $url -d "[{
\"status\": \"firing\",
@jarutis
jarutis / tf_serving.sh
Created October 24, 2016 18:37
Install Tensorflow Serving on Centos 7 (CPU)
sudo su
# Java
yum -y install java-1.8.0-openjdk-devel
# Build Esentials (minimal)
yum -y install gcc gcc-c++ kernel-devel make automake autoconf swig git unzip libtool binutils
# Extra Packages for Enterprise Linux (EPEL) (for pip, zeromq3)
yum -y install epel-release
@karpathy
karpathy / min-char-rnn.py
Last active June 16, 2024 04:05
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@nishantmodak
nishantmodak / nginx.conf.default
Last active May 26, 2024 19:29
Default Nginx Conf
#user nobody;
#Defines which Linux system user will own and run the Nginx server
worker_processes 1;
#Referes to single threaded process. Generally set to be equal to the number of CPUs or cores.
#error_log logs/error.log; #error_log logs/error.log notice;
#Specifies the file where server logs.
@mbbx6spp
mbbx6spp / README.md
Last active May 28, 2024 13:52
Gerrit vs Github for code review and codebase management

Gerrit vs Github: for code review and codebase management

Sure, Github wins on the UI. Hands down. But, despite my initial annoyance with Gerrit when I first started using it almost a year ago, I am now a convert. Fully. Let me tell you why.

Note: This is an opinionated (on purpose) piece. I assume your preferences are like mine on certain ideas, such as:

  • Fast-forward submits to the target branch are better than allowing merge commits to the target branch. The reason I personally prefer this is that, even if a non-conflicting merge to the target branch is possible, the fact that the review/pull request is not up to date with the latest on the target branch means feature branch test suite runs in the CI pipeline reporting on the review/PR may not be accurate. Another minor point is that forced merge commits are annoying as fuck (opinion) and clutter up Git log histories unnecessarily and I prefer clean histories.
  • Atomic/related changes all in one commit is something worth striving for. Having your dev