Skip to content

Instantly share code, notes, and snippets.

View Sumith1896's full-sized avatar
🎉

Sumith Kulal Sumith1896

🎉
View GitHub Profile
@awni
awni / ctc_decoder.py
Last active April 18, 2024 19:14
Example CTC Decoder in Python
"""
Author: Awni Hannun
This is an example CTC decoder written in Python. The code is
intended to be a simple example and is not designed to be
especially efficient.
The algorithm is a prefix beam search for a model trained
with the CTC loss function.
export http_proxy=http://your_proxy.in:port/
export https_proxy=http://your_proxy.in:port/
export no_proxy="localhost,127.0.0.1,your_proxy.in"
alias docker-run="docker run -e http_proxy=$http_proxy -e https_proxy=$https_proxy -e no_proxy=$no_proxy"
alias docker-build="docker build --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy --build-arg no_proxy=$no_proxy"
@mastbaum
mastbaum / ftrapv.cpp
Created June 2, 2011 16:38
A demonstration of GCC's ftrapv flag for C++ integer overflow debugging
#include<iostream>
#include<signal.h>
#include<limits.h>
/** g++'s -ftrapv flag provides some protection against integer overflows. It
* is a little awkward to use, though. All it will do is "trap" -- you must
* provide a signal handler to deal with it.
*
* (You must compile with -ftrapv for this to work)
*/