Skip to content

Instantly share code, notes, and snippets.

@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.
@awjuliani
awjuliani / rl-tutorial-2.ipynb
Last active May 2, 2018 18:55
Reinforcement Learning Tutorial 2 (Cart Pole problem)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fduran
fduran / Linux Bash generate a number of files of random sizes in a range
Last active May 21, 2024 12:42
Linux Bash generate a number of files of random sizes in a range
#!/bin/bash
# generate a number of files with random sizes in a range
min=1 # min size (MB)
max=10 # max size (MB)
nofiles=20 # number of files
for i in `eval echo {1..$nofiles}`
do
dd bs=1M count=$(($RANDOM%max + $min)) if=/dev/urandom of=./files/file$i