This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main multiverse restricted universe | |
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main multiverse restricted universe | |
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main multiverse restricted universe | |
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main multiverse restricted universe | |
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main multiverse restricted universe | |
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main multiverse restricted universe | |
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main multiverse restricted universe | |
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main multiverse restricted universe | |
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main multiverse restricted universe | |
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main multiverse restricted universe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Warning: This script is untested. (copy from command history) | |
# Install | |
curl -fsSL get.docker.com -o get-docker.sh | exit -1 | |
sudo sh get-docker.sh | exit -1 | |
# Add user to docker group (sudoless) | |
sudo gpasswd -a ${USER} docker | exit -1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.2.0-Linux-x86_64.sh | |
sh Anaconda3-5.2.0-Linux-x86_64.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conda install -c conda-forge jupyter_contrib_nbextensions -y | |
# pip install jupyter jupyter_contrib_nbextensions | |
# jupyter contrib nbextension install --user | |
jupyter nbextension enable toc2/main | |
jupyter nbextension enable execute_time/ExecuteTime | |
jupyter nbextension enable python-markdown/main | |
jupyter nbextension enable scratchpad/main | |
jupyter nbextension enable move_selected_cells/main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[-HKEY_CLASSES_ROOT\Directory\shell\runas] | |
[HKEY_CLASSES_ROOT\Directory\shell\runas] | |
@="Open command window here as Administrator" | |
"HasLUAShield"="" | |
[HKEY_CLASSES_ROOT\Directory\shell\runas\command] | |
@="cmd.exe /s /k pushd \"%V\"" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reference: | |
// https://www.cnblogs.com/HarryGuo2012/p/4722784.html | |
// http://blog.csdn.net/fcxxzux/article/details/40053937 | |
#include <cstring> | |
#include <cstdio> | |
#include <cstdlib> | |
int dfs(int i) { | |
int a[100]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected] | |
user=root | |
remote_addr=192.168.0.1 | |
scp ~/.ssh/id_rsa.pub $user@$remote_addr:/tmp/pub | |
ssh -l $user $remote_addr "cat /tmp/pub >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Enable to import .ipynb files in the same way that the .py files are. | |
Usage: import this file before you import .ipynb files. | |
Reference: http://nbviewer.jupyter.org/github/jupyter/notebook/blob/master/docs/source/examples/Notebook/Importing%20Notebooks.ipynb# | |
""" | |
import io, os, sys, types | |
from nbformat import read |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////////////////////////////////////////// | |
// Binary Indexed Tree 树状数组 | |
/////////////////////////////////////////////////////// | |
#include <cassert> | |
template<typename T, int N> class BIT { | |
public: | |
T c[N]; | |
void init() { memset(c, 0, sizeof(c)); } | |
int lowbit(int x) { return x & (-x); } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
;图片 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag] | |
"ThisPCPolicy"="Hide" | |
;视频 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag] | |
"ThisPCPolicy"="Hide" |