This file contains hidden or 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
PyHeapExtensibleTypeObject MyProvider_Type = | |
{ | |
/* PyHeapTypeObject etp_heaptype */ | |
{ | |
/* PyTypeObject ht_type */ | |
{ | |
PyVarObject_HEAD_INIT(0, 0), | |
"myprovidertype", /*tp_name*/, | |
sizeof(MyProvider_Object), /* tp_basicsize */ | |
0, /* tp_itemsize */ |
This file contains hidden or 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
An IPython notebook running on Amazon EC2: | |
http://ec2-54-247-153-111.eu-west-1.compute.amazonaws.com:8888/ | |
Where to find help: | |
- numpy-discussion: http://www.scipy.org/Mailing_Lists | |
- cython-users: https://groups.google.com/forum/?fromgroups#!forum/cython-users | |
- http://scicomp.stackexchange.com | |
- http://stackoverflow.com/ |
This file contains hidden or 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
cdef extern from *: | |
void* malloc(long) | |
void free(void*) | |
double sin(double) | |
from random import randint | |
from time import clock | |
cdef extern from "time.h": | |
cdef struct timespec: |
This file contains hidden or 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
from __future__ import division | |
import numpy as np | |
import sys | |
def simulate(nitems, nslots, nsims=100): | |
k = int(np.log2(nslots)) | |
assert 2**k == nslots | |
success_count = 0 | |
for isim in range(nsims): | |
hashes = np.random.randint(2**32, size=nitems).astype(np.uint64) |
This file contains hidden or 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
/* DO NOT EDIT THIS FILE, IT IS GENERATED */ | |
/*!*/ | |
/*!*/ | |
/*!*/ | |
/*!*/ | |
/*!*/ | |
/*!*/ | |
/*!*/ #include <stdio.h> | |
/*!*/ #include <string.h> | |
/*!*/ |
NewerOlder