This gist consists of a makefile
and a script
that can automate the creation of PDFs from Slidify generated HTML slides. The script assumes that the makefile
and the script makepdf.js
are in the same directory as the Rmd
file. The makepdf.js
script uses casperjs, a very useful utility to automate tasks that require browser interaction. You may follow the installation instructions on the casperjs website, to make sure that you have all the dependencies correctly installed before trying this out.
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
function foo(n::Integer) | |
x::Int = 0 | |
t1::Float64 = @elapsed for i in 1:n | |
x = x + 1 | |
end | |
@printf "Int: %f\n" t1 | |
y::BigInt = BigInt(0) | |
t2::Float64 = @elapsed for i in 1:n | |
y = y + BigInt(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
```{r echo=FALSE, error=TRUE} | |
perc <- function(var){ | |
result <- 100*(table(var))/sum(table(var)) | |
return(result) | |
} | |
``` |
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
\documentclass{article} | |
\begin{document} | |
<<names>>= | |
input$firstname | |
input$lastname | |
@ | |
\end{document} |
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
################################################### | |
## | |
## Functions for calculating AUC and plotting ROC | |
## Corey Chivers, 2013 | |
## [email protected] | |
## | |
################################################### | |
## Descrete integration for AUC calc |
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
llxc = function( a, ll=-12:12, legend.loc="topleft", displayLegend=T, legend.cex=1.0, overplot=F ) | |
{ | |
if ( ncol(a) < 2 ) | |
{ | |
print( "Not enough columns") | |
return; | |
} | |
a = na.omit(a) | |
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
library(shiny) | |
library(ggplot2) | |
# Download DataTables JS file and TableTools full package from http://datatables.net/download/ | |
# Change the paths appropriately: | |
addResourcePath('datatables','/Users/yourusername/Downloads/DataTables-1.9.4/media') | |
addResourcePath('tabletools','/Users/yourusername/Downloads/TableTools-2.1.5/media') | |
runApp(list( | |
ui = basicPage( |
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
\documentclass[letter,$if(fontsize)$$fontsize$,$else$10pt,$endif$$if(lang)$$lang$,$endif$$if(papersize)$$papersize$,$endif$]{ucbletter} | |
\usepackage[T1]{fontenc} | |
\usepackage{mathpazo} | |
\usepackage{amssymb,amsmath} | |
\linespread{$if(linespread)$$linespread$$else$1.1$endif$} | |
\usepackage{ifxetex,ifluatex} | |
\usepackage{fixltx2e} % provides \textsubscript | |
% use upquote if available, for straight quotes in verbatim environments | |
\IfFileExists{upquote.sty}{\usepackage{upquote}}{} | |
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex |
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
################################################### | |
## | |
## Functions for calculating AUC and plotting ROC | |
## Corey Chivers, 2013 | |
## [email protected] | |
## | |
################################################### | |
## Descrete integration for AUC calc |
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
julia> using TimeSeries, MarketTechnicals, MarketData, Lazy | |
julia> @> OHLC doji findall x->OHLC[x] x->x.timestamp | |
166-element Array{Date{ISOCalendar},1}: | |
1962-03-02 | |
1962-04-13 | |
1962-07-16 | |
1962-10-08 | |
1963-02-08 | |
1963-05-22 |