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
sed '1 d' jan2017articles.csv > jan17no_headers.csv |
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
sort -nr -t$'\t' -k8 jan20only.tsv | head -n 1 | |
# 20 Jan 2017 Article Tracy Miranda How is your community promoting diversity? 1 /article/17/1/take-action-diversity-tech Diversity and inclusion 1007 |
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
cut -d',' -f3 jan17no_headers.csv > authors.txt |
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
sort authors.txt | uniq -c > authors-sorted.txt |
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
tail -n3 authors-sorted.txt | |
# 1 Tracy Miranda | |
# 1 Veer Muchandi | |
# 3 VM (Vicky) Brasseur |
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
awk -F "\t" '{print $3 " " $NF}' jan20only.tsv | |
# Kushal Das 690 | |
# D Ruth Bavousett 218 | |
# Jason Baker 214 | |
# Tracy Miranda 1007 |
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
// ES5 Event Emitter Example | |
var events = require('events').EventEmitter; | |
var emitter = new events.EventEmitter(); | |
emitter.on('newEvent', function(user){ | |
console.log(user); | |
}); | |
emitter.emit('newEvent', "Sukma Saputra"); |
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
emitter.on('newEvent', function(user){ | |
console.log(user); | |
}); |
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
emitter.emit('newEvent', "Sukma Saputra"); |
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; | |
var util = require('util'); | |
var User = function(username){ | |
this.username = username; | |
} | |
util.inherits(User, EventEmitter); | |
var user = new User('Krunal Lathiya'); | |
user.on('nuevent', function(props){ | |
console.log(props); |