Skip to content

Instantly share code, notes, and snippets.

View tengpeng's full-sized avatar

Teng Peng tengpeng

View GitHub Profile
" VIM Configuration File
" Description: Optimized for C/C++ development, but useful also for other things.
" Author: Gerhard Gappmeier
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
@tengpeng
tengpeng / gist:ccd5b194a304c8942171
Created June 20, 2014 03:08
红帽携手eNovance,共进OpenStack市场
红帽携手eNovance,共进OpenStack市场
================================================================================
![](http://farm4.static.flickr.com/3108/3191608123_67e1da2b79_o.jpg)
正在OpenStack峰会于亚特兰大举办的同时,红帽确认了数项与OpenStack相关的项目。其中一项是,红帽正与开源云计算市场的领导者eNovance进行 [合作][1] 。双方将推动网络功能虚拟(Network Functions Virtualization)和电信功能融入OpenStack. 红帽 [宣布][2] 将以七千万欧元或九千五百万美金的现金和股票,购买eNovance.
eNovance 是OpenStack市场上重要的角色, 特别以其和电信公司的合作而为人所知。eNovance帮助服务提供商和大型私企搭建部署云基础架构,快速且成本低廉。这也将为红帽开创新的产品线。
IDC 分析员 Laura DuBois and Ashish Nadkarni 在2014春季OpenStack 峰会上指出 “像eNovance这样的集成商将继续助力云服务提供商和企业,建立OpenStack云。OpenStack的前景开起来十分光明。"
@tengpeng
tengpeng / Setup New Mac by Brew and Cask
Last active October 31, 2016 15:40
Setup New Mac by Brew and Cask
sudo passwd pt
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew tap caskroom/cask
#brew install wget
brew install htop
#brew install zsh
#brew install aria2
@tengpeng
tengpeng / gist:61c881978d77f459b732
Last active August 29, 2015 14:07
Setup New Ubuntu
sudo apt-get update
sudo apt-get install htop -y
sudo apt-get install texlive-full -y
sudo apt-get install gummi -y
sudo apt-get install git -y
git config --global user.name ""
git config --global user.email ""
@tengpeng
tengpeng / k-fold CV.r
Last active November 20, 2016 15:56 — forked from bhoung/k-fold CV.r
# original example from Digg Data website (Takashi J. OZAKI, Ph. D.)
# http://diggdata.in/post/58333540883/k-fold-cross-validation-in-r
library(plyr)
library(randomForest)
data <- iris
# in this cross validation example, we use the iris data set to
sudo yum update -y
sudo yum install htop -y
sudo yum install R -y
sudo yum install openssl098e # Required only for RedHat/CentOS 6 and 7
wget http://download2.rstudio.org/rstudio-server-0.98.1091-x86_64.rpm
sudo yum install --nogpgcheck rstudio-server-0.98.1091-x86_64.rpm
@tengpeng
tengpeng / gist:9d326aed843cb10dbeda
Created January 31, 2015 21:30
Uninstall Rev R on Mac OS
cd /Applications
sudo rm -rf "Revolution R Open".app
cd /Library/Frameworks
sudo rm -rf R.framework
sudo rm /usr/bin/R
sudo rm /usr/bin/Rscript
@tengpeng
tengpeng / gist:bbbfcd16a6dc4446c665
Created February 1, 2015 05:36
Cal mean by factor in R
aggregate(FruitFlies$Longevity, list(FruitFlies$Treatment), mean)
@tengpeng
tengpeng / gist:b2914f81694111750c72
Created February 9, 2015 04:44
Merge multicolumns of a data into one column in R
matrix(cbind(pig1[,1:4], ncol=1))
@tengpeng
tengpeng / gist:28139ec2a7fcba65017a
Created February 9, 2015 04:58
R: generate a repeating sequence based on vector
rep(c(1:4), each = 10)
[1] 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4
http://stackoverflow.com/questions/3672527/r-generate-a-repeating-sequence-based-on-vector