Skip to content

Instantly share code, notes, and snippets.

// The official etcd Go client library is far from easy-to-use. I had
// to read github.com/coreos/etcd/client and
// github.com/coreos/etcd/etcdctl before I can write down the
@wangkuiyi
wangkuiyi / learn-mpi.go
Created December 18, 2015 18:55
Build and run an MPI program in Go
// This is a sample MPI program in Go.
//
// To build and run it, we need to install MPI. I downloaded and built
// Open MPI 1.8.8:
//
// wget https://www.open-mpi.org/software/ompi/v1.8/downloads/openmpi-1.8.8.tar.bz2
// tar xjf openmpi-1.8.8.tar.bz2
// cd openmpi-1.8.8
// ./configure --prefix=/home/yi/openmpi
// make -j2 install
@wangkuiyi
wangkuiyi / learn-gob.go
Created January 14, 2016 10:28
This sample program shows how to read Gob-encoded records out from a file.
package main
import (
"encoding/gob"
"io"
"log"
"os"
)
func main() {
@wangkuiyi
wangkuiyi / goaws-s3.go
Created February 3, 2016 19:19
Shows how to use https://github.com/AdRoll/goamz/tree/master/s3 to access an AWS bucket created on AWS console.
package main
import (
"bytes"
"image"
"image/jpeg"
"io"
"github.com/AdRoll/goamz/aws"
"github.com/AdRoll/goamz/s3"
@wangkuiyi
wangkuiyi / goaws-sqs.go
Created February 3, 2016 19:20
How to use https://github.com/AdRoll/goamz/tree/master/s3 to create SQS queues as well as read/write with it.
package main
import (
"fmt"
"time"
"github.com/AdRoll/goamz/aws"
"github.com/AdRoll/goamz/sqs"
"github.com/davecgh/go-spew/spew"
@wangkuiyi
wangkuiyi / gist:d5547ec0231a6e39cec3e7180c7cec08
Created August 1, 2016 23:07
Retrieve Docker image's tags and run corresponding version
curl -u _token:$(gcloud auth print-access-token) https://gcr.io/v2/tensorflow/tensorflow/tags/list
docker run --rm -it gcr.io/tensorflow/tensorflow:r0.9rc0 /bin/bash
@wangkuiyi
wangkuiyi / ci-arch.dot
Last active November 8, 2016 16:24
An example GraphViz image
digraph CI {
github [label="github.com"];
ngrok1 [label="ngrok tunnel 1"];
ngrok2 [label="ngrok tunnel 2"];
config1 [label="configuration 1"];
config2 [label="configuration 2"];
github -> ngrok1 -> config1;
github -> ngrok2 -> config2;
}
@wangkuiyi
wangkuiyi / download_issue_dates.sh
Last active January 31, 2017 15:28
Issues by month -- Open Source Deep Learning Platforms
project="paddlepaddle/paddle"
if [[ $# -ne 0 ]]; then
project=$1
fi
file=${project/\//-}
> $file.issues
issues_per_page=25
page=1
@wangkuiyi
wangkuiyi / check_late_response_to_issues.sh
Last active February 4, 2017 08:14
This bash script checks if some issues of a Github repo has been there without comments in more than 30 minutes.
project="wangkuiyi/mapreduce-lite"
if [[ $# -ne 0 ]]; then
project=$1
fi
issues_per_page=25
page=1
until [ $issues_per_page -lt 25 ]; do
echo Parsing page: $page >&2
@wangkuiyi
wangkuiyi / paddlepaddle-new-api-blog-draft.md
Created March 8, 2017 08:05
PaddlePaddle New API Launching Blog Draft

PaddlePaddle is Launching New API

PaddlePaddle is a deep learning framework originally developed in Baidu four years ago. Experienced Baidu researchers and engineers have successfully applied it in 80% of Baidu products. When we open sourced PaddlePaddle in September 2016, we know it is time to make it easy-to-use by everyone who is interested in deep learning.

Today we are happy to announce the alpha release of our new API. And we updated example programs in our open source book Deep Learning with PaddlePaddle accordingly.

The following screenshot shows that a PaddlePaddle program using the new API could be much shorter than its old counterpart.