This is an additional theme for ggplot2 that generates an inverse black and white color scheme.
ggplot(mtcars, aes(wt, mpg)) + geom_point()
# Add theme_black()
ggplot(mtcars, aes(wt, mpg)) + geom_point(color = "white") + theme_black()
| scale_x_discrete(limits = rev(levels(the_factor))) |
| # Find all CRAN package with FORTRAN code | |
| packages <- c() | |
| base_url <- 'https://api.github.com/search/repositories?q=user:cran%20language:fortran' | |
| for(page in 1:100){ | |
| url <- paste0(base_url, "&page=", page) | |
| cat("Reading", url, "\n") | |
| repos <- jsonlite::fromJSON(url) | |
| if(!length(repos$items)) | |
| break | |
| packages <- c(packages, repos$items$name) |
| ################################################################################ | |
| # | |
| # R.nanorc -- nano syntax-highlighting file for R | |
| # | |
| # Origin: This file is part of the pkgutils package for R. | |
| # | |
| # Usage: This file should be placed in a directory such as /usr/share/nano/ (on | |
| # Ubuntu 12.04). That nano uses syntax highlighting at all might need to be | |
| # enabled separately. |
tm <- quadmesh::triangmesh(volcano)
xyzg <- tibble::tibble(x = tm$vb[1, tm$it],
y = tm$vb[2, tm$it],
z = tm$vb[3, tm$it],
g = rep(seq_len(ncol(tm$it)), each = nrow(tm$it)))
library(ggplot2)
ggplot(xyzg, aes(x, y, group = g, fill = z)) +
geom_polygon()| #!/bin/bash | |
| ### steps #### | |
| # verify the system has a cuda-capable gpu | |
| # download and install the nvidia cuda toolkit and cudnn | |
| # setup environmental variables | |
| # verify the installation | |
| ### | |
| ### to verify your gpu is cuda enable check |