This is tested on OS X 10.11.6 running on a MacBook Pro with NVIDIA GeForce GT 750M as of Tuesday, November 22, 2016; if you are note sure about your system, run
sw_vers
have b2 && | |
_b2 () { | |
local _b2_subcommands=( | |
'authorize_account' | |
'clear_account' | |
'create_bucket' | |
'delete_bucket' | |
'delete_file_version' | |
'download_file_by_id' | |
'download_file_by_name' |
#include <stdio.h> | |
int main( int argc, char *argv[] ) | |
{ | |
printf( "Salve, %s!\n" ); | |
return 0; | |
} |
$functions = <<FUNCTIONS | |
function _fixperms { | |
echo "*** Fixing /home/vagrant permissions and ownership" 1>&2 | |
chown -R vagrant:vagrant /home/vagrant | |
chmod -R go= /home/vagrant | |
} | |
function _github { | |
if ! [ -d /home/vagrant/sdt ]; then | |
echo "*** Cloning 'sdt' from GitHub" 1>&2 | |
su - vagrant -c 'hg clone git://github.com/mapio/sdt.git' |
from timeit import Timer | |
from operator import attrgetter | |
from random import randint | |
def timeit( stmt, setup ): | |
t = Timer(stmt=stmt, setup=setup) | |
print "%.2f usec/pass" % (100000 * t.timeit(number=10000)/10000) | |
class Person(object): | |
def __init__(self, age): |
import static org.junit.Assert.assertEquals; | |
import java.util.Arrays; | |
import java.util.Comparator; | |
import java.util.Iterator; | |
import java.util.List; | |
import org.junit.Test; | |
public class LexicographicListComparator { |
import java.io.File; | |
import java.io.IOException; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
import java.net.URLDecoder; | |
import java.nio.charset.Charset; | |
import java.util.List; | |
import java.util.Locale; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; |
from json import loads, dumps | |
from base64 import b64decode, b64encode | |
def relocate( conf_data, old_path, new_path ): | |
def rdt( dct ): | |
for k, v in dct.items(): | |
if isinstance( v, dict ): | |
rdt( v ) | |
else: |