Skip to content

Instantly share code, notes, and snippets.

View bzamecnik's full-sized avatar

Bohumír Zámečník bzamecnik

View GitHub Profile
@ASvyatkovskiy
ASvyatkovskiy / TF_replica_test.py
Created April 17, 2017 04:40
Test distributed data parallel synchronous LSTM with Tensorflow
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import math
import sys
import tempfile
import time
import os
@stared
stared / live_loss_plot_keras.ipynb
Last active October 8, 2024 00:42
Live loss plot for training models in Keras (see: https://github.com/stared/livelossplot/ for a library)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Dref360
Dref360 / TFQueueKeras.py
Last active March 16, 2020 02:24
An example of using keras with tf queues, this handle BatchNorm
import operator
import threading
from functools import reduce
import keras
import keras.backend as K
from keras.engine import Model
import numpy as np
import tensorflow as tf
import time
@darylteo
darylteo / ArrayOrObject.java
Last active November 8, 2022 10:48
Jackson Deserializer based on several StackOverflow posts.
import java.util.List;
@Data
public class ArrayOrObject<T> {
private List<T> data;
private Boolean isObject;
}
@udibr
udibr / beamsearch.py
Last active October 4, 2021 11:50
beam search for Keras RNN
# variation to https://github.com/ryankiros/skip-thoughts/blob/master/decoding/search.py
def keras_rnn_predict(samples, empty=empty, rnn_model=model, maxlen=maxlen):
"""for every sample, calculate probability for every possible label
you need to supply your RNN model and maxlen - the length of sequences it can handle
"""
data = sequence.pad_sequences(samples, maxlen=maxlen, value=empty)
return rnn_model.predict(data, verbose=0)
def beamsearch(predict=keras_rnn_predict,
@samiraguiar
samiraguiar / MC Cheat Sheet
Last active November 10, 2024 16:02 — forked from maciakl/MC Cheat Sheet
Midnight Commander Cheat Sheet / Shortcuts
Note for newcomers:
In the shortcuts below, "C" stands for CTRL and "A" stands for "ALT". This is a convention
used in the Midnight Commander documentation and was kept here.
You can also use "ESC" instead of "ALT", which is useful on Macbooks.
Main View
---------------------------------------------------------------
- File/directory operations
@endolith
endolith / readme.md
Last active January 28, 2023 05:40
Just intonation classes for music theory experiments in Python
@kazad
kazad / fourier.html
Created June 25, 2014 19:00
BetterExplained Fourier Example
<html>
<head>
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.2/underscore-min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
<script src="//ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script>
<!--
TODO:
@hanjianwei
hanjianwei / pdftitle.py
Last active September 1, 2024 19:50
Extract title from pdf file.
#!/usr/bin/env python
"""
Extract title from PDF file.
Depends on: pyPDF, PDFMiner.
Usage:
find . -name "*.pdf" | xargs -I{} pdftitle -d tmp --rename {}