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
#' My roxy | |
#' | |
#' This is an example of how you would use roxygen. | |
#' | |
#' ```{r} | |
#' #' Test example | |
#' #' | |
#' #' This is an example. Here is how you embed R code: | |
#' #' | |
#' #' ```{r} |
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
# Sampling frequency and audio length | |
freq <- 400 | |
duration <- 5 | |
# radian constant for sin/cos | |
tau <- 2*pi | |
# Generate a composite signal (4, 6, 9 hz) | |
x <- seq(0, duration, length.out = freq*duration) | |
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
#include <v8.h> | |
#include <libplatform/libplatform.h> | |
using v8::HandleScope; | |
using v8::Isolate; | |
using v8::MemorySpan; | |
using v8::WasmModuleObject; | |
using v8::Context; | |
using v8::Local; | |
using v8::Value; |
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(V8) | |
ctx <- v8() | |
ctx$eval(" | |
let bytes = new Uint8Array([ | |
0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x07, 0x01, | |
0x60, 0x02, 0x7f, 0x7f, 0x01, 0x7f, 0x03, 0x02, 0x01, 0x00, 0x07, | |
0x07, 0x01, 0x03, 0x61, 0x64, 0x64, 0x00, 0x00, 0x0a, 0x09, 0x01, | |
0x07, 0x00, 0x20, 0x00, 0x20, 0x01, 0x6a, 0x0b | |
]); | |
let module = new WebAssembly.Module(bytes); |
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
# Import the GPG key | |
wget https://dist.apache.org/repos/dist/dev/arrow/KEYS | |
apt-key add < KEYS | |
# Install libarrow | |
DISTRO=$(lsb_release --codename --short) | |
add-apt-repository "deb [arch=amd64] http://dl.bintray.com/apache/arrow/ubuntu $DISTRO main" | |
apt-get install libarrow-dev libparquet-dev | |
# Install the R package |
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
# To start the docker container | |
docker run -it wch1/r-debug | |
# Run this inside docker: | |
cd ~ | |
wget https://dist.apache.org/repos/dist/dev/arrow/KEYS | |
apt-key add < KEYS | |
add-apt-repository 'deb [arch=amd64] http://dl.bintray.com/apache/arrow/ubuntu bionic main' | |
apt-get install libarrow-dev libparquet-dev |
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
Attaching package: ‘arrow’ | |
The following object is masked from ‘package:testthat’: | |
matches | |
The following object is masked from ‘package:utils’: | |
timestamp |
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
Determining if the pthread_create exist failed with the following output: | |
Change Dir: /root/poppler-0.74.0/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp | |
Run Build Command:"/usr/bin/make" "cmTC_aa88c/fast" | |
make[2]: Entering directory '/root/poppler-0.74.0/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp' | |
/usr/bin/make -f CMakeFiles/cmTC_aa88c.dir/build.make CMakeFiles/cmTC_aa88c.dir/build | |
make[3]: Entering directory '/root/poppler-0.74.0/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp' | |
Building C object CMakeFiles/cmTC_aa88c.dir/CheckSymbolExists.c.o | |
/usr/bin/cc -std=c99 -D_DEFAULT_SOURCE -o CMakeFiles/cmTC_aa88c.dir/CheckSymbolExists.c.o -c /root/poppler-0.74.0/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/CheckSymbolExists.c | |
Linking C executable cmTC_aa88c |
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
parse_streamer <- function(url, cb = print){ | |
con <- curl::curl(url = url) | |
open(con) | |
on.exit(close(con)) | |
repeat{ | |
txt <- readLines(con, 1) | |
if(!length(txt)){ | |
print("All done!") | |
cb(NULL) | |
break; |
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
/* Test program to verify that CURLMOPT_MAX_TOTAL_CONNECTIONS works as expected */ | |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/time.h> | |
#include <unistd.h> | |
#include <math.h> | |
#include <curl/curl.h> | |
/* Configure max concurrent connections */ |