Skip to content

Instantly share code, notes, and snippets.

View jdblischak's full-sized avatar

John Blischak jdblischak

View GitHub Profile
@jdblischak
jdblischak / snake-group-meeting.py
Last active November 9, 2017 17:42
Example Snakefile for group meeting presentation
# Example Snakemake pipeline
#
# This example snakefile performs the following steps:
#
# * Downloads an Excel file
# * Converts the file to CSV format
# * Plots a result
# * Creates a summary report
#
# LICENSE: CC0. Do what you want with the code, but it has no guarantees.
@jdblischak
jdblischak / gpl-stats.R
Created July 26, 2019 16:12
Do CRAN packages that depend on the stats package use a copyleft license?
#!/usr/bin/env Rscript
# Do CRAN packages that depend on the stats package use a copyleft license?
# https://twitter.com/cimentadaj/status/1154420408508043264
Sys.Date()
## [1] "2019-07-26"
library(stringr)
calc3 <- function(sets)
{
sets <- check_sets(sets)
set_lengths <- vapply(sets, length, 0)
set_order <- order(set_lengths)
sets <- sets[set_order]
set_lengths <- set_lengths[set_order]
n_sets <- length(sets)
set_names <- names(sets)
@jdblischak
jdblischak / description-fields-reserved.txt
Last active June 17, 2021 15:05
R's DESCRIPTION fields documented in Writing R Extensions
Additional_repositories
Author
Authors@R
Biarch
BugReports
BuildVignettes
Built
ByteCompile
Classification/ACM
Classification/ACM-2012
@jdblischak
jdblischak / twitter-unfollowing.py
Created October 14, 2021 17:48
Unfollow all Twitter accounts that aren't following you back
#!/usr/bin/env python
# Unfollow all Twitter accounts that aren't following you back
#
# Twitter API:
# https://developer.twitter.com/en/docs/twitter-api
# https://github.com/python-twitter-tools/twitter
# https://developer.twitter.com/en/portal/projects/new
#
# Authentication:
@jdblischak
jdblischak / knitr-hook-output-redact.Rmd
Created February 28, 2025 20:18
A minimal example that uses a knitr output hook to redact long alphanumeric strings. Motivated by https://fosstodon.org/@sckottie/114078121814425933
---
title: "Untitled"
output: html_document
date: "2025-02-28"
---
```{r setup, include=FALSE}
# knitr output hook to redact alphanumeric strings
#
# Adapted from