Skip to content

Instantly share code, notes, and snippets.

go mod edit -module {NEW_MODULE_NAME}
-- rename all imported module
find . -type f -name '*.go' \
-exec sed -i -e 's,{OLD_MODULE},{NEW_MODULE},g' {} \;

Beginner

Introductory, no previous programming experience

  1. Programming: Principles and Practice Using C++ (Bjarne Stroustrup) (updated for C++11/C++14) An introduction to programming using C++ by the creator of the language. A good read, that assumes no previous programming experience, but is not only for beginners.

Introductory, with previous programming experience

  1. C++ Primer * (Stanley Lippman, Josée Lajoie, and Barbara E. Moo) (updated for C++11) Coming at 1k pages, this is a very thorough introduction into C++ that covers just about everything in the language in a very accessible format and in great detail. The fifth edition (released August 16, 2012) covers C++11. [Review]
@ydp
ydp / InstallingAgOnCentOS.md
Last active April 11, 2018 05:19 — forked from rkaneko/InstallingAgOnCentOS.md
Installing ag: the silver searcher on CentOS.

Installing ag on CentOS

Prerequistes

  • libpcre
  • liblzma

Download, build and install

@ydp
ydp / latency.txt
Created April 3, 2018 10:27 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@ydp
ydp / TENSORFLOW_DEBUG.md
Created April 3, 2018 10:05 — forked from Mistobaan/TENSORFLOW_DEBUG.md
Tensorflow Internals Debugging Techniques

Machine Setup August 2016

Linux Ubuntu 2016.

  • 1080 GTX
  • SDK 8.0
  • CuDNN 5.1

ENABLE Core dumps

ulimit -c unlimited
@ydp
ydp / kubeadm-install-offline.md
Created February 12, 2018 05:34 — forked from jgsqware/kubeadm-install-offline.md
Offline Kubeadm install

On master and nodes

Pull images form internet access laptop

docker pull gcr.io/google_containers/kube-apiserver-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-controller-manager-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-proxy-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-scheduler-amd64:v1.5.0
docker pull weaveworks/weave-npc:1.8.2
docker pull weaveworks/weave-kube:1.8.2
@ydp
ydp / compile_tensorflow_serving.sh
Created November 15, 2017 08:12 — forked from jorgemf/compile_tensorflow_serving.sh
Compile TensorFlow Serving with CUDA support (October 2017) needs bazel 5.3 , cuda 8 , cudnn 7
#!/bin/bash
TENSORFLOW_COMMIT=9e76bf324f6bac63137a02bb6e6ec9120703ea9b # August 16, 2017
TENSORFLOW_SERVING_COMMIT=267d682bf43df1c8e87332d3712c411baf162fe9 # August 18, 2017
MODELS_COMMIT=78007443138108abf5170b296b4d703b49454487 # July 25, 2017
if [ -z $TENSORFLOW_SERVING_REPO_PATH ]; then
TENSORFLOW_SERVING_REPO_PATH="serving"
fi
INITIAL_PATH=$(pwd)