A first blog post using that one tool
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
docker run --rm -it python:3.10-buster /bin/bash | |
## Can't test | |
pyarrow == 5.0.0 | |
## Happy | |
??? | |
## Unhappy python:3.10-buster |
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
# 2021-06-23: Tidy Tuesday | |
# Inspired by, and some code copied from Jesse Mostipak | |
# https://twitter.com/kierisi/status/1407171923633651717 | |
## Background ## | |
# Thought Experiment/Example: | |
# Imagine I'm the 5th tallest kid in a class of 40. | |
# Then my class size doubles to 80. | |
# Now I'm probably not the 5th tallest anymore. |
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
# Discussion on Medium: https://medium.com/@russell.s.pierce/setting-up-aws-glue-with-terraform-8f601cf36366 | |
resource "aws_iam_role" "glue" { | |
name = "AWSGlueServiceRoleDefault" | |
assume_role_policy = <<EOF | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Action": "sts:AssumeRole", |
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
#' Create Embed for Periscope | |
#' | |
#' Code not complete | |
#' | |
#' @param dashboard | |
#' @param filters | |
#' @param api_key | |
# '@author Russell S. Pierce, \email{Russell.Pierce@@zapier.com} | |
# '@author Christopher Peters, \email{chris.peters@@zapier.com} | |
#' @return |
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
#repsych is on github and is here only for the glibrary idiom | |
library(repsych) | |
#install and load the following packages | |
glibrary(whisker, lubridate, magrittr, rappdirs, awsjavasdk, rJava) | |
if (!aws_sdk_present()) { | |
install_aws_sdk() | |
} | |
load_sdk() |
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
#' Send a message to Slack | |
#' | |
#' To use, set options(zapier_slack_webhook="yourZapierPostWebhookHere") | |
#' | |
#' @param message | |
#' @param channel | |
#' @param bot_name | |
#' @param bot_icon_url | |
#' @param image_url | |
#' @param emoji |
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
# Very raw dump of prototype code that allows for connection to a JDBC db via a ad-hoc one node cluster. This demo code was designed to connect to redshift using Amazon's JDBC drivers - because sometimes you just want to do things the hard way | |
# To make this work, you'll need to update the classPath, driverPath, and of course, the host settings. | |
#library(plyr); needs to be available, but doesn't need to be attached | |
library(whisker) | |
library(R6) | |
library(logging) | |
library(R.utils) #tempvar | |
library(parallel) #makeCluster and friends |
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
#' Require and install package version | |
#' | |
#' Guarantee that the required version (or higher) is installed. | |
#' This function will install from github in the desired version isn't found on CRAN or the current machine version is insufficient. | |
#' | |
#' @param packageName A quoted string, e.g. 'lubridate' | |
#' @param githubLoc e.g., 'hadley/lubridate' | |
#' @param requiredVersion e.g. '1.4' | |
#' | |
#' @return boolean ; TRUE if successful, FALSE otherwise |
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(parallel) | |
saveRDS.xz <- function(object,file,threads=parallel::detectCores()) { | |
pxzAvail <- any(grepl("(XZ Utils)",system("pxz -V",intern=TRUE))) | |
if (pxzAvail) { | |
con <- pipe(paste0("pxz -T",threads," > ",file),"wb") | |
base::saveRDS(object, file = con) | |
close(con) | |
} else { | |
saveRDS(object,file=file,compress="xz") |
NewerOlder