Skip to content

Instantly share code, notes, and snippets.

@wangkuiyi
wangkuiyi / install_mpich_and_plda.bash
Last active March 3, 2016 10:05
Download, Build and Deploy MPICH 3.1 and PLDA 3.1 on Computers in a Cluster
# This script download, build and deploy MPICH 3.1
# (http://www.mpich.org) and pLDA 3.1 (https://code.google.com/p/plda)
# to computers in a cluster.
#
# Usage:
#
# You download and run this script from any directory. For example,
# consider that Alice is running this script to install MPICH and pLDA
# on David's workstation in the role of Steven, she should do:
#
@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 / BUILD
Created February 23, 2013 13:40
Go invokes C samples
cc_plugin(
name = 'lda',
srcs = ['lda.c'],
deps = ['#pthread']
)
@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.

@wangkuiyi
wangkuiyi / majel-package-deps.bash
Created May 8, 2017 19:04
Plot Majel's package dependencies
for i in $(du -a | cut -f 2); do
if [[ -d $i ]]; then
echo === $i |
sed 's/\.//';
grep '#include <majel' $i/*.{h,cu,cc,cpp,hpp,hh} 2>/dev/null |
sed 's/^.*#include <majel//' |
sed 's/\/[-_a-z0-9]*.h>$//' |
sort |
uniq;
fi;
@wangkuiyi
wangkuiyi / functor_example.cc
Created May 15, 2017 15:51
A simple example on C++ functor
#include <iostream>
class Image {
};
class blur {
public:
blur(double factor) : factor_(factor) {}
void operator()(Image & img) const {
@wangkuiyi
wangkuiyi / searching-in-c++-namespace.cc
Created June 28, 2017 16:21
Give StringAppendF a C++ style name string::AppendF
#include <iostream>
namespace strings {
void Print() {
std::cout << "strings::Print" << std::endl;
}
} // namespace strings
namespace uses {
namespace detail {