As configured in my dotfiles.
start new:
tmux
start new with session name:
package go | |
import java.util.concurrent.{ | |
BlockingQueue => JBlockingQueue, | |
ArrayBlockingQueue => JArrayBlockingQueue | |
} | |
object Channel { | |
def empty[A]: Channel[A] = new BlockingChannel() | |
def make[A]: Channel[A] = make(1) |
#include <boost/geometry.hpp> | |
#include <boost/geometry/extensions/index/rtree/rtree.hpp> | |
#include <random> | |
#include <iostream> | |
#include <exception> | |
int main() try{ |
As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/usr/bin/env python | |
from numpy import asmatrix, asarray, ones, zeros, mean, sum, arange, prod, dot, loadtxt | |
from numpy.random import random, randint | |
import pickle | |
MISSING_VALUE = -1 # a constant I will use to denote missing integer values | |
def impute_hidden_node(E, I, theta, sample_hidden): |
// Here is a traits structure I wrote to be able to determine if a function with | |
// a given name can be called in the context defined by a signature. This was | |
// originally not possible in C++03 - or at least a one solution works everywhere | |
// did not exist AFAIK. | |
// | |
// Olivier Grant | |
// | |
#include <iostream> | |
#include <iomanip> |
#!/bin/bash | |
# Watch paths (given as arguments), automatically build when something changes. | |
# The script does a couple opinionated things to make my life easier: | |
# | |
# * Terminal scrollbuffer is reset before each iteration, simplifying scrolling. | |
# * I use a filter script to colorize gcc output (clang errors would be nicer). | |
# * Output is copied to a log file (/tmp/build.log). | |
# - I open this file in Sublime or vim, which reloads the file on change (each build). | |
# | |
# Usage: |
''' | |
chunked_server_test.py | |
Copyright August 3, 2012 | |
Released into the public domain | |
This implements a chunked server using Python threads and the built-in | |
BaseHTTPServer module. Enable gzip compression at your own peril - web | |
browsers seem to have issues, though wget, curl, Python's urllib2, my own | |
async_http library, and other command-line tools have no problems. |
#!/usr/bin/env python | |
"""Disco worker that automatically finds and sends to the nodes all the modules and packages that are used""" | |
import os | |
import sys | |
import shutil | |
import tempfile | |
import zipfile | |
import modulefinder | |
from inspect import getsourcefile, getmodule |
#include "SSLBuffer.h" | |
SSLBuffer::SSLBuffer() | |
:ssl(NULL) | |
,read_bio(NULL) | |
,write_bio(NULL) | |
,write_to_socket_callback(NULL) | |
,write_to_socket_callback_data(NULL) | |
,read_decrypted_callback(NULL) | |
,read_decrypted_callback_data(NULL) |
function toArray(args) { | |
return [].slice.call(args); | |
} | |
function autocurry(fn) { | |
var len = fn.length; | |
var args = []; | |
return function next() { | |
args = args.concat(toArray(arguments)); | |
return (args.length >= len) ? |