A tab completion script that works for Bash. Relies on the BSD md5
command on Mac and md5sum
on Linux, so as long as you have one of those two commands, this should work.
$ gradle [TAB]
# maybe.py - a Pythonic implementation of the Maybe monad | |
# Copyright (C) 2014. Senko Rasic <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# |
import junit.framework.TestCase; | |
import org.apache.hadoop.hive.service.HiveClient; | |
import org.apache.thrift.TException; | |
import org.apache.thrift.protocol.TBinaryProtocol; | |
import org.apache.thrift.protocol.TProtocol; | |
import org.apache.thrift.transport.TSocket; | |
import java.util.List; | |
/** |
#!/bin/zsh | |
# | |
# Highlight a given file and copy it as RTF. | |
# | |
# Simon Olofsson <[email protected]> | |
# | |
set -o errexit | |
set -o nounset |
FROM ubuntu:precise | |
MAINTAINER Bohdan Mushkevych | |
# Installing Oracle JDK | |
RUN apt-get -y install python-software-properties ;\ | |
add-apt-repository ppa:webupd8team/java ;\ | |
apt-get update && apt-get -y upgrade ;\ | |
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections ;\ | |
apt-get -y install oracle-java7-installer && apt-get clean ;\ | |
update-alternatives --display java ;\ |
(ns simple-sim | |
(require [clojure.core.async :as async] | |
[clojure.tools.logging :as log] | |
criterium.core | |
[com.benmabey.clj-sim :as sim])) | |
;; Andreas' code | |
(defn event [env type val] | |
(let [rc (async/chan)] |
Slightly disorganized but reasonably complete notes on the algorithms, strategies and optimizations of the Akka Cluster implementation. Could use a lot more links and context etc., but was just written for my own understanding. Might be expanded later.
Links to papers and talks that have inspired the implementation can be found on the 10 last pages of this presentation.
This is the Gossip state representation:
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
// add this to <profile>/static/custom/custom.js to load vim keybindings: | |
$.getScript("/static/components/codemirror/keymap/vim.js", function() { | |
if (! IPython.Cell) return; | |
IPython.Cell.options_default.cm_config.keyMap = "vim"; | |
}); |
#This web site lists recent injuries for MLB players in HTML format, but requires you to click each team, etc. | |
#http://mlb.mlb.com/mlb/fantasy/injuries/ | |
#To do real data analysis, we want a shitton and don't have time to click everywhere. | |
#So our exercise is to get all available injuries into one easy to use spreadsheet. | |
#By looking at "view source" on the web site, I found that the web site actually hits another web site, which provides the injuries, trades and other info in a computer-readable format called JSON, which is basically | |
#the same as python's dictionary type. You can only get one month at a time bc there are so many. See it here: | |
#http://mlb.mlb.com/lookup/json/named.transaction_all.bam?start_date=20120301&end_date=20120401&sport_code='mlb' | |
#Our code will hit this web site repeatedly for different dates, convert the web site's content into a python object, and then write certain fields from that object to a file of the CSV format |