Skip to content

Instantly share code, notes, and snippets.

View AlfonsoRReyes's full-sized avatar

AlfonsoRReyes

  • The Woodlands, Texas
View GitHub Profile
@AlfonsoRReyes
AlfonsoRReyes / LICENSE
Created October 27, 2016 16:50 — forked from lheagy/ LICENSE
Unit testing for jupyter notebooks
The MIT License (MIT)
Copyright (c) 2016 Lindsey Heagy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@AlfonsoRReyes
AlfonsoRReyes / 0_reuse_code.js
Created February 17, 2017 13:43
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
# benchmarks from http://www.win-vector.com/blog/2015/07/efficient-accumulation-in-r/#more-3295
mkRow <- function(nCol) {
x <- as.list(rnorm(nCol))
# make row mixed types by changing first column to string
x[[1]] <- ifelse(x[[1]]>0,'pos','neg')
names(x) <- paste('x',seq_len(nCol),sep='.')
x
}
@AlfonsoRReyes
AlfonsoRReyes / histo_excel.Rmd
Created March 21, 2017 20:03
transparent plot like Excel
library(ggplot2)
set.seed(10)
data = rnorm(100)
ggplot(data.frame(data=data), aes(x=data))+
geom_histogram(fill="#4F81BD", binwidth=.5)+
theme(panel.background = element_rect(fill = "transparent",colour = NA),
panel.grid.minor = element_blank(),
panel.grid.major = element_line(colour="#CDCDCD", size=0.25) )