Skip to content

Instantly share code, notes, and snippets.

View t-mart's full-sized avatar

Tim Martin t-mart

View GitHub Profile
@t-mart
t-mart / gist:5165953
Created March 14, 2013 22:52
good way to get time data
#!/bin/bash
#strace
# "-e trace=some_syscall" allows you to trace just the syscalls you want.
# lotta noise otherwise. comma separated list, but
# for our experiments, it'll prolly just be 1
# syscall
# "-T" give us time data
#
# "program arg0 arg1" is the program we want to trace. this'll likely be
curl "https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py" | sudo python3.3
curl "https://raw.github.com/pypa/pip/master/contrib/get-pip.py" | sudo python3.3
sudo pip install virtualenv
class Node(object):
def __init__(self, name, lc=None, rc=None):
self.name = name
self.lc = lc
self.rc = rc
self.rn = None
# THE MEAT OF THE PROBLEM
@staticmethod
def link_rn(level_list):
def list_condense(l):
run_start = None
in_run = False
last_item = None
out = ''
while len(l):
item = l.pop(0)
if not in_run:
run_start = item
@t-mart
t-mart / README.md
Last active August 29, 2015 14:07 — forked from mbostock/.block

For continuous data such as time series, a streamgraph can be used in place of stacked bars. This example also demonstrates path transitions to interpolate between different layouts. Streamgraph algorithm, colors, and data generation inspired by Byron and Wattenberg.

.pie_arc {
font-size: 0.75em;
}
.distillery {
font-weight: bold;
}
#svg {
text-align: center;
@t-mart
t-mart / foo.v
Last active August 29, 2015 14:08
module pipeRegister(clk, reset,
stall,
regWrEnIn, memWrEnIn, mulSelIn, aluOutIn, PCIn, instrTypeIn, isBranchTakenIn,
regWrEnOut, memWrEnOut, mulSelOut, aluOutOut, PCOut, instrTypeOut, isBranchTakenOut
);
parameter BIT_WIDTH = 32;
input clk, reset;
input stall;
local function difference(after, before)
return after - before
end
local function hms(seconds)
local hours = floor(seconds / 3600)
local minutes = floor((seconds % 3600) / 60)
local sec = floor(seconds % 60)
return hours, minutes, sec
end
From 49f5b2cb90dba546fc93e045311cf9f1d273050d Mon Sep 17 00:00:00 2001
From: Tim Martin <tim@timmart.in>
Date: Sat, 17 Jan 2015 02:15:01 -0500
Subject: [PATCH] fix coloring on urxvt
---
colors/hybrid.vim | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/colors/hybrid.vim b/colors/hybrid.vim
@t-mart
t-mart / xfce_terminalrc
Created January 17, 2015 11:01
terminal config for xfce's terminal (i.e. xubuntu) styled a la vim-hybrid (https://github.com/w0ng/vim-hybrid). put this in $HOME/.config/xfce4/terminal/terminalrc
[Configuration]
FontName=DejaVu Sans Mono 8
MiscAlwaysShowTabs=FALSE
MiscBell=FALSE
MiscBordersDefault=TRUE
MiscCursorBlinks=FALSE
MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK
MiscDefaultGeometry=80x24
MiscInheritGeometry=FALSE
MiscMenubarDefault=TRUE