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-stripped.html
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<p>Python 2.7.3 (default, Aug 1 2012, 05:14:39) </p>
<p>Type &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.</p>
<p><br /></p>
<p>IPython -- An enhanced Interactive Python.</p>
<p>? -&gt; Introduction and overview of IPython's features.</p>
<p>%quickref -&gt; Quick reference.</p>
$ LLVM_CONFIG_PATH=llvm-config-3.1 python build
LLVM version = 3.1
Generate intrinsic IDs
Using PTX
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/llvm
copying llvm/ -> build/lib.linux-x86_64-2.7/llvm
bfroehle / .gitignore
Created Aug 25, 2012
Bitey Magic, an IPython extension
bfroehle /
Created Nov 8, 2012
Property decorator for the `__doc__` attribute.
"""Property decorator for the `__doc__` attribute.
Useful for when you want a custom docstring for class instances
while still showing a generic docstring for the class itself.
A naive attempt using `@property` generally breaks Sphinx as
`cls.__doc__` returns the property object itself, and not a string.
See the documentation for `docstring_property` for an example.
bfroehle / umfpack.cpp
Created Dec 6, 2012
UMFPACK Numeric/Symbolic Smart Pointer in C++
View umfpack.cpp
#include "umfpack.h"
* Smart pointer versions of the typical "void *Numeric" and
* "void *Symbolic" defintions.
* For example:
* umfpack_dl_numeric_ptr Numeric;
* umfpack_dl_numeric(..., &Numeric, ...);
* // No call to umfpack_dl_free_numeric required, as it is
#!/usr/bin/env python
import re
import requests
html = requests.get('')
all_pages_table ='<table class="mw-allpages-table-chunk">(.*)</table>',
html.content, re.DOTALL).group()
titles = re.findall(r'title="([^"]*?)"', all_pages_table)
bfroehle / scalapack.rb
Created Mar 3, 2013
ScaLAPACK Homebrew Formula
View scalapack.rb
require 'formula'
class Scalapack < Formula
homepage ''
url ''
sha1 'ff9532120c2cffa79aef5e4c2f38777c6a1f3e6a'
option 'test', 'Verify the build with make test'
option 'with-openblas', "Use openblas instead of Apple's Accelerate.framework"
bfroehle / With Magic Demo.ipynb
Last active Dec 16, 2015
%with / %endwith IPython extension
View With Magic Demo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
bfroehle /
Last active Dec 16, 2015
A script to change the screen resolution and restart Nautilus.
#!/usr/bin/env python
Change the screen resolution and restart Nautilus.
You may need to provide your VNC server with a list of available
resolutions. See:
bfroehle /
Created Jun 14, 2013
Calculate the minimal bounding box of a series of images.
#!/usr/bin/env python
"""Calculate the minimal bounding box of a series of images.
Example usage::
$ *.jpg
$ mogrify -crop 836x680+64+0 *.jpg
Requires the `identify` command which is part of ImageMagick.
You can’t perform that action at this time.