Skip to content

Instantly share code, notes, and snippets.

View jacob-long's full-sized avatar

Jacob Long jacob-long

View GitHub Profile
library(css)
library(glue)
library(rvest)
library(stringr)
library(dplyr)
library(purrr)
directory <- "https://github.com/rstudio/rstudio/blob/master/src/gwt/src/org/rstudio/studio/client/workbench/views/source/editors/text/themes"
raw_directory <- "https://raw.githubusercontent.com/rstudio/rstudio/master/src/gwt/src/org/rstudio/studio/client/workbench/views/source/editors/text/themes"
rstudio_theme_names <- read_html(directory) %>%
@lukas-h
lukas-h / license-badges.md
Last active May 21, 2024 17:21
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

\documentclass[xcolor=dvipsnames]{beamer}
\usetheme{Madrid}
\useoutertheme{miniframes} % Alternatively: miniframes, infolines, split
\useinnertheme{circles}
\definecolor{UBCblue}{rgb}{0.04706, 0.13725, 0.26667} % UBC Blue (primary)
\definecolor{UBCgrey}{rgb}{0.3686, 0.5255, 0.6235} % UBC Grey (secondary)
\setbeamercolor{palette primary}{bg=UBCblue,fg=white}
@tmalsburg
tmalsburg / predict_vs_simulate.org
Last active November 18, 2022 01:14
Predict vs simulate in lme4

Predict vs simulate in lme4

For this investigation we are going to use the sleepdata data set from the lme4 package. Here is the head of the data frame:

@soodoku
soodoku / scrape_wisconsin_ads.py
Last active September 14, 2016 13:21
Get text from Wisconsin ad pdfs using pyPdf
'''
Text from Searchable pdfs
Scrape Text off Wisconsin Ads pdfs
Uses pyPdf to get text from searchable pdfs. The script is for tailored for getting data
from Wisconsin Political Ads Database: http://wiscadproject.wisc.edu/Storyboards.
@author: Gaurav Sood
Created on November 02, 2011
@tkhn
tkhn / replacer.py
Last active December 10, 2016 03:34 — forked from meddulla/replacer.py
"""
Usage: python script.py search_string replace_string dir
Eg. python batchreplace.py galleries productions /Sites/cjc/application/modules/productions/
And it will search recursively in dir
and replace search_string in contents
and in filenames.
Case-sensitive
"""
from sys import argv
These code snippets have been tested on R 3.1.0 and Mac OS 10.9.3. They presumably do *not* work on R 2.X!
## Enter these commands in the Mac OS Terminal
# use faster vecLib library
cd /Library/Frameworks/R.framework/Resources/lib
ln -sf /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libBLAS.dylib libRblas.dylib
# return to default settings
cd /Library/Frameworks/R.framework/Resources/lib
@mathematicalcoffee
mathematicalcoffee / README.md
Last active September 17, 2017 01:39
Prism language definition for R
@dsparks
dsparks / coefficent_plot_walkthrough.R
Created December 18, 2012 22:31
A coefficient plot for multiple models
doInstall <- TRUE
toInstall <- c("ggplot2")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
ANES <- read.csv("http://www.oberlin.edu/faculty/cdesante/assets/downloads/ANES.csv")
ANES <- ANES[ANES$year == 2008, -c(1, 11, 17)] # Limit to just 2008 respondents,
head(ANES) # remove some non-helpful variables
# Fit several models with the same DV: