Skip to content

Instantly share code, notes, and snippets.

@tylermorganwall
tylermorganwall / 3d_jealous_girlfriend.R
Last active April 25, 2020 20:25
3D jealous girlfriend ggplot made with R + rayshader
library(tidyverse)
dbf = data.frame(color=character(0), x=numeric(0), y=numeric(0), stringsAsFactors = F)
## Distractive woman
# Left arm
dbf = bind_rows(dbf, crossing(color='skin', x=seq(4,5), y=seq(1,9),z=3))
dbf = bind_rows(dbf, data.frame(color='skin', x=5, y=10,z=3))
@kafkasl
kafkasl / sp500_constituents.json
Created March 7, 2019 13:47
List of S&P 500 historical constituents from 2008/01/31 to 2019/02/27. JSON format where each date contains a list of the constituents.
This file has been truncated, but you can view the full file.
{
"2008/01/31":[
"GHC",
"MDP",
"GAS",
"AZO",
"MIL",
"MXA",
"ASH",
"SNA",
@schaunwheeler
schaunwheeler / xlsxToR.r
Last active December 11, 2020 16:41
Import an xlsx file into R by parsing the file's XML structure.
# The MIT License (MIT)
#
# Copyright (c) 2012 Schaun Jacob Wheeler
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: