This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
# Load the MNIST digit recognition dataset into R | |
# http://yann.lecun.com/exdb/mnist/ | |
# assume you have all 4 files and gunzip'd them | |
# creates train$n, train$x, train$y and test$n, test$x, test$y | |
# e.g. train$x is a 60000 x 784 matrix, each row is one digit (28x28) | |
# call: show_digit(train$x[5,]) to see a digit. | |
# brendan o'connor - gist.github.com/39760 - anyall.org | |
load_mnist <- function() { | |
load_image_file <- function(filename) { |
javascript:(function(){var g="#gamergate";var f=function(t){return t.split(' ').map(function(w){return w.toLowerCase()==g?w:'butt'}).join(' ')};var es=document.getElementsByClassName("tweet-text");for(var i=0;i<es.length;i++){if(es[i].innerText.toLowerCase().indexOf(g)>0)es[i].innerText=f(es[i].innerText)}})() |
library("shiny") | |
x <- runApp(shinyApp( | |
fluidPage( | |
"Password:", | |
tags$input(id = "password", type = "password"), | |
actionButton("done", "Done") | |
), | |
function(input, output) { | |
observe({ |
library(dplyr) | |
library(tidyr) | |
library(magrittr) | |
library(ggplot2) | |
"http://academic.udayton.edu/kissock/http/Weather/gsod95-current/NYNEWYOR.txt" %>% | |
read.table() %>% data.frame %>% tbl_df -> data | |
names(data) <- c("month", "day", "year", "temp") | |
data %>% | |
group_by(year, month) %>% |
library(twitteR) | |
library(rlist) | |
library(pipeR) | |
library(stringi) | |
# Authenticate with twitter | |
# consumer/access keys and secrets for the twitter API must be defined elsewhere | |
setup_twitter_oauth(consumer_key, consumer_secret, access_token, access_secret) | |
# Get all my followers and followees |
ghelp <- function(topic, in_cran=TRUE) { | |
require(htmltools) # for getting HTML to the viewer | |
require(rvest) # for scraping & munging HTML | |
# github search URL base | |
base_ext_url <- "https://github.com/search?utf8=%%E2%%9C%%93&q=%s+extension%%3AR" | |
ext_url <- sprintf(base_ext_url, topic) | |
# if searching with user:cran (the default) add that to the URL |
library(purrr) | |
library(dplyr) | |
library(XML) | |
read_plist <- safely(readKeyValueDB) | |
safe_compare <- safely(compareVersion) | |
apps <- list.dirs(c("/Applications", "/Applications/Utilities"), recursive=FALSE) | |
# if you have something further than this far down that's bad you're on your own |
Data science has a really bad reputation recently. Between Facebook's privacy violations , facial scanning at kiosks in restaurants, and racism in algorithms, there are a lot of cases where surveillance, invasion of privacy, and unethical algorithms are dominating the news.
These cases are really important to make public, study, and prevent. But it's just as important to collect examples of good use cases of data science (that are not hyperbolized or PR fluff) so we can focus on those as an industry, and learn about what makes them work, as well.
Have some? Make some? Feel free to leave a comment or edit.