Skip to content

Instantly share code, notes, and snippets.

View jabooth's full-sized avatar

James Booth jabooth

View GitHub Profile
@jabooth
jabooth / gitlab_ibug_hook.py
Created October 30, 2013 19:20
Pseudocode of how we might implement group permission syncing in DoC GitLab for iBUG
users # all the users in the universe
ibug_group # let's pretend this it the group that is iBUG
ibug_users # list of users that are in iBUG
def on_user_add(group, new_user):
group.add_user(new_user)
if group == ibug_group
sync_user_permissions(ibug_group)
kern.ostype = Darwin
kern.osrelease = 13.0.2
kern.osrevision = 199506
kern.version = Darwin Kernel Version 13.0.2: Sun Sep 29 19:38:57 PDT 2013; root:xnu-2422.75.4~1/RELEASE_X86_64
kern.maxvnodes = 263168
kern.maxproc = 1064
kern.maxfiles = 12288
kern.argmax = 262144
kern.securelevel = 0
kern.hostname = narsil.local
@jabooth
jabooth / qt
Created November 1, 2013 20:09
Copy of @cliffrowley's patched qt formula, with the haswell ssse3 patched removed for debugging
require 'formula'
class Qt < Formula
homepage 'http://qt-project.org/'
url 'http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-everywhere-opensource-src-4.8.5.tar.gz'
sha1 '745f9ebf091696c0d5403ce691dc28c039d77b9e'
bottle do
revision 2
sha1 'b361f521d413409c0e4397f2fc597c965ca44e56' => :mountain_lion
@jabooth
jabooth / compilers_only
Last active December 27, 2015 05:08
Full gory details of attempted install of qt on haswell rMBP 2013
c++ -c -o project.o -arch i386 -pipe -DQMAKE_OPENSOURCE_EDITION -fconstant-cfstrings -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -Igenerators/integrity -I/private/tmp/qt-LVhU/include -I/private/tmp/qt-LVhU/include/QtCore -I/private/tmp/qt-LVhU/src/corelib/global -I/private/tmp/qt-LVhU/src/corelib/xml -I/private/tmp/qt-LVhU/tools/shared -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/private/tmp/qt-LVhU/mkspecs/unsupported/macx-clang -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DEPRECATED project.cpp
c++ -c -o property.o -arch i386 -pipe -DQMAKE_OPENSOURCE_EDITION -fconstant-cfstrings -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -Igenerators/integrity -I/private/tmp/qt-LVhU/include -I/private/tmp/qt-LVhU/include/QtCore -I/private/tmp/qt-LVhU/src/corelib/global -I/p
@jabooth
jabooth / closure.ipynb
Created January 15, 2014 15:20
Short example of closure in Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jabooth
jabooth / OS X %matplotlib qt bug.ipynb
Created February 2, 2014 15:37
OS X %matplotlib qt bug
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jabooth
jabooth / %matplotlib qt
Created April 4, 2014 12:54
Library not loaded: /usr/local/lib/libpng15.15.dylib upon %matplotlib qt -> solution -> brew reinstall libpng qt
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-6ad73d0e50c7> in <module>()
----> 1 get_ipython().magic(u'matplotlib qt')
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
2203 magic_name, _, magic_arg_s = arg_s.partition(' ')
2204 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2205 return self.run_line_magic(magic_name, magic_arg_s)
2206
@jabooth
jabooth / ibug68.txt
Last active August 29, 2015 14:02
IBUG 68 annotation template for landmarkerio-server
jaw 17
0:16
left_eyebrow 5
0:4
right_eyebrow 5
0:4
nose 9
@jabooth
jabooth / gist:4d809b780a3b70d5146c
Created July 10, 2014 13:45
extract_local_patches_fast lineprofile breaking bad image
Timer unit: 1e-06 s
File: /Users/jab08/pythondev/menpo/menpo/fitmultilevel/functions.py
Function: extract_local_patches_fast at line 67
Total time: 0.001947 s
Line # Hits Time Per Hit % Time Line Contents
==============================================================
67 def extract_local_patches_fast(image, centres, patch_shape, out=None):
68 r"""
@jabooth
jabooth / Filter triangulation.ipynb
Created July 25, 2014 14:06
How to filter a triangle list with a mask
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.