sudo yum -y update
sudo yum-config-manager --enable epel
sudo yum -y install make automake gcc gcc-c++ libcurl-devel proj-devel geos-devel
cd /tmp
curl -L http://download.osgeo.org/gdal/2.0.0/gdal-2.0.0.tar.gz | tar zxf -
cd gdal-2.0.0/
./configure --prefix=/usr/local --without-python
make -j4
sudo make install
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 <sys/types.h> | |
#include <sys/stat.h> | |
#include <sys/mman.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <Rinternals.h> | |
#include <R_ext/Rallocators.h> | |
static void *mmap_alloc(R_allocator_t *allocator, size_t length) { |
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
# Takes an ordered vector of numeric values and returns a small bar chart made | |
# out of Unicode block elements. Works well inside dplyr mutate() or summarise() | |
# calls on grouped data frames. | |
sparkbar <- function(values) { | |
span <- max(values) - min(values) | |
if(span > 0 & !is.na(span)) { | |
steps <- round(values / (span / 7)) | |
blocks <- c('▁', '▂', '▃', '▄', '▅', '▆', '▇', '█') | |
paste(sapply(steps - (min(steps) - 1), function(i) blocks[i]), collapse = '') |
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(data.table) | |
dyn.load('mmap_alloc.dll') | |
## create test ~74GB dataset, similar to | |
## https://github.com/Rdatatable/data.table/wiki/Benchmarks-:-Grouping | |
N=2e9; K=100 | |
set.seed(1) | |
DT = list() | |
# empty mmap columns |
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(data.table) | |
library(dplyr) | |
library(sp) | |
library(rgeos) | |
library(UScensus2000tract) | |
library(geosphere) | |
library(geodist) |
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
#!/usr/bin/env bpftrace | |
/* | |
* ralloc - Print allocations of R vectors. | |
* | |
* Copyright 2020 Aaron Jacobs | |
* Licensed under the MIT License or the Apache License, version 2.0. | |
*/ | |
BEGIN | |
{ |