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
dmckinley@dmckinley $ hadoop fs -ls /logs.etsy.com/event_logs/2013_01_30 | awk '{ sum += $5 } END { print sum / 1024 / 1024 }' | |
74042.1 |
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
14 97954900 | |
16 96457161 | |
32 95590098 | |
28 93552850 | |
9 89226804 | |
34 86835728 | |
8 84536021 | |
33 80861650 | |
22 79238941 | |
18 78353033 |
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
// Purchases: these cause a proliferation of events because there | |
// are a minimum of three entities in the system that people can | |
// be interested in that take part: the buyer, the shop, and the | |
// item. | |
// | |
// For consistency we'll generate all of these activities, but it | |
// wouldn't make sense to display all of them. People interested | |
// in an item would see (item, purchased_by, buyer). People | |
// interested in a shop would see (shop, sold_to, buyer), maybe | |
// aggregated to show several sales. People interested in a |
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
(eval-when-compile (require 'cl)) | |
(require 'w3m-load) | |
(require 'w3m) | |
(require 'dom) | |
(require 'php-mode) | |
(setq w3m-use-cookies t) | |
(defvar *url-handlers* |
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
(require 'php-mode) | |
(defun progmode-defaults () | |
(interactive) | |
(enable-tab-completion) | |
(column-number-mode t) | |
(linum-mode t) | |
(setq tab-width 4) | |
(setq c-basic-offset 4) | |
(column-marker-1 81) |
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
#!/bin/bash | |
for f in `ls -la /etc/alternatives/ | grep java | cut -f 13 --delimiter=' '` | |
do | |
alt="/usr/java/jdk1.6.0_20/bin/$f"; | |
if [ -f $alt ]; then | |
echo "installing $alt" | |
sudo alternatives --install /usr/bin/$f $f $alt 20000 | |
fi | |
done |
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
/** | |
* This method enables syntax such as the following: | |
* | |
* <pre> | |
* string should be theSameInstanceAs anotherObject | |
* ^ | |
* </pre> | |
*/ | |
def should(beWord: BeWord): ResultOfBeWordForAnyRef[String] = new ResultOfBeWordForAnyRef(left, true) |
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
static long | |
string_hash(PyStringObject *a) | |
{ | |
register Py_ssize_t len; | |
register unsigned char *p; | |
register long x; | |
if (a->ob_shash != -1) | |
return a->ob_shash; |
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
>>> from BeautifulSoup import BeautifulSoup as soup | |
>>> s = soup('<div>hi<span>1.2</span></div>') | |
>>> ' '.join(s.findAll(text=True)) | |
u'hi 1.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
package com.etsy | |
/** | |
* <p> | |
* Handy extensions that can mostly be traced to Haskell derangement syndrome. To | |
* use, <pre>import com.etsy.Prelude._</pre> | |
* </p> | |
*/ | |
object Prelude { |