Skip to content

Instantly share code, notes, and snippets.

@walsvid
walsvid / install.sh
Created May 31, 2016 15:23 — forked from kilfu0701/install.sh
Install PyQt5 with Python2.7 on Mac
cd ~
mkdir dev_tools
cd dev_tools
## download SIP source code
wget http://sourceforge.net/projects/pyqt/files/sip/sip-4.16.7/sip-4.16.7.tar.gz
tar zxf sip-4.16.7.tar.gz
cd sip-4.16.7
python configure.py
make
@walsvid
walsvid / ranking.py
Created June 7, 2016 11:51 — forked from agramfort/ranking.py
Pairwise ranking using scikit-learn LinearSVC
"""
Implementation of pairwise ranking using scikit-learn LinearSVC
Reference: "Large Margin Rank Boundaries for Ordinal Regression", R. Herbrich,
T. Graepel, K. Obermayer.
Authors: Fabian Pedregosa <fabian@fseoane.net>
Alexandre Gramfort <alexandre.gramfort@inria.fr>
"""
@walsvid
walsvid / ffmpeg.md
Created January 7, 2017 13:14 — forked from v5tech/ffmpeg.md
ffmpeg视频合并、格式转换、截图

使用ffmpeg合并MP4文件

ffmpeg -i "Apache Sqoop Tutorial Part 1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i "Apache Sqoop Tutorial Part 2.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "Apache Sqoop Tutorial Part 3.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
ffmpeg -i "Apache Sqoop Tutorial Part 4.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate4.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts|intermediate4.ts" -c copy -bsf:a aac_adtstoasc "Apache Sqoop Tutorial.mp4"
@walsvid
walsvid / subsets.py
Created February 4, 2017 12:12 — forked from makto/subsets.py
求某个集合的所有子集
#-*- coding: utf-8 -*-
"""
给定集合 test_case
输出其所有子集
"""
def getsubs(father, size):
"""获取集合 father 的
指定长度 size 的所有子集合"""
@walsvid
walsvid / subsets.py
Created February 4, 2017 12:12 — forked from makto/subsets.py
求某个集合的所有子集
#-*- coding: utf-8 -*-
"""
给定集合 test_case
输出其所有子集
"""
def getsubs(father, size):
"""获取集合 father 的
指定长度 size 的所有子集合"""
@walsvid
walsvid / install_cuda_7_5_Unbuntu_16_04.md
Created March 28, 2017 12:16 — forked from terrydang/install_cuda_7_5_Unbuntu_16_04.md
Ubuntu 16.04 安装 NVIDIA CUDA Toolkit 7.5

Ubuntu 16.04 安装 NVIDIA CUDA Toolkit 7.5

NVIDIA CUDA Toolkit 7.5 目前官方只适配了 Ubuntu 15.04 和 Ubuntu 14.04 两个版本的系统。如果你是这两个系统,可以直接去官方下载安装文件安装。

由于其没有适配 Ubuntu 16.04 ,这里我们通过下载官方为 CUDA 7.5 为 Uubuntu 15.04 适配的 runfile(local) 安装。

@walsvid
walsvid / install_nvidia_driver_in_ubuntu1604.md
Last active February 10, 2024 17:39 — forked from terrydang/install_nvidia_driver_in_ubuntu1604.md
Ubuntu 16.04 安装英伟达(Nvidia)显卡驱动

Ubuntu 16.04 安装英伟达(Nvidia)显卡驱动

配有英伟达显卡的主机,装完 Ubuntu 16.04 后出现闪屏现象,是由于没有安装显卡驱动。

显卡型号
NVIDIA Corporation GM204 [GeForce GTX 970]

@walsvid
walsvid / Uninstall-pkg.md
Created April 17, 2017 13:41 — forked from githubutilities/Uninstall-pkg.md
Uninstall pkg manually in OS X

Mac Uninstall pkg Manually

  • using pkgutil
# list all your installed packages
pkgutil --pkgs

# show your package info
pkgutil --pkg-info 
@walsvid
walsvid / tmux-cheatsheet.markdown
Created April 26, 2017 05:57 — forked from ryerh/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表

Tmux 快捷键 & 速查表

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

tmux at [-t 会话名]
@walsvid
walsvid / tmux-cheatsheet.markdown
Created May 12, 2017 14:24 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname