Skip to content

Instantly share code, notes, and snippets.

import ctypes
import os
import mmap
class Record(ctypes.Structure):
_fields_ = [('index', ctypes.c_uint64),
('key_length', ctypes.c_uint16),
('key', ctypes.c_char * 256)]
On Wed, Nov 30, 2011 at 4:07 AM, Soren Hansen <soren@linux2go.dk> wrote:
> To me, the PPA's have always been a QA tool. I wanted people willing to
> help test OpenStack to be able to do so with as little effort as
> possible.  Building packages per-commit gave us that.
...
> This is completely different from a "production" PPA. I wouldn't dream
> of pointing people to the above mentioned PPA for their production
> environment.  If someone wants to offer this outside of (but perhaps in
> cooperation with) OpenStack, that'd be great. I'd be delighted to see
> companies taking this on and offering a supported OpenStack
import mmap
import ctypes
class Record(ctypes.Structure):
_fields_ = [('index', ctypes.c_uint64),
('key', ctypes.c_char * 256)]
RECORD_COUNT = 256
#include <stdio.h>
struct args {
int someval;
int someval2;
char *someval3;
};
void _print_some_stuff(struct args a)
{
gholt Mar 14
Patch Set 1: I would prefer that you didn't submit this
swift/common/middleware/proxy_logging.py:152:9: E301 expected 1 blank line, found 0
This is called proxy_logging in some places, access-logging in others. With where it is
suggested in the pipeline, it seems like access-logging would be the proper name.
However, with this change some requests will be double-logged due to folks writing
@redbo
redbo / gist:7592814
Last active December 29, 2015 01:19
package main
import (
"fmt"
"os"
"io"
"encoding/binary"
"encoding/json"
"compress/gzip"
)
@app.route('/<path:path>', methods=['OPTIONS'])
def allow_cors(path):
resp = current_app.make_default_options_response()
resp.headers['Access-Control-Allow-Origin'] = request.headers.get('Origin')
resp.headers['Access-Control-Allow-Methods'] = 'GET, POST, PUT'
resp.headers['Access-Control-Max-Age'] = '21600'
resp.headers['Access-Control-Allow-Credentials'] = 'true'
return resp

Keybase proof

I hereby claim:

  • I am redbo on github.
  • I am redbo (https://keybase.io/redbo) on keybase.
  • I have a public key whose fingerprint is 0EBF 40E5 E95E 0703 4563 7492 EA24 317B 30C6 B4E8

To claim this, I am signing this object:

import time
import os
import uuid
import random
from swift.container.backend import ContainerBroker
from swift.common.utils import normalize_timestamp
INSERT_COUNT = 100
RECORD_COUNT = 1000
mmapped: 10.850992 seconds
malloced: 10.513761 seconds
mmapped: 9.706446 seconds
malloced: 9.711632 seconds
mmapped: 9.721822 seconds
malloced: 9.714509 seconds