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
------------------------------------------- | |
Time: 2016-02-17 13:50:20 | |
------------------------------------------- | |
(u'"ORD"', 12446088) | |
(u'"ATL"', 11537058) | |
(u'"DFW"', 10795479) | |
(u'"LAX"', 7721097) | |
(u'"PHX"', 6582459) | |
(u'"DEN"', 6268160) | |
(u'"DTW"', 5635414) |
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
3.9723442136498517 HA | |
5.044499594078162 AQ | |
5.672566797335321 PS | |
8.703598142334235 ML (1) | |
9.128027655975494 WN | |
9.933341238438784 F9 | |
10.344808759846858 PA (1) | |
10.53142356392608 US | |
10.584071568049064 NW | |
10.660752365340201 OO |
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
12449354 ORD | |
11540422 ATL | |
10799303 DFW | |
7723596 LAX | |
6585534 PHX | |
6273787 DEN | |
5636622 DTW | |
5480734 IAH | |
5199213 MSP | |
5171023 SFO |
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
USE mykeyspace; | |
SELECT * FROM task1_part2_group3_2 WHERE origin = 'CMI' AND through = 'ORD' AND dest = 'LAX' AND first_date = '04/03/2008'; | |
SELECT * FROM task1_part2_group3_2 WHERE origin = 'JAX' AND through = 'DFW' AND dest = 'CRP' AND first_date = '09/09/2008'; | |
SELECT * FROM task1_part2_group3_2 WHERE origin = 'SLC' AND through = 'BFL' AND dest = 'LAX' AND first_date = '01/04/2008'; | |
SELECT * FROM task1_part2_group3_2 WHERE origin = 'LAX' AND through = 'SFO' AND dest = 'PHX' AND first_date = '12/07/2008'; | |
SELECT * FROM task1_part2_group3_2 WHERE origin = 'DFW' AND through = 'ORD' AND dest = 'DFW' AND first_date = '10/06/2008'; | |
SELECT * FROM task1_part2_group3_2 WHERE origin = 'LAX' AND through = 'ORD' AND dest = 'JFK' AND first_date = '01/01/2008'; | |
$ bash question3_2.sh |
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
USE mykeyspace; | |
SELECT origin, carrier, average FROM task1_part2_group2_1 WHERE origin IN ('CMI', 'BWI', 'MIA', 'LAX', 'IAH', 'SFO'); | |
$ bash question2_1.sh | |
origin | carrier | average | |
--------+---------+--------- | |
BWI | F9 | 4.9161 | |
BWI | PA (1) | 5.9429 | |
BWI | CO | 7.1413 |
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
USE mykeyspace; | |
SELECT origin, dest, average FROM task1_part2_group2_2 WHERE origin IN ('CMI', 'BWI', 'MIA', 'LAX', 'IAH', 'SFO'); | |
$ bash question2_2.sh | |
origin | dest | average | |
--------+------+--------- | |
BWI | SAV | 0 | |
BWI | MLB | 2.3842 | |
BWI | IAD | 3.0871 |
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
USE mykeyspace; | |
SELECT origin, dest, carrier, average FROM task1_part2_group2_3 WHERE origin = 'CMI' AND dest = 'ORD'; | |
SELECT origin, dest, carrier, average FROM task1_part2_group2_3 WHERE origin = 'IND' AND dest = 'CMH'; | |
SELECT origin, dest, carrier, average FROM task1_part2_group2_3 WHERE origin = 'DFW' AND dest = 'IAH'; | |
SELECT origin, dest, carrier, average FROM task1_part2_group2_3 WHERE origin = 'LAX' AND dest = 'SFO'; | |
SELECT origin, dest, carrier, average FROM task1_part2_group2_3 WHERE origin = 'JFK' AND dest = 'LAX'; | |
SELECT origin, dest, carrier, average FROM task1_part2_group2_3 WHERE origin = 'ATL' AND dest = 'PHX'; | |
$ bash question2_3.sh |
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
function str_replace (search, replace, subject, count) { | |
// http://kevin.vanzonneveld.net | |
// + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) | |
// + improved by: Gabriel Paderni | |
// + improved by: Philip Peterson | |
// + improved by: Simon Willison (http://simonwillison.net) | |
// + revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com) | |
// + bugfixed by: Anton Ongson | |
// + input by: Onno Marsman | |
// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) |
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
var EventEmitter = require('events').EventEmitter, | |
_ = require('lodash'); | |
/** | |
* Creates an action functor object | |
*/ | |
exports.createAction = function() { | |
var action = new EventEmitter(), | |
eventLabel = "action", |
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
var { Map, List } = require('immutable'); | |
getInitialState: function() { | |
return { | |
data: Map({ input: '', messages: List() }) | |
} | |
}, | |
componentDidMount: function() { | |
this.socket = io('http://localhost:5000', { jsonp:false }); | |
this.socket.on('chat message', (msg) => { | |
// this.state.messages.push(msg); |