Skip to content

Instantly share code, notes, and snippets.

Kaiyin Zhong kindlychung

Block or report user

Report or block kindlychung

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kindlychung
kindlychung / ld.gold.sh
Last active Jun 5, 2019 — forked from daniel-j-h/ld.gold.sh
default to ld.gold on Ubuntu'ish
View ld.gold.sh
sudo update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20
sudo update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10
sudo update-alternatives --config ld
ld --version
GNU gold
export CPP=cpp-5 gcc-5 g++-5
env CXXFLAGS='-march=native -flto -fuse-linker-plugin' cmake .. -DCMAKE_BUILD_TYPE=Release
View mxnet_error.txt
In file included from src/io/./iter_batchloader.h:16:0,
from src/io/io.cc:7:
src/io/././inst_vector.h:157:46: error: expected class-name before ‘{’ token
class TBlobContainer : public mshadow::TBlob {
^
src/io/././inst_vector.h:166:30: error: ‘TShape’ in namespace ‘mshadow’ does not name a type
void resize(const mshadow::TShape &shape, int type_flag) {
^
src/io/././inst_vector.h: In constructor ‘mxnet::io::TBlobContainer::TBlobContainer()’:
src/io/././inst_vector.h:160:21: error: expected class-name before ‘(’ token
View xml.rs
extern crate quick_xml;
use quick_xml::reader::Reader;
use quick_xml::events::Event;
fn main() {
let xml = r#"<tag1 att1 = "test">
text_from_tag1
<tag2><!--Test comment-->text1_from_tag2</tag2>
<tag2>
@kindlychung
kindlychung / tensorflow_gpu_gce_ubuntu_zesty.sh
Last active Oct 30, 2017 — forked from jedisct1/tensorflow_gpu_gce_ubuntu_zesty.sh
Tensorflow 1.1 with CUDA 8.0 for GCE on Ubuntu 17.04
View tensorflow_gpu_gce_ubuntu_zesty.sh
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
cd /tmp # the next part is specific to your setup
# Get it here: https://developer.nvidia.com/cudnn
gsutil cp gs://tn-devel-ds/ubuntu/libcudnn5* .
ls libcudnn*.deb | sort | xargs sudo dpkg -i
sudo apt update
sudo apt install libopenblas-dev liblapack-dev python3-pip python3-pandas python3-venv python3-werkzeug
@kindlychung
kindlychung / build_lmms.sh
Created Oct 25, 2017 — forked from anonymous/build_lmms.sh
How to build lmms on ubuntu 17.10
View build_lmms.sh
git clone https://github.com/LMMS/lmms
cd lmms/
git checkout master
mkdir build target
cd build
sudo apt install libasound2-dev
sudo apt install libsndio-dev
sudo apt install libsndio-dev
sudo apt-get install libfftw3-dev
sudo apt-get install libfltk1.3-dev
View Using Swift Package Manager with iOS.md

Using Swift Package Manager with iOS

Step 1:

File > New > Project...

Step 2:

Create a Package.swift file in your root project directory, add dependencies, then run swift package fetch on the command line in the same directory. We’re not going to run swift build because it will just complain.

View exif.js
(function() {
var debug = false;
var root = this;
var EXIF = function(obj) {
if (obj instanceof EXIF) return obj;
if (!(this instanceof EXIF)) return new EXIF(obj);
this.EXIFwrapped = obj;
View userinfo.scala
case class User(name: String, age: Int)
object User {
implicit val userPrinter: InfoPrinter[User] = new InfoPrinter[User] {
override def toInfo(value: User) = s"[User] name: ${value.name}, age: ${value.age}"
}
}
val userInfo = implicitly[InfoPrinter[User]].toInfo(User("Xiaohong", 24))
println(userInfo)
View list.rs
pub struct List<T> {
head: Link<T>,
}
type Link<T> = Option<Box<Node<T>>>;
struct Node<T> {
elem: T,
next: Link<T>,
}
View err
warning: variable does not need to be mutable, #[warn(unused_mut)] on by default
--> src/eight_queens.rs:43:6
|
43 | let mut start: usize;
| ^^^^^^^^^
Finished debug [unoptimized + debuginfo] target(s) in 0.38 secs
You can’t perform that action at this time.