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
| { | |
| "author": "tylor", | |
| "name": "csv_street_trees", | |
| "version": "0.0.0", | |
| "repository": { | |
| "url": "" | |
| }, | |
| "main": "trees.js", | |
| "engines": { | |
| "node": "~v0.4.9" |
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
| Quick and dirty word frequency analysis of the Facebook IPO filing document found here: http://www.sec.gov/Archives/edgar/data/1326801/000119312512034517/d287954ds1.htm | |
| Using command from: https://josephhall.org/nqb2/index.php/word_frequency | |
| $ tr '[A-Z]' '[a-z]' < facebook_ipo.txt | tr -cd '[A-Za-z0-9_ \012]' | tr -s '[ ]' '\012' | sort | uniq -c | sort -nr | |
| Or copy passage to clipboard and paste to command line: | |
| $ pbpaste | tr '[A-Z]' '[a-z]' | tr -cd '[A-Za-z0-9_ \012]' | tr -s '[ ]' '\012' | sort | uniq -c | sort -nr |
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 fs = require('fs'); | |
| var csv = require('csv'); | |
| var data = fs.readFileSync('all_reports.json', 'utf8'); | |
| var lines = data.split("\n"); | |
| var all = []; | |
| for (var i = 0; i < lines.length; i++) { | |
| console.log(i); | |
| var items = JSON.parse(lines[i]).items; |
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
| Map { | |
| background-color: #b8dee6; | |
| } | |
| #countries { | |
| ::outline { | |
| line-color: #85c5d3; | |
| line-width: 2; | |
| line-join: round; | |
| } |
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
| /* Full length pages, remove fancy scroll bar, and add clearfix */ | |
| #Faux:after, | |
| .Faux:after, | |
| #FauxInside:after, | |
| .FauxInside:after, | |
| #Main:after { | |
| content: "."; | |
| display: block; | |
| clear: both; | |
| visibility: hidden; |
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
| In a week of broadcast HOT 97 played 1165 tracks, which breaks down to 86 unique songs. | |
| The top 10 songs make up 55% of plays and the top 20 songs make up nearly 74% of plays. | |
| 86 "MERCY" - KANYE WEST FT BIG SEAN, PUSTA T & 2CHAINZ | |
| 86 "LEMME SEE" - USHER FEAT. RICK ROSS | |
| 80 "THE MOTTO" - DRAKE | |
| 78 "UP REMIX" - LOVERANCE FT 50 CENT, YOUNG JEEZY & T.I. | |
| 72 "COLD (SHORT)" - KANYE WEST FT DJ KHALED | |
| 56 "HANDS ON THE WHEEL" - SCHOOL BOY Q FT ASAP ROCKY | |
| 47 "LEAVE YOU ALONE" - YOUNG JEEZY |
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
| /* | |
| * Simply code to rate limit your stdout. | |
| * | |
| * Compile: | |
| * - $ gcc limit.c | |
| * Fun uses: | |
| * - $ find ~/Sites/thisisourstop/ -name "*.js" -exec cat {} \; | ./a.out 1000 | |
| * - $ ./a.out < /dev/random | |
| */ | |
| #include <stdio.h> |
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
| Some basic queries of the DriveBC incident data 2006-2011. | |
| Total incidents: 817479 | |
| Number of incidents by region: | |
| Rocky Mountain District 149174 | |
| West Kootenay District 133435 | |
| Thompson Nicola District 101701 | |
| Cariboo District 92216 |
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 csv = require('csv'); | |
| var pg = require('pg'); | |
| var connectionString = 'postgres://tylor@localhost/drivebc'; | |
| var client = new pg.Client(connectionString); | |
| client.connect(); | |
| client.query("DROP TABLE incidents"); | |
| client.query("CREATE TABLE incidents(import_id serial primary key, \"id\" varchar(255), cause varchar(255), district varchar(255), state varchar(255), severity varchar(255), localupdatetime varchar(255), advisorymessage text, isbidirectional varchar(255), trafficpattern varchar(255), head_latitude varchar(255), head_longitude varchar(255), tail_latitude varchar(255), tail_longitude varchar(255), route varchar(255), type varchar(16))"); |
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
| javascript:(function() {if(typeof jQuery=='undefined'){var j=document.createElement('script');j.type='text/javascript';j.onload=papyrus;j.src='http://is.gd/uDgzgG';document.body.appendChild(j);}else{papyrus();}function papyrus(){$('*').css({'font-family':'Papyrus'});}})(); |