I hereby claim:
- I am mdneuzerling on github.
- I am mdneuzerling (https://keybase.io/mdneuzerling) on keybase.
- I have a public key whose fingerprint is B09F 70F9 25C8 6754 D5A0 9746 870E C1FF 97FC EB78
To claim this, I am signing this object:
# This file contains the minimal code needed to set up a tidymodels flavour for | |
# mlflow, along with unit tests. There are three issues that need to be addressed: | |
# | |
# * we currently use workflows:::predict.workflow, which will NOT be accepted by | |
# CRAN. We should ask that the Tidymodels team make this function available in | |
# the workflows NAMESPACE. | |
# * we need to ensure that the Python CLI can support the new R flavour. There is | |
# a commented-out unit test for this. | |
# * the unit tests call on packages through `library`, and this could be cleaned up. |
# data/pokemon.csv from https://gist.github.com/simsketch/1a029a8d7fca1e4c142cbfd043a68f19 | |
# The last 5 to 10 rows needed to be manually fixed to have the correct number of columns | |
# data/evolutions-raw.csv is manually scraped from https://pokemon.fandom.com/wiki/List_of_Pok%C3%A9mon_by_evolution | |
library(tidyverse) | |
# Terminology note: a "base" of a Pokemon "family" is the unevolved form from | |
# which other Pokemon in the family come from. For example, Squirtle is the | |
# base of Wartortle and Blastoise, and these three are members of the "Squirtle" | |
# family (and possibly Mega Blastoise too) |
macro roll(dice) | |
dice_split = split(string(dice), "d") | |
dice_split[1] = (dice_split[1] == "" ? "1" : dice_split[1]) | |
n_dice, range = parse.(Int64, dice_split) | |
:(sum(rand(1:$range, $n_dice))) | |
end |
library(tidyverse) | |
tidy_tuesday <- tidytuesdayR::tt_load(2020, week = 28) | |
coffee <- tidy_tuesday$coffee_ratings | |
coffee %>% | |
filter(!is.na(country_of_origin)) %>% | |
inner_join( | |
coffee %>% | |
group_by(country_of_origin) %>% |
# This function formulates and submits a HTTP GET request to the Public | |
# Transport Victoria (PTV) API. In particular, it calculates the "signature" | |
# component of the URL required for authentication. While I've included the | |
# version number as an argument, I haven't tested this function on versions | |
# other than 3. | |
# | |
# See URL below for information on obtaining a user ID (also called a devid) and | |
# an API key: | |
# https://www.ptv.vic.gov.au/footer/data-and-reporting/datasets/ptv-timetable-api/ | |
# |
# Takes a pattern like xxxddd (for three letters followed by three numbers) | |
# and converts it to regex. Other characters are left as is in the regex | |
# pattern string. This is helpful for states like SA in which every modern | |
# licence plate begins with an "S". | |
def match_plate_pattern(plate, pattern): | |
pattern = pattern.replace('x','[A-Za-z]').replace('d','[0-9]') | |
return(re.fullmatch(pattern, plate)) | |
# Some of these rules are a bit more general than they need to be. | |
# These rules aren't complete (I tended to ignore anything before 1970). |
library(tidyverse) | |
modifier <- function(x) { | |
floor((x - 10) / 2) | |
} | |
skill_ability <- tribble( | |
~skill, ~ability_code_upper, | |
#-------|------------------ | |
"athletics", "STR", |
library(tidyverse) | |
library(bomrang) | |
weather <- get_historical( | |
stationid = "090015", | |
type = "max" | |
) | |
weather %>% | |
filter(!is.na(Max_temperature)) %>% # remove missing values |
I hereby claim:
To claim this, I am signing this object: