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
| # CRAN | |
| pkgs <- c("devtools", | |
| "ggplot2", | |
| "ggforce", | |
| "tidyverse", | |
| "R6", | |
| "stats", | |
| "stringr", | |
| "scales", | |
| "rlang", |
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(openxlsx) | |
| library(magrittr) | |
| library(plyr) | |
| wb.init <- function() { | |
| wb <- openxlsx::createWorkbook() | |
| return(wb) | |
| } | |
| wb.add.sheet <- function(wb, sheet="1", signatures) { |
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(ggplot2) | |
| library(ggforce) | |
| ggvenn <- function(a, b, ga, gb, title="") { | |
| # Calculate area | |
| x.a <- length(a) | |
| x.b <- length(b) | |
| x.u <- length(intersect(a, b)) | |
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
| example <- "An example {1} where adding {2} and {2} and {3}" | |
| val.1 <- "Value 1" | |
| val.2 <- "Value 2" | |
| val.3 <- "Value 3" | |
| format_str <- function(string, ...) { | |
| args <- list(...) | |
| for (i in 1:length(args)) { | |
| pattern <- paste("\\{", i, "}", sep="") |
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(R6) | |
| pvector <- R6Class("pvector", list( | |
| values = NULL, | |
| initialize = function(values=c()) { | |
| self$values <- values | |
| }, | |
| pop = function() { | |
| if (length(self$values) > 0) { | |
| popped.value <- self$values[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
| # General | |
| .DS_Store | |
| .AppleDouble | |
| .LSOverride | |
| # Icon must end with two \r | |
| Icon | |
| # Thumbnails | |
| ._* |
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
| require(Biobase) | |
| require(RColorBrewer) | |
| require(plotly) | |
| # Fake Data | |
| set.seed(124) | |
| samples = paste("S", (1:50), sep="") | |
| genes = paste("G", (1:200), sep="") | |
| row_hist1 = runif(50, min=0, max=1) | |
| row_hist2 = runif(50, min=0.9, max=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
| # pip install python-binance | |
| from binance.client import Client | |
| client = Client(api_key, api_secret) | |
| DUST = 0.001 # BTC | |
| account = client.get_account() | |
| prices = client.get_all_tickers() |