Skip to content

Instantly share code, notes, and snippets.

Bradley M. Froehle bfroehle

Block or report user

Report or block bfroehle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ipython_all_pages.py
#!/usr/bin/env python
import re
import requests
html = requests.get('http://wiki.ipython.org/Special:AllPages')
all_pages_table = re.search('<table class="mw-allpages-table-chunk">(.*)</table>',
html.content, re.DOTALL).group()
titles = re.findall(r'title="([^"]*?)"', all_pages_table)
@bfroehle
bfroehle / 00README.rst
Created Jun 13, 2012 — forked from GaelVaroquaux/00README.rst
Copy-less bindings of C-generated arrays with Cython
View 00README.rst

Cython example of exposing C-computed arrays in Python without data copies

The goal of this example is to show how an existing C codebase for numerical computing (here c_code.c) can be wrapped in Cython to be exposed in Python.

The meat of the example is that the data is allocated in C, but exposed in Python without a copy using the PyArray_SimpleNewFromData numpy

You can’t perform that action at this time.