- VP distance (with choseable kernel)
- van Rossum's distance
- Schreiber et al similarity measure -> basically equivalent to CS distance, but is a computationally more efficient implementation
- Inner-product distance measures (norm distance, Cauchy-Schwarz)
- Multi-neuron variants of VP and van Rossum distance
- Hunter-Milton Similarity
- Event synchronization
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 | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the branch/status of the current git repository | |
# * the branch of the current subversion repository | |
# * the return value of the previous command | |
# | |
# USAGE: |
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 flexmock import * | |
import numpy as np | |
import unittest | |
class FlexmockNumpyTest(unittest.TestCase): | |
def testFlexmockNumpy(self): | |
someArray = np.array([[0, 1], [2, 3]]) | |
equalToSomeArray = someArray.copy() |
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! PythonAndRopeComplete(findstart, base) | |
if a:findstart | |
let result = pythoncomplete#Complete(a:findstart, a:base) | |
let s:useRope = 1 | |
if result > 0 | |
silent! if len(pythoncomplete#Complete(0, a:base)) > 0 | |
let s:useRope = 0 | |
endif | |
endif | |
if s:useRope |
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 hamcrest.core.base_matcher import BaseMatcher | |
class Empty(BaseMatcher): | |
def _matches(self, item): | |
if hasattr(item, '__len__'): | |
return len(item) == 0 | |
elif hasattr(item, 'count'): | |
return item.count() == 0 | |
raise TypeError('%s cannot be tested for emptiness.' % ( |
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
#!/usr/bin/nev python | |
def gen_switch_typo_variants(string): | |
if len(string) < 2: | |
return [string] | |
var1 = [string[0] + v for v in gen_switch_typo_variants(string[1:])] | |
var2 = [string[1::-1] + v for v in gen_switch_typo_variants(string[2:])] | |
return var1 + var2 |
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
.*.swp | |
.ropeproject |
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
class Broadcast(list): | |
"""List which broadcasts all operations to its elements.""" | |
def __getattr__(self, name): | |
if name.startswith('__'): | |
# Necessary to allow easy casting to numpy arrays. | |
raise AttributeError( | |
"No implicit broadcast of attributes starting with '__'. Use " | |
"explicit call to broadcast().") |
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
# Some code do include nicely formatted source code listings of external | |
# files. Unfortunately, these listings will not be included using | |
# nbconvert to convert the notebook to a PDF. | |
import IPython | |
from pygments import highlight | |
from pygments.lexers import PythonLexer | |
from pygments.formatters import HtmlFormatter | |
def include_listing(filename): |
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
$pdflatex = "xelatex %O %S"; | |
$pdf_mode = 1; | |
$postscript_mode = $dvi_mode = 0; |
OlderNewer