This file contains 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(tidyverse) | |
library(gert) | |
git_overview <- function(path) { | |
# find root folders for all git repos | |
repo_list <- path %>% | |
list.dirs() %>% | |
str_subset("/.git$") %>% |
This file contains 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(flametree) | |
library(voronoise) | |
library(ambient) | |
library(scico) | |
library(dplyr) | |
theme_mono <- voronoise:::theme_mono | |
ft <- flametree_grow( | |
seed = 333, |
This file contains 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
pop <- (ggthemes::canva_pal("Pop art"))(4) | |
turmite59::turmite59( | |
shade = "#000000", | |
file = "~/Desktop/pop_heart.png", | |
palette_n = 4, | |
palette_heart = pop, | |
palette_turmite = pop, | |
turmite_steps = 100000000, | |
turmite_stepsize = 1 | |
) |
This file contains 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
perlin_circle <- function( | |
cx = 0, cy = 0, n = 100, noise_max = 0.5, octaves = 2, r_min = 0.5, r_max = 1 | |
) { | |
tibble::tibble( | |
angle = seq(0, 2*pi, length.out = n), | |
xoff = scales::rescale(x = cos(angle), from = c(-1, 1), to = c(0, noise_max)), | |
yoff = scales::rescale(x = sin(angle), from = c(-1, 1), to = c(0, noise_max)), | |
r = scales::rescale( | |
x = ambient::fracture( | |
noise = ambient::gen_simplex, |
This file contains 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(dplyr) | |
library(paletteer) | |
# specify the range | |
lo <- 0 | |
hi <- 4 | |
by <- .01 | |
# create data structure |
This file contains 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
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
This file contains 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(dplyr) | |
library(here) | |
# create data structure | |
pxl <- 5000 | |
dat <- expand.grid( | |
k = seq(0, 1, by=.001), | |
n = seq(44, 55, by=.01) |
This file contains 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
#include <Rcpp.h> | |
using namespace Rcpp; | |
// turmite function to be called from R | |
// [[Rcpp::export]] | |
NumericMatrix flame(int iter, int layers) { | |
NumericMatrix points(iter, 3); // initially zero | |
NumericMatrix coeffs(9, layers); | |
This file contains 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
# tidyeval version: tidy_outer returns | |
# the user expression | |
# | |
# expr quotes you | |
# enexpr quotes user | |
tidy_outer <- function(x) { | |
tidy_inner(!!rlang::enexpr(x)) | |
} |
This file contains 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(ambient) | |
library(dplyr) | |
seaweed <- function(seed) { | |
set.seed(seed) | |
output <- here::here("images", paste0("seaweed_", seed, ".png")) | |
# generate a random palette |