Dual boot Ubuntu 18.04 and Windows 10
Windows occupies an 128GB ssd for gaming Ubuntu occupies a 256GB ssd and two same 1TB hdd with raid0 grouped by [bcache][3].
# Install dependencies | |
sudo apt install libcurl4-openssl-dev iptables-dev autoconf libgmp3-dev libssl-dev pkg-config | |
# Install StrongSwan | |
wget http://download.strongswan.org/strongswan-5.6.1.tar.bz2 | |
tar xjvf strongswan-5.6.1.tar.bz2 && cd strongswan-5.6.1 | |
# FIXME: Some of these options may be redundant, but they work on my laptop. | |
autoconf && ./configure \ | |
--prefix=/usr/local \ |
#! /usr/bin/env python3 | |
import os | |
import tensorflow as tf | |
import numpy as np | |
import tempfile | |
from tensorflow.python import debug as tfdbg | |
def watch_session(dump_root_dir, train_op, times): | |
''' Dump tensors to temperary directory for analysis''' |
# disable system problem detected | |
sudo sed -i 's/enabled=1/enabled=0/' /etc/default/apport | |
# update and install necessary software | |
## shadowsocks-libev | |
sudo apt-get install software-properties-common -y | |
sudo add-apt-repository ppa:max-c-lv/shadowsocks-libev -y | |
sudo apt-get update |
" Leader | |
let mapleader = " " | |
set backspace=2 " Backspace deletes like most programs in insert mode | |
set nobackup | |
set nowritebackup | |
set noswapfile " http://robots.thoughtbot.com/post/18739402579/global-gitignore#comment-458413287 | |
set history=50 | |
set ruler " show the cursor position all the time | |
set showcmd " display incomplete commands |
# export all_proxy='socks5://127.0.0.1:1080' | |
# export ALL_PROXY='socks5://127.0.0.1:1080' | |
MUJOCO_PY_MJPRO_PATH="$HOME/.mujoco/mjpro131/bin" | |
export all_proxy='' | |
export ALL_PROXY='' | |
export PATH="$HOME/bin/:$MUJOCO_PY_MJPRO_PATH:/usr/local/cuda/bin:$PATH" | |
export MUJOCO_PATH="$HOME/bin/mjpro140" | |
# export GTEST_DIR="$HOME/lib/googletest/googletest" | |
# export GMOCK_DIR="$HOME/lib/googletest/googlemock" |
Get-ChildItem -path "C:\path\to\my\directory" -recurse -Include *.py | | |
ForEach-Object { | |
(gc $_.FullName) | ? {$_.trim() -ne ""} | Set-Content $_.FullName | |
} |
#include "showbits.h" | |
#include <iostream> | |
#include <algorithm> | |
#include <string> | |
#include <locale> | |
#include <cassert> | |
typedef union { | |
int64_t i; |
#! /bin/bash | |
find -name '*.cpp' | sed -i 's/typeinfo\.h/typeinfo/g' | |
find -name '*.h' | sed -i 's/typeinfo\.h/typeinfo/g' | |
find -name '*.cpp' | python patch.py | |
find -name '*.h' | python patch.py | |
imps=$(find -name '*_implementation.h') |
import mxnet as mx | |
from mxnet import nd, autograd | |
from mxnet.gluon import nn | |
from mxnet.gluon.contrib.nn import Identity, Concurrent | |
from mxnet import gluon | |
import logging | |
def d(a, b): | |
return (a - b).norm() |