This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import functools | |
import unittest | |
import mock | |
__inputoutput__ = "__inputoutput__" | |
def with_inputs(input, output, identifier=None): | |
def decorator(f): | |
try: | |
io = getattr(f, __inputoutput__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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!') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <assert.h> | |
#include <stdio.h> | |
#include <time.h> | |
#include <liberasurecode/erasurecode.h> | |
typedef struct { | |
char * backend; | |
size_t chunk_size; | |
size_t total_size; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import unicode_literals | |
import argparse | |
import cmd | |
import hashlib | |
import shlex | |
import socket | |
try: | |
import readline # noqa |
NewerOlder