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
| #!/bin/bash | |
| # Script for installing tmux on systems where you don't have root access. | |
| # tmux will be installed in $HOME/local/bin. | |
| # It's assumed that wget and a C/C++ compiler are installed. | |
| # exit on error | |
| set -e | |
| TMUX_VERSION=1.8 |
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
| CC=gcc-4.9 CXX=g++-4.9 luarocks install cutorch |
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
| license: gpl-3.0 |
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
| function save_jld( file, varargin ) | |
| Jl.eval('using JLD') | |
| arguments = cell(2*length(varargin), 1); | |
| for ii = 1:length(varargin) | |
| arguments{2*(ii-1) + 1} = inputname(1 + ii); | |
| arguments{2*(ii-1) + 2} = varargin{ii}; | |
| end |
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
| using PyCall | |
| import Base.next | |
| import Base: sigatomic_begin, sigatomic_end | |
| #overwrite 'next' definition in PyCall | |
| function next(po::PyObject, s) | |
| sigatomic_begin() | |
| try | |
| nxt = PyObject(ccall((PyCall.@pysym :PyIter_Next), PyPtr, (PyPtr,), s[2])) | |
| return (s[1], (nxt, s[2])) # No conversion to PyAny |
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 pystruct.models.base import StructuredModel | |
| import numpy as np | |
| import types | |
| class ExternalModel(StructuredModel): | |
| """Interface definition for Structured Learners. | |
| This class defines what is necessary to use the structured svm. | |
| You have to implement at least joint_feature and inference. | |
| """ | |
| def __init__(self, size_joint_feature=None, joint_feature=None, |
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
| import types | |
| class Test(object): | |
| def __init__(self, method): | |
| self.fruit = "apple" | |
| self.method = types.MethodType(method, self) | |
| def method(self): | |
| print self.fruit |
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
| // Maxim : copied from macintosh_vndr/fr and modified to suit Logitech K760 french keyboard layout | |
| // put in /usr/share/X11/xkb/symbols/fr | |
| // select with setxkbmap -device 14 -layout fr -variant ipad | |
| // [email protected] 19-sep-1998 | |
| // modifications : Etienne Herlent <[email protected]> june 2000 | |
| // adapted to the new input layer : | |
| // Martin Costabel <[email protected]> 3-jan-2001 | |
| // adapted for Latin9 alphabet (ISO-8859-15): | |
| // Etienne Herlent <[email protected]> march 2005 |