Skip to content

Instantly share code, notes, and snippets.

@kastnerkyle
kastnerkyle / minibatch_ocr.py
Last active September 9, 2022 11:34
Minibatch OCR using modified CTC from Shawn Tan and Mohammad Pezeshki
"""
bitmap utils and much of the ctc code modified
From Shawn Tan, Rakesh and Mohammad Pezeshki
"""
# Author: Kyle Kastner
# License: BSD 3-clause
from theano import tensor
from scipy import linalg
import theano
import numpy as np
@Qwlouse
Qwlouse / Prepare_TIMIT.ipynb
Last active October 1, 2022 22:20
This notebook preprocesses the TIMIT dataset using MFCCs in the same way that the paper "LSTM: A Search Space Odyssey" used it.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Qwlouse
Qwlouse / lstm_reference.ipynb
Last active December 15, 2020 18:54
LSTM Reference Implementation in Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@neubig
neubig / lstm-lm.py
Last active August 23, 2017 09:18
This is a minimal implementation of training for a language model using long short-term memory (LSTM) neural networks
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This is a simplified implementation of the LSTM language model (by Graham Neubig)
#
# LSTM Neural Networks for Language Modeling
# Martin Sundermeyer, Ralf Schlüter, Hermann Ney
# InterSpeech 2012
#
# The structure of the model is extremely simple. At every time step we
@julienr
julienr / build_opencv_android.sh
Created September 18, 2014 21:52
OpenCV Android custom build multiple ABI script
#!/bin/bash
# Script to build opencv for android for multiple architectures
# Must be run from a directory that contains an 'opencv' directory with the
# opencv sources (from git or a tarball)
# Final Build to opencv/build/install
export ANDROID_NDK=$NDK
CMAKE_ARGS="-DNATIVE_API_LEVEL=14 \
-DBUILD_ANDROID_EXAMPLES=0 \
-DBUILD_ANDROID_PACKAGE=0 \
@baojie
baojie / rc.lua
Last active December 21, 2015 16:49
awesome config, with dmenu support, save as ~/.config/awesome/rc.lua
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
-- Load Debian menu entries
@jayrambhia
jayrambhia / AndroidMainfest.xml
Created March 28, 2013 19:00
First Android OpenCV Application.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.imgloader"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
@weilinear
weilinear / Makefile
Created December 1, 2012 07:21
cutil_inline.h
# Change the include line in Makefile
INCLUDES := -DCUDA_5 -I$(PYTHON_INCLUDE_PATH) -I$(NUMPY_INCLUDE_PATH) -I$(CUDA_SDK_PATH) -I./include -I./include/common -I./include/cudaconv2 -I./include/nvmatrix -I./dummyinclude/
@zed
zed / cydot.pyx
Created March 16, 2012 18:25
Naive O(N**3) 2D np.dot() multithreaded implementation (CPython extension in Cython)
#cython: boundscheck=False, wraparound=False
import numpy as np
cimport numpy as np
from cython.parallel cimport prange
def dot(np.ndarray[np.float32_t, ndim=2] a not None,
np.ndarray[np.float32_t, ndim=2] b not None,
np.ndarray[np.float32_t, ndim=2] out=None):
"""Naive O(N**3) 2D np.dot() implementation."""
@mblondel
mblondel / hmm.tex
Created July 12, 2010 14:42
Good-looking HMM and Lattice diagrams using TikZ
% (C) Mathieu Blondel, July 2010
\documentclass[a4paper,10pt]{article}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
\usepackage{lmodern}
\usepackage{amsmath}