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/env bash | |
pkgver=1.2.21 | |
mkdir -p $VIRTUAL_ENV/src && cd $VIRTUAL_ENV/src | |
curl -O http://oligarchy.co.uk/xapian/$pkgver/xapian-core-$pkgver.tar.xz && tar xf xapian-core-$pkgver.tar.xz | |
curl -O http://oligarchy.co.uk/xapian/$pkgver/xapian-bindings-$pkgver.tar.xz && tar xf xapian-bindings-$pkgver.tar.xz | |
cd $VIRTUAL_ENV/src/xapian-core-$pkgver |
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
""" | |
This is a batched LSTM forward and backward pass | |
""" | |
import numpy as np | |
import code | |
class LSTM: | |
@staticmethod | |
def init(input_size, hidden_size, fancy_forget_bias_init = 3): |
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
"""A couple of very simple utilities for reading and writing files | |
that contain multiple JSON values. Could be useful in situations where | |
you're generating a bunch of data for later processing and then, later, | |
you want to read it in an element at a time. | |
The json module doesn't really support streaming reads, though, so this | |
is limited by that. If you need real streaming, you probably want to use | |
something like ijson: | |
http://pypi.python.org/pypi/ijson/ | |
""" |
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 Unset(object): | |
pass | |
class Item(object): | |
_cnt = 0 | |
def __init__(self, value=Unset, choice=Unset): | |
self.key = None | |
self.value = value | |
self.choice = choice |