Skip to content

Instantly share code, notes, and snippets.

View tipabu's full-sized avatar

Tim Burke tipabu

  • San Francisco, CA
View GitHub Profile
#!/usr/bin/env python
import struct
import sys
import zlib
def check_archive(fragment_archive):
with open(fragment_archive, 'rb') as fp:
meta = fp.read(59)
if len(meta) != 59:
raise ValueError('Incomplete metadata!')
import base64
import json
files = {'c/o': {'name': 'tox.ini', 'size': 3935},
'c/o2': {'name': 'setup.cfg', 'size': 4396}}
def tar_padding(sz):
return '\x00' * (512 - (sz - 1) % 512 - 1)
def tar_header(v):
import json
import os
import pprint
import random
import time
from pyeclib import ec_iface
def get_timings(driver, all_slots, repeats, failures, pred=None):
data = os.urandom(1 << 20)
#!/usr/bin/env python
from __future__ import division
import argparse
from collections import defaultdict, OrderedDict
import json
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter
from operator import itemgetter
import numpy as np
@tipabu
tipabu / rs_vand.go
Last active July 18, 2017 22:14
Testing ISA-L RS Vand Invertibility
package main
/*
#cgo CFLAGS: -I/usr/local/include
#cgo LDFLAGS: /usr/local/lib/libisal.a
#include <stdlib.h>
#include <string.h>
#include <isa-l.h>
*/
import "C"
import functools
import unittest
import mock
__inputoutput__ = "__inputoutput__"
def with_inputs(input, output, identifier=None):
def decorator(f):
try:
io = getattr(f, __inputoutput__)
@tipabu
tipabu / healthcheck_stats.py
Last active October 9, 2020 23:39 — forked from clayg/healthcheck_stats.py
keep an eye on things
import argparse
import sys
import subprocess
from swift.common.utils import get_logger
from threading import Thread
import time
import socket
import os
import ssl
@tipabu
tipabu / .gitignore
Last active October 16, 2020 19:35 — forked from clayg/.gitignore
Troll the disks for async_pendings and gather some stats
/*.json