A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
from __future__ import division | |
import numpy | |
from uuid import uuid1 | |
class d3object: | |
def __init__(self, | |
height=100, | |
width=100, | |
topHtml='', | |
bottomHtml='', | |
style=None, |
from __future__ import print_function | |
from nanomsg import Socket, REQ, REP, PUB, SUB, DONTWAIT, \ | |
NanoMsgAPIError, EAGAIN, SUB_SUBSCRIBE | |
import time | |
from gevent import monkey | |
import gevent | |
monkey.patch_all() | |
upstream some_app_server { | |
server 127.0.0.1:9393; | |
} | |
server { | |
listen 80; | |
server_name my-upload-endpoint.com ; | |
// This systemd runs iptables-restore on boot: | |
[Unit] | |
Description=Packet Filtering Framework | |
DefaultDependencies=no | |
After=systemd-sysctl.service | |
Before=sysinit.target | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/sbin/iptables-restore /opt/docker/scripts/iptables/iptables.rules |
from itertools import ifilter | |
import sys | |
import timeit | |
REPEAT = 3 | |
EXECUTIONS = 10000 | |
VALUES = range(0, 10000) | |
def double(x): | |
return x*2 |
-- set hive.exec.reducers.bytes.per.reducer=<number> | |
-- set hive.exec.reducers.max=<number> | |
-- set mapred.reduce.tasks=<number> | |
set hive.exec.dynamic.partition.mode=nonstrict; | |
set hive.optimize.ppd=true; | |
add jar /opt/mapr/hadoop/hadoop-0.20.2/contrib/streaming/hadoop-0.20.2-dev-streaming.jar; | |
add jar /opt/jars/parquet-hive-bundle-1.2.10.jar; |
from luigi import notifications, configuration | |
import smtplib | |
import email | |
import datetime | |
def send_email(subject, message, xlsx_fn, sender, recipients): | |
if not isinstance(recipients, (list, tuple, set)): | |
recipients = [ recipients ] | |
config = configuration.get_config() |
.timeline { | |
list-style: none; | |
padding: 20px 0 20px; | |
position: relative; | |
} | |
.timeline:before { | |
top: 0; | |
bottom: 0; | |
position: absolute; |