View this code at http://livecoding.io/4137610
This file contains hidden or 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
{ | |
"url": "http://mynewsapp.com/article/19928034", | |
"id": "19928034", | |
"body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vitae lorem quam, a luctus quam. Proin scelerisque cursus dolor, ut iaculis urna tempus vitae.", | |
"original_body": "<b>Lorem ipsum</b> dolor sit amet, consectetur adipiscing elit. Pellentesque vitae lorem quam, a luctus quam. Proin scelerisque cursus dolor, ut iaculis urna tempus vitae. ", | |
"title": "Lorem ipsum", | |
"byline": "By Cicero", | |
"pub_date": "1011-01-04T16:00:25Z", | |
"decompositions": { | |
"sentences": [ |
This file contains hidden or 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
Backbone.sync = function(method, model, options) { | |
// we need to make sure we initialize a store, in this case | |
// we will just use a JS object. | |
var cache = {}; | |
// The size will be primarily used to assign ids to newly | |
// created models. Each time a new model is created, the size | |
// will be incremented. | |
var size = 0; |
This file contains hidden or 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
var interactive = new Miso.Storyboard({ | |
// our initial state will be loading | |
initial : 'loading', | |
scenes : { | |
loading: { | |
enter : function() { | |
// show that we are in a loading state | |
$('#loading').show(); |
This file contains hidden or 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
var data = [ | |
{ age : 23, weight : 140, height : 65 }, | |
{ age : 40, weight : 290, height : 72 }, | |
{ age : 13, weight : 110, height : 60 } | |
]; | |
var healthData = new Miso.Dataset({ | |
data: data | |
}); |
View this code at http://livecoding.io/3860275
This file contains hidden or 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
# Making R read data faster by precomputing the column | |
# data types | |
sample <- read.table("data.txt", nrows = 100) | |
types <- sapply(sample, classes) | |
allData <- read.table("data.txt", colClasses = classes) |
See example: http://jsfiddle.net/SyQYp/4/
This file has been truncated, but you can view the full file.
This file contains hidden or 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":"Abe Sapien","type":"hero","id":1339970957,"intelligence":0.88,"strength":0.14,"speed":0.35,"durability":0.42,"power":0.35,"combat":0.85,"Alternate_Identities":"Abe Sapien","Aliases":"Langdon Everett Caul, Abraham Sapien, Langdon Caul","Nicknames":"Fish Man, Fish Stick, Blue, Brother Blue","Place_of_birth":"","First_appearance":"Hellboy: Seed of Destruction (1993)","Alignment":"good","Gender":"male","Race":"Icthyo Sapien","Height_cm":"NA","Height_ft":"NA","Weight_lb":"NA","Weight_km":"NA","Skin_color":"Blue","Eye_color":"","Hair_color":"None","Occupation":"Paranormal Investigator","Base":"","Relatives":"","Group_Affiliation":"Bureau for Paranormal Research and Defense","Friends":"Hellboy, Liz Sherman","Enemies":"","superpower_Ability_Shift":0,"superpower_Absorption":0,"superpower_Accuracy":1,"superpower_Adaptation":0,"superpower_Aerokinesis":0,"superpower_Agility":1,"superpower_Animal_Attributes":0,"superpower_Animal_Oriented_Powers":0,"superpower_Animation":0,"superpower_Anti-Gravity":0,"superpower_ |