Skip to content

Instantly share code, notes, and snippets.

View briandk's full-sized avatar

Brian A. Danielak briandk

View GitHub Profile
@briandk
briandk / install-texlive-without-docs.py
Created July 20, 2016 20:55
Instal a full latex texlive on Ubuntu Xenial without any of the docs
import subprocess
get_line_by_line_texlive_dependencies = subprocess.run(
[
"apt-cache",
"depends",
"texlive-full"
],
universal_newlines=True,
stdout=subprocess.PIPE
@briandk
briandk / pasteUsingSepAndCollapseInR.R
Created November 27, 2014 07:11
Understanding `sep` and `collapse` in R using `paste()
# The difference between the `sep` and `collapse` arguments
# in paste can be thought of like this:
#
# paste can accept multiple *vectors* as input, and will
# concatenate the ith entries of each vector pairwise
# (or tuplewise), if it can.
#
# When you pass paste multiple vectors, sep defines what
# separates the entries in those tuple-wise concatenations.
#
@briandk
briandk / CONTRIBUTING.md
Created March 18, 2016 20:29
A basic template for contributing guidelines that I adapted from Facebook's open source guidelines

Contributing to Transcriptase

We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

  • Reporting a bug
  • Discussing the current state of the code
  • Submitting a fix
  • Proposing new features
  • Becoming a maintainer

We Develop with Github

@briandk
briandk / gt-quarto-split-table-bug.qmd
Last active October 2, 2023 15:12
Trying to create a reproducible example of a bug in the `gt` package for R.
---
title: "GT Quarto Split Table Bug Test"
format:
docx: default # renders fine
html: default # fails with error (see below)
pdf: default # fails with error (see below)
---
## Test Code
@briandk
briandk / danielakResearchStatement.Rmd
Last active August 22, 2023 09:21
My research statement
---
title: Danielak - Statement of Research Experience
output: rmarkdown::tufte_handout
---
## My experience, knowledge, and interest in PER
I spent five years at the University of Maryland--College Park (UMD) as a National Science Foundation Disciplinary Expert in Science Education Research. While there, I was an active member of UMD's Physics Education Research Group (PERG), presenting at the AAPT 2010 Winter Meeting and attending the 2012 AAPT Summer Meeting and PERC. My core areas of expertise, evidenced in both my dissertation[^1] and my first-authored journal publication[^2], include:
- **6** years of experience conducting clinical interviews with students and engineers to understand their cognition and practices
@briandk
briandk / elm-json-decode-pipeline.md
Created November 25, 2022 20:21
Trying to understand why the order of `required` statements matters in an Elm JSON Decode Pipeline

Why does the order of required statements matter in a JSON Decode Pipeline?

Background

I’m currently working through the book Programming Elm by Jeremy Fairbank. I’m on Chapter 4, where he introduces JSON decoders and the Json.Decode.Pipeline package. Please bear with me, as I’m an Elm beginner. I’m also working in the Elm repl, as I’m not currently sure how to translate my work into a full Elm program.

What I Expect to Happen

In Elm, the order of requireds in a JSON decode pipeline shouldn’t matter for successful decoding, because we’re matching the names of the keys in the JSON oject to the names of the fields in a record. There is no inherent order to the fields of an Elm record, just as there is no inherent order to the properties of a JSON object.

@briandk
briandk / siuba-datetime-example.py
Last active July 31, 2022 20:35
- Applying `pd.to_datetime()` to a column using `mutate` seems to fail
import pandas as pd
from siuba import *
my_data = {
'name': ["Abigail Adams"],
'birth': ["1744-11-22"],
'death': ["1818-10-28"]
}
df = pd.DataFrame(my_data)
@briandk
briandk / rstudioconf2022-presentation-links.md
Last active July 27, 2022 15:57
List of links related to my rstudio::conf 2022 presentation on designing a socially critical data science course
@briandk
briandk / learning-objectives.md
Created May 19, 2022 02:02
The original lest of modeling objectives from MSU’s CMSE 201 - Introduction to Computational Modeling

Course Learning Objectives

Modeling begins before you ever touch a computer

  • How do I understand the system of interest?
  • Within that system, what phenomena am I interested in?
  • What entities do I think are relevant for my model?
  • How might I qualitatively describe entity relationships in the model? (Example: predators hunt prey, so predators should have some contribution to the reduction of prey.)
  • What simplifications do I know I’m making?
  • How can I express expectations of/predictions about the model? (E.g., with one wolf and 10 million rabbits, I don’t think there will be much of a predator effect. Or: here’s a sketch of the path I think this orbiting body might take. Or: based on my experiences with kerbal space program, I figure the object would take a path like this.)
@briandk
briandk / InstallingPandocOnMac.md
Last active September 28, 2021 18:39
How to install pandoc on a mac

Step 0 - Installing the XCode Development tools

Paste the following in your terminal, then press Enter and follow any prompts:

xcode-select --install

Step 1 - Install homebrew