Below are the results from running this on my 2011 MacBook Pro with an Intel Core i7-2635QM CPU @ 2.00GHz.
$ make compare
time ./by-ref
7.07 real 7.05 user 0.00 sys
#deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted | |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted | |
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted | |
## Major bug fix updates produced after the final release of the | |
## distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted |
This project has moved to https://github.com/justbuchanan/i3scripts
#!/usr/bin/env python3 | |
import yaml | |
import sys | |
from collections import OrderedDict | |
""" | |
This script converts i3-style themes into xresources format. | |
i3-style can be found here: https://github.com/acrisci/i3-style. |
# Creates a binary tree of depth `d`. Each node is represented as a python `dict`, | |
# with the value of the key "leaf" as a boolean indicating whether or not the node is a leaf node. | |
def make_tree(d): | |
assert d > 0 | |
if d == 1: return {"leaf": True} | |
else: return {"leaf": False, "left": make_tree(d-1), "right": make_tree(d-1)} | |
make_tree(1) | |
# {'leaf': True} |
# Ensure clang is used, by default, over any other C++ installation (e.g. gcc). | |
build --client_env=CC=clang | |
# We require C++17, but bazel defaults to C++0x (pre-C++11). | |
build --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --client_env=BAZEL_CXXOPTS=-std=c++17 |
/bazel-* |
load("@io_bazel_rules_go//go:def.bzl", "go_binary") | |
go_binary( | |
name = "main", | |
srcs = ["main.go"], | |
cgo = True, | |
) | |
action_listener( | |
name = "my_action_listener", |
# This netctl profile is for connecting to Georgia Tech's GTwifi network | |
# Usage: | |
# 1. Copy/download it to /etc/netctl/GTwifi | |
# 2. Set the 'identity' and 'password' fields appropriately | |
# 3. Set file permissions and ownership: | |
# chown root:root /etc/netctl/GTwifi | |
# chmod 0600 /etc/netctl/GTwifi | |
Description='GTwifi' | |
Interface=wlan0 |
#!/usr/bin/env python3 | |
# data from: https://smartasset.com/taxes/heres-how-the-trump-tax-plan-could-affect-you | |
# note: this applies to single filers only | |
import matplotlib.pyplot as plt | |
import numpy as np | |
brackets_old = [ | |
(9325.0, .1), |