I hereby claim:
- I am vu3jej on github.
- I am jithesh (https://keybase.io/jithesh) on keybase.
- I have a public key whose fingerprint is CEDA 260C C5C3 EBF1 C93F 52C0 2575 6817 D003 9D97
To claim this, I am signing this object:
{ | |
"name": "demo1", | |
"count": 100, | |
"frequency": "Manual Crawl", | |
"version": 2, | |
"newdata": true, | |
"lastrunstatus": "success", | |
"lastsuccess": "Sun Feb 15 2015 19:10:38 GMT+0000 (UTC)", | |
"thisversionstatus": "success", | |
"thisversionrun": "Sun Feb 15 2015 19:10:38 GMT+0000 (UTC)", |
function transform(data) { | |
// Sort according to location | |
for(var collection in data.results) { | |
data.results[collection].sort(function(a, b) { | |
return a.location.localeCompare(b.location); | |
}); | |
} | |
{ | |
"name": "demo1", | |
"count": 100, | |
"frequency": "Manual Crawl", | |
"version": 2, | |
"newdata": true, | |
"lastrunstatus": "success", | |
"lastsuccess": "Sun Feb 15 2015 19:10:38 GMT+0000 (UTC)", | |
"thisversionstatus": "success", | |
"thisversionrun": "Sun Feb 15 2015 19:10:38 GMT+0000 (UTC)", |
class Spell(object): | |
def __init__(self, incantation, name): | |
self.name = name | |
self.incantation = incantation | |
def __str__(self): | |
return self.name + ' ' + self.incantation + '\n' + self.getDescription() | |
def getDescription(self): | |
return 'No description' |
I hereby claim:
To claim this, I am signing this object:
## Libraries | |
require(XML) | |
require(stringr) | |
## Read in the file | |
doc <- htmlTreeParse(file = '27 March to 10 April OTT.mbox.html', useInternalNodes = TRUE) | |
## Do some random crazy stuff | |
mail.list <- sapply(getNodeSet(doc, "//td[2]"), xmlValue) |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
#first attempt at implementing horizon plots in ggplot2 | |
#pleased with result but code sloppy and inflexible | |
#as always very open to improvements and forks | |
require(ggplot2) | |
require(reshape2) | |
require(quantmod) | |
require(PerformanceAnalytics) | |
require(xtsExtra) |
This example shows how to use the d3.hexbin plugin for hexagonal binning on a map with the d3.geo.albersUsa
projection. Approximately 3,000 locations of Walmart stores are shown. These are binned into hexagons, and the hexagon area encodes the number of stores that fall into each bin. Color encodes the median age of Walmart stores in that area, with the oldest stores in black and the youngest stores in blue. Inspired by earlier work by Zachary Forest Johnson.
for filename in $(find . -type f -print); do du -s "$filename"; done |