This script has been adapted from a post on LA Times
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class RDownloadStrategy < SubversionDownloadStrategy | |
def stage | |
quiet_safe_system 'cp', '-r', @clone, Dir.pwd | |
Dir.chdir cache_filename | |
end | |
end | |
class R < Formula |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from numba import jit | |
def root_func(x): | |
return x**4 - 2*x**2 - x - 3 | |
def compile_specialized_bisect(f): | |
""" | |
Returns a compiled bisection implementation for ``f``. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module PartSort | |
using Base.Order | |
import Base: sort!, Sort.Algorithm | |
export PartialQuickSort | |
immutable PartialQuickSort <: Algorithm | |
k::Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Trivial GARCH implementation in python | |
# | |
# From Peter Tessin's http://www.petertessin.com/TimeSeries.pdf | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
// Copyright James Daly 2014 | |
// Compile with: gcc farkle.c -std=c99 -o farkle | |
typedef struct Leader | |
{ | |
char name[16]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
// Modified Sublime-REPL keybindings for an "R-friendly" set of shortcuts. | |
// Copy and paste this text into the Key Bindings - User (under Preferences menu). | |
// For more information, see http://tomschenkjr.net/2012/05/17/using-sublime-text-2-for-r/ | |
// Executes a selection of text in REPL, latter only displays code and does not execute | |
{ "keys": ["ctrl+shift+r"], "command": "repl_transfer_current", "args": {"scope": "selection"}}, | |
{ "keys": ["ctrl+shift+r", "r"], "command": "repl_transfer_current", "args": {"scope": "selection", "action":"view_write"}}, | |
// Executes the entire file (build) in REPL, latter only displays code and does not execute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pkg.add("Gadfly") | |
Pkg.add("HTTPClient") | |
Pkg.add("JSON") | |
Pkg.add("RDatasets") | |
using Gadfly | |
using HTTPClient.HTTPC | |
using JSON | |
using RDatasets |
Useful links:
- https://cran.rstudio.com/web/packages/dplyr/vignettes/introduction.html
- https://www.rstudio.com/wp-content/uploads/2015/02/data-wrangling-cheatsheet.pdf
- https://s3.amazonaws.com/assets.datacamp.com/img/blog/data+table+cheat+sheet.pdf
- http://pandas.pydata.org/pandas-docs/stable/comparison_with_r.html
- https://dato.com/products/create/docs/generated/graphlab.SFrame.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Duluth", | |
"reference": { | |
"marker.color": | |
["rgb(0,116,217)", | |
"rgb(255,65,54)", | |
"rgb(133,20,75)", | |
"rgb(255,133,27)", | |
"rgb(255,220,0)", | |
"rgb(61,153,112)"], |
OlderNewer