This file contains 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
# These instructions work for OS X 10.6 with homebrew pre-installed. | |
brew install python --framework | |
brew install gfortran | |
# install other dependencies through pip: | |
pip install numpy | |
# the regular pip build for matplotlib is b0rken, and it can't find the built-in libraries for OSX | |
export LDFLAGS="-L/usr/X11/lib" |
This file contains 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
diff --git a/gamera/gui/classifier_display.py b/gamera/gui/classifier_display.py | |
index e483570..89c83c6 100644 | |
--- a/gamera/gui/classifier_display.py | |
+++ b/gamera/gui/classifier_display.py | |
@@ -164,8 +164,8 @@ class ExtendedMultiImageWindow(MultiImageWindow): | |
font.SetWeight(wx.BOLD) | |
self.titlebar_text.SetFont(font) | |
if wx.Platform != '__WXGTK__': | |
- self.titlebar_text.SetForegroundColour(wx.Color(255,255,255)) | |
- self.titlebar_text.SetBackgroundColour(wx.Color(128,128,128)) |
This file contains 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
export MEI_LOCATION="~/Documents/code/svn/mei/tags/MEI_release_2011-05/schemata/mei-2011-05-source.xml" | |
export TEI_STYLESHEETS="/usr/local/share/xml/tei/stylesheet" | |
===== /usr/local/bin/mei ===== | |
#!/usr/bin/env sh | |
/usr/local/bin/roma --localsource=$MEI_LOCATION --xsl=$TEI_STYLESHEETS $* | |
============================== | |
Usage: | |
mei modification-file.xml --options |
This file contains 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
bool MeiElement::hasChild(MeiElement *child) { | |
for (vector<MeiElement*>::iterator iter = _children.begin(); iter != _children.end(); ++iter) { | |
if((&child) == &(*iter)) { | |
return true; | |
} | |
} | |
return false; | |
} |
This file contains 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
function doSomethingWhenClicked() { | |
jQuery.ajax(<parameters>, | |
success: successFunction(params), | |
) | |
} | |
function successFunction(params) { | |
...update your div... | |
} |
This file contains 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
I'm posting this here because I had a maddening search for information about why this error occurs when trying to do certain tasks in a Boost Python binding to a C++ object: | |
TypeError: No to_python (by-value) converter found for C++ type: Element* | |
This was when trying to iterate over a vector, defined as: | |
typedef std::vector<Element*> ElementList; | |
It turns out that in your `class_<>` definitions you have to be pretty specific. I already had: |
This file contains 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 rest_framework import mixins | |
from rest_framework.generics import SingleObjectAPIView | |
from yourapp.mixins import PartialUpdateModelMixin | |
class RetrievePartialUpdateDestroyAPIView(PartialUpdateModelMixin, | |
mixins.RetrieveModelMixin, | |
mixins.UpdateModelMixin, | |
mixins.DestroyModelMixin, | |
SingleObjectAPIView): |
This file contains 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
Usage: | |
"kdu_compress ... | |
-i <file 1>[*<copies>@<size>],... {see also `-fprec' & `-icrop'} | |
One or more input files. If multiple files are provided, they must be | |
separated by commas. Any spaces will be treated as part of the file | |
name. If any filename contains the optional "*<copies>@<size>" suffix, | |
that file actually contributes <copies> inputs, where the k'th copy | |
starts (k-1)*<size> bytes into the file; this is most useful for raw | |
files, allowing a single raw file to contribute multiple image | |
components. |
This file contains 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
<mei:measure n="6" xml:id="d6959e2018" width="278"> | |
<mei:staff n="1"> | |
<mei:layer n="1"> | |
<mei:note xml:id="d6959e2020" pname="d" oct="4" dur="2" dur.ges="512" stem.dir="up" instr="P1-I1"></mei:note> | |
<mei:note xml:id="d6959e2042" pname="d" oct="4" dur="2" dur.ges="512" stem.dir="up" instr="P1-I1"></mei:note> | |
<mei:note xml:id="d6959e2064" pname="a" oct="4" dur="4" dur.ges="256" stem.dir="up" instr="P1-I1"></mei:note> | |
<mei:note xml:id="d6959e2087" pname="g" oct="4" dur="4" dur.ges="256" stem.dir="up" instr="P1-I1"></mei:note> | |
<mei:note xml:id="d6959e2104" pname="a" oct="4" dur="4" dur.ges="256" stem.dir="up" instr="P1-I1"></mei:note> | |
<mei:note xml:id="d6959e2121" pname="b" oct="4" dur="4" dur.ges="256" stem.dir="down" instr="P1-I1"></mei:note> | |
</mei:layer> |
This file contains 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
#!/bin/bash | |
NAME="imageserve" # Name of the application | |
VIRTUAL_ENV=srv_env | |
DJANGODIR=/data7/srv/webapps/imageserve2 # Django project directory | |
SOCKFILE=/tmp/imageserve.sock # we will communicte using this unix socket | |
USER=www-data # the user to run as | |
GROUP=www-data # the group to run as | |
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn | |
DJANGO_SETTINGS_MODULE=imageserve.settings # which settings file should Django use |
OlderNewer