Skip to content

Instantly share code, notes, and snippets.

View oplatek's full-sized avatar

Ondřej Plátek oplatek

View GitHub Profile
@oplatek
oplatek / gist:3958203
Created October 26, 2012 11:01
JavaScript for Latex support on blogger
<script type="text/x-mathjax-config"> MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}}); </script> <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"> </script>
#!/bin/bash
# source: https://gist.github.com/oplatek/7180425
# DEPRECATED: There is show_lattice.sh based on this script
# http://sourceforge.net/p/kaldi/code/HEAD/tree/trunk/egs/wsj/s5/utils/show_lattice.sh
# Kaldi recipes creates and stores lattices for several utterances into lat.1.gz files typically in #`exp/acoustic_model_name/decode` directory e.g.
#`exp/tri1/decode/lat1.gz`.
#This script takes two parameters: a) The gunzipped file b) the word symbol table (WST) typically stored in #`exp/acoustic_model_name/graph/words.txt` e.g. `exp/tri1/graph/words.txt`
# The script creates a pdf files displaying the words lattice for each of decoded utterance.
@oplatek
oplatek / profile_pykaldi.ipynb
Created October 30, 2013 00:02
First profiling snippet for Pykaldi. Still not finished and fully working
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oplatek
oplatek / Copy to svn
Created January 8, 2014 11:59
Simple script for mirroring the changes from git repository to svn repository. Note: Consider using git svn instead.
#!/bin/bash
gitdir=$1
svndir=$2
pushd $gitdir
git ls-files |
while read f ; do
dir_name="$svndir/`dirname $f`"
# echo $dir_name
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@oplatek
oplatek / nonprojective parser nltk
Created February 20, 2015 16:22
nonprojective parser nltk develop
{
"metadata": {
"name": "",
"signature": "sha256:947955ff46129b4f2cf4026bf234e38dac3fc59722c394c2b136612fb5d7bbf0"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@oplatek
oplatek / forwarder-2-way.py
Created March 19, 2015 10:41
forwarder-2-way.py is a simplistic implementation of publish subscribe pattern with process device in python
#!/usr/bin/env python
# encoding: utf-8
# Copyright (c) 2015, Ondrej Platek, Ufal MFF UK <oplatek@ufal.mff.cuni.cz>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@oplatek
oplatek / bashrc_local
Created July 20, 2015 08:27
Ssh agent starting on (multiple machines)
containsElement () {
local e
for e in ${@:2}; do [[ "$e" == "$1" ]] && return 0; done
return 1
}
allowed_ssh_agents=('kronos kronos-dev shrek lrc lrc1 lrc2')
agent_file_prefix="$HOME/.ssh/environment"
hostname=`hostname -s`
agent_file="${agent_file_prefix}${hostname}"
@oplatek
oplatek / broken_livedown_refresh_mathjax.md
Last active October 11, 2015 14:49
livedown minimal broken example after refresh
@oplatek
oplatek / AlexPuccioTraining.md
Created January 13, 2016 16:04 — forked from mloskot/AlexPuccioTraining.md
Alex Puccio's training overview based on interview given to TrainingBeta.com