Skip to content

Instantly share code, notes, and snippets.

View aronlindberg's full-sized avatar

Aron Lindberg aronlindberg

  • Stevens Institute of Technology
  • Hoboken, NJ
View GitHub Profile
["FA-FA-ITR-IIFA,TR-FA-I2-I2-FA-EX-IFA,IEX,I2-I2-INR-I2","I1,TR-NR-I2","EX-IQU-TR","NR-EX","EX,I2-EX-IIIII2-I1","I2-EX,FA-IEX-EX-TR-EX-TR","INR-I2-FA-FA-TR-I2-IIIIIFA-I2-FA-TR-II1","NR-FA-II1","TR-I2-I2,I2-I2-EX,TR-TR-I2-FA-I2","IIIFA-ITR-FA-IFA-INR-NR-II2","I2-FA-II2-EX-FA,","1","TR","FA-NR-II2-I1","TR-TR-EX,","TR-NR-TR-QU-EX-NR-TR-I2-EX-II1","INR-INR-IFA,TR","I2","NR-NR-I1,IIFA-FA-IFA-FA-NR-I1","NR-I2-FA-FA-IFA-NR-FA,IFA-FA-NR-NR-I2-NR-IIIFA-EX,II2-II2-I2-QU-TR-FA-QU","EX-ITR-IFA-FA-NR-INR-FA-FA-EX-II2-NR",",","FA-I2-I2-FA-I2-FA-I2,I2-INR-I2-NR-I1","TR-FA-I2","NR-EX-TR-IEX,II2-FA-I2-INR-I2","IIEX-FA,IEX-EX-EX-EX-EX-EX-EX-TR-TR-I2-NR-NR-EX-NR","FA-NR-NR-NR-EX-NR-II2-IIFA-FA-ITR-NR-I2","I2-NR-FA-NR-I1",",TR-FA-FA-EX-EX-NR-I2-FA,I2-FA-II2-I2","I2-NR-TR","I1","EX,","FA-I2-FA-NR-EX-EX-FA,","I2-FA-I2-IEX","IIEX,I2-EX-TR-NR-EX,IEX,I2-EX-TR-I2-QU-NR","FA-FA-EX,IEX-EX-EX-EX,I2-I2-II2-NR-FA-EX,","FA-I2","EX,IEX,I2-I1","NR-NR-QU,TR-QU,TR-FA,","FA,TR-NR-I2,QU-I2,QU-I2,QU-QU-QU-NR-TR-I2-QU-I2,TR-IQU,TR-QU,TR-EXFAI2-FA,"
["FA-FA-ITR-IIFA,TR-FA-I2-I2-FA-EX-IFA,IEX,I2-I2-INR-I2","I1,TR-NR-I2","EX-IQU-TR","NR-EX","EX,I2-EX-IIIII2-I1","I2-EX,FA-IEX-EX-TR-EX-TR","INR-I2-FA-FA-TR-I2-IIIIIFA-I2-FA-TR-II1","NR-FA-II1","TR-I2-I2,I2-I2-EX,TR-TR-I2-FA-I2","IIIFA-ITR-FA-IFA-INR-NR-II2","I2-FA-II2-EX-FA,","1","TR","FA-NR-II2-I1","TR-TR-EX,","TR-NR-TR-QU-EX-NR-TR-I2-EX-II1","INR-INR-IFA,TR","I2","NR-NR-I1,IIFA-FA-IFA-FA-NR-I1","NR-I2-FA-FA-IFA-NR-FA,IFA-FA-NR-NR-I2-NR-IIIFA-EX,II2-II2-I2-QU-TR-FA-QU","EX-ITR-IFA-FA-NR-INR-FA-FA-EX-II2-NR",",","FA-I2-I2-FA-I2-FA-I2,I2-INR-I2-NR-I1","TR-FA-I2","NR-EX-TR-IEX,II2-FA-I2-INR-I2","IIEX-FA,IEX-EX-EX-EX-EX-EX-EX-TR-TR-I2-NR-NR-EX-NR","FA-NR-NR-NR-EX-NR-II2-IIFA-FA-ITR-NR-I2","I2-NR-FA-NR-I1",",TR-FA-FA-EX-EX-NR-I2-FA,I2-FA-II2-I2","I2-NR-TR","I1","EX,","FA-I2-FA-NR-EX-EX-FA,","I2-FA-I2-IEX","IIEX,I2-EX-TR-NR-EX,IEX,I2-EX-TR-I2-QU-NR","FA-FA-EX,IEX-EX-EX-EX,I2-I2-II2-NR-FA-EX,","FA-I2","EX,IEX,I2-I1","NR-NR-QU,TR-QU,TR-FA,","FA,TR-NR-I2,QU-I2,QU-I2,QU-QU-QU-NR-TR-I2-QU-I2,TR-IQU,TR-QU,TR-EXFAI2-FA,"
@aronlindberg
aronlindberg / sha_list.R
Created July 24, 2015 19:02
sha_list.R
list(structure(character(0), .Names = character(0)), structure(character(0), .Names = character(0)),
structure(character(0), .Names = character(0)), structure(character(0), .Names = character(0)),
structure(character(0), .Names = character(0)), structure(character(0), .Names = character(0)),
structure(character(0), .Names = character(0)), structure(character(0), .Names = character(0)),
structure(character(0), .Names = character(0)), structure(character(0), .Names = character(0)),
structure(character(0), .Names = character(0)), structure(character(0), .Names = character(0)),
structure(c("c0fec1b3f9052a9400a7c0f9a0763f3fedcd797f", "53cec5e6b8a78acb5d98f9013354008b1f1725c1",
"c42a471018d73fcb39db751899dfe8e2b6ca60e5", "9f6efeacd198f9855218f7cf9837a19312995abe",
"baf8b671f855f844b358d775dd11095ecf7ccaff", "1ffba443a042da94da1a1758a2d7bd44870e52c2",
"8725709654ae3263f2192a9ccdf4c060f4ca6967", "06ff0d289fb68759b8f7a00f81ac6dd72a2abb05",
@aronlindberg
aronlindberg / pull_lists.R
Created July 24, 2015 14:58
pull_lists.R
structure(list(ok = TRUE, content = list(structure(list(sha = "2dd95c322feb610df489cc75e2ff650d5dd478f5",
commit = structure(list(author = structure(list(name = "Evan Phoenix",
email = "evan@fallingsnow.net", date = "2012-12-04T22:54:44Z"), .Names = c("name",
"email", "date")), committer = structure(list(name = "Evan Phoenix",
email = "evan@fallingsnow.net", date = "2012-12-04T22:54:44Z"), .Names = c("name",
"email", "date")), message = "Remove Array.attr_accessor :total",
tree = structure(list(sha = "f9e8137681c2851b219497b1393d2c214c0c1d52",
url = "https://api.github.com/repos/rubinius/rubinius/git/trees/f9e8137681c2851b219497b1393d2c214c0c1d52"), .Names = c("sha",
"url")), url = "https://api.github.com/repos/rubinius/rubinius/git/commits/2dd95c322feb610df489cc75e2ff650d5dd478f5",
comment_count = 0L), .Names = c("author", "committer",
@aronlindberg
aronlindberg / 0_reuse_code.js
Last active August 29, 2015 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@aronlindberg
aronlindberg / Routine structure query
Created March 25, 2015 15:46
Routine structure query
# Identify all forks named rails:
# SELECT * FROM projects WHERE name = "rails”
# They all seemed to be forked from 1334, so I get that:
# SELECT * FROM projects WHERE id = 1334
# Then I get all the pull request IDs from the base_repo (where the PRs are pulled to, i.e. rails/rails):
# Loading the database
# export PATH=$PATH:/usr/local/mysql/bin
# wget http://ghtorrent.org/downloads/msr14-mysql.gz
# mysql -u root -p
# mysql> create user 'msr14'@'localhost' identified by 'msr14';
@aronlindberg
aronlindberg / File stats query
Created March 25, 2015 15:45
File stats query
require 'octokit'
require 'csv'
client = Octokit::Client.new :login => 'github_username', :password => 'github_password'
repo = 'rails/rails'
numbers = CSV.read('/Users/Aron/Dropbox/Thesis/3-Variance/api_queries/rails_include.csv').flatten
CSV.open('rails_include_stats.csv', 'w') do |csv|
csv << ["pull.number", "pull.additions", "pull.deletions", "pull.created_at", "pull.merged_at", "pull.commits", "pull.changed_files"]
for number in numbers
@aronlindberg
aronlindberg / file interdependence query
Created March 25, 2015 15:43
file interdependence query
# For this script to run I have to run my local version of rgithub. Open the rgithub Rstudio project and build and reload the package to use the modified get.commit() function that allows for setting the "git" argument to NULL.
# library(github)
# library(devtools)
# library(roxygen2)
setwd("/Users/Aron/Dropbox/Thesis/3-Variance/Journal/Computational Analysis/compute/")
# library(github)
# library(rgithub, lib.loc = "/Users/Aron/github/local/")
library(httpuv)
library(jsonlite)
@aronlindberg
aronlindberg / data_to_reverse.R
Last active August 29, 2015 14:16
A dput of the data.frame data_to_reverse
structure(list(Year = c(1990L, 1990L, 1990L, 1990L, 1991L, 1991L,
1992L, 1992L, 1992L, 1993L, 1993L, 1993L, 2005L, 1995L, 1994L,
2005L, 1994L, 1994L, 2006L, 1994L, 2012L, 2012L, 2007L, 2012L,
1995L, 1996L, 2004L, 2005L, 1994L, 1995L, 1998L, 1996L, 2000L,
2002L, 2002L, 1998L, 1997L, 2012L, 1995L, 1996L, 1996L, 1997L,
1996L, 1997L, 1997L, 1998L, 1997L, 1996L, 1996L, 2011L, 2006L,
2006L, 1998L, 1998L, 1999L, 2000L, 1998L, 1998L, 1999L, 1999L,
1999L, 2004L, 2006L, 2011L, 1998L, 2000L, 2012L, 2000L, 2000L,
2010L, 2004L, 2001L, 1999L, 2002L, 2011L, 2001L, 1998L, 2003L,
2004L, 1999L, 2006L, 2000L, 2006L, 1995L, 2010L, 1995L, 2008L,