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
Russells-MacBook-Pro-OLD:~ rjurney$ ssh chimpy@localhost -p 9122 | |
Warning: Permanently added '[localhost]:9122' (RSA) to the list of known hosts. | |
chimpy@localhost's password: | |
Last login: Sun Nov 23 04:42:12 2014 from 172.17.0.13 | |
chimpy@worker00:~$ df -h | |
Filesystem Size Used Avail Use% Mounted on | |
rootfs 19G 16G 1.5G 92% / | |
none 19G 16G 1.5G 92% / | |
tmpfs 2.7G 0 2.7G 0% /dev | |
shm 64M 8.0K 64M 1% /dev/shm |
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
sorted_asset_views = FOREACH (GROUP thing_views BY user_id) { | |
sorted_by_time_ids = ORDER thing_views BY datetime_viewed DESC; | |
most_recent_100 = LIMIT sorted_by_time_ids 100; | |
sorted_recent_100 = ORDER most_recent_100 BY datetime_viewed; | |
GENERATE group AS user_id, sorted_recent_100.(asset_id, asset_title, series_title, datetime_viewed) AS sorted_by_time_ids; | |
}; |
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
Russells-MacBook-Pro-OLD:marketing_web rjurney$ bundle install | |
Your jruby version is 1.7.19, but your Gemfile specified jruby 1.7.18 | |
Russells-MacBook-Pro-OLD:marketing_web rjurney$ rvm use jruby-1.7.18 | |
Using /Users/rjurney/.rvm/gems/jruby-1.7.18 | |
Russells-MacBook-Pro-OLD:marketing_web rjurney$ jruby -v | |
jruby 1.7.19 (1.9.3p551) 2015-01-29 20786bd on Java HotSpot(TM) 64-Bit Server VM 1.7.0_40-b43 +jit [darwin-x86_64] | |
Russells-MacBook-Pro-OLD:marketing_web rjurney$ which jruby | |
/Users/rjurney/.rvm/rubies/jruby-1.7.18/bin/jruby |
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
import sys, os, re | |
line = sys.stdin.readline() | |
columns = line.rstrip("\n").split("|") | |
load_statement = "full_dump = LOAD 'data/FullDump_clean.csv' AS (\n" | |
for column in columns: | |
load_statement += "\t{}:chararray, \n".format(column) | |
load_statement = load_statement[:-3] | |
load_statement += "\n);" | |
print load_statement |
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 addRow = function() { | |
} | |
$("#plus_button_1").click(addRow); | |
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 people = [{Name: 'Tom', Age: 15, Location: 'Port Jefferson'}, | |
{Name: 'Jen', Age: 30, Location: 'Huntington'}, | |
{Name: 'Diana', Age: 5, Location: 'Huntington'}]; | |
console.log(jinqJs().from(people).groupBy('Location').sum('Age').orderBy([{field: 'Age', sort: 'desc'}]).select()); | |
[Object, Object] | |
0: Object | |
Age: 35 |
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
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.BufferedInputStream; | |
import java.io.FileInputStream; | |
import java.nio.ByteBuffer; | |
import java.nio.channels.FileChannel; |
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
import java.io.FileInputStream; | |
import java.nio.ByteBuffer; | |
import java.nio.channels.FileChannel; | |
import org.bson.BsonBinaryReader; | |
// Setup BSON Reading of MongoDB mongodump data | |
filename = "/Users/rjurney/Software/marketing/dump/relato/companies.bson"; | |
fIn = new FileInputStream(filename); | |
fChan = fIn.getChannel(); |
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
k = 3 | |
nodes = {} | |
cgraph = graph.copy() | |
changes = True | |
while changes is not False: | |
changes = False | |
for node in cgraph.nodes(): | |
if cgraph.in_degree(node) < k: | |
cgraph.remove_node(node) | |
changes = True |
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
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
4 accenture.com 0.00302655705823 | |
4 tibco.com 0.00242683250068 | |
4 capgemini.com 0.00241365642793 | |
4 salesforce.com 0.00237525137745 | |
4 cognizant.com 0.00210109531292 | |
4 opentext.com 0.0019762154224 | |
4 carahsoft.com 0.00174258359131 | |
4 redlinetrading.com 0.00156127741025 | |
4 infor.com 0.00155154297355 | |
4 ciber.com 0.00153249268069 |