Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Inline Math for Notion.so
// @homepageURL https://www.notion.so/evertheylen/Notion-Inline-Math-9c5047a4e7c84643848b3630db8d5a5e
// @version 0.2.1
// @match https://www.notion.so/*
// @grant GM_addStyle
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.js
// ==/UserScript==
// Instructions for use:
@xiangjjj
xiangjjj / image_ops_gpu_build_error
Created June 19, 2017 19:21
Build error for image_ops_gpu.cu
1 error detected in the compilation of "/tmp/tmpxft_0000370f_00000000-10_image_ops_gpu.cu.compute_52.cpp1.ii".
ERROR: /data/xjiang/tensorflow/tensorflow/contrib/image/BUILD:20:1: output 'tensorflow/contrib/image/_objs/python/ps/_image_ops_gpu/tensorflow/contrib/image/kernels/image_ops_gpu.cu.pic.o' was not created.
ERROR: /data/xjiang/tensorflow/tensorflow/contrib/image/BUILD:20:1: not all outputs were created or valid.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
@xiangjjj
xiangjjj / tf_protoc_failed
Created June 19, 2017 17:02
protoc failed error message
ERROR: /home/xjiang/tensorflow/tensorflow/core/BUILD:180:1: null failed: protoc failed: error executing command bazel-out/host/bin/external/protobuf/protoc '--cpp_out=bazel-out/local-opt/genfiles/' -I. -Iexternal/protobuf/src -Ibazel-out/local-opt/genfiles/external/protobuf/src ... (remaining 1 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
bazel-out/host/bin/external/protobuf/protoc: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by bazel-out/host/bin/external/protobuf/protoc)
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 463.769s, Critical Path: 450.76s
@xiangjjj
xiangjjj / build_swig
Last active June 19, 2017 15:19
Build Swig from source
# download swig
$ wget http://ufpr.dl.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz
$ tar xzf swig-3.0.12.tar.gz # decompress
# configure swig
$ cd swig-3.0.12/
$ ./configure --prefix=$HOME/swig
# install swig
$ make clean && make && make install
# get tensorflow
$ cd $HOME
$ git clone https://github.com/tensorflow/tensorflow.git
$ cd tensorflow/
# (optional) select a branch, e.g., r1.2
$ git checkout r1.2
# without this step we stay at the master branch, equivelant to below
$ git checkout master
@xiangjjj
xiangjjj / compile_tensorflow
Created March 16, 2017 19:20
Build Bazel from Source
# start from home directory
cd $HOME
# get Bazel dist from https://github.com/bazelbuild/bazel/releases
$ wget https://github.com/bazelbuild/bazel/releases/download/0.4.5/bazel-0.4.5-dist.zip
# unzip Bazel
unzip bazel-0.4.5-dist.zip -d bazel
# compile Bazel
$sudo chsh git -s $(which git-shell)
# create local repo
mkdir test_repo
# add remote repo
# now you can see how private_git_host simplifies our life
git remote add origin private_git_host:test_repo.git
# we can push, pull, etc.
git touch test_file
git commit -m "test commit"
# create local repo
mkdir test_repo
# add remote repo
# now you can see how private_git_host simplifies our life
git remote add origin private_git_host:test_repo.git
# we can push, pull, etc.
git touch test_file
git commit -m "test commit"
# create local repo
mkdir test_repo
# add remote repo
# now you can see how private_git_host simplifies our life
git remote add origin private_git_host:test_repo.git
# we can push, pull, etc.
git touch test_file
git commit -m "test commit"