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
alias: pixelclock_spotify | |
description: "" | |
trigger: | |
- platform: state | |
entity_id: media_player.spotify_vistagamer | |
condition: [] | |
action: | |
- choose: | |
- conditions: | |
- condition: state |
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
#include <RcppArmadillo.h> | |
// include header file from splines2 package | |
#include <splines2Armadillo.h> | |
// [[Rcpp::export]] | |
arma::mat splines2_periodic(const arma::vec &x, | |
const arma::vec &knots, | |
const unsigned int deg, | |
const bool &intercept = true) | |
{ |
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
#include <RcppArmadillo.h> | |
// Expose splines::splineDesign to Rcpp | |
mat splineDesign_rcpp(const vec &x, const vec &knots, const int °) | |
{ | |
Rcpp::Environment pkg = Rcpp::Environment::namespace_env("splines"); | |
Rcpp::Function f = pkg["splineDesign"]; | |
mat y = Rcpp::as<arma::mat>(f(knots, x, deg + 1, 0, true)); | |
return y; | |
} |
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(microbenchmark) | |
library(Rcpp) | |
library(inline) | |
src <- "int n = as<int>(N); | |
std::vector<int> s = as< std::vector<int> >(sizes); | |
std::vector<int> epsilon (s.size()); | |
std::vector<int>::iterator it; | |
it = s.begin(); | |
it = s.insert ( it , 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
library(dplyr) | |
library(ggplot2) | |
library(ggsci) | |
library(tidyr) | |
material_pals <- c( | |
"red", "pink", "purple", "deep-purple", "indigo", | |
"blue", "light-blue", "cyan", "teal", "green", "light-green", "lime", | |
"yellow", "amber", "orange", "deep-orange", "brown", "grey", "blue-grey" | |
) |
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
field1 <- fieldtest1() | |
dim(field1) | |
field2 <- fieldtest2() | |
dim(field2) | |
field3 <- fieldtest3() | |
dim(field3) | |
field1out <- FieldInfieldOut(field1) |
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
FROM ubuntu:focal | |
SHELL ["/bin/bash", "-c"] | |
ENV R_VERSION=4.1.1 \ | |
# See https://packagemanager.rstudio.com/client/#/repos/1/overview | |
R_REPOS=https://packagemanager.rstudio.com/all/__linux__/focal/4526215 \ | |
DISPLAY=:0 \ | |
TZ=Europe/Berlin |
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
// [[Rcpp::depends(RcppArmadillo)]] | |
#include <RcppArmadillo.h> | |
using namespace arma; | |
// [[Rcpp::export]] | |
vec testfun(const vec &x, | |
const double &y, | |
const double &z) | |
{ | |
vec out = ((y < x) - z) % (x - y); |
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
% !TEX root = Main.tex | |
\documentclass{article} | |
\usepackage[round]{natbib} | |
\bibliographystyle{abbrvnat} | |
\begin{document} | |
\cite{geng2017relationship} |
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(shiny) | |
ui <- fluidPage( | |
tags$head(includeScript("returnClick.js")), | |
textInput("myText", "", placeholder = "Enter text then hit return", width = "100%"), | |
actionButton("myButton", "Go!"), | |
verbatimTextOutput("textOutput") | |
NewerOlder