float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
return mix(rand(fl), rand(fl + 1.0), fc);
}
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(cowplot) | |
# download historical data in csv format from here: | |
# https://www.coingecko.com/en/coins/degen-base/historical_data | |
data <- read_csv("degen-usd-max.csv") | |
make_date_number <- function(x) { | |
as.numeric(difftime(x, ymd_hms(data$snapped_at[1]), units="days")) | |
} |
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
<!DOCTYPE html> | |
<!-- saved from url=(0047)https://warpcast.com/~/channel/ai-art/followers --> | |
<html lang="en" class=""><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="icon" href="https://warpcast.com/favicon.png"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><meta name="description" content="A decentralized social network"><meta name="theme-color" content="#17101f" media="(prefers-color-scheme: dark)"><meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><link rel="apple-touch-icon" href="https://warpcast.com/logo192.png"><link rel="manifest" href="https://warpcast.com/manifest.json"><title>Users following /ai-art</title><link rel="preconnect" href="https://fonts.googleapis.com/"><link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin=""><link href= |
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
# Deterministically generated normal variates, implemented here in R but more | |
# useful for GLSL programming. | |
library(ggplot2) | |
fract <- function(x) x - floor(x) | |
rand <- function(x) fract(3482954.234 * sin(24934.342 * x + 12394.32)) | |
norm <- function(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
I am attesting that this GitHub handle clauswilke is linked to the Tezos account tz1XTr7d3FZ19KndZ1HX3iav8fqKeZwGx8bZ for tzprofiles | |
sig:edsigu1GvDvbQoaUf51om2PgLtFvWX3sirA4NcVs7jj2nNganXtuk6mKEZCHFm2gSvGCkXA3L4y6ZjsVyTdnACwqL6kmsa36bHx |
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
--- | |
title: "COVID-19 Case Fatality Rate (CFR) by age" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
library(tidyverse) | |
``` |
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
# Code for presentation at rstudio::conf2019 | |
# Slides: | |
# https://docs.google.com/presentation/d/1zMuBSADaxdFnosOPWJNA10DaxGEheW6gDxqEPYAuado/edit?usp=sharing | |
# Setup ------------------------------------------------------------------- | |
library(ggplot2) | |
library(gganimate) | |
library(ungeviz) | |
library(mgcv) |
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
// This file implements the 2D isoline and isoband algorithms described | |
// here: https://en.wikipedia.org/wiki/Marching_squares | |
// Written by Claus O. Wilke | |
#include <Rcpp.h> | |
using namespace Rcpp; | |
#include <iostream> | |
#include <vector> | |
#include <utility> // for pair |
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(sf) | |
# Development version of colorspace is needed. Install via: | |
# install.packages("colorspace", repos = "http://R-Forge.R-project.org") | |
library(colorspace) | |
crs_goode <- "+proj=igh" | |
world_goode <- st_as_sf(rworldmap::getMap(resolution = "low")) %>% |
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
--- | |
title: "World maps" | |
output: | |
html_document: | |
df_print: paged | |
--- | |
```{r echo = FALSE, message = FALSE} | |
library(tidyverse) | |
library(sf) |
NewerOlder