With the power of bash piping and a tiny python script you can see what css rules could stand to be merged into simple classes.
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 concurrent.futures | |
import multiprocessing | |
import random | |
import time | |
from functools import partial | |
def fn2(fn, chunk): | |
return [fn(*args) for args in zip(*chunk)] |
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
<!DOCTYPE html> | |
<style> | |
circle { | |
stroke: #060606; | |
} | |
body { | |
background-color: #555; | |
} |
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
def quicksort(bros): | |
if len(bros) == 0: | |
return [] | |
else: | |
first = bros[0] | |
rest = bros[1:] | |
smallerbros = quicksort([i for i in rest if i < first]) | |
biggerbros = quicksort([i for i in rest if i >= first]) | |
return smallerbros + [first] + biggerbros |
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 | |
# node.js using PPA (for statsd) | |
sudo apt-get install python-software-properties | |
sudo apt-add-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs npm | |
# Install git to get statsd | |
sudo apt-get install git |
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
// The following is a function defined in the mongo shell | |
// use transfer # switch to the transfer db | |
// t = transfer.test # save the important collection off to this temp | |
// unfortunately this is stuck to only work on july 28, 2013 | |
function show_daily_improvers(){ | |
return t.aggregate( | |
{$match:{time:{$gte:ISODate("2013-07-28"), | |
$lt:ISODate("2013-07-29")}} | |
}, |
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 com.example.util.Codec | |
import com.example.storm.bolts.IntervalBolt | |
import com.github.theon.uri.Uri.parseUri | |
class SomeBolt (serializer:Serializer, ticksBeforeFlush: Int, bufferLimit: Int) | |
extends IntervalBolt(ticksBeforeFlush) with Codec{ | |
def bufferOffInterval(input: Tuple) = ??? | |
def onInterval() = ??? |
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
// @cpdean | |
// demonstrates how to have one promise kick off | |
// an additional arbitrary number of promises, and | |
// then merge their results down again after | |
// all the promises are complete. | |
var Q = require('q'); // "q": "~1.0.0" | |
// initial query that generates seed data for more work to be done | |
function fakeQuery(){ |
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
// @cpdean | |
// demonstrates how to have one promise kick off | |
// an additional arbitrary number of promises, and | |
// then merge their results down again after | |
// all the promises are complete. | |
var Q = require('q'); // "q": "~1.0.0" | |
// initial query that generates seed data for more work to be done | |
function fakeQuery(){ |
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 contextlib | |
def a_bad(): | |
print "doing work" | |
raise IOError | |
def retry(n, f, e): | |
times = 0 |