Skip to content

Instantly share code, notes, and snippets.

@jdeng
jdeng / cluster
Last active June 17, 2020 02:52
clustering by fast search and find of density peak
// generate [0..n-1]
auto seq = [](size_t n) -> std::vector<size_t> {
std::vector<size_t> v(n);
for (size_t i=0; i<n; ++i) v[i] = i;
return v;
};
auto index = seq(n);
// n * n distance matrix
std::vector<D> dists(n * n);
@chappyhome
chappyhome / gist:7615718
Created November 23, 2013 15:20
利用rsync自动同步服务器与本地代码的python脚本
利用rsync自动同步服务器与本地代码的python脚本
四 07 二月 2013
tags: Python
菜鸟表示写web时 每次修改完后把文件往VPS上丢很麻烦
用ssh sshfs scp都太慢 小东西又懒得用git
sublimetext上得sftp不支持中文 emacs干脆就只能ssh
于是用linux自带的rsync写了个同步脚本
可以手动或自动往服务器上差异性同步 不用scp一堆东西 也不用忍受ssh那个渣速度
@lucifr
lucifr / gist:1208100
Created September 10, 2011 08:16
Sublime Text 2 - 实用快捷键 (Mac OS X)
@pksunkara
pksunkara / config
Last active May 31, 2025 15:37
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
github = pksunkara
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
[column]
ui = auto