Generating some data first:
# R version 3.3.0
require(data.table) ## 1.9.7, commit 2433, github
require(dplyr) ## devel, commit 3189, github
Clearly ES6 is a huge improvement over ES5, and tools like [6to5][] allow us to use these cool features now. I was reading [Replace CoffeeScript with ES6][replace coffeescript] by [Blake Williams][] and thought it was a great summary of how ES6 solves many of the same problems that CoffeeScript solves; however I'd like to comment on a few of Blake's points and talk about why I'll be sticking with CoffeeScript.
Classes in ES6 (like many of the syntax changes in ES6) are very similar to the CoffeeScript equivalent. To support browsers that are not fully ES5 compliant (e.g. IE8-), however, we still can't really use getters/setters, so ignoring these the comparison is:
Thanks for all the stars.
Due to unexpected demand, I move this to a proper github repo, see here: https://github.com/chroth7/reactD3resources
I would very much like to get your PRs there, thank you!
var Comment = {} | |
Comment.store = Store('Comment') | |
Comment.fetchForPost = function (postId) { | |
return m.request({ method: 'GET', url: '/api/post/' + postId + '/comments' }) | |
.then(Comment.store.syncAll) | |
} |
## http://polygraph.cool/films/ | |
## https://github.com/matthewfdaniels/scripts | |
x <- "https://raw.githubusercontent.com/matthewfdaniels/scripts/master/data/character_list5.csv" | |
characters <- read.csv(x, na.strings = c("NULL", "?"), | |
fileEncoding = "ISO-8859-1", stringsAsFactors = FALSE) | |
## some ages are clearly (negative) birth years ... oops | |
characters$age[!is.na(characters$age) & characters$age < 0] <- NA | |
characters$age[!is.na(characters$age) & characters$age > 105] <- NA |
Assuming you have:
blogdown
and Hugoblogdown:::serve_site()
, which is generated within the public
folderpublic
repository to .github.io repository in your github accountYou want to deploy your website to Netlify, which supports custom domains with HTTPS:
# This example demonstrates running furrr code distributed on 2 AWS instances ("nodes"). | |
# The instances have already been created. | |
library(future) | |
library(furrr) | |
# Two t2.micro AWS instances | |
# Created from http://www.louisaslett.com/RStudio_AMI/ | |
public_ip <- c("34.205.155.182", "34.201.26.217") |
""" | |
Remove *all* default, hard-coded, CSS classes and inline styling attached to tables when calling df.to_html(), | |
and add your own classes to each tag ad hoc. | |
This will probably be extremely simple in the future when the styling API is more mature. For now, we bleach it. | |
May need to `conda install bleach` or `pip install bleach` | |
""" | |
import pandas as pd |