An exploratory data analysis using d3
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
# More or less direct translation of folktale.js data.task + control.async.parallel | |
# https://github.com/folktale/data.task/blob/master/lib/task.js | |
# https://github.com/folktale/control.async/blob/master/lib/core.js | |
module Monads | |
class Task | |
def self.of(x) | |
new {|_,res| res[x] } |
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
// A translation of Elm's StartApp to js + ramda + flyd | |
// for comparison see https://github.com/evancz/start-app/blob/2.0.1/src/StartApp.elm | |
// Comments welcome | |
var curry = require('ramda/src/curry'); | |
var map = require('ramda/src/map'); | |
var concat = require('ramda/src/concat'); | |
var reduce = require('ramda/src/reduce'); | |
var commute = require('ramda/src/commute'); |
This file has been truncated, but you can view the full file.
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
8004 http fetch 200 https://registry.npmjs.org/growl/-/growl-1.8.1.tgz | |
8005 silly fetchAndShaCheck shasum 4b2dec8d907e93db336624dcec0183502f8c9428 | |
8006 verbose addTmpTarball /tmp/npm-949-95ba9a63/registry.npmjs.org/growl/-/growl-1.8.1.tgz not in flight; adding | |
8007 verbose addTmpTarball already have metadata; skipping unpack for [email protected] | |
8008 silly cache afterAdd [email protected] | |
8009 verbose afterAdd /home/egjertsen/.npm/growl/1.8.1/package/package.json not in flight; writing | |
8010 silly gunzTarPerm extractEntry lib/babel/build-helpers.js | |
8011 verbose afterAdd /home/egjertsen/.npm/growl/1.8.1/package/package.json written | |
8012 info preinstall [email protected] | |
8013 http 200 https://registry.npmjs.org/jade |
You are designing a document-control system. Users create and edit documents for publication. Documents can be draft, in review, on hold, in process, or published. Users have specific roles which determine which documents they have access to, and what they are permitted to do to the documents, as the documents move through the workflow. Some users are writers, others are editors.
Expressed in plain language, the rules are:
- Writers can view their own documents regardless of status.
- Writers can create new documents.
- Writers can save new documents as draft, or to in review if certain information is included.
- update metalsmith plugins for metalsmith 1.x
- json-schema-*: consider a different implementation strategy that makes "core" less core:
- does not require pre-parsing the schema in order to dereference and validate
- allows pluggable validators through a common interface, with a default validator
- parses the schema only when building a correlation, which is where it is actually used
- correlation prototype is extendable, as now, through a plugin interface
- "model" functionality is implemented as a correlation plugin
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
# Usage: | |
# ruby sequel_dot.rb [SEQUEL-DATABASE-URI] > output.dot | |
# Or pipe directly to Graphviz: | |
# ruby sequel_dot.rb [SEQUEL-DATABASE-URI] | dot -Tgif > output.gif | |
# | |
# Note adapted from Jeremy Evans' and Rohit Namjoshi's son's code at | |
# http://sequel.heroku.com/2010/05/29/fun-with-graphviz-and-associations/ | |
# | |
# However, instead of basing graph on model associations, this uses foreign key constraints of the db tables | |
# Thus, this relies on the database adapter supporting #foreign_key_list. |
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
# Usage | |
# ruby gsubs.rb './tests/**/*.rb' | |
ARGF.replace Dir[ARGV[0]] unless ARGV.empty? | |
require 'fileutils' | |
$GSUBS = \ | |
[ | |
[ /^(\s*)(.+)\.should\s+be_true/ , '\1assert \2' ], |
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
1. Two different uses for DelegateClass [newman-scheduler] | |
2. Array() top-level function works on any Enumerable |
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
1. Building a chainable lazy-iterator interface | |
2. |