Skip to content

Instantly share code, notes, and snippets.

Yanping Chen yanping

View GitHub Profile
View BIG DATA with RevoScale R
#------------------------------------------------------------
# REVOLUTION ANALYTICS WEBINAR: INTRODUCTION TO R FOR DATA MINING
# February 14, 2013
# Joseph B. Rickert
# Technical Marketing Manager
#
# BIG DATA with RevoScaleR
#
# Copyright: Revolution Analytics
View BIG DATA with RevoScale R
#------------------------------------------------------------
# REVOLUTION ANALYTICS WEBINAR: INTRODUCTION TO R FOR DATA MINING
# February 14, 2013
# Joseph B. Rickert
# Technical Marketing Manager
#
# BIG DATA with RevoScaleR
#
# Copyright: Revolution Analytics
@yanping
yanping / downloadStylesheet.R
Created Jun 14, 2013
下载 knitrBootstrap 的样式文件
View downloadStylesheet.R
# 参考 https://github.com/jimhester/knitrBootstrap/blob/master/R/knit_bootstrap.R
boot_styles = c(
'Default'='http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css',
'Amelia'='http://netdna.bootstrapcdn.com/bootswatch/2.3.1/amelia/bootstrap.min.css',
'Cerulean'='http://netdna.bootstrapcdn.com/bootswatch/2.3.1/cerulean/bootstrap.min.css',
'Cosmo'='http://netdna.bootstrapcdn.com/bootswatch/2.3.1/cosmo/bootstrap.min.css',
'Cyborg'='http://netdna.bootstrapcdn.com/bootswatch/2.3.1/cyborg/bootstrap.min.css',
'Journal'='http://netdna.bootstrapcdn.com/bootswatch/2.3.1/journal/bootstrap.min.css',
'Readable'='http://netdna.bootstrapcdn.com/bootswatch/2.3.1/readable/bootstrap.min.css',
@yanping
yanping / getAttendNum.R
Created Jun 4, 2013
获取第6界R语言会议报名者的区域分布信息
View getAttendNum.R
url <- "http://www.vasee.com/event/manage/echart_data.jsp?id=ff8080813d7c8a71013d87e56a9b47b0&type=5&date=1&timestamp=11.57071830239147"
library(XML)
xmlResult <- xmlTreeParse(url)
doc <- xmlParse(url)
prov <- xpathSApply(doc,path='//area[@title]', xmlGetAttr, "title")
reg <- regexpr("[1-9]+", prov)
ret <- substring(prov,reg, reg + attr(reg,'match.length')-1)
ret <- ifelse(grepl("", prov),0,ret)
@yanping
yanping / index.html
Last active Dec 17, 2015
jekyll对read more的原生支持
View index.html
---
layout: default
title: Welcome to
isHome: true
---
<!--from https://github.com/jsw0528/MrZhang.me/blob/gh-pages/_index.html-->
{% for post in paginator.posts %}
<article class="entry" id="{{ post.id }}">
@yanping
yanping / bloggerMigration.sh
Last active Dec 17, 2015
Blogspot posts migrate to Octopress posts
View bloggerMigration.sh
# from http://pro.ctlok.com/blog/2012/03/25/blogger-migrate-to-octopress-github-page.html
# 先要给终端设置代理
git clone git://gist.github.com/1807781
cd 1807781
./bloggerImport.sh <blogname> # <blogname>.blogspot.com
@yanping
yanping / ShinyWithPerformanceAnalytics.R
Created May 29, 2013
Shiny和PerformanceAnalytics包结合做证券绩效评估
View ShinyWithPerformanceAnalytics.R
# source code for http://rbresearch.wordpress.com/2013/03/04/shiny-with-performanceanalytics-example/
shiny::runGist("https://gist.github.com/rbresearch/5081906")
@yanping
yanping / Markdown.tmLanguage
Created May 1, 2013
Modified tmLanguage file for Markdown for Sublime Text 2, see http://t.cn/zTO5kYJ for details
View Markdown.tmLanguage
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>mdown</string>
<string>markdown</string>
<string>markdn</string>
<string>md</string>
@yanping
yanping / 00-readme.md
Last active Dec 16, 2015
使用pandoc从md编译成beamer
View 00-readme.md

文件列表

  • cos.beamer.tex 模板文件
  • demo.md 演示文件

编译命令为

pandoc -t beamer --template=cos.beamer.tex --latex-engine=xelatex -Vurl:1 -V theme:CambridgeUS -V colortheme:dolphin  -V shorttitle:COS  demo.md  -o demo.pdf
You can’t perform that action at this time.